• 🏆 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!

Having More than 5 Abilities available for a hero, without spellbook?

Status
Not open for further replies.
Level 4
Joined
Jul 5, 2015
Messages
75
I am looking for a way to have a hero have the max 5 abilities, but later on, switch out the entire set and have another set, in the learning car, and have the base 5 disabled so they cannot be used, even if passive.

Example:

Hero A has in his learning card:
Wind Walk
Evasion
Avatar
Banish
FlameBolt

After X condition has been achievied:
Hero A's original abilities have been removed (getting only 1 point to spend on the new set)
Hero A can NO LONGER use his original ability set
Afterwards:
Hero A has in his learning card:
Inner Fire (hero)
Bash
Spirit of Vengeance (the Ult)
Endurance Aura
Unholy Frenzy (hero)
 
Level 12
Joined
Jun 15, 2016
Messages
472
You can create 2 hero units each one with a different skill set, and when the necessary conditions are met (like unit reaches level), switch one with the other. The switching trigger can include saving the former hero's attributes and items and assigning them to the new unit to make the switch seamless.
 
Level 4
Joined
Jul 5, 2015
Messages
75
What I want is a way to kepp the SINGULAR hero, with absolutely NO detectable changes to the hero himself, only his abilities. Is there a way to morph/change abilities mid game?
 
Level 12
Joined
Jun 15, 2016
Messages
472
Well with an unfortunate computer crash I can't test anything, however there should be several possible methods:

1. bearform trick - Hero passive transformation

2. Chaos ability (usually not recommended) - Hero passive transformation

3. Copying the heroes values and attribute then pasting that on the new unit - requires keeping track of level, scroll of strength hp etc. a bit of a pain, and requires some triggers that would keep the old hero's stats saved in variables. But definitely a doable option.
 
Level 4
Joined
Jul 5, 2015
Messages
75
I really don't want to be making another unit, and the bearform trick does not look like it'll work for what I want. Looks like what I want may only be accessible through JASS D: <---- I'll get there eventually.

+ this question is only to see if there is a way to actually do this, before I even implement the hero change or rank up in my map.
 
Level 13
Joined
Jan 2, 2016
Messages
973
I usually use Engineering Upgrade to switch heroes' skills.
The problem with it is that I must replace the abilities with the same type of ability. If it's gonna be a chanelling ability - you need to replace it with such as well..
I guess it wouldn't be much of a problem if you use channel for your skills, and trigger their effects, tho you'd still need to always have the same type of ability in the skill slot :p
 
Level 19
Joined
Jul 2, 2011
Messages
2,162
simple solution... create a metaphors ability

I would uses illidains demonic form.

when he changes to demon form, all his states are swapped over to a new body (hero) with new abilities(add your new abilities to this new body)

this will only last until the morphed form expires, but if you use a trigger to kill and replace the morph with a copy of the same UNit... the expiration time disappears and you now have a permanent new hero with new abilities

if you want to keep the same model file, use the same model file to of the hero you morph
 
Level 13
Joined
Jan 2, 2016
Messages
973
Metamorphosis does NOT change hero's abilities, even if the morphed form has another set of skills. You need to make a custom Engineering Upgrade skill, which you give to the unit after metamorphing in order to change its skills.

I can however offer a workaround, which wouldn't look too good, but may work quite well:
1) Give each hero 5 dummy skills, which do nothing, and are hidden. Base them on the yellow + ability, which usually gives bonus stats.
2) If you want your hero to be buying the skills - "When the hero buys skill from shop 1 - set a global variable (array) to the id of the skill he has bought.
I'd do it like: udg_skills[array], and players will have their skills saved like this - skill "i" (from 0 to 4) will be saved in udg_skills[ GetPlayerId(player)*5 + i ]
This way player 1's 1-st skill will be in udg_skills[0], 2-nd skill in udg_skills[1].... 5-th skill in udg_skills[4]; 2-nd player's 1-st skill will be in udg_skills[5], etc....
3) When "Player 1's hero" levels its 1-st "yellow plus" (dummy hero skill) - give the hero udg_skills[0]; When it's leveled again - set the skill's level to the level of the hero's 1-st yellow plus call SetUnitAbilityLevel(hero, udg_skills[GetPlayerId(player)], GetUnitAbilityLevel(hero, udg_dummyskill[0])).
4) When you want to change the skill - remove the skill, and give the hero the new one:
JASS:
call UnitRemoveAbility(hero, udg_skills[p_id]) // removes the old skill
set udg_skills[p_id] = LoadInteger(udg_Table, 0, GetItemTypeId(GetManipulatedItem())) // I'd recomend linking the skills' IDs with the items' IDs via a hashtable.
// This way, when the player buys an item - you don't need to do 1000 'if' checks, you just need to load the value from the hashtable
// You will need to save all the values in the hashtable in an initializing trigger tho.
call UnitAddAbility(hero, udg_skills[p_id]) // So, with all the above said - you simply add the actual skill to the hero
call SetUnitAbilityLevel(hero, udg_skills[p_id], GetUnitAbilityLevel(hero, udg_dummyskill[0])) //And since you are replacing the skill - you'd likely want to keep its old level, so just give it (again) the level of the yellow plus skill

I know it may be a bit confusing when I'm showing you only parts of the triggers, but if you can script in jass - you should manage.
Also do note, that the dummy skills (the yellow pluses) are supposed to be hero abilities, and the actual skills should be unit abilities.
 
Last edited:
Level 4
Joined
Jul 5, 2015
Messages
75
All things considered. I might just do a creepy pasta with a different sub/hero tag, diff abilities, same agi/str/int stats (from this point on, all stats will be increased by hero leveling (so 1.35 agi will stay 1.35 agi per level), but also by triggers, dependent on which ability set they have "bought". (this works great for me, because it will keep the stats the EXACT same at the same level so @ level 30, Hero A has 30 str, 15 int, 48 agi, even after he buys the ability changes.

As with all my triggers/help, I say I will do my best starting with GUI, then in later updates move into JASS as I learn it.
 
Status
Not open for further replies.
Top