Tutorial Custom Hero Creation Unveiled

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.

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

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:

Code:
Data - Ability Upgrade 1	Slot 5, Blizzard

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:

Code:
Unit - A unit Acquires an item	[Unit - Generic unit event]

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:

Code:
(Item-type of (item being manipulated)) Equal to Blizzard	[Item-Type Comparison]

So once we know that the skill bought was Blizzard we can give the hero Blizzard:

So for Actions use:

Code:
	Unit - Add Blizzard - Spell Book to (triggering unit)	[Unit - Add Ability]

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:

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]


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]

And voila! Done!

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



- 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))



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))
              • 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))
              • 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))
              • 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))
              • 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))
              • 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))
        • 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


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 :p 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... :p
 

Attachments

  • Custom Hero Engine Demo.w3x
    46 KB · Views: 975
This actually belongs to the Free Trigger Code, not really a tutorial.
 
Well i suppose thats upto you to decide, SFilip, but i was aiming for a tutorial, thats why i went through each line of code step by step explaining it all. But im fine with either :)
 
It doesnt work for me :banghead:

It work but you can only have 1 custom skill even if i did 4 slots and also the spellbook is still visible!

Thats my problem!
 
err.. AceHart has already created a map that has all those stuff, and its
located in the free trigger code > hero section <3
 
yes but he used dialogues to make it if im not mistaken.

and if the spell book is still showing its because you didnt disable it.

EDIT::

ehehe ok so i was mistaken... my bad :D
 
Well that map didnt use the system i wanted :(
I want it to be like in your map baka :D cause else you can max chose between 12? different skills and i want that you can chose between milions :p of different skills!

Thanks for the help anyway
 
question.

I'm new to the whole editing thing. Anyways, I can't figure out how to make a few abilities that I would like to see.

1 ability that I am having difficulty with:
How to create a melee type attack spell. One in which uses the animation model of the hero swinging weapon. I have tried taking a critical strike ability and making it clickable, but no luck with that. I have also played around with the stormbolt, yet I could not figure out how to make it look like a melee attack.

Another problem that I am having is with an item ability. I want to have it so that melee character can pick up bows click item, then target to fire. I have tried a few examples of things on other forums, but no such luck yet. There was one time that I made it so that the arrow became part of the heroes abilities, but it was still not animating like I had inplanted, nor was it doing dmg (when the dmg was set to 300.)

Any ideas, suggestions or answers? I'd appreciate any knowledge that I can gather.
 
wrong thread for a start, i suggest you start your own with those questions.

but if im not taking what you want to do the wrong way, i believe u want the "animation tags" field, right at the top of ever ability.
 
Thanks man. Brilliant. Nice way to write it so EVERYONE understands it. I like your style:cool:
 
This doesn't explain how you do it with items!? You can only have a maximum of 12 this way... could you please explain how to do it with items from a shop?
 
The items are only representative of the skill you want to "buy". so in that way you can have more then one shop, potentially having an infinite number of abilities.

If you're talking about skills on the hero, there is only really space for six abilities on the hero's UI and five in the hero's own spell book.

I'm not sure how they do it in other games like terminus arena for example, but this is just one of several ways to make a custom hero engine.

I hope i answered your question =S if not could you clarify it a little?
 
Hmmmm... i'm starting to understand more but there's sometime I still don't understand... On the Custom Hero Line Wars map (which is a great map! :D) you can pick any four of all the skills, does that make sense? But, I was looking at this way and it looked as if you could only choose from about 12 spells for the hero!

Is that just me being stupid? Would you happen to have a demo map that you can upload?

I also tried looking at ace harts demo map butthat did it a completly different way I think, because you picked the skills from the actual hero. =S That way definetly only allows you to have 12 spells to pick from...

Adamdagr8
 
what about it makes you think that you can only have a max of 12 abilities to choose from? maybe i can elaborate it for you a little more.

i don't have a demo map, but i will work on having one done for you sometime soon...
 
Oh okay! =) I'll go read over the tutorial again maybe i'm just not understanding something... drop me a message if you upload a demo.


Thanks,
Adamdagr8

Hrmm... i've made the engineering upgrades for all my spells but when I come to the spell book I can't add them...

Do I need to change it so it is not a hero ability? Because the spell book only lists unit abilitys and items...
 
yes you need to change them to unit abilities.

did i forget to mention that? :p my bad... ill edit the first post.

and sorry to keep you waiting on the demo map... i'm trying to finish the latest version of chlw... but hopefully ill have both done soon..
 
Hello,

I'm sure sure wether it is this system/tutorial that is causing this problem but my hero's wont level higher than level 5...
Could you help me?

Also, how do you make it so that players cannot select the " ? " skills before they buy them from the shop?

Thanks,
Adamdagr8
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top