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

Reduced cost for tower upgrade

Status
Not open for further replies.
Level 14
Joined
Nov 4, 2006
Messages
1,241
So, i just got back to wc3 mapping after a looong break and i seem to have forgotten everything.

Simple Problem, i have x towers
lvl1 - 10 gold
lvl2 - 100 gold
lvl3 - 1000 gold
....


My worker can build all of them for the listed price. I also want them to be upgradable but for the price difference.

so lvl1 upgrades to lvl2 for 90 gold, lvl2 upgrades to lvl3 for 900 gold etc. I know it was something fairly easy but after googling for 30 mins i couldn't find it.

Help pls :)
 
Level 23
Joined
Dec 4, 2007
Messages
1,558
I think you need to have 2 towers for each upgrade then.
lvl 1 tower - 10 gold cost to build
lvl 2 tower(1) - 100 gold cost to build
lvl 2 tower(2) - 90 gold cost to upgrade (not in the build list of your worker)
lvl 3 tower(1) - 1000 gold cost to build
lvl 3 tower(2) - 900 gold cost to upgrade (not in the build list of your worker)
 
Level 11
Joined
Jun 2, 2004
Messages
849
Unfortunately, no. You'll have to do some sort of workaround to force a dynamic construction cost like that. The charge gold and lumber ability probably won't be your solution either, since it doesn't work with levels.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
If a structure is upgraded, refund the gold difference using triggers. Sure the player will still need 1000 gold to start level 3, however they will be refunded 100 gold as they already own a level 2. Not ideal but better than nothing.

On an off topic note StarCraft II does exactly what you want with its unit morphs, keeping track of the total unit cost and only charging the difference.
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
I'm using a trigger option

  • Events
    • Unit - A Unit is issued an order without target
  • Conditions
    • issued order not equal to stop
    • ((Triggering unit) is a building) equal to True
  • Actions
    • Player - Add (Point-value of (Triggering unit)) to (Owner of (Triggering unit)) current gold
So far i haven't found a way to exploit it, so i'll stick with it for now, if my towers get more abilitys later i may have to tweak the conditions a little.
 
Level 18
Joined
Jun 15, 2012
Messages
498
Not at home atm
but I remember testing something about "use relative costs for upgrades" or something similar in gameplay costants (don't know how it is called in english)
I remember having it change upgrade costs in some way when I was testing it

will try again later
 
Status
Not open for further replies.
Top