I have a spell-based modal ability that I'd like to make undispellable, but can't figure out a way to do it without modifying the effect_dispel_magic_h script to ignore that particular spell ID. The dispel magic script simply as a check to see if an ability is of ABILITY_TYPE_SPELL. If it's not, the script ignores it. If it is, the script removes the effects.
The wiki suggests that there is a subtype that can be set when an effect is applied through scripting to specify whether the effect is normal or magical with regard to whether the effect can or cannot be dispelled. I can't determine how that subtype should be implemented, and I'm not even sure that it would help in this specific situation because I have to deal with the function _ActivateModalAbility rather than any of the various ApplyEffect functions.
There also is an ABILITY_FLAG_DISPELLABLE, so I thought perhaps there might be a specific bit entry that can be used in the "Flags" column of ABI_Base, but can find no documentation on the possible flags that can be set here.
Any solutions or ideas would be greatly appreciated.
Making a modal spell undispellable?
Débuté par
Sakaslan
, sept. 11 2010 05:46
#1
Posté 11 septembre 2010 - 05:46
#2
Posté 12 septembre 2010 - 01:13
Can't you just create your effect without an ability ID tied to it or a dummy ability ID which is not a spell?
#3
Posté 12 septembre 2010 - 01:40
Maybe I'm just not sure how to go about doing that. If it's a modal that the player can turn off and on with button press, it seems like (for a mage-based class, at least) it has to be a spell. The modal itself can be "empty" and I could create separate effects that are applied when the modal is turned on, but I'm having trouble conceptualizing how that would work any differently since the "shell" modal itself would still be ABILITY_TYPE_SPELL and would get shut down by dispel.
#4
Posté 12 septembre 2010 - 01:57
Here's what I would do -
- create another ability which is not a spell but has the same string IDs as the original ability (this is to ensure tooltips, etc. look the same)
- In your spell_modal, inside the case structure for the new spell, add the following lines after building the effects
Dispel Magic will not remove the effects of this ability since the effects are not tied to a spell.
Of course, you need to implement this and make sure it works
Edit: You need to check for the ability ID called in DeactivateModalAbility and then, replace the duplicate ability ID to remove the effects.
- create another ability which is not a spell but has the same string IDs as the original ability (this is to ensure tooltips, etc. look the same)
- In your spell_modal, inside the case structure for the new spell, add the following lines after building the effects
if (bEffectValid == TRUE)
{
Ability_ApplyUpkeepEffects(stEvent.oCaster, , eEffects, stEvent.oTarget, bPartywide);
bEffectValid = FALSE;
}
In the above snippet, you are basically applying the effects as if it were tied to the duplicate ability which is not a spell.Dispel Magic will not remove the effects of this ability since the effects are not tied to a spell.
Of course, you need to implement this and make sure it works
Edit: You need to check for the ability ID called in DeactivateModalAbility and then, replace the duplicate ability ID to remove the effects.
Modifié par TimelordDC, 12 septembre 2010 - 01:58 .
#5
Posté 13 septembre 2010 - 12:39
I'll give that a shot, TL. Thanks.
#6
Posté 13 septembre 2010 - 01:07
Heh, I just checked my post and I noticed that the second argument is blank - it should be the ability ID of the duplicate ability.
#7
Posté 13 septembre 2010 - 09:10
Haven't tried this yet, TL. Got sidetracked fixing a bunch of other stuff for a new release of the spec and went a different route with the other abilities for which the modal was a shell. I still want to get it undispellable but it's a bit less pressing now. Will let you know what the results are.





Retour en haut






