baka-ranger
._.
- Reaction score
- 107
Custom Hero Creation Unveiled...
Ever wondered how they make those custom heros where you buy the item and it goes into the heros skill book? Yes? Well this is the answer! In this tutorial ill be teaching and showing you how to make Blizzard a buyable skill, and how to apply it to any other skill that wish to be buyable.
Many thanks to AceHart those many months ago when this system came to me in an epiphany moment.
Note that this is the system i use for my map "Custom Hero Line Wars"
SETTING UP
You don't need any funky programs for this, just TFT editor straight up.
What you need to do is to goto the object editor, look under the abilities tab and find:
-Engineering Upgrade [neutral hostile > heroes]
-Channel [neutral hostile > heroes]
-Spellbook [special > items]
-Blizzard [human > heroes]
if you still cant find these use CTRL + F and type it in.
You will also need a random item, any item, preferably not a tome or a charged item and make a copy of it, change the icon to the blizzard icon, strip any abilities it may have off it and rename it to blizzard and add whatever description you want. MOST importantly, make it undroppable. If you're wondering why, know that it will SERIOUSLY screw up the system if the items don't stay in their acquired position [this will be shown and explained in the triggered section].
MAKING THE SYSTEM [non-triggered part]
To start off find Blizzard, and set it to however you like, damage, duration mana cost, cooldown, set it to whatever you want.
Now find Channel. After you've found Channel, make as many copies of it as you want your heroes to be able to learn. if you want them to be able to learn 5 skills then 5 copies, 4 skills then 4 copies etc etc. For this tutorial i want them to be able to learn 5 skills of their choice [4 normal skills and 1 ultimate], so thats 5 copies of Channel. In this way Slots 1-4 will represent Normal Skills while slot 5 will represent Ultimates.
After you've copied them rename to something like, Slot 1, Slot 2, hero slot 1, ability 1 etc etc, just so you can distinguish them. I'm going to use slot 1, slot 2, slot 3, slot 4 and slot 5
I like to change the icon to the question mark [which can be found under items secret level power up] but you can change it to whatever you like. Be sure to change the research icon as well so it wont leave an ugly green box if they decide to look in their skill book before buying skills. Another nice little touch you could do is add is a description, "what skill are you going to choose?" or something to that effect.
You also need to set the number of levels these skills have to match the number of levels your real skills will have. For example, my Blizzard will have 7 levels, so ill need to set the number of levels of Channel to 7.
Once you've done that, get your hero that you want to be able to buy the skills, strip them of their current abilities and add in your Channels ie slot 1, slot 2 etc etc.
- Normal skills
This section is just how to make the 4 Normal skills. Find Engineering Upgrade and make a copy of it, set its levels to 4, set it to a unit ability and strip it bare again, bonus move speed, attack damage, everything, make sure everything is set to 0.
After doing that, find the field Level 1 - Data - Ability Upgrade 1 and set it so it looks like this.
MAKE SURE that they're all under the same ability upgrade and that all the other Ability Upgrades are blank, ALSO make sure the your Channel abilities come first. Rename it for convenience sake to something like Blizzard - Engineering.
Now find Spell book, find the fields Data - Minimum Spells and Data - Maximum Spells and set Minimum to 0 and Maximum to 5 [NOTE:: I'm not sure if you need to actually do this, but it works for me so yeah..]
After that find the field Data - Spell List which should be just under the last 2 mentioned fields and remove all the spells and add your Blizzard - Engineering which we just made, and rename the Spell Book to something that references it to Blizzard, eg Blizzard - Spell Book. Note that, your Engineering Upgrade, in the case Blizzard - Engineering, must be a unit ability before it can be entered into the spell book.
- Ultimate skills
If you want to make Blizzard an Ultimate, for whatever reason, just follow the above steps with some slight changes, mainly to Engineering Upgrade.
Instead of giving it 4 levels, simply give it one, and set Ability Upgrade 1 so that it looks like this:
We can do this because, we know that people can only buy one ultimate, that of which will fill Slot 5, so therefore we only need one level.
After doing this, the rest of the steps above regarding Spell Book can be followed.
Now for the triggered part.
MAKING THE SYSTEM [triggered part]
- Normal Skills
This is a fairly simple trigger, the only thing with it is that it assumes Normal skills will be bought before an Ultimate, but if you'd like you could easily modify it to your desires.
Now lets start making the trigger.
Since we are using the "buy an ability" scheme, we have an item representing the skill, so that once bought the hero gains that skill.
So for an event use:
Next, we need to add a condition to detect which item is acquired, so that it won't give the wrong ability for the wrong item.
So for conditions use:
So once we know that the skill bought was Blizzard we can give the hero Blizzard:
So for Actions use:
This will add the Spell Book containing Engineering Upgrade. This in effect "replaces" our Channel in the heroes Skill book with the skill just bought, therefore adding it to the hero's Skill Book directly making it a learnable skill. BUT its not finished yet.
Next we need to find out how many skills he has already bought, so that it won't want to keep replacing the first Channel ie slot 1. So we use a loop to detect where it is.
So make a loop and inside the loop add an If/then/else so we can check for it.
So do this:
This is where not making your items undroppable could potentially cause problems. Say for example, Blizzard was the first skill bought, this would be fine, but if they moved it to another inventory slot, for whatever reason, the next item will go into the first inventory slot and therefore would be trying to replace slot 1 which has already been replaced by Blizzard.
Lastly, all we have to do is hide the Spell Book icon, so theres space on the interface for the other abilities.
So just add this under the "then - actions":
And voila! Done!
Your trigger should now look something like this:
- Ultimates
The trigger for adding Ultimates is essentially the same as above, however as we know there will only be one Ultimate, we can simply add the Spell Book then disable it
So the trigger should simply look like this:
EDITING
Since these triggers are pretty simple, if you understand how they work here, then they'll be simple for you to edit to fit your situation.
Mostly it will be changing your skill desired. To do this, simply change everywhere you see Blizzard to the skill that you want.
Modifying it your situation will most likely involve fiddling with the loop, so that it fits. Sorry i cant give more advice on this...
SIDE NOTES
Another potential problem that could occur is taking 2 of the same items, when this happens the next slot is taken up but you still only have the one skill. To protect against this i made this trigger with a whole lot of conditions.
Here it is:
What this trigger does is, to check each item against each slot to see if there is another matching item, if there is, it removes it, displays the message "you cannot take 2 of the same item" and reimburses the money spent on buying the skill.
You will have to make a Spell Book, Engineering Upgrade and trigger for EVERY spell that you want to make buyable.
You'll also have to remove the items via triggers, which could be done with a simple loop.
If you don't want people to be able to see each others "skill builds" theres a field in game play constants which allows you to hide the hero's inventory from enemies. It can be found under Enemy Inventory Display, just set it to true.
You should also note that this system is different to those used in Custom Hero Arena and Enfo's hero builder TS. I'm not sure how they do it in Enfo's, somehow they use seperate units and do something bizzaro and it works out. However in Custom hero arena, they use a similar system to mine but use triggers to manually level the ability, since the icons in the skill book are static and they use game messages to tell you you cant level the ability twice in a row or something.
Anyways if you decide to use this system, credits is not necessary, but appreciated none the less.
Thanks once again to AceHart for getting me to that epiphany moment, and i hope this answers a lot of your questions.
Please feel free to comment or give feed back this is my first tutorial
so any is appreciated.
If you don't understand anything feel free to ask, id be happy to clarify for you.
- Baka-Ranger
PS sorry for the poor formatting...
Ever wondered how they make those custom heros where you buy the item and it goes into the heros skill book? Yes? Well this is the answer! In this tutorial ill be teaching and showing you how to make Blizzard a buyable skill, and how to apply it to any other skill that wish to be buyable.
Many thanks to AceHart those many months ago when this system came to me in an epiphany moment.
Note that this is the system i use for my map "Custom Hero Line Wars"
SETTING UP
You don't need any funky programs for this, just TFT editor straight up.
What you need to do is to goto the object editor, look under the abilities tab and find:
-Engineering Upgrade [neutral hostile > heroes]
-Channel [neutral hostile > heroes]
-Spellbook [special > items]
-Blizzard [human > heroes]
if you still cant find these use CTRL + F and type it in.
You will also need a random item, any item, preferably not a tome or a charged item and make a copy of it, change the icon to the blizzard icon, strip any abilities it may have off it and rename it to blizzard and add whatever description you want. MOST importantly, make it undroppable. If you're wondering why, know that it will SERIOUSLY screw up the system if the items don't stay in their acquired position [this will be shown and explained in the triggered section].
MAKING THE SYSTEM [non-triggered part]
To start off find Blizzard, and set it to however you like, damage, duration mana cost, cooldown, set it to whatever you want.
Now find Channel. After you've found Channel, make as many copies of it as you want your heroes to be able to learn. if you want them to be able to learn 5 skills then 5 copies, 4 skills then 4 copies etc etc. For this tutorial i want them to be able to learn 5 skills of their choice [4 normal skills and 1 ultimate], so thats 5 copies of Channel. In this way Slots 1-4 will represent Normal Skills while slot 5 will represent Ultimates.
After you've copied them rename to something like, Slot 1, Slot 2, hero slot 1, ability 1 etc etc, just so you can distinguish them. I'm going to use slot 1, slot 2, slot 3, slot 4 and slot 5
I like to change the icon to the question mark [which can be found under items secret level power up] but you can change it to whatever you like. Be sure to change the research icon as well so it wont leave an ugly green box if they decide to look in their skill book before buying skills. Another nice little touch you could do is add is a description, "what skill are you going to choose?" or something to that effect.
You also need to set the number of levels these skills have to match the number of levels your real skills will have. For example, my Blizzard will have 7 levels, so ill need to set the number of levels of Channel to 7.
Once you've done that, get your hero that you want to be able to buy the skills, strip them of their current abilities and add in your Channels ie slot 1, slot 2 etc etc.
- Normal skills
This section is just how to make the 4 Normal skills. Find Engineering Upgrade and make a copy of it, set its levels to 4, set it to a unit ability and strip it bare again, bonus move speed, attack damage, everything, make sure everything is set to 0.
After doing that, find the field Level 1 - Data - Ability Upgrade 1 and set it so it looks like this.
Code:
Level 1 - Data - Ability Upgrade 1 Slot 1, Blizzard
Level 2 - Data - Ability Upgrade 1 Slot 2, Blizzard
Level 3 - Data - Ability Upgrade 1 Slot 3, Blizzard
Level 4 - Data - Ability Upgrade 1 Slot 4, Blizzard
Now find Spell book, find the fields Data - Minimum Spells and Data - Maximum Spells and set Minimum to 0 and Maximum to 5 [NOTE:: I'm not sure if you need to actually do this, but it works for me so yeah..]
After that find the field Data - Spell List which should be just under the last 2 mentioned fields and remove all the spells and add your Blizzard - Engineering which we just made, and rename the Spell Book to something that references it to Blizzard, eg Blizzard - Spell Book. Note that, your Engineering Upgrade, in the case Blizzard - Engineering, must be a unit ability before it can be entered into the spell book.
- Ultimate skills
If you want to make Blizzard an Ultimate, for whatever reason, just follow the above steps with some slight changes, mainly to Engineering Upgrade.
Instead of giving it 4 levels, simply give it one, and set Ability Upgrade 1 so that it looks like this:
Code:
Data - Ability Upgrade 1 Slot 5, Blizzard
After doing this, the rest of the steps above regarding Spell Book can be followed.
Now for the triggered part.
MAKING THE SYSTEM [triggered part]
- Normal Skills
This is a fairly simple trigger, the only thing with it is that it assumes Normal skills will be bought before an Ultimate, but if you'd like you could easily modify it to your desires.
Now lets start making the trigger.
Since we are using the "buy an ability" scheme, we have an item representing the skill, so that once bought the hero gains that skill.
So for an event use:
Code:
Unit - A unit Acquires an item [Unit - Generic unit event]
So for conditions use:
Code:
(Item-type of (item being manipulated)) Equal to Blizzard [Item-Type Comparison]
So for Actions use:
Code:
Unit - Add Blizzard - Spell Book to (triggering unit) [Unit - Add Ability]
Next we need to find out how many skills he has already bought, so that it won't want to keep replacing the first Channel ie slot 1. So we use a loop to detect where it is.
So make a loop and inside the loop add an If/then/else so we can check for it.
So do this:
Trigger:
- For each (integer A) from 1 to 4, do (actions) [For each integer A, do multiple actions]
- Loop - Actions
- If (all conditions are true) then do (then actions) else do (else actions) [If/then/else, multiple actions]
- If - Conditions
- (Item carried by (triggering unit) in slot (integer A) equal to (Item being manipulated) [Item comparison]
- Then - actions
- Unit - Set level of Blizzard - Engineering for (triggering unit) to (integer A) [Unit - Set level of ability for unit]
- If - Conditions
- If (all conditions are true) then do (then actions) else do (else actions) [If/then/else, multiple actions]
- Loop - Actions
This is where not making your items undroppable could potentially cause problems. Say for example, Blizzard was the first skill bought, this would be fine, but if they moved it to another inventory slot, for whatever reason, the next item will go into the first inventory slot and therefore would be trying to replace slot 1 which has already been replaced by Blizzard.
Lastly, all we have to do is hide the Spell Book icon, so theres space on the interface for the other abilities.
So just add this under the "then - actions":
Code:
Player - Disable Blizzard - Spell book for (owner of (triggering unit)) [Player - Disable Ability]
Your trigger should now look something like this:
Trigger:
- Blizzard
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Blizzard
- Actions
- Unit - Add Blizzard - Spell Book to (Triggering unit)
- For each (Integer A) from 1 to 4, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Item carried by (Triggering unit) in slot (Integer A)) Equal to (Item being manipulated)
- Then - Actions
- Unit - Set level of Blizzard - Engineering for (Triggering unit) to (Integer A)
- Player - Disable Blizzard - Spell Book for (Owner of (Triggering unit))
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Events
- Ultimates
The trigger for adding Ultimates is essentially the same as above, however as we know there will only be one Ultimate, we can simply add the Spell Book then disable it
So the trigger should simply look like this:
Trigger:
- Blizzard
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Blizzard
- Actions
- Unit - Add Blizzard - Spell Book to (Triggering unit)
- Player - Disable Blizzard - Spell Book for (Owner of (Triggering unit))
- Events
EDITING
Since these triggers are pretty simple, if you understand how they work here, then they'll be simple for you to edit to fit your situation.
Mostly it will be changing your skill desired. To do this, simply change everywhere you see Blizzard to the skill that you want.
Modifying it your situation will most likely involve fiddling with the loop, so that it fits. Sorry i cant give more advice on this...
SIDE NOTES
Another potential problem that could occur is taking 2 of the same items, when this happens the next slot is taken up but you still only have the one skill. To protect against this i made this trigger with a whole lot of conditions.
Here it is:
Trigger:
- Blizzard
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Blizzard
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- And - All (Conditions) are true
- Conditions
- (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to (Item-type of (Item being manipulated))
- (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to (Item-type of (Item being manipulated))
- Conditions
- And - All (Conditions) are true
- Conditions
- (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to (Item-type of (Item being manipulated))
- (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to (Item-type of (Item being manipulated))
- Conditions
- And - All (Conditions) are true
- Conditions
- (Item-type of (Item carried by (Triggering unit) in slot 1)) Equal to (Item-type of (Item being manipulated))
- (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to (Item-type of (Item being manipulated))
- Conditions
- And - All (Conditions) are true
- Conditions
- (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to (Item-type of (Item being manipulated))
- (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to (Item-type of (Item being manipulated))
- Conditions
- And - All (Conditions) are true
- Conditions
- (Item-type of (Item carried by (Triggering unit) in slot 2)) Equal to (Item-type of (Item being manipulated))
- (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to (Item-type of (Item being manipulated))
- Conditions
- And - All (Conditions) are true
- Conditions
- (Item-type of (Item carried by (Triggering unit) in slot 3)) Equal to (Item-type of (Item being manipulated))
- (Item-type of (Item carried by (Triggering unit) in slot 4)) Equal to (Item-type of (Item being manipulated))
- Conditions
- And - All (Conditions) are true
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Game - Display to (Player group((Owner of (Triggering unit)))) for 10.00 seconds the text: |cffff0000YOU CANNO...
- Item - Remove (Item being manipulated)
- Player - Add 1 to (Owner of (Triggering unit)) Current gold
- Else - Actions
- Unit - Add Blizzard - Spell Book to (Triggering unit)
- For each (Integer A) from 1 to 4, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Item carried by (Triggering unit) in slot (Integer A)) Equal to (Item being manipulated)
- Then - Actions
- Unit - Set level of Blizzard - Engineering for (Triggering unit) to (Integer A)
- Player - Disable Blizzard - Spell Book for (Owner of (Triggering unit))
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
What this trigger does is, to check each item against each slot to see if there is another matching item, if there is, it removes it, displays the message "you cannot take 2 of the same item" and reimburses the money spent on buying the skill.
You will have to make a Spell Book, Engineering Upgrade and trigger for EVERY spell that you want to make buyable.
You'll also have to remove the items via triggers, which could be done with a simple loop.
If you don't want people to be able to see each others "skill builds" theres a field in game play constants which allows you to hide the hero's inventory from enemies. It can be found under Enemy Inventory Display, just set it to true.
You should also note that this system is different to those used in Custom Hero Arena and Enfo's hero builder TS. I'm not sure how they do it in Enfo's, somehow they use seperate units and do something bizzaro and it works out. However in Custom hero arena, they use a similar system to mine but use triggers to manually level the ability, since the icons in the skill book are static and they use game messages to tell you you cant level the ability twice in a row or something.
Anyways if you decide to use this system, credits is not necessary, but appreciated none the less.
Thanks once again to AceHart for getting me to that epiphany moment, and i hope this answers a lot of your questions.
Please feel free to comment or give feed back this is my first tutorial
If you don't understand anything feel free to ask, id be happy to clarify for you.
- Baka-Ranger
PS sorry for the poor formatting...
Attachments
-
46 KB Views: 912