• 🏆 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 increase cost of buildings with each one built ?

Status
Not open for further replies.
Level 29
Joined
Mar 9, 2012
Messages
1,557
Ive thought this could be an nice addition but dont know how to.
It can be done to punish tower spam of humans and for town halls in general.

Each time an tower has been upgraded to one of the 3 types it adds an pre-defined static amount of cost for next tower upgrade of that type.
Fe. first Guard Tower costs amount displayed,
2. is upgraded for +15g +10w atop the original cost,
3. for +30g +15w,
4. for +45g +20w,
and so on...

First Town Hall will be built for amount displayed, 2. adds half of it atop, 3. town hall costs double the cost of first, 4. double and an half, and so on...
If player had lost all Town Halls but somehow manages to comeback there will be discount for him. (half of normal price)

Obviously this has to check how many Town Halls/Towertypes the player currently has alive and decrease the cost accordingly when he has lost it.
 
Level 11
Joined
Jan 23, 2015
Messages
788
You can make the buildings cost 0 gold, and trigger the gold subtraction. Every time a unit is issued a build order, check if the owner of the unit has the gold for the building, if no, make it stop, if it has the gold required, just let it build it and subtract the gold. You can add the gold cost in the description of the building.
Increase the gold cost for that certain type of structure every time a player gets 1 more structure.
 
Level 11
Joined
Jun 2, 2013
Messages
613
A way that you 'might' be able to do it is:

-Create several copies of the towers you want to cost more (same stats but more expensive with each copy).
-Create a Berserker upgrade with multiple levels.
-Set each upgrade level to different 'Alternate' unit - each consecutive being the more expensive towers.
-Since the towers would all be the same tower in stats, the auto 'upgrade' wouldn't hurt anything and you would be able to increase the cost with each berserker research.

-You could apply the upgrade through triggers with each tower built. You wouldn't be able to re-lower the cost however. (You could refund gold or give extra gold upon losing the structures.)

The drawback: A lot of object editor work
The Plus: Very Little triggering.
 
Level 15
Joined
Aug 14, 2007
Messages
936
You can do a builder swap trick with trigger, which means that you change the builder without the player noticing by trigger, remove current builder and create a new builder with the facing of the old. Depending on what unit the player is currently selecting you will select or not select the worker. This will make a seemingly invisible transition to the gold increase of the structure.
 
Status
Not open for further replies.
Top