Aller au contenu

Photo

Abilities triggering specific script effects?


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

#1
Kesaru

Kesaru
  • Members
  • 130 messages
This seems like something important enough that it would have been covered somewhere already. If not in the wiki, then at least it seems like something that would have been asked a lot of times. But I haven't been able to find any information on this.

I don't understand how an ability triggers it's specific section in a script like Spell_Singletarget.ncs.
The abilities in ABI_base are only able to reference the script as a whole, and inside the scripts the only thing that seems to allow sections to be singled out for a single ability's use are the lines like "case <ABILITY_NAME>" at the start of them.
Since this is identical to the Label of the ability found in ABI_base I had assumed it references the Label against this line, but that isn't the case.
I'm trying to add new abilities to Dog, so to do that I copied certain abilities and changed their ID number, prerequisite ability, guitype, and cast animation. These were the only things I changed.
The abilities show up on Dog perfectly fine, and they activate fine. But for some reason their scripts don't fire.
The abilities have absolutely no effect, and ones that add a buff have a blank icon with no description or title.

I don't understand how changing any of those things could cause the script not to function properly, when the scripts themselves do not reference any of those things!
Another assumption I'd had was that perhaps one of the secondary scripts referenced by the main one to hold variables (such as talent_constants_h) would have things like "<ABILITY_NAME> = ID number", but none of them seemed to have anything remotely similar...

Can anyone please help?

Modifié par Kesaru, 06 mars 2010 - 06:42 .


#2
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
the <ABILITY_NAME> is a variable that contains a constant that is the ability ID in the 2DA i think.

you'll need to keep the ID numbers in the 2da of the abilities in order for the specific sections in the scripts to trigger.

#3
Kesaru

Kesaru
  • Members
  • 130 messages

gordonbrown82 wrote...

the is a variable that contains a constant that is the ability ID in the 2DA i think.
you'll need to keep the ID numbers in the 2da of the abilities in order for the specific sections in the scripts to trigger.

That's what I thought, that was the posibility I mentioned near the bottom of my post. But I don't know where to find the scripts that contains those ID numbers (none of the scripts listed at the start of the main one with "#Include" have them).
I don't think that would help me anyway, though. If that is how it works, I guess I'll just have to create a few new scripts for the new abilities, like Dog_singletarget, Dog_modal and Dog_constants_h. Then I'll add only the ones I'm using, and change them to actually use the ID rather than the variable middle-man.

Thanks :D

-Edit-
Well, it worked partially. I copied talent_singletarget, talent_modal, and talent_aoeinstant, and changed them to only include the abilities I needed while referencing the ID numbers directly.
Most abilities work now, but the buff icons created by certain abilities are all blank (as are the new specializations' icons on the character sheet), and none of the AoE Modal abilities have a function (they now have the full visual VFX with cost and cooldown and everything, but not the scripted mechanical effects such as +attack or whatever). Self-only modal abilties work fine, just not AoE ones like Rally or Pain.

Modifié par Kesaru, 06 mars 2010 - 08:22 .


#4
ladydesire

ladydesire
  • Members
  • 1 928 messages
They aren't always included in the first level of script includes; you may have to hunt for the specific one you are looking for.

#5
Kesaru

Kesaru
  • Members
  • 130 messages
Ohhh, I am so terribly confused...
It turns out, it actually seems to be almost random which abilities are working and which ones aren't.
Rally doesn't work. Full VFX, cost and cooldown, but no one receives the stat boosts and the buff icon and buff tooltip are all blank.
Aura of Pain doesn't work. Same as Rally.
Berserk doesn't work. The ordinary Berserk ability works fine, but the buff icon and buff tooltip are both blank just like with Rally and Aura of Pain. Additionally, none of the upgrade abilities later in the same branch seem to have any effect on it.
And finally War Cry doesn't work. Just like with Berserk the ability itself seems to work fine, but none of the upgrades for it do. It doesn't have a buff icon for me to possibly see as blank.

I've looked over the scripts and ABI_base and everything is fine. I can't figure out what's wrong.

Modifié par Kesaru, 07 mars 2010 - 12:04 .


#6
ladydesire

ladydesire
  • Members
  • 1 928 messages
What row id numbers are you using, and are the blank ability icons bordered in red? If you put them over row id 500,000 they don't function properly.

#7
Kesaru

Kesaru
  • Members
  • 130 messages
Yeah, that may be it. All of the specialization abilities are over 4,000,000 :lol:
I'll try fixing that, thanks.

-Edit- That fixed the icons (the only ones still blank are the icons for the known specializations themselves), but the mechanical effects are still bugged out the same as before.
And the blank icons don't have a red border; they're just grey boxes.

Modifié par Kesaru, 07 mars 2010 - 03:18 .


#8
Kesaru

Kesaru
  • Members
  • 130 messages
I figured it out! :D
The issue with Berserk and War Cry was that their script sections have sub-sections that basically say "if the character has X ability present, then this ability also does this". That's how the passive abilities that add to them work. The problem is that, while I changed the reference to the base ability, I didn't change the references to the passive abilities inside of them.
The problem with Rally and Pain is that there effects are not all handled inside of the same script. I need to find another one that handles the mechanical effects they produce (the talent_modal script I copied only handles the toggling and visuals).
The only problem remaining is that the specialization icons are still blank inside the character sheet (when choosing them on level-up they look fine, but once you have them and look at the known specs for you're character they're blank).
Since they show up fine on level-up I imagine the information inside CLA_base must be fine, but just in case their ID numbers are in the 170-179 range.
Inside ABI_base, the hidden abilities (which I'm nearly certain are the source of this issue), are in the 400,000 range, just like the abilities they grant which are working fine.
Specifically, the IDs are 403401, 403402, 403403, and 403404. The ID numbers are the only things I changed from the originals with the hidden abilities.

-Edit- I have even more information. The problem with the speciaization icons being blank in the character stats sheet is caused somehow by CLA_base.
I changed the ID numbers on the copied specs in CLA_base to replace the originals (same IDs), and the icons showed up properly.
Does anyone know of another file somewhere that needs to reference the IDs given in CLA_base? That seems to be the issue.

Modifié par Kesaru, 08 mars 2010 - 03:38 .