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

How to break the unit-type limit in "Gameplay Constants".

Status
Not open for further replies.
Level 14
Joined
Jun 15, 2016
Messages
749
Here is the problem. I merged many races together which also added a large number of heroes into melee map. The problem is i can not add more heroes to "Dependency Equivalents - Hero" under "Gameplay Constants" tab in order to limit 3 training heroes. If i try to add more, some added hero names will be lost and not work at all. The question is how i can do it by using trigger codes instead of "Gameplay Constants". Further more, maybe even more solutions to Altar-type and Townhall-type as well.

Anyone? Please? I see only two available options to limit heroes from trigger are:
1. Limit training of heroes: work on all heroes (i used this to limit training number of all heroes to 3)
2. Limit training of Unit-type: only work on one specific hero (i used this to limit training number of a hero to 1)

It seems like they can not help at identifying a hero as the real hero to be realized and limited in the "Dependency Equivalents - Hero" and "Limit training of heroes".
 
Last edited by a moderator:
Level 14
Joined
Jun 15, 2016
Messages
749
I found myself a solution!!! Just:
1. Delete the "Limit Heroes to 1 per Hero-type (for all players)
2. Use "Player - Limit training of Heroes to 3 for (All Player)
3. Use "Player - Limit training of <Hero Name> to 1 for (All Player). Note: I have to manually limit back all original heroes from 4 races and heroes from tavern too.
4. Delete all Heroes in "Dependency Equivalent - Hero" under "Gameplay Constrains".

Feel free to add many heroes as you like ^^.
This works perfectly without worrying about how many heroes you want to add. Hope this help to anyone willing to do the same.

Okay, i just mess thing up. Please if anyone know how to make a hero to be considered as the "true hero" without using "Dependency Equivalents - Hero"? Because there is a limitation that i can not bypass if try to add more.?

Hungry for the answer... :3
 
Last edited by a moderator:
Level 11
Joined
Jun 2, 2004
Messages
849
Well, you could use a trigger to limit the training of ALL the unit types of the heroes in question when a 3rd one is trained. Easiest way would be to define an array at the start to include all the unit types (for easy modification later), and loop through them setting their availability to 0 after the third hero is trained.
 
Level 14
Joined
Jun 15, 2016
Messages
749
Thank you for responding, anyway. I really think it could be a real challenge if i have to somehow keep the tier upgrade, requirement and limitation of heroes. I just really hope i can break the maximum number of heroes i can add to "Dependency Equivalents - Hero", the computer will accept and recognize any units as heroes as long as they are included in this sector. If i have to do it manually, this could be just feel like a developers' work more than modders' work.

I think this problem will be a long-term and headache issue until someone really understand about this
 
Level 11
Joined
Jun 2, 2004
Messages
849
Ah, I forgot about the tier requirements for heroes 2 and 3. Yeah I can't think of an easy way to replicate that.

You could try editing the slks directly, though the limit may exist for a reason. I don't guarantee you won't get crashes/etc if you add more than allowed.
 
Level 14
Joined
Jun 15, 2016
Messages
749
Of course, it is worth the risk since i spent a lot of time on this and not give up until it is solved. Why? because i believe it can be solved :D

Ah, I forgot about the tier requirements for heroes 2 and 3. Yeah I can't think of an easy way to replicate that.

You could try editing the slks directly, though the limit may exist for a reason. I don't guarantee you won't get crashes/etc if you add more than allowed.

Do you know how to edit slk file? what kind of software i need to extract, open that?

Somebody help, plz? i'm trap in this case
 
Last edited by a moderator:
Level 14
Joined
Jun 15, 2016
Messages
749
Extract with mpqmaster. Edit with a text editor, I think.

i will try this, which one do i suppose to open? the map or warcraft mpq file?

Be aware that player can have max 7 heroes.
You must add custom heroes to Gameplay Constants: Techtree - Dependency Equivalents - Hero, then game will treat them as "real heroes".

:confused:You must misunderstand my problem, i want to bypass the limit of how many heroes i can add in Dependency Equivalents - Hero
 
Level 14
Joined
Jun 15, 2016
Messages
749
May I ask how many heroes you want to add? I got in my AoS 60 custom heroes added here: Gameplay Constants: Techtree - Dependency Equivalents - Hero w/o any problems. To be honest I didnt know there's a limit in that GameConstant field.

Well, lets see the map now includes 4 original race + 8 custom races -> 4*12 = 46 race heroes then + 8 neutral heroes = 54 heroes. Yep, i tried to add the 55th hero but will lose it anyway
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
there's limited amount of field for dependencies, I guess. you cannot have workaround for that. disable tech availability for player or disable shop's selling ability locally if you using default shops. since he cannot interact with shop it should be sync-safe
 
Level 14
Joined
Jun 15, 2016
Messages
749
there's limited amount of field for dependencies, I guess. you cannot have workaround for that. disable tech availability for player or disable shop's selling ability locally if you using default shops. since he cannot interact with shop it should be sync-safe

Unfortunately, my map is focus on custom melee race, which means all heroes can only buy via Altars. :<
I see you are the main code programmer of Dota, very professional on WE, so ....zzz i have to give up....
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
Unfortunately, my map is focus on custom melee race, which means all heroes can only buy via Altars. :<
I see you are the main code programmer of Dota, very professional on WE, so ....zzz i have to give up....
as being dota-oriented, Im missing big chunk of stuff dota never used, and dependencies are one of them. I can be wrong, but game has it's limits on some fields, and I cant imagine blizzard did borderless dep conditions. they would rather use 5-7 positions + alt branches. again, you better to use taverns-like approach
 
Level 11
Joined
Jun 2, 2004
Messages
849
A non-easy solution: Techtree requirements. Make all the heroes have a techtree requirement of both a Tier 2 and Tier 3 dummy unit that is initially placed somewhere on the map for all players and is removed/readded as appropriate. The hard part is keeping track of when the player has an appropriate tier town hall.
 
Level 14
Joined
Jun 15, 2016
Messages
749
A non-easy solution: Techtree requirements. Make all the heroes have a techtree requirement of both a Tier 2 and Tier 3 dummy unit that is initially placed somewhere on the map for all players and is removed/readded as appropriate. The hard part is keeping track of when the player has an appropriate tier town hall.

I will try everything i can to accomplish this.

May I ask how many heroes you want to add? I got in my AoS 60 custom heroes added here: Gameplay Constants: Techtree - Dependency Equivalents - Hero w/o any problems. To be honest I didnt know there's a limit in that GameConstant field.

I still want to know how you can keep up with 60 heroes while i can have only 54 heroes, ZiBitheWand3r3r. Maybe something wrong with my WE?
 
Status
Not open for further replies.
Top