[General] Research Tech Question

Level 7
Joined
Nov 6, 2019
Messages
198
Ok simple question, if I make a research/upgrade for example increase health by 3 per level damage by 5

Is it possible to edit that upgrade in game, like if you choose setting 1 goes 3hp 5dps per level, and if you choose setting 2, that upgrade changes so per level you now get 5hp 7dps

Or would I need 2 different upgrades
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
No, it's not possible. But two different Upgrades would work great. You can Set upgrade "A" to the desired Level and Set "B" back to 0, OR reverse the process and Set "A" = 0 and "B" = the desired Level. It's basically just a light switch -> On/Off, but when turning one On you need to Set it to the correct Level.

That solution aside, I attached a map showcasing how you can create your own custom upgrade system.

An upgrade isn't that complicated, it's basically using a Unit Group + a set of Abilities.
  • It Adds units to the Unit Group as they come into play based on whether or not they're "using" the Upgrade.
  • It Removes dead units from the Unit Group (excluding heroes since they can be revived) since we don't want to be modifying them anymore.
  • It Adds and Removes stat modifying Abilities to/from the Unit Group based on the upgrade Level.
  • It modifies the Ability field values based on the upgrade Level.
With that in mind, it's not too difficult to trigger the effects yourself and have complete control over everything.
 

Attachments

  • Custom Upgrades 1.w3m
    24.8 KB · Views: 1
Last edited:
Level 2
Joined
Feb 8, 2025
Messages
10
I believe this could be doable in JASS.

For the GUI, there is no option to edit integer field of upgrades. You can always just make 2 upgrades and display either one and let the player pick which one they might want.
 
Top