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

Making a Wood Banking System

Status
Not open for further replies.
Level 1
Joined
Jan 12, 2014
Messages
7
I'm new to the whole editing world and a good friend of mine would like for me to make a bank system. Would it be possible to have some help making a banking system for wood? Detailed steps would be nice to have
 
Level 1
Joined
Jan 12, 2014
Messages
7
Well i'm not all to sure how to explain it. What I would like to learn how to make is a banking system for wood so that the cap can be extended by taking the excess wood and transfer it into an integer based system that would allow the players of the map to store up wood that would allow for the map to be extended in technology and tiered systems.
 
Level 11
Joined
Nov 15, 2007
Messages
800
As in, once the player has over 100,000 wood (or whatever amount), 10,000 is removed and added to a counter that can be spent on more expensive items? Or is it simply stored and added back to the wood count later (like when the player's wood drops under 90,000 again)?
 
Level 1
Joined
Jan 12, 2014
Messages
7
What I was wanting was to have it go to the max. 1 mil wood and from there take anything produced and start to build it up in the bank for later use such as a 4 million wood upgrade. The integer i'd like to have it based on 1 tick = 1 million, but have it go 0.1, 0.2, 0.3 etc. for the ease of knowing the general amount. I'd like for it to be automatic.
 
Level 11
Joined
Nov 15, 2007
Messages
800
For the simplest example, limit max lumber to 500,000. Anything over 500,000 will go to the bank.

  • Bank Store
    • Events
      • Player - Player 1 (Red)'s Current lumber becomes Greater than 500000.00
    • Conditions
    • Actions
      • Set BankInterval = (BankInterval + ((Real((Player 1 (Red) Current lumber))) - 500000.00))
      • Player - Set (Triggering player) Current lumber to 500000
  • Bank
    • Events
      • Game - BankInterval becomes Greater than or equal to 100000.00
    • Conditions
    • Actions
      • Set Bank = (Bank + 0.10)
      • Set BankInterval = (BankInterval - 100000.00)
If you want lumber to max out instead of cutting off at 500,000 you'll have to trigger all forms of income so you can send any overflow above 1,000,000 to the bank immediately, like so:

  • Income Tick
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set AdjustedIncome = ((Player 1 (Red) Current lumber) + Income)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AdjustedIncome Less than or equal to 1000000
        • Then - Actions
          • Player - Add Income to Player 1 (Red) Current lumber
        • Else - Actions
          • Player - Set Player 1 (Red) Current lumber to 1000000
          • Set BankInterval = (BankInterval + ((Real(AdjustedIncome)) - 1000000.00))
The above system will be a bit harder to pull off if your map uses "traditional" lumber harvesting instead of an income trickle.

Making the bank is the easy part, it's spending it that will require some work. How much work depends largely on how resources in your map are spent, and on what.

Also, to display the bank you'll need a multiboard. If you only want to display it for the player who owns the bank you'll need a local multiboard for each player, otherwise a single multiboard will work: http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/all-about-multiboards-84942/
 
Level 1
Joined
Jan 12, 2014
Messages
7
The map I am helping a friend with is their take on Island Defense and Vampirism, but taken quiet a few steps forward with a higher tier system. He's wanting to do upwards of 10 million lumber tech upgrades and push the lumber system to a higher limit.
 
Level 11
Joined
Nov 15, 2007
Messages
800
using big number is just a big waste anyway lol.
I mean what's the difference between the following.
1 gold per second income, apple cost 10 gold
10 gold per second income, apple cost 100

Well, most strategy games user larger numbers because it's easier to balance. If the only change you can make to something's cost is changing it from 2 to 3 or 1, that's a relatively huge change compared to changing it from 200 to 190 or 210.

Though I have to agree if you're getting into the millions you could probably scale something back...
 
Level 1
Joined
Jan 12, 2014
Messages
7
I get where you're coming from, but he wants to add numerous tiers to the game to make it more indepth. More options, more ways to branch off, and overall numerous strategies that can be scaled higher and higher.
 
Level 1
Joined
Jan 12, 2014
Messages
7
Death how would I add that to the map then by chance? And then send it to my friend to add it to his map since he decided to edit the map and make changes while I was trying to figure out how to do the bank
 
Status
Not open for further replies.
Top