- Joined
- Nov 10, 2004
- Messages
- 351
Spellbooks:
This tutorial introduces you how the spellbook works.
What is a spellbook?:
A spell book is an item ability which is able to store many different abilities.
The spellbook works for units aswell.
It looks like any other normal active ability ingame.
But it isn't. Whenever you click on it, it will open something i would call a "skill tree".
Looks like this:
Inside the "skill tree" there can be several abilities inside, and are all castable.
notice the cancel button in the lower right corner, clicking it will simply exit the spellbook, allowing the unit to do other actions.
Cool, but what can we use them for besides storing abilities?:
Spellbooks brings up some really usefull and unique features.
An example is passive spell icon hiding.
You may have heard people answering something like this when someone asks how to hide a passive skill: "place the ability inside a disabled spellbook". (sounds kind of weird)
As not everyone knows the trick of hiding passive icons(while still having their effects), i will explain it.
Whenever you disable a spell, the icon will be hidden and the spell completly useless.
No, that's not 100% correct, since whenever you disable something like a channeling spell, while the caster is already channeling it, he wont stop channeling.
How is that related to spellbooks?:
Well, later on it was discovered that if you disable a spellbook, the only thing that changed was that the icon was gone, and is unable to be opened. BUT, all passive abilities inside the spell book still works fine!
This was a huge discovery.
It was finnaly possible to hide passive skills completly while still having their effects.
This is one of the most common known features of the spellbook.
How do i make this stuff work then?:
First of all, create a spellbook and call it something like "dummy" or whatever you want.
Now, go look at the field called " Data - Spell List ".
This is where you can edit what spells there should be in the spell book.
Remove all abilities there, and place your passive skill(s) in there.
After you've done that, go to the trigger editor and do following:
Now it suddenly got all the passive skills without any icon.
How do i add other spells to a spell book with triggers?:
There's a simple trick for doing that.
I will start explaining what the field " Data - Base Order Id " is used for.
If you have 2 spellbooks on one unit, where both spellbooks have the same Base Order Id, their spells will be shared in both spell books.
If their Base Order Id is different, it wont happen.
Back to the point how does this help me?:
First of all, create a new spellbook ability with the same Base Order Id as the spellbook you want to add a new ability into.
Add the skill which you want to transfer to the other spellbook inside the newly created spellbook.
Disable it.
How do i add learned spells to a spellbook then?
I can make an example how to do that:
Lets pretend we want to make shockwave go into a spell book whenever it is learned.
Start off by making a new spellbook ability and call it Hero Skills(this is the spellbook where the abilities learned should be moved into)
Set the maximum/minimum spells to 0, and shared spell cooldown to false.(remember to remove all spells too)
Now, create a new spellbook(we call it shockwave Adition) with the same Base order id as the previous one, and put the shockwave ability into the newly created spellbook.
Disable the Shockwave Adition ability
for heroes with morphing skills, make the shockwave ability and shockwave adition ability permanent for the unit.
After you've done this it should work perfectly, as long as you do this for Every spell which should be transfered.
Additonal Notes:
A spellbook only have space for 11 abilities each.
All these spellbook bugs was discovered by Vexorian(Thank you).
The fields " Maximum Spells " and " Minimum Spells " are a bit strange.
i usually set them both to 11, since in some cases it seems to bug when minimum is too low or something..(i am not quite sure about those fields)
Some other examples of spellbook usage
http://www.clancbs.com/downloads_seperate.php?id=348
http://www.wc3campaigns.net/showthread.php?t=80186 In case of that you didn't quite understand how to add learned spells into a spellbook, this one shows how to do it.
Also Attached a Demo Map
View attachment Spellbooks.w3x
Have fun with the mysteries of the spellbook.
This tutorial introduces you how the spellbook works.
What is a spellbook?:
A spell book is an item ability which is able to store many different abilities.
The spellbook works for units aswell.
It looks like any other normal active ability ingame.
But it isn't. Whenever you click on it, it will open something i would call a "skill tree".
Looks like this:
Inside the "skill tree" there can be several abilities inside, and are all castable.
notice the cancel button in the lower right corner, clicking it will simply exit the spellbook, allowing the unit to do other actions.
Cool, but what can we use them for besides storing abilities?:
Spellbooks brings up some really usefull and unique features.
An example is passive spell icon hiding.
You may have heard people answering something like this when someone asks how to hide a passive skill: "place the ability inside a disabled spellbook". (sounds kind of weird)
As not everyone knows the trick of hiding passive icons(while still having their effects), i will explain it.
Whenever you disable a spell, the icon will be hidden and the spell completly useless.
No, that's not 100% correct, since whenever you disable something like a channeling spell, while the caster is already channeling it, he wont stop channeling.
How is that related to spellbooks?:
Well, later on it was discovered that if you disable a spellbook, the only thing that changed was that the icon was gone, and is unable to be opened. BUT, all passive abilities inside the spell book still works fine!
This was a huge discovery.
It was finnaly possible to hide passive skills completly while still having their effects.
This is one of the most common known features of the spellbook.
How do i make this stuff work then?:
First of all, create a spellbook and call it something like "dummy" or whatever you want.
Now, go look at the field called " Data - Spell List ".
This is where you can edit what spells there should be in the spell book.
Remove all abilities there, and place your passive skill(s) in there.
After you've done that, go to the trigger editor and do following:
- Events
- Map initialization
- Conditions
- Actions
- Player - Disable <Your spellbook ability here> for Player 1 (Red)
- // Ofcourse do this for every player.
Now it suddenly got all the passive skills without any icon.
How do i add other spells to a spell book with triggers?:
There's a simple trick for doing that.
I will start explaining what the field " Data - Base Order Id " is used for.
If you have 2 spellbooks on one unit, where both spellbooks have the same Base Order Id, their spells will be shared in both spell books.
If their Base Order Id is different, it wont happen.
Back to the point how does this help me?:
First of all, create a new spellbook ability with the same Base Order Id as the spellbook you want to add a new ability into.
Add the skill which you want to transfer to the other spellbook inside the newly created spellbook.
Disable it.
- Player - Disable <spellbook> for Player 1 (Red)
- // Do this for all players ofcourse.
How do i add learned spells to a spellbook then?
I can make an example how to do that:
Lets pretend we want to make shockwave go into a spell book whenever it is learned.
Start off by making a new spellbook ability and call it Hero Skills(this is the spellbook where the abilities learned should be moved into)
Set the maximum/minimum spells to 0, and shared spell cooldown to false.(remember to remove all spells too)
Now, create a new spellbook(we call it shockwave Adition) with the same Base order id as the previous one, and put the shockwave ability into the newly created spellbook.
Disable the Shockwave Adition ability
- Player - Disable Shockwave Adition for Player 1 (Red)
- // do this for all players ofcourse.
- Events
- Unit - A unit Learns a skill
- Conditions
- (Learned Hero Skill) Equal to Shockwave
- (Level of Shockwave for (Triggering Unit)) Equal to 1
- Actions
- Unit - Remove Shockwave from (Triggering unit)
- Unit - Add Shockwave Adition (Triggering unit)
for heroes with morphing skills, make the shockwave ability and shockwave adition ability permanent for the unit.
After you've done this it should work perfectly, as long as you do this for Every spell which should be transfered.
Additonal Notes:
A spellbook only have space for 11 abilities each.
All these spellbook bugs was discovered by Vexorian(Thank you).
The fields " Maximum Spells " and " Minimum Spells " are a bit strange.
i usually set them both to 11, since in some cases it seems to bug when minimum is too low or something..(i am not quite sure about those fields)
Some other examples of spellbook usage
http://www.clancbs.com/downloads_seperate.php?id=348
http://www.wc3campaigns.net/showthread.php?t=80186 In case of that you didn't quite understand how to add learned spells into a spellbook, this one shows how to do it.
Also Attached a Demo Map
View attachment Spellbooks.w3x
Have fun with the mysteries of the spellbook.
Last edited: