• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Allow a hero to choose his abilities?

Status
Not open for further replies.
Level 6
Joined
Oct 19, 2008
Messages
168
How can I make a system where you can choose a blank hero and then choose the blank spells you want from a selection?

Basically exactly like the game Custom Hero Arena.

I've searched everywhere and experimented myself but i cant figure out the right efficient way to do it.

How can i do it??? or is there already a thread about it? And especially with over 20 heroes and 80 abilities



thanks!
 
Level 10
Joined
Mar 31, 2009
Messages
732
Decide what system players will have for selecting their hero and abilities, then make triggers for the buttons that creates the hero and adds abilities to it when the button is pressed.

Alternatively create 20*80*4 combinations of all the heroes and abilities.
 
Level 6
Joined
Oct 19, 2008
Messages
168
Decide what system players will have for selecting their hero and abilities, then make triggers for the buttons that creates the hero and adds abilities to it when the button is pressed.

Alternatively create 20*80*4 combinations of all the heroes and abilities.

so that's the only other way huh besides making my own system? To make it legit, i'd have to make a combination of about 4241823 heros.

What do you recommend is a good system then? For leveling up the abilities, seeing how many skill points you have, etc..
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Custom Castle Defense used a research-based trick where each ability on the actual hero does absolutely nothing.
Then when the research was done, one of the abilities was replaced with one of those on the hero(probably through engineering update, I'm not sure).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Generally done using dummy learnable abilities for levelling (or items if you want a resource cost). Triggers then map these ability slots to real abilities that you gave to the hero with triggers. Remember to make all given abilities permanent so that morphs do not mess them up.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
but what about the Ability Draft map made for wc3? You get 3 random heroes out of all melee heroes and you get to choose from absolutly gigantic pool of abilities, I dont think dude went and made 60000 different units just to cover all combinations, yet you learn them normally, and they dont seem to be dummies, because as it seemed, auras arent clickable etc...

So I wonder how that was made(sorry for kind of hijacking this thread, but it is technically the same question)
 
I see, thanks Paulus and Xonok but I'm trying to get it to be just like this map

http://www.hiveworkshop.com/forums/maps-564/custom-hero-arena-1-6b-78989/

It's protected though and all the other Custom Hero games are too

That's what they had to do if they didn't know about the engineering glitch. :grin:

It's even easier to do it the way you requested though I couldn't open the map after a bit of trying however I can easily remake whatever I see.
It's not quite the exact same, it's actually better in terms of you needing to do less work then he did. I presumed you didn't want to have to do it the harder way which is hopefully correct. Hashtables makes data storing a lot easier especially for big systems like this. Sure I could of did more, but I figured to leave the main ability array an array for top speed since its the one used in a loop. Arrays are faster then Hashtables if you haven't guessed yet however the speed difference is the same as GUI VS JASS meaning not much of a difference depending on what it is.
 

Attachments

  • old hero abilupgrader.w3x
    23 KB · Views: 25

sentrywiz

S

sentrywiz

You basically want Assassins like system.
I made one from scratch, but its annoying.

You need dummy researches, X possible combinations of the spell for every hotkey and lot of triggers to detect when a unit researches an upgrade and if the unit has the ability or not.
 
Level 6
Joined
Oct 19, 2008
Messages
168
That's what they had to do if they didn't know about the engineering glitch. :grin:

It's even easier to do it the way you requested though I couldn't open the map after a bit of trying however I can easily remake whatever I see.
It's not quite the exact same, it's actually better in terms of you needing to do less work then he did. I presumed you didn't want to have to do it the harder way which is hopefully correct. Hashtables makes data storing a lot easier especially for big systems like this. Sure I could of did more, but I figured to leave the main ability array an array for top speed since its the one used in a loop. Arrays are faster then Hashtables if you haven't guessed yet however the speed difference is the same as GUI VS JASS meaning not much of a difference depending on what it is.


hey thanks for the taking the time to do all that, i looked through it and I understand what you did and it's very clean I like it. I'm going to do the same thing but with arrays and no items since I like arrays better for some reason. And i guess im just going to stick with using attribute bonus as a dummy ability and when a hero levels up and presses hero abilities to upgrade the ability, it wont be the actual icon or description of the abilities he chose, it'll just be a sword for ability 1 (offenseive) shield for defensive etc.. The players can manage I guess
Thanks again
 
Last edited:
Level 3
Joined
May 12, 2012
Messages
41
without having read all the answers, i say, i would use "dialogue buttons".
you let you hero have a "empty ability" to learn and if the player clicks it, a trigger starts:

hero skill is learned

skill equal to "empty skill"

actions
"start dialogue", let the first decision be something like "meele, ranged, magical, defensive" and then just go with sub-dialogues that open dependending on what is chosen. at the end of all, make "add skill to hero" depending on what is chosen, declared by a simple if/then/else (multi, with "else - do nothing"). although you could put this all into one trigger, i guess i'd split it basically up after the first decision, just to keep the overview.
 
Status
Not open for further replies.
Top