• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Hashtable - Save Ability Handle -> crashes Editor?

Status
Not open for further replies.
Level 3
Joined
Mar 1, 2018
Messages
41
JNGP, Sharpcraft, World Editor patch 1.27a

JNGP doesn't even show the functions, but on the other two, when selecting
Save Ability Handle and clicking on "ability" blue link crashes the editor, closes and any unsaved progress is lost.

Nothing works. I can still use integers reals strings but it's all very basic compared to some other handle that would be so handy (pun intended) to use.

Edit: Sorry guys I've read about it and figured it out thanks to the hive
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,037
Sounds like you figured it out, but for clarity: The ability type is functionally non-existent in Wc3. It was added but no functions were ever written that use that type. Do not use it. Ability IDs are actually just integers.
 
Level 3
Joined
Mar 1, 2018
Messages
41
Thanks guys, I ended up using arrays. I've been toying around with the ORGP idea and wanted to save unit handles for spells to make them MUI.

So even if you had 2 times the same unit (wich would be unlikely) you could have 2 seperate instances of the same ability.

I ended up discarding that, limiting each player to 1 hero, and using the playerNr as Index for the arrays wich is kinda lazy but seems to work.

Also saving ability handles would come in handy when adding attachments for weapons, like "some magic wand"...

Like for key "Item" save "Ability Attachment" but it all can be done another way. I've just learned about hashtables and I thought that using them could make things easier to organize.

I was very curious about trying the 1.31 but I'm really afraid of breaking the map since I've seen so many complaints about stuff that stops working.
 
Level 8
Joined
May 21, 2019
Messages
435
Try with World Editor version 1.31. That is the only officially supported version anymore as both JNGP and WEX are unmaintained and for old unsupported versions of Warcraft III.
Are the corruption issues fixed yet? If not, I wouldn't really recommend it to anyone.
 
Level 39
Joined
Feb 27, 2007
Messages
5,037
Also saving ability handles would come in handy when adding attachments for weapons, like "some magic wand"...
As I said before you CAN save ability ‘handles’ or use the abilities as keys because ability ids are just integers and saving integers is trivial (keys are integers as well).

The way you’ve done it is MPI (multi player instance), but a good resource for getting fully MUI spells to work is: Visualize: Dynamic Indexing
 
Level 3
Joined
Mar 1, 2018
Messages
41
Thanks I've been reading that post recently, I now found out that I would need to write a lot more stuff for each spell and because each player only has 1 hero there will never be 2 instances of the same spell with the same player Number so I made MPI spells for a few weeks.
If later on I want to change this, it will be a huge amount of work.
I undestand that it's not that complex or maybe I'm a bit slow and lazy and in the end it's sorting out Array Index numbers.
 
Status
Not open for further replies.
Top