logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
VersusRacialTypeEffect(effect, int) but for Subrace?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Tue Sep 13, 2011 18:12    Post subject: VersusRacialTypeEffect(effect, int) but for Subrace? Reply with quote

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
View user's profile Send private message
addicted2rpg



Joined: 01 Aug 2008
Posts: 106

PostPosted: Fri Sep 23, 2011 6:09    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Sep 23, 2011 22:49    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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