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

"Any Hero" Equivalent not reconigzing heroes

Status
Not open for further replies.
Level 3
Joined
Nov 22, 2015
Messages
17
"Any Hero" Equivalent not recognizing heroes

Hi all!

I have created a custom upgrade in my map which has only a single requirement; the Any Hero equivalent, found as one of the normal options in the Object Editor. Each level of the upgrade requires you to have a hero two levels higher than the previous upgrade. Level 1 of the upgrade requires a hero level 2 or greater, level 2 of the upgrade requires a hero level 4 or greater, and so on ad infinitum.

The problem is that in game, the upgrade remains disabled, telling me I required "A hero". This problem persists regardless of which hero I currently have, including the default melee heroes (and custom ones, as well). It also seems to persist regardless of how I acquire the hero (either through training or by having him at the start). I double checked the heroes listed in the Hero Equivalency option in Gameplay Constants; even heroes listed therein don't seem to count toward enabling the upgrade.

Can anyone give me any insight into what might be going on, here? Is the "Any Hero" equivalent bugged somehow?
 
Last edited:
Level 3
Joined
Nov 22, 2015
Messages
17
No, custom heroes are simply not recognized as an "Any Hero" or for anything really. You have to manually do everything for them.

I was worried about that, but it doesn't recognize default heroes, either. This goes for edited stock heroes and completely vanilla ones. Does "Any hero" just never work, like, ever?

I tested it with the Mountain King (edited) and the Warden (completely unedited) and neither are recognized.
 
I was worried about that, but it doesn't recognize default heroes, either. This goes for edited stock heroes and completely vanilla ones. Does "Any hero" just never work, like, ever?

I tested it with the Mountain King (edited) and the Warden (completely unedited) and neither are recognized.

It should work. Where you checking with the campaign Warden? Campaign heroes are not "Any Hero." Add you custom heroes to gameplay constants. This should work.

You mentioned something about it requiring a hero 2 levels above the upgrade. How did you try to accomplish this? Maybe this is it.
 
Level 3
Joined
Nov 22, 2015
Messages
17
You mentioned something about it requiring a hero 2 levels above the upgrade. How did you try to accomplish this? Maybe this is it.

This was the problem. I had the upgrade set to simply use the "Required Level" for the hero to be 2 (4/6/8/etc) which of course doesn't make any sense to the object editor, which is parsing it like it would an upgrade, not hero levels. Removing the "level" requirement for "Any hero" allowed it to work normally, although now there is no regulator for how many times you can research the upgrade. As I read your question it became obvious to me where the problem was! Thanks.

The upgrade was supposed to be tied to hero levels; if you had a level 4 hero, you could research the upgrade twice, a level 6 hero let you research it three times, and so on... but I guess I'll have to find a way to trigger that, instead. That's a shame, since I am terrible with triggers.
 
Level 12
Joined
May 22, 2015
Messages
1,051
This was the problem. I had the upgrade set to simply use the "Required Level" for the hero to be 2 (4/6/8/etc) which of course doesn't make any sense to the object editor, which is parsing it like it would an upgrade, not hero levels. Removing the "level" requirement for "Any hero" allowed it to work normally, although now there is no regulator for how many times you can research the upgrade. As I read your question it became obvious to me where the problem was! Thanks.

The upgrade was supposed to be tied to hero levels; if you had a level 4 hero, you could research the upgrade twice, a level 6 hero let you research it three times, and so on... but I guess I'll have to find a way to trigger that, instead. That's a shame, since I am terrible with triggers.

I'm not sure if the upgrade levels allow for different tech requirements. Anyway, one trick you can do is create a dummy unit that is named "Requires a hero of level 2 or greater" and make that unit the tech requirement for the upgrade.

Then you spawn one of these units when the player's hero gets to a high enough level.

You can do the same for the higher level upgrades as well, however, it will be tedious to create and adds a ton of object editor data. Maybe there is a better solution to make it scale up better, but it might not have all the same interface as regular requirements.

You may also need to swap out the upgrades on the structure since I am not sure if you can have different tech requirements for different levels of the upgrade.
 
Level 3
Joined
Nov 22, 2015
Messages
17
Anyway, one trick you can do is create a dummy unit that is named "Requires a hero of level 2 or greater" and make that unit the tech requirement for the upgrade.

Then you spawn one of these units when the player's hero gets to a high enough level.

This is a good idea, and should be easy enough to trigger! I'll still probably fudge it somehow, but oh well. Thanks!

There is only a total of 10 levels to this upgrade, so I'll only need ten dummies. I might scale it back and use research time+cost as the prohibitive factors instead of relying solely on hero levels, as well, reducing the number of dummies I'd need.

You may also need to swap out the upgrades on the structure since I am not sure if you can have different tech requirements for different levels of the upgrade.

I don't see this being a problem. Weapons and armor by default require two different building requirements (Keep/Castle) and custom versions (with more level) work just fine. Of course, leave it to the object editor to throw a sudden curveball when it's least expected...

Thanks again for the suggestions.
 
Status
Not open for further replies.
Top