• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Adding and removing spells from spell book

Status
Not open for further replies.
Level 7
Joined
Aug 19, 2009
Messages
278
When spells are added and removed from a spell, they keep on jumping places.

This made me remember a old topic in wc3.net. I don't remember what it was exactly but some one had figured on what exactly the spells jumping in a spell book depend on.

It would be helpful if some one could confirm this information cause i tried searching but couldn't find the original thread.

It was like "The spells in a spell book jump on based on the priority when those spells were added to the spell book.

Like if I add a spell "A" to the spell book and it is without any other spells then the first location of the spell book is taken by "A". i,e (0,0) next time when you remove it and re-add it, it will take its old location.

Can some one confirm this information or tell exactly what was the correct information.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Spells are put wherever they originally were in any spellbook. This is counted from the time when they were first put on an actual unit ingame.
If there's multiple spells that would take the same slot, then the oldest(first to be loaded into memory) takes the slot.
 
Level 7
Joined
Aug 19, 2009
Messages
278
Spells are put wherever they originally were in any spellbook. This is counted from the time when they were first put on an actual unit ingame.
If there's multiple spells that would take the same slot, then the oldest(first to be loaded into memory) takes the slot.

What about the spells that are added to the spell book using dummy spell book?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
What about the spells that are added to the spell book using dummy spell book?

Good question.
They are put in the slot that they are in the dummy spellbook(if they hadn't been added through any other spellbook before)
So the best solution is making a bunch of spellbooks and putting them on a unit at map init. Then slightly after removing the unit.
 
Level 7
Joined
Aug 19, 2009
Messages
278
Good question.
They are put in the slot that they are in the dummy spellbook(if they hadn't been added through any other spellbook before)
So the best solution is making a bunch of spellbooks and putting them on a unit at map init. Then slightly after removing the unit.

I plan to make a completely empty spellbook. Then add the dummy unit spell order wise in the order which I want to be present in spell book.. Then remove all of them from the spell book.

Will that do?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
I plan to make a completely empty spellbook. Then add the dummy unit spell order wise in the order which I want to be present in spell book.. Then remove all of them from the spell book.

Will that do?

This might work, but the sure way is simply making a spellbook with all abilities in their correct positions. Then putting a unit with that spellbook on the map and removing it.
That way the ability positions are saved and you won't have to worry about it any more.
 
Level 8
Joined
Oct 12, 2011
Messages
483
This might work, but the sure way is simply making a spellbook with all abilities in their correct positions. Then putting a unit with that spellbook on the map and removing it.
That way the ability positions are saved and you won't have to worry about it any more.

And you want to make sure all the other units preplaced before the unit that gets removed don't have the abilities either.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
You can try to add all the abilities to the spellbook, but disable the abilities for that player (Player - Disable ability), then enable the abilities in the order you want to be in the Spellbook (as long as all of them are placed on X:0 and Y:0)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here's a system to add spells to spell book.

The spells keep their order, but you can't have empty slots in a spell book.

For example if you have spells 1, 2 and 3. You add spell 3 into an empty spell book, it goes to slot 1. Then you add spell 1, it goes to slot 1 and 3 gets pushed to 2. Add spell 2, it goe to slot 2 and 3 gets pushed to 3.
 

Attachments

  • Spell Book(2).w3x
    17.4 KB · Views: 84
Level 7
Joined
Aug 19, 2009
Messages
278
Here's a system to add spells to spell book.

The spells keep their order, but you can't have empty slots in a spell book.

For example if you have spells 1, 2 and 3. You add spell 3 into an empty spell book, it goes to slot 1. Then you add spell 1, it goes to slot 1 and 3 gets pushed to 2. Add spell 2, it goe to slot 2 and 3 gets pushed to 3.

Ok i understood it by this. Thanks..
 
Status
Not open for further replies.
Top