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

In game hero ability customization

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
You could set each of your abilites into an array then set each item that represents that ability to a custom value = to the array index of that ability. Then when your heroes have items you would do something like...

  • Actions
    • For each (Integer A) from 1 to 6, do (Actions)
      • Loop - Actions
        • Unit - Add Abilities[(Custom value of (Item carried by (Triggering unit) in slot (Integer A)))] to (Triggering unit)
Abilities = the Ability variable
[(Custom value of (Item carried by (Triggering unit) in slot (Integer A)))] = the index reference

Oh and to set the custom value you would need this...

  • SetItemCV
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to AnItemType
    • Actions
      • Item - Set the custom value of (Item being manipulated) to 0
You would need a trigger like this for each item/ability.


Dunno. Maybe there is a faster way than doing this for each item.
 
Level 7
Joined
Apr 27, 2008
Messages
94
You misunderstand me... I know all too well how to give heroes abilities, but giving them abilities does not add that same ability to their "learn ability" button, it just superficially adds them to the command card. This does not work, I was wondering if anyone knew how to also add the ability to the learn ability button, a hero ability.
 
Level 8
Joined
Nov 9, 2008
Messages
502
There must be an option somewhere or a little trick because I'm pretty sure Custom Hero Line Wars makes them into the hero abilities.
 
Level 3
Joined
Feb 18, 2005
Messages
50
It shouldn't actually be to hard good sir.

In theory, all you have to do is have multiple heroes with the same base attributes, names, etc. and have them each with different ability sets learnable. Then, set a trigger to allow you to change on hero for the next while keeping his spells (I'm assuming you can find a way to save the spells or duplicate them before the hero is deleted or something, I'm not too Trigger savvy).

This method would ensure that the abilities that are add to the hero aren't learned yet, the only thing I'm not sure about is retaining the old abilities.

However, if you could figure out a way to make the changed hero an alternate form (like metamorphosis or something, just permanent) I'm sure the multi-versions-of-the-heroes idea will work. It would be similar to how you can add normal abilities to an alternate form, it's just it's a hero ability and not learned by default.
 
Level 7
Joined
Apr 27, 2008
Messages
94
Sadly, that method doesn't work. If I have 20 abilities (there will be more than 20), that would mean 20000 different combinations of 4 hero abilities. And 20000 different heroes is a little bit of overkill.
 
Level 3
Joined
Feb 18, 2005
Messages
50
Hmm, didn't consider that. I'll poke my nose through some triggers and get back to you, don't count on me finding anything though :\

edit: Sorry, no luck :(
 
Level 8
Joined
Nov 9, 2008
Messages
502
Hold on, there was a site I was shown a while ago that shows trigger codes for some maps. Problem is I've formatted since then and the bookmark is lost while the guy who showed me is unreachable. If I find him and find the site I maybe be able to check the triggers to see what the maker of CHLW has done.

I do not support hacking protected maps ;)
 
Level 3
Joined
Feb 18, 2005
Messages
50
Well, I'm trying a trigger system for a map of mine and I figure I'll share it with you because there is an off chance it may help.

My concept is to avoid using the hero abilities section, because I'm using it for something else, but because of which I needed a new way to give heroes skills. My concept is to use a spellbook spell and give it to the hero, and that spell book spell will have dumby spells that will be "casted" for 0 mana and no cooldown, however, the spellbook becomes deactivated once the user casts a spell. The dumby spell won't do anything, but it will set off a trigger which will teach the hero the skill learned. It will function much like the hero ability screen, but it won't show the levels of each one.

You might want to give that a shot. Good Luck!
 
Level 8
Joined
Nov 9, 2008
Messages
502
Ye I will get on that. Another option would be to track down the creator of CHLW and simply ask.

You know, when you gain the item in CHLW it straight away replaces that 'No ability' icon in the hero book with that ability. Maybe it's got something to do with sharing IDs and some other funky shiz
 
Level 3
Joined
Feb 18, 2005
Messages
50
No problem, if it helps good on ya, if not oh well. At least I tried.

Good luck in your journeys!
 
Status
Not open for further replies.
Top