Hey guys, the original post here
http://www.bay12forums.com/smf/index.php?topic=162064.0 let me to create a mod for a building that allows us to use a form of currency.
What it does is add a building known as the "Counting Table"
Mint coins at a forge like normal, then dump those coins into a stockpile that gives to the first Counting Table.
Count Coins at the Counting Table to turn them into Urists of whatever coin metal is being used. Urists can only be made from Coins that are copper, silver, or gold.
Urists are now tools. Create a stockpile to receive tools from the Counting Table.
This tools stockpile should now take from the first stockpile and give to a second Counting Table.
From here the second counting table can do one of two things. It can exchange copper Urists for silver or gold and silver for copper and gold, etc.
To do this, create a third stockpile that is dedicated to receiving tools from the second Counting Table and giving to the Second Stockpile
Or it can turn Urists back into coins at a set count for payments. "Trasfer 10 Gold" takes 10 gold urists and turns them into 10 gold coins.
Create a 4th stockpile for coins set to take from the second Counting Table. Now if this dwarf owes another dwarf 21 Urists, he or she can use the following commands.
Transfer 1 Gold
Transfer 1 Silver
Transfer 1 Copper
this will put the currency equivalent of 26 Dwarfbucks(Urists) into the stockpile. Now this stockpile can be set to give to any other stockpile at any given time, usually after payment preparation is complete. Then delete the stockpile and set it back up.
All stockpiles should be Quantum and set to take from links only.
Here is the code if you would like to use it.
reaction
reaction_vault
[OBJECT:REACTION]
[REACTION:COUNT_CURRENCY]
[NAME:Count Coins]
[BUILDING:VAULT:CUSTOM_SHIFT_M]
[SKILL:RECORD_KEEPING]
[REAGENT:A:1:COIN:NONE:NONE:NONE][REACTION_CLASS:COIN_METAL]
[PRODUCT:100:1:TOOL:ITEM_TOOL_URIST:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:TOOL]
[REACTION:TRANSFER_CURRENCY_COPPER1]
[NAME:Transfer 1 Copper]
[BUILDING:VAULT:CUSTOM_C_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:1:TOOL:ITEM_TOOL_URIST:INORGANIC:COPPER]
[PRODUCT:100:1:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_COPPER2]
[NAME:Transfer 2 Copper]
[BUILDING:VAULT:CUSTOM_C_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:2:TOOL:ITEM_TOOL_URIST:INORGANIC:COPPER]
[PRODUCT:100:2:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_COPPER3]
[NAME:Transfer 3 Copper]
[BUILDING:VAULT:CUSTOM_C_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:3:TOOL:ITEM_TOOL_URIST:INORGANIC:COPPER]
[PRODUCT:100:3:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_COPPER4]
[NAME:Transfer 4 Copper]
[BUILDING:VAULT:CUSTOM_C_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:4:TOOL:ITEM_TOOL_URIST:INORGANIC:COPPER]
[PRODUCT:100:4:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:EXCHANGE_COPPER__FOR_SILVER]
[NAME:Exchange Copper for Silver]
[BUILDING:VAULT:CUSTOM_E_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:5:TOOL:ITEM_TOOL_URIST:INORGANIC:COPPER]
[PRODUCT:100:1:TOOL:ITEM_TOOL_URIST:INORGANIC:SILVER]
[PRODUCT_TOKEN:TOOL]
[REACTION:EXCHANGE_COPPER__FOR_GOLD]
[NAME:Exchange Copper for Silver]
[BUILDING:VAULT:CUSTOM_E_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:15:TOOL:ITEM_TOOL_URIST:INORGANIC:COPPER]
[PRODUCT:100:1:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT_TOKEN:TOOL]
[REACTION:TRANSFER_CURRENCY_SILVER1]
[NAME:Transfer 1 Silver]
[BUILDING:VAULT:CUSTOM_S_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:1:TOOL:ITEM_TOOL_URIST:INORGANIC:SILVER]
[PRODUCT:100:1:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_SILVER2]
[NAME:Transfer 2 Silver]
[BUILDING:VAULT:CUSTOM_S_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:2:TOOL:ITEM_TOOL_URIST:INORGANIC:SILVER]
[PRODUCT:100:2:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_SILVER3]
[NAME:Transfer 3 Silver]
[BUILDING:VAULT:CUSTOM_S_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:3:TOOL:ITEM_TOOL_URIST:INORGANIC:SILVER]
[PRODUCT:100:3:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:EXCHANGE_SILVER__FOR_COPPER]
[NAME:Exchange Silver for Copper]
[BUILDING:VAULT:CUSTOM_E_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:1:TOOL:ITEM_TOOL_URIST:INORGANIC:SILVER]
[PRODUCT:100:5:TOOL:ITEM_TOOL_URIST:INORGANIC:COPPER]
[PRODUCT_TOKEN:TOOL]
[REACTION:EXCHANGE_SILVER__FOR_GOLD]
[NAME:Exchange Silver for Gold]
[BUILDING:VAULT:CUSTOM_E_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:3:TOOL:ITEM_TOOL_URIST:INORGANIC:SILVER]
[PRODUCT:100:1:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT_TOKEN:TOOL]
[REACTION:TRANSFER_CURRENCY_GOLD1]
[NAME:Transfer 1 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:1:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:1:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD2]
[NAME:Transfer 2 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:2:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:2:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD3]
[NAME:Transfer 3 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:3:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:3:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD4]
[NAME:Transfer 4 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:4:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:4:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD5]
[NAME:Transfer 5 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:5:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:5:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD6]
[NAME:Transfer 6 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:6:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:6:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD7]
[NAME:Transfer 7 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:7:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:7:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD8]
[NAME:Transfer 8 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:8:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:8:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD9]
[NAME:Transfer 9 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:9:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:9:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:TRANSFER_CURRENCY_GOLD10]
[NAME:Transfer 10 GOLD]
[BUILDING:VAULT:CUSTOM_G_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:10:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:10:COIN:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[PRODUCT_TOKEN:COIN]
[REACTION:EXCHANGE_GOLD__FOR_COPPER]
[NAME:Exchange Gold for Copper]
[BUILDING:VAULT:CUSTOM_E_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:1:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:15:TOOL:ITEM_TOOL_URIST:INORGANIC:COPPER]
[PRODUCT_TOKEN:TOOL]
[REACTION:EXCHANGE_GOLD__FOR_SILVER]
[NAME:Exchange Gold for Silver]
[BUILDING:VAULT:CUSTOM_E_+NONE]
[SKILL:RECORD_KEEPING]
[REAGENT:A:1:TOOL:ITEM_TOOL_URIST:INORGANIC:GOLD]
[PRODUCT:100:3:TOOL:ITEM_TOOL_URIST:INORGANIC:SILVER]
[PRODUCT_TOKEN:TOOL]
URISTS
item_tool_urist
[OBJECT:ITEM]
[ITEM_TOOL:ITEM_TOOL_URIST]
[NAME:URIST:URISTS]
[DESCRIPTION:A coin minted to be currency]
[VALUE:0]
[TILE:'/']
[SIZE:10]
[MATERIAL_SIZE:1]
[UNIMPROVABLE]
Counting Table
building_custom_vault
[OBJECT:BUILDING]
[BUILDING_WORKSHOP:VAULT]
[NAME:Counting Table]
[NAME_COLOR:9:7:1]
[DIM:1:1]
[WORK_LOCATION:1:1]
[BUILD_LABOR:ARCHITECT]
[BUILD_KEY:CUSTOM_ALT_V]
[BLOCK:1:0]
[TILE:0:1:207]
[COLOR:0:1:0:7:0]
[TILE:1:1:207]
[COLOR:1:1:MAT]
[BUILD_ITEM:1:TABLE:NONE:NONE:NONE][CAN_USE_ARTIFACT]
entity file additions
[TOOL:ITEM_TOOL_URIST]
[PERMITTED_BUILDING:VAULT]
[PERMITTED_REACTION:COUNT_CURRENCY]
[PERMITTED_REACTION:TRANSFER_CURRENCY_COPPER1]
[PERMITTED_REACTION:TRANSFER_CURRENCY_COPPER2]
[PERMITTED_REACTION:TRANSFER_CURRENCY_COPPER3]
[PERMITTED_REACTION:TRANSFER_CURRENCY_COPPER4]
[PERMITTED_REACTION:EXCHANGE_COPPER__FOR_SILVER]
[PERMITTED_REACTION:EXCHANGE_COPPER__FOR_GOLD]
[PERMITTED_REACTION:TRANSFER_CURRENCY_SILVER1]
[PERMITTED_REACTION:TRANSFER_CURRENCY_SILVER2]
[PERMITTED_REACTION:TRANSFER_CURRENCY_SILVER3]
[PERMITTED_REACTION:EXCHANGE_SILVER__FOR_COPPER]
[PERMITTED_REACTION:EXCHANGE_SILVER__FOR_GOLD]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD1]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD2]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD3]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD4]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD5]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD6]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD7]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD8]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD9]
[PERMITTED_REACTION:TRANSFER_CURRENCY_GOLD10]
[PERMITTED_REACTION:EXCHANGE_GOLD__FOR_COPPER]
[PERMITTED_REACTION:EXCHANGE_GOLD__FOR_SILVER]
The reason this is in dwarf mode is that now that this mod is working, we still need to hash out the rules for value of work, skill, loyalty, etc.