Hello all. I don't know if this is the correct sub-forum, but I have a request:
I'm playing a warlock in a PW, who can cast Walk Unseen (invisibility for 24 h). The problem is that I don't have any dispel available yet, so if I want to get rid of my invisibility (to talk to other players or something), I can only do so by attacking someone or something.
I'd like to know if a self-dispel command (or item, or whatever) can be done. I was told someone made it once, but the administrators of the PW don't remember who or how. I'm no scripter, but I can report to them if someone here knows how to do this. Thanks.
Self-Dispel
Débuté par
Arkalezth
, juil. 08 2011 09:08
#1
Posté 08 juillet 2011 - 09:08
#2
Posté 08 juillet 2011 - 11:00
hey Ark,
this is one of the things that irks me 'bout NwN2. I remember playing games where you can click on the buff's icon and it would dissipate, like that. Unfortunately the icons here don't actually represent the buffs themselves, but as ya know the bonuses or other pseudo-tangible effects.
I'm gonna make a guess and suggest that an xml-Gui window could be coded up and populated with current effects on a PC, and by clicking on such a list it could be removed. a foreseen difficulty, might be making sure that buff scripts use EffectLinkEffects() properly .. strikes me as a semi-major task, but an interesting Perk for a PW, eh.
edit, maybe in a year or two ....
this is one of the things that irks me 'bout NwN2. I remember playing games where you can click on the buff's icon and it would dissipate, like that. Unfortunately the icons here don't actually represent the buffs themselves, but as ya know the bonuses or other pseudo-tangible effects.
I'm gonna make a guess and suggest that an xml-Gui window could be coded up and populated with current effects on a PC, and by clicking on such a list it could be removed. a foreseen difficulty, might be making sure that buff scripts use EffectLinkEffects() properly .. strikes me as a semi-major task, but an interesting Perk for a PW, eh.
edit, maybe in a year or two ....
Modifié par kevL, 08 juillet 2011 - 11:11 .
#3
Posté 08 juillet 2011 - 11:18
Creating an item shouldn't be too difficult to activate a custom dispel on self.
The only thing that will need to be done is have a way to have it sort through the effects cause by the player & faction members an only remove those. Else it would be exploited.
The only thing that will need to be done is have a way to have it sort through the effects cause by the player & faction members an only remove those. Else it would be exploited.
#4
Posté 08 juillet 2011 - 11:22
Thanks for the replies.
@kevL: Now that I think of it, the Warlock's Buddy does that, you click and get all buffs applied or dispelled (not individual buffs, but it might work). The problem is that the Buddy isn't allowed there, but maybe it can be tweaked in some way?
An item could work too, if those problems Shaughn mentions are solved.
@kevL: Now that I think of it, the Warlock's Buddy does that, you click and get all buffs applied or dispelled (not individual buffs, but it might work). The problem is that the Buddy isn't allowed there, but maybe it can be tweaked in some way?
An item could work too, if those problems Shaughn mentions are solved.
Modifié par Arkalezth, 08 juillet 2011 - 11:32 .
#5
Posté 08 juillet 2011 - 11:30
Shaughn et al.
could the SpellID be used to retrieve the name of the actual buff? It would make things much clearer to a player, whether using an Item-dialog or a Gui-box .. and maybe buff scripts would have to be tweaked to store the Caster as a variable (for test Faction equal)
could the SpellID be used to retrieve the name of the actual buff? It would make things much clearer to a player, whether using an Item-dialog or a Gui-box .. and maybe buff scripts would have to be tweaked to store the Caster as a variable (for test Faction equal)
#6
Posté 08 juillet 2011 - 11:31
This isn't tested but something like this should work. It will remove all effects on a player that are cast by the same faction members. Unfortunately this script is an all or nothing, so you may loose a few other buffs as well.
An item will need to be created with the ref "dispel_faction_effects". It will need the cast spell, unique power on self property.
// i_dispel_faction_effects_ac -script name-
void main()
{
object oPC = GetItemActivator();
object oItem = GetItemActivated();
object oTarget = GetItemActivatedTarget();
location lTarget = GetItemActivatedTargetLocation();
effect eLoop = GetFirstEffect(oPC);
object oOrigin;
while(GetIsEffectValid(eLoop))
{
oOrigin = GetEffectCreator(eLoop);
if(GetIsObjectValid(oOrigin) && GetFactionEqual(oPC,oOrigin) == TRUE)
{
RemoveEffect(oPC,eLoop);
}
eLoop = GetNextEffect(oPC);
}
}
This could also be limited to just the player created effects by changing the if line:
if(GetIsObjectValid(oOrigin) && oOrigin == oPC)
An item will need to be created with the ref "dispel_faction_effects". It will need the cast spell, unique power on self property.
// i_dispel_faction_effects_ac -script name-
void main()
{
object oPC = GetItemActivator();
object oItem = GetItemActivated();
object oTarget = GetItemActivatedTarget();
location lTarget = GetItemActivatedTargetLocation();
effect eLoop = GetFirstEffect(oPC);
object oOrigin;
while(GetIsEffectValid(eLoop))
{
oOrigin = GetEffectCreator(eLoop);
if(GetIsObjectValid(oOrigin) && GetFactionEqual(oPC,oOrigin) == TRUE)
{
RemoveEffect(oPC,eLoop);
}
eLoop = GetNextEffect(oPC);
}
}
This could also be limited to just the player created effects by changing the if line:
if(GetIsObjectValid(oOrigin) && oOrigin == oPC)
Modifié par Shaughn78, 08 juillet 2011 - 11:34 .
#7
Posté 08 juillet 2011 - 11:33
Ok, that's beyond my comprension, so I'll tell the PW administrators to take a look at this thread. Thanks both.
Just for the record, my current dispelling system is: summon zombie, blast zombie, unsummon zombie. Or just blast a chair or something (I've already "accidentally" destroyed some object doing this). Both ways look pretty stupid when seen.
Just for the record, my current dispelling system is: summon zombie, blast zombie, unsummon zombie. Or just blast a chair or something (I've already "accidentally" destroyed some object doing this). Both ways look pretty stupid when seen.
#8
Posté 08 juillet 2011 - 03:39
I've thought of this issue before. Unfortunately, even having access to a dispel ability is not a total solution. You can use any dispelling spell to automatically remove any area effects you've cast; if I'm playing a caster that uses AoEs, I do always keep a dispel handy for this purpose. However, this does not work with targeting yourself or another creature (friend or foe) partly because there isn't any way to determine which spell you're looking to remove.
In PnP, you can choose to automatically succeed on a dispel check against your own spells. How to best implement this in NWN2 is not a simple question. A GUI-based approach does seem best, perhaps requiring you to burn a dispel or even having the GUI created from a sub-radial option from a dispel.
In PnP, you can choose to automatically succeed on a dispel check against your own spells. How to best implement this in NWN2 is not a simple question. A GUI-based approach does seem best, perhaps requiring you to burn a dispel or even having the GUI created from a sub-radial option from a dispel.
#9
Posté 08 juillet 2011 - 11:41
It appears that Lance Botelle is working on this. He has a gui to remove invisibility.
http://worldofalthea...ty-stealth.html
You want to get get in touch with him.
http://worldofalthea...ty-stealth.html
You want to get get in touch with him.
Modifié par Shaughn78, 08 juillet 2011 - 11:41 .
#10
Posté 09 juillet 2011 - 01:31
Is there anything Lance isn't working on? Thanks for the link, I pointed the PW staff to this thread so they should see it.
#11
Posté 09 juillet 2011 - 01:52
No.Arkalezth wrote...
Is there anything Lance isn't working on?
#12
Posté 09 juillet 2011 - 05:01
I am doing something simpler, which allows you to remove "At Will" effects, ie if you turn someone to stone you can remove the effect with a thought and thus ransom this. This is done via a context menu which allows you to remove spells you are the creator of if they match a very small list.
I just added invisibilty to this list of spells, which should deal with this situation. There is not a lot of call for this to begin with.
As for a more elaborate UI, my character editor for DM's has this implemented, but i don't see it being simple enough to just work.
The self targeted dispel is also something which is done via kaedrins content, my content and quite a few pw's.
I just added invisibilty to this list of spells, which should deal with this situation. There is not a lot of call for this to begin with.
int CSLRemoveAtWillEffectsByCreator(object oTarget, object oCreator, int bFeedBack = FALSE )
{
int bRemove = FALSE;
int bHoldSpell = FALSE;
int bReduceSpell = FALSE;
int bStoneSpell = FALSE;
int SolipsismSpell = FALSE;
int bSilenceSpell = FALSE;
int bInvisSpell = FALSE;
// only deal with these limited spell id's
if (
GetHasSpellEffect(SPELL_MASS_HOLD_MONSTER, oTarget) ||
GetHasSpellEffect(SPELL_MASS_HOLD_PERSON, oTarget) ||
GetHasSpellEffect(SPELL_REDUCE_ANIMAL, oTarget) ||
GetHasSpellEffect(SPELL_REDUCE_PERSON, oTarget) ||
GetHasSpellEffect(SPELL_REDUCE_PERSON_GREATER, oTarget) ||
GetHasSpellEffect(SPELL_REDUCE_PERSON_MASS, oTarget) ||
GetHasSpellEffect(SPELL_SILENCE, oTarget) ||
GetHasSpellEffect(SPELL_SOLIPSISM, oTarget) ||
GetHasSpellEffect(SPELL_FLESH_TO_STONE, oTarget) ||
GetHasSpellEffect(SPELL_HOLD_ANIMAL, oTarget) ||
GetHasSpellEffect(SPELL_HOLD_MONSTER, oTarget) ||
GetHasSpellEffect(SPELL_I_WALK_UNSEEN, oTarget) ||
GetHasSpellEffect(SPELL_I_RETRIBUTIVE_INVISIBILITY, oTarget) ||
GetHasSpellEffect(SPELL_GREATER_INVISIBILITY, oTarget) ||
GetHasSpellEffect(SPELLABILITY_AS_GREATER_INVISIBLITY, oTarget) ||
GetHasSpellEffect(SPELL_INVISIBILITY, oTarget) ||
GetHasSpellEffect(SPELL_HOLD_PERSON, oTarget)
)
{
effect eEffect = GetFirstEffect( oTarget );
while ( GetIsEffectValid(eEffect) )
{
int bRestart = FALSE;
if ( GetEffectCreator(eEffect)==oCreator )
{
if ( GetEffectSpellId(eEffect) == SPELL_MASS_HOLD_MONSTER || GetEffectSpellId(eEffect) == SPELL_MASS_HOLD_PERSON || GetEffectSpellId(eEffect) == SPELL_HOLD_ANIMAL || GetEffectSpellId(eEffect) == SPELL_HOLD_MONSTER || GetEffectSpellId(eEffect) == SPELL_HOLD_PERSON )
{
RemoveEffect(oTarget, eEffect);
bRemove = TRUE;
bRestart = TRUE;
bHoldSpell = TRUE;
}
if ( GetEffectSpellId(eEffect) == SPELL_REDUCE_ANIMAL || GetEffectSpellId(eEffect) == SPELL_REDUCE_PERSON || GetEffectSpellId(eEffect) == SPELL_REDUCE_PERSON_GREATER || GetEffectSpellId(eEffect) == SPELL_REDUCE_PERSON_MASS )
{
RemoveEffect(oTarget, eEffect);
bRemove = TRUE;
bRestart = TRUE;
bReduceSpell = TRUE;
}
if ( GetEffectSpellId(eEffect) == SPELL_SILENCE )
{
RemoveEffect(oTarget, eEffect);
bRemove = TRUE;
bRestart = TRUE;
bSilenceSpell = TRUE;
}
if ( GetEffectSpellId(eEffect) == SPELL_SOLIPSISM )
{
RemoveEffect(oTarget, eEffect);
bRemove = TRUE;
bRestart = TRUE;
SolipsismSpell = TRUE;
}
if ( GetEffectSpellId(eEffect) == SPELL_FLESH_TO_STONE )
{
RemoveEffect(oTarget, eEffect);
bRemove = TRUE;
bRestart = TRUE;
bStoneSpell = TRUE;
}
if ( GetEffectSpellId(eEffect) == SPELL_I_WALK_UNSEEN || GetEffectSpellId(eEffect) == SPELL_INVISIBILITY || GetEffectSpellId(eEffect) == SPELL_I_RETRIBUTIVE_INVISIBILITY || GetEffectSpellId(eEffect) == SPELL_GREATER_INVISIBILITY || GetEffectSpellId(eEffect) == SPELLABILITY_AS_GREATER_INVISIBLITY )
{
RemoveEffect(oTarget, eEffect);
bRemove = TRUE;
bRestart = TRUE;
bInvisSpell = TRUE;
}
}
if (bRestart)
{
eEffect = GetFirstEffect(oTarget);
}
else
{
eEffect = GetNextEffect(oTarget);
}
}
}
if ( bRemove && bFeedBack )
{
string sRemovedText = "";
if ( bHoldSpell ) { sRemovedText += "Hold "; }
if ( bReduceSpell ) { sRemovedText += "Reduce "; }
if ( bStoneSpell ) { sRemovedText += "Flesh to Stone "; }
if ( SolipsismSpell ) { sRemovedText += "Solipism "; }
if ( bSilenceSpell ) { sRemovedText += "Silence "; }
if ( bInvisSpell ) { sRemovedText += "Invisibility "; }
SendMessageToPC( oCreator, "You removed the "+sRemovedText+"you cast on "+GetName(oTarget) );
SendMessageToPC( oTarget, GetName(oCreator)+" removed the "+sRemovedText+"spell from you" );
}
return bRemove;
}
As for a more elaborate UI, my character editor for DM's has this implemented, but i don't see it being simple enough to just work.
The self targeted dispel is also something which is done via kaedrins content, my content and quite a few pw's.
#13
Posté 09 juillet 2011 - 10:34
Thanks to you as well, Pain.
#14
Posté 09 juillet 2011 - 12:19
Hi All,
EDIT: Just read some of the comments about "what I am working on" .. LOL!
Shaughn kindly drew my attention to this post and I thought I would just give a quick comment: I have also thought about the problem of invisibility, both from a players perspective (needing to talk to someone) and from a builders perspetive, where the effect would not make sense in some situations where tiggers may automatically start a conversation with a PC with another NPC. There are also some other situations where the effect needs addressing with respect to logical flow and plot sections of a game. Anyway, just to say, I have now posted an image at my blog and add it below to show the sort of thing I have already done. If anybody would like to comment about further considerations for this GUI, then please let me know. Unfortunately, due to the nature of invisibility, while the code is reasonably generic for simple conversation, it gets more specific when it comes to plot situations and so does not lend itself for simple Vault release. As always, builders will be welcome to take from my module once uploaded (just give a reference to me).
To repeat the link where the image can be seen larger: http://worldofalthea...ty-stealth.html
The image also shows my "Current Spells" GUI that I like to have for my PCs. You can read what Time Warp spells mean at my blog. Basically, the time remain reflects game time, which varies due to game time ratio to real time.
Lance.
EDIT: Just read some of the comments about "what I am working on" .. LOL!
Shaughn kindly drew my attention to this post and I thought I would just give a quick comment: I have also thought about the problem of invisibility, both from a players perspective (needing to talk to someone) and from a builders perspetive, where the effect would not make sense in some situations where tiggers may automatically start a conversation with a PC with another NPC. There are also some other situations where the effect needs addressing with respect to logical flow and plot sections of a game. Anyway, just to say, I have now posted an image at my blog and add it below to show the sort of thing I have already done. If anybody would like to comment about further considerations for this GUI, then please let me know. Unfortunately, due to the nature of invisibility, while the code is reasonably generic for simple conversation, it gets more specific when it comes to plot situations and so does not lend itself for simple Vault release. As always, builders will be welcome to take from my module once uploaded (just give a reference to me).
To repeat the link where the image can be seen larger: http://worldofalthea...ty-stealth.html
The image also shows my "Current Spells" GUI that I like to have for my PCs. You can read what Time Warp spells mean at my blog. Basically, the time remain reflects game time, which varies due to game time ratio to real time.
Lance.
Modifié par Lance Botelle, 09 juillet 2011 - 12:31 .





Retour en haut







