You can't make one that appears in the top bar like gold and wood do, but you CAN make it exist. You have to come up with your own way of displaying it though.
To make the actual currency, use an array.
Click the Variables button (Looks like a yellow X) in the trigger editor. Click the green +X button to add a variable. Title it whatever you want, I'll use "iPlayerCurrency" as an example. Set the type to Integer, check the Array box, and make it size 12. If you're gonna use the neutral players too, set it to 16. If you're making a Frozen Throne map then it doesn't really matter because the game will resize it automatically. Leave the default at 0.
To get a player's currency, just select iPlayerCurrency from the Variable pulldown menu in anything that needs an integer value, and it'll automatically make a part that looks like "[ Index ]"
Click Index and set it to: Function: Player - Player Number Then, set the player part to whichever player you need.
To ADD currency, use: Set Variable _ iPlayerCurrency _ _ [ Player - Player Number (PLAYER) ] _ Arithmetic _ _ iPlayerCurrency _ _ _ [ Player - Player Number (PLAYER) ] _ _ + _ _ AMOUNT TO ADD
To SET currency, use: Set Variable _ iPlayerCurrency _ _ [ Player - Player Number (PLAYER) ] _ NEW AMOUNT
Wow_WhatANoobTo get a player's currency, just select iPlayerCurrency from the Variable pulldown menu in anything that needs an integer value, and it'll automatically make a part that looks like "[ Index ]"
sorry im not really good with variables but i have had experience with them but anwyways what is the variable pulldown menu? is that the same as clicking on the yellow x?
Well, I just realized, you'd need to do more stuff to make your new currency required for unit creation.
You're going to need several triggers and a bunch of things set by hand to do it.
But anyway, first things first....
what is the variable pulldown menu?
When you're making a trigger, some things take integers (a.k.a. non-fractional numbers), like for example, if you create an action with "Player - Set Property", then the last number in it (the value to set the property to) is an integer. If you click that, then you get 3 options:
Variable, Function, or Value.
Next to the Variable option is the pulldown menu that lets you select one of your variables to use it.
Now then, to actually make your currency factor in, you will NEED the expansion, because RoC doesn't support variable-sized arrays or multi-function Fors/Conditionals, which are needed for this.
The most tedious part of all this is you need to enter each unit type and cost by hand, and keep it up-to-date so the currency is handled accurately.
Those are just recyclable triggers though, you need 4 more to control item production.
Unfortunately, the only way I can think of to effectively cancel unit training is to kill the unit after it spawns. I'm not sure if they can be cancelled in training, but if they could, then you'd still lose money just by TRYING to build it.
New trigger:
(Events) Unit - Generic Unit Event | . Finished training a unit
(Conditions)
(Actions) Set Variable | . utUnitBeingCheckedType | . Event Response - Trained Unit-Type Set Variable | . iUnitCheckOwner | . Player - Player Number | . | . Owner of Unit | . | . | . Event Response - Triggering Unit Trigger - Run (Ignoring Conditions) | . Check Unit Affordability <gen> If / Then / Else, Multiple Functions | . (If - Conditions) | . Boolean Comparison | . | . bUnitCheckSucceeded | . | . Equal to | . | . True | . (Then - Actions) | . | . Set Variable | . | . | . iPlayerCurrency | . | . | . | . [ iUnitCheckOwner ] | . | . | . Arithmetic | . | . | . | . iPlayerCurrency | . | . | . | . | . [ iUnitCheckOwner ] | . | . | . | . - | . | . | . | . iUnitCheckCost | . (Else - Actions) | . | . Game - Text Message (Auto-Timed) | . | . | . Convert Player to Player Group | . | . | . | . Event Response - Triggering Player | . | . | . TEXT FOR FAILING UNIT TRAINING GOES HERE | . | . Unit - Kill | . | . | . Event Response - Trained Unit | . | . Trigger - Run (Ignoring Conditions) | . | . | . Fail Unit Creation <gen>
Another trigger for when buildings start getting made:
(Events) Unit - Generic Unit Event | . Begins construction
(Conditions)
(Actions) Set Variable | . utUnitBeingCheckedType | . Unit-Type of Unit | . | . Event Response - Constructing Structure Set Variable | . iUnitCheckOwner | . Player - Player Number | . | . Owner of Unit | . | . | . Event Response - Constructing Structure Trigger - Run (Ignoring Conditions) | . Check Unit Affordability <gen> If / Then / Else, Multiple Functions | . (If - Conditions) | . Boolean Comparison | . | . bUnitCheckSucceeded | . | . Equal to | . | . True | . (Then - Actions) | . | . Set Variable | . | . | . iPlayerCurrency | . | . | . | . [ iUnitCheckOwner ] | . | . | . Arithmetic | . | . | . | . iPlayerCurrency | . | . | . | . | . [ iUnitCheckOwner ] | . | . | . | . - | . | . | . | . iUnitCheckCost | . (Else - Actions) | . | . Game - Text Message (Auto-Timed) | . | . | . Convert Player to Player Group | . | . | . | . Event Response - Triggering Player | . | . | . TEXT FOR FAILING CONSTRUCTION GOES HERE | . | . Unit - Remove | . | . | . Event Response - Constructing Structure | . | . Trigger - Run (Ignoring Conditions) | . | . | . Fail Unit Creation <gen>
Not done yet, need to refund if the player cancels units
(Events) Unit - Generic Unit Event | . Cancels training a unit
(Conditions)
(Actions) Set Variable | . utUnitBeingCheckedType | . Event Response - Trained Unit-Type Set Variable | . iUnitCheckOwner | . Player - Player Number | . | . Event Response - Triggering Player Set Variable | . iUnitCancelRatio | . PERCENTAGE OF VALUE TO REFUND ON UNITS GOES HERE Trigger - Run (Ignoring Conditions) | . Cancellation Refund <gen>
And another if they cancel a building...
(Events) Unit - Generic Unit Event | . Cancels construction
(Conditions)
(Actions) Set Variable | . utUnitBeingCheckedType | . Unit-Type of Unit | . | . Event Response - Cancelled Structure Set Variable | . iUnitCheckOwner | . Player - Player Number | . | . Owner of Unit | . | . | . Event Response - Cancelled Structure Set Variable | . iUnitCancelRatio | . PERCENTAGE OF VALUE TO REFUND ON BUILDINGS GOES HERE Trigger - Run (Ignoring Conditions) | . Cancellation Refund <gen>