View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Sep 13, 2011 18:12 Post subject: VersusRacialTypeEffect(effect, int) but for Subrace? |
|
|
Is it at all feasible to make
VersusRacialTypeEffect(effect, int)
Work for Subraces?
Eg - It would be great if we could make Spell Effects etc, affect other players, only if they are certain subraces - I know this can be done via spellhooking, however, some effects such as Sanctuary etc, are a 'All or Nothing' effect.
for example...
nwnx funcs has
struct gameeffect_s NWNXFuncs_EffectSanctuary(string sCreator, int iSpellID, int nDifficultyClass, int nVsRace=RACIAL_TYPE_ALL) {
struct gameeffect_s e;
e.Type = 0x3F;
e.Creator = sCreator;
e.SpellID = iSpellID;
e.NumInts = 6;
e.Ints = "8 "+IntToString(nVsRace)+" 0 0 "+IntToString(nDifficultyClass)+" 1";
return e;
}
Allowing you to create a custom Sanctuary effect that would make you invisible against 'Undead' for example.
However, it would be great to make an effect for Players of certain subraces, to make them invisible to other players of other subraces.
Does anyone know if such a thing could be done easilly via nwnx?
I suppose it probably is a complex change.
The vsRacial argument is an int value,
Subraces are strings.
The only way I can think of handling it, would be to make a table object of some sort, and then hook the handling of effects, to check if the effect should affect said players etc.
Similar to how visibility works |
|
Back to top |
|
|
addicted2rpg
Joined: 01 Aug 2008 Posts: 106
|
Posted: Fri Sep 23, 2011 6:09 Post subject: |
|
|
When you mention invisiblity vs. others, assuming a PW environment where you're not just overriding OnPerception scripts for NPCs, it seems a bit non-trivial.
Truth be told, I've never considered messing around with player perception much. It might make a great darkness bug fix in the making
I would suspect there is some kind of code the masterminds all the "who can see who" thing with all the stealth, true sight, invis, roll checks, etc.. mechanics going on. I wouldn't know where to find it in the debugger though. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Sep 23, 2011 22:49 Post subject: |
|
|
There is NWNX Visibility for that. I think MaxRock ported it to Windows as part of nwnx_funcs. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|