• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

How to make custom heros? (choose abilties)

Status
Not open for further replies.
Level 8
Joined
Oct 19, 2008
Messages
168
I've searched the forum but could not find the answer.

There is a "Custom Hero Arena" game where you choose a hero with no abilities and then you get to choose the abilities from different taverns for that hero.

How do I make a system like that?
especially with about 20 heros


If someone could make an example with 1 hero and a couple spells, that would definitely help!

Thanks
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
Mmm, If you are talking about the map I am thinking of then it is done like this:

The abilities do not have "Hero" classification, meaning that they are normal unit abilities.
The heroes buy them from a shop or something at the beginning of the game and later level them up by buying them from a shop again.

  • Some trigger
  • Event
    • Unit - A unit acquires an item
  • Condition
  • Action
    • If (Compare item-type with list of item-types)
      • If (Level of corresponding ability == max level )
        • refund gold
        • warning message
      • Else If (Level of ailitby == 0)
        • Give corresponding ability to hero
        • Remove item
      • Else
        • Level up ability
        • Remove item
 
Level 8
Joined
Oct 19, 2008
Messages
168
Mmm, If you are talking about the map I am thinking of then it is done like this:

The abilities do not have "Hero" classification, meaning that they are normal unit abilities.
The heroes buy them from a shop or something at the beginning of the game and later level them up by buying them from a shop again.

  • Some trigger
  • Event
    • Unit - A unit acquires an item
  • Condition
  • Action
    • If (Compare item-type with list of item-types)
      • If (Level of corresponding ability == max level )
        • refund gold
        • warning message
      • Else If (Level of ailitby == 0)
        • Give corresponding ability to hero
        • Remove item
      • Else
        • Level up ability
        • Remove item


I just played the game actually and the hero starts with no abilities expect (ability 1, 2, 3, ultimate) and then you choose those abilities from ability 1 tavern etc.. And then you can level up the abilities completely normally from the hero. How can I do that??
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
I think it is ugly.
But if that is what you want, then ok.
You must save the abilities that you buy to your hero.
When a hero learns a skill, you level the ability that is put in that slot.
The dummy learn abilities can be based of Attribute bonus and have hidden icons and 0 stats.
 
Level 8
Joined
Oct 19, 2008
Messages
168
I think it is ugly.
But if that is what you want, then ok.
You must save the abilities that you buy to your hero.
When a hero learns a skill, you level the ability that is put in that slot.
The dummy learn abilities can be based of Attribute bonus and have hidden icons and 0 stats.

Ohh I kind of get what you mean but would you mind explaining a little bit more
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Every hero has 4 integers that represent their abilities.
When you buy the upgrade, you save the ability id to the hero in the proper slot.

You give every hero 4 Attribute Bonus abilities that have a hidden icon. Set the requirements and stuff properly.
When a hero learns/levels up one of those abilities, give them or level up the ability that is saved to the hero in that slot.

You can save the data in arrays and use the player id as index. (At least if you will not have multiple heroes per player. Otherwise, use a hashtable.)
 
Level 8
Joined
Oct 19, 2008
Messages
168
Every hero has 4 integers that represent their abilities.
When you buy the upgrade, you save the ability id to the hero in the proper slot.

You give every hero 4 Attribute Bonus abilities that have a hidden icon. Set the requirements and stuff properly.
When a hero learns/levels up one of those abilities, give them or level up the ability that is saved to the hero in that slot.

You can save the data in arrays and use the player id as index. (At least if you will not have multiple heroes per player. Otherwise, use a hashtable.)


Woooooooow thank you using the attribute ability as a dummy ability made everything so much cleaner and the array and variable thing is actually exactly what I've been doing. And just to be sure, using this method means the icons of the dummy attribute abilities will all be question marks (or whatever I set them to be in object editor)? There's no way to have the dummy abilities become the same icons as the icons of the abilities the player chooses?
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
In that case, you have a spellbook with 4 abilities: Holy Light, Divine Shield, Devotion Aura and Resurrection. (for example)
When you cast any of those spells, you upgrade the unit ability linked to that cast.

You do require to make requirements of level and avaiable skill points to make it work though.
It is way better but requires much more things.
In the map you sent, there are also global learning icons and tooltips.
 
Status
Not open for further replies.
Top