(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Tutorials > Trigger (GUI) Editor Tutorials

Trigger (GUI) Editor Tutorials Contains tutorials concerning the usage of GUI features.
Read the Rules before posting.

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 04-27-2007, 09:36 PM   #1 (permalink)
 
Diablo-dk's Avatar

Shifting voidwalker!
 
Join Date: Nov 2004
Posts: 452

Diablo-dk has a spectacular aura about (128)Diablo-dk has a spectacular aura about (128)Diablo-dk has a spectacular aura about (128)Diablo-dk has a spectacular aura about (128)


The mysteries of the Spellbook

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.
ss0.jpg
But it isn't. Whenever you click on it, it will open something i would call a "skill tree".
Looks like this:
ss1.jpg
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.
Add the spellbook to the unit you want to have the passive skill(s).
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.
After you've done all this, add the disabled spell book to the unit that had the other spellbook and POOF! You succesfully transfered a new ability to the spellbook. (the ability can be removed again by removing the disabled spell book)

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.

Create a new trigger that looks like this:
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)
And one more important thing.
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
Spellbooks.w3x
Have fun with the mysteries of the spellbook.

Last edited by Diablo-dk; 05-08-2007 at 12:42 PM.
Diablo-dk is offline  
Old 04-30-2007, 06:20 PM   #2 (permalink)
 
sonkan1's Avatar

User
 
Join Date: Jan 2007
Posts: 344

sonkan1 has little to show at this moment (15)sonkan1 has little to show at this moment (15)


Use the spellbook as ability storer.

Introduction: This tutorial is created to teach people how to use the spell book as an ability storer. This makes it possible to have more than 4-5 abilities, very useful when you have more than 10 levels for the hero to gain (and you don't have to make 4 abilities that will have more than 50 levels). The ability we are adding to the spell book is a Bash ability

Stage1: Preparation.

First you should prepare the abilities so they can be added to the spell book.

1.First make a dummy spell book ability:
step1sd7.jpg

this is used to add the Bash ability to the spellbook. I call it Bash Addition.

Second, you should make a spellbook to store the ability in.
step2sb5.jpg

Note: If you want a totally clean spellbook to start with don't add any spell to the spell list.

Third, you should make a dummy tome. I'm using a tome of agility for this.
step3tw2.jpg

NOTE: if you choose to have a hero ability then uncheck the box saying it's a hero ability, else this will cause it to not show up in the spellbook.

Step 2: Trigger it

Now we come to the part were we use the stuff we prepared.
To make this work we have to trigger the ability. I am creating a trigger that allows the ability to gain level if you get more than one tome of the same type.

Add or Level [color="Red"]Bash [/color]
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Bash
Actions
--------It will increase the level of [color="Red"]Bash[/color] when you already have it --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of [color="Red"]Bash[/color] for (Triggering unit)) Equal to 0
Then - Actions
Unit - Add [color="Orange"]Bash addition[/color] to (Triggering unit)
Else - Actions
-------- Don't use Increase level of ability --------
-------- Because it can go beyond the limit --------
Unit - Set level of [color="Red"]Bash[/color] for (Triggering unit) to ((Level of [color="Red"]Bash[/color] for (Triggering unit)) + 1)

Step 4, Cleaning it up.

This may look all fine, but! It's not. When you do like this you will end up with several icons for every ability. To avoid that we will disable the ability, using a simple trigger.

Disable Bash Addition
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to [color="Orange"]Bash Addition[/color]
Actions
Player - Disable [color="orange"]Bash Addition[/color] for Player 1 (Red)
What have I done here? well I just disabled the Bash Addition , so it wont show 2 images. Thats all, now enjoy your mapping =)


Now you can add the finished tome to a shop or to be dropped by a monster.
TIP: Use lumber as payment for the ability, this makes it easier to set a price and restrict the payments (just because the hero needs to get a piece of lumber to purchase an ability).


Happy Mapping.
Attached Files
File Type: w3x Spellbook ability storer sys.w3x (14.8 KB, 288 views)

Last edited by Wolverabid; 07-06-2007 at 01:39 AM. Reason: Fixing the links. [Wolve attached images]
sonkan1 is offline  
Old 06-23-2007, 11:16 PM   #3 (permalink)
Overall Site Manager
 
Wolverabid's Avatar

 
Join Date: Oct 2006
Posts: 8,793

Wolverabid has much of which to be proud (1206)Wolverabid has much of which to be proud (1206)

Respected User: This user has been given the respected user award. User of the Year: 2007 

Thumbs up Tutorial Approved!

[EDIT]

~ Use the spellbook as ability storer approved.

~ Two threads cleaned and merged.
__________________
SuperSecretSearchSystem .......Netiquette....... Posting And You..........Read Me.......Vote

Antivirus Chat Dictionary Games Hoaxes Links Music News Quotations Reference Software


Last edited by Wolverabid; 07-13-2007 at 12:33 AM.
Wolverabid is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Spellbook... Azumi Triggers & Scripts 11 11-12-2007 12:26 PM
Campaign: Ancient Mysteries Drp3 Map Development 10 08-22-2007 04:37 PM
[Trigger] Spellbook Help EviL_BuddhA Triggers & Scripts 4 01-27-2007 01:13 PM
[JASS] Spellbook help aznricepuff Triggers & Scripts 3 07-02-2006 02:16 AM
The mysteries of warcraft - cinema wolf_kid_is_me Map Development 1 12-10-2005 12:46 AM

All times are GMT. The time now is 11:04 PM.






Your link here 
Mortgage Calculator | Mortgages | Mobile Phone deals | Advertising | Problem Mortgage
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle