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

heroes neutral tech upgrade

Status
Not open for further replies.
Level 3
Joined
Nov 1, 2018
Messages
51
I want to upgrade to netros heroes in all races

I do not know how to make a trigger or make the upgrade possible to search only if one or more of the four neutral heroes is recruited to not do the search without need

and I do not know if there's any way to put the upgrade in the tavern or if it's easier to put the upgrade in the house of each race
 
Level 13
Joined
Oct 12, 2016
Messages
769
Well, you could make a purchasable powerup that can be sold from the tavern for the upgrade.

If you want the upgrade to work only when the player has a neutral hero, you'll just have to trigger it and check what heroes that player has in the conditions.
 
Level 3
Joined
Nov 1, 2018
Messages
51
Well, you could make a purchasable powerup that can be sold from the tavern for the upgrade.

If you want the upgrade to work only when the player has a neutral hero, you'll just have to trigger it and check what heroes that player has in the conditions.

Do you know of a tutorial where teach how to do it?
 
Level 13
Joined
Oct 12, 2016
Messages
769
Nope, no tutorials, but I know how to do this myself.
You'll have to edit both the object data and make a trigger.
For the object data, check out "Item\Power Up\Glyph of Fortification," and what that does. You can base an item upgrade off that.
You'll also have to go into the Abilities tab and check out the Glyph of Fortification item ability: "Abilities\Special\Items\Glyph of Fortification"

In order to not waste your gold by accidentally buying multiple upgrades, something like this trigger should help:
  • Purchasable Upgrade
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-class of (Sold Item)) Equal to Powerup
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Sold Item)) Equal to Mercenary Contract
          • (Current research level of Mercenary Contract for (Owner of (Buying unit))) Equal to 1
        • Then - Actions
          • Set TempForce = (Player group((Owner of (Buying unit))))
          • Game - Display to TempForce the text: You already have that upgrade.
          • Custom script: call DestroyForce(udg_TempForce)
          • Item - Remove (Sold Item)
          • Player - Add 300 to (Owner of (Buying unit)) Current gold
        • Else - Actions
Modify the gold and lumber values to suit your needs, depending on how much the upgrade you make costs.
You can change the requirements here in the trigger, too, for whether or not the player has a neutral hero, and refund/reset the upgrade that way.
Mind you, this method will instantly give the player the upgrade.

Alternatively, you could do the other thing you mentioned.
Put the upgrade on each racial structure somewhere, then go into "Advanced\Gameplay Constants\Techtree Dependency Equivalents."
Choose one of the tier 4 through 9 sections, and add all the neutral heroes to the list there.
Below that, for the text section, type in something like: "Requires a Tavern Hero," or something.
Whatever tier you use, you can set the requirements for the upgrade to be that.

For Example: Upgrade Requirements = "Equivalents\Any Tier 4 Hall"; in the object data.
 
Last edited:
Level 3
Joined
Nov 1, 2018
Messages
51
Nope, no tutorials, but I know how to do this myself.

Alternatively, you could do the other thing you mentioned.
Put the upgrade on each racial structure somewhere, then go into "Advanced\Gameplay Constants\Techtree Dependency Equivalents."
Choose one of the tier 4 through 9 sections, and add all the neutral heroes to the list there.
Below that, for the text section, type in something like: "Requires a Tavern Hero," or something.
Whatever tier you use, you can set the requirements for the upgrade to be that.

For Example: Upgrade Requirements = "Equivalents\Any Tier 4 Hall"; in the object data.

had not thought of it ... it will be the method chosen to place a double requirement of hall 4 for heroes and hall 2 and 3 to keep equal the normal upgrades ... just put inside the houses that always have enough empty space and bingo

Thank you very much excellent solution
 
Status
Not open for further replies.
Top