Aller au contenu

Photo

spell_modal, how does it work?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Joshua Raven

Joshua Raven
  • Members
  • 182 messages
I'm currently changing the Spirit Healer's "Cleansing Aura" spell in a custom script named "np_spell_aoe_duration". I found the usual actions in the spell_aoe_duration script and the part I am interested in looks like this:


if (fDistance <= CLEANSING_AURA_PULSE_INNER_RADIUS)
{
    // remove injury
    effect[] eInjuries = Injury_GetInjuryEffects(oTarget);
    if (GetArraySize(eInjuries) > 1)
    {
        bInjury = TRUE;

        Injury_RemoveInjury(oTarget, Injury_GetInjuryIdFromEffect(eInjuries[0]));
    }
}

I altered it and was about to edit the 2da file to point to the new script, when I found out that the 2da file actually points to spell_modal...:whistle:

Went back to the spell_modal script and found this reference;

case ABILITY_SPELL_CLEANSING_AURA:
{
    eEffects[0] = EffectAreaOfEffect(CLEANSING_AURA_AOE, SCRIPT_SPELL_AOE_DURATION, CLEANSING_AURA_AOE_VFX);
    eEffects[0] = SetEffectEngineFloat(eEffects[0], EFFECT_FLOAT_SCALE, GetM2DAFloat(TABLE_VFX_PERSISTENT, "RADIUS", CLEANSING_AURA_AOE));
    eEffects[1] = EffectModifyProper(PROPERTY_ATTRIBUTE_REGENERATION_STAMINA,
CLEANSING_AURA_MANA_REGENERATION_PENALTY,
      PROPERTY_ATTRIBUTE_REGENERATION_STAMINA_COMBAT, CLEANSING_AURA_MANA_REGENERATION_PENALTY);

    break;
}

So the question is. How and where is it set to activate the ABILITY_SPELL_CLEANSING_AURA case in the standard spell_aoe_duration script when the 2da file actually points to the spell_modal script? And how would I be able to make this specific spell use my custom script instead, after having been pointed to the spell_modal script?

Any thoughts? Am I missing something here? So far, all the spells I touched pointed directly to the script file that addressed their respected actions, this is the first one that seems to have it's actions split into multiple scripts, and from the looks of it (checked Blood Magic as well), it goes for all spells that point to spell_modal.

Modifié par Joshua Raven, 24 novembre 2009 - 08:45 .


#2
emosicknesscom

emosicknesscom
  • Members
  • 22 messages
I think this might be a confusion between the name of the spell and the effect it applies. The effect from ABILITY_SPELL_CLEANSING_AURA is handled in the spell_aoe_duration and checks for objects inside the raidus that have an injury. You might want to check the effects 2da file. Unfortunately, I can't look myself because I'm at work.

Modifié par emosicknesscom, 24 novembre 2009 - 08:40 .


#3
Joshua Raven

Joshua Raven
  • Members
  • 182 messages
 Thanks for the help. Couldn't find anything in there though.

Went on to search all the header files more thoroughly, found the solution:

spell_constants_h: (line 2 -_-)
const resource SCRIPT_SPELL_AOE_DURATION = R"spell_aoe_duration.ncs";

Since this constant is called in another unmodified spell, I'm just going to replace the constant in a modified np_spell_modal with my modified script string and leave it at that. That should do the trick.

Thanks for the help!

#4
Craig Graff

Craig Graff
  • Members
  • 608 messages
Depending on how you are handling things, you may also want to look at changing the reference in the spellscript column of ABI_Base.xls.

#5
Joshua Raven

Joshua Raven
  • Members
  • 182 messages
Thanks for the heads-up. I already changed it to point to np_spell_modal which has the modified reference to np_spell_aoe_duration. Haven't tried it yet but should do the trick.