• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Changing custom ability ID number?

Status
Not open for further replies.
Level 15
Joined
Jul 15, 2005
Messages
356
Ok, I'm running into a really frustrating problem.

I've got a series of maps linked together as a single campaign. The problem is, after making all the maps, I modified one of the heros' abilities significantly, requiring me to completely remove the old one and replace it with a new one.

Now, I'm finding that any skill points spent on this ability don't carry over between maps via the Game Cache. All other abilities do.

The only reason I can think of why this is happening is because each map contains a copy of this ability... and in each map, because I modified the ability after all other abilities had been made, it has a different 'ability ID'. By 'ability ID', I mean the unique 4-digit code that you can see next to the spell's icon in the Object Editor, when you have "Display values as raw data" ticked.

This is seriously problematic. Is there any way for me to manually modify or select this ability ID? I've had no luck so far...
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
It is not about the order id but the ability's id in object editor. And of course, they have to match. But normally, you would create these objects that have to be shared within the campaign in campaign editor > object data. These grant an offset to the ids to not collide with map-specific objects and you do not have to declare them individually everywhere.
 
Level 15
Joined
Jul 15, 2005
Messages
356
It is not about the order id but the ability's id in object editor. And of course, they have to match. But normally, you would create these objects that have to be shared within the campaign in campaign editor > object data. These grant an offset to the ids to not collide with map-specific objects and you do not have to declare them individually everywhere.

Unfortunately I made (and released) the maps that constitute the campaign individually over the course of several years - I'm only now 'converting' them into a campaign - so it's pretty much too late for me to be adding all those custom abilities into the campaign file. While I could do so, it would require a massive amount of trigger-fixing in every single map.

I can see a few different solutions that I'm pretty confident would work, but none of them are really all that great:

Solution 1: find the 'highest' ability ID in any of the maps. In all other maps, keep making copies of the problem ability until a copy reaches the same ability ID. Delete all copies with a lower ability ID than the desired one. Use the desired one instead, re-trigger any triggers relating to it.
Advantages: consistent with how all other hero abilities are handled across the maps; requires only re-triggering of that one ability.
Disadvantages: will take ages; mind-numbing monkey work

Solution 2: just copy/paste that one problem ability into the campaign file and use that.
Advantages: fast; only requires re-triggering of that one ability
Disadvantages: very inconsistent with how all other abilities are handled

Solution 3: fix the way all hero abilities are handled (even the ones that aren't broken) by copy/pasting them into the campaign file.
Advantages: would be consistent; would future-proof any changes to these abilities; most elegant outcome
Disadvantages: will take ages; will require re-triggering ALL hero abilities; large chance of making errors in re-triggering

Solution 4: use different triggers to store the ability level number in the game cache, rather than the hero himself. Then load the hero, and use the stored ability level number to add the ability (of the right level) to him.
Advantages: seems relatively easy to do; fastest solution
Disadvantages: seems really hokey; doesn't address the underlying problem in any way

Unless, of course, there IS some way of changing the ability ID that I don't know about...?
 
Last edited:
Level 26
Joined
Aug 18, 2009
Messages
4,097
In JNGP, you can set the ability's id when creating it.

Solution 5: Write yourself a tool that converts the data, resetting the objects' ids and replacing them in triggers.

Solution 6: Call for Captain Hindsight because, normally, you would use variables to save things only once/load from that and not restate the same fix values multiple times. Also, you would not create the objects repeatedly as this is not only likewise inconvenient but even error-prone.
 
Status
Not open for further replies.
Top