Hey guys, I decided to try my hand at adding a raw mod for a workshop that takes coins of any material and splits the stacks. I thought I had everything in the right places but even after regenerating the world, the workshop doesn't show up in the build menu. Can anyone help me to see why?
Code edit 08-01-2017 16:38
EDIT: first issue has been taken care of but now the coins just disappear.
EDIT 2: coins now come out as a product, but it auto stacks the units back to 500, going to attempt to create a new item that isn't a coin.
EDIT 3: urists are the currency, but now the coins just disappear without a product.
EDIT 4: Code works, urists are individual coins now.
The next task is to create a reaction that moves the coins to and from each other with a set amount. If a dwarf is getting paid 100 urists for his or her work, we should be able to do a quick reaction for "Receive 6 Gold URISTS" and another reaction for "Receive 2 Silver Urists"
URISTS do not have the correct monetary value, so they will be made to be 0 so as not to be exploitable.
Urists will be transported as coins and split into tools inside the vault and stored on a qsp. all stockpiles must be linked and set to take and give with links only.
so coin stack of 500 goes to vault, vault then turns these coins into 500 gold urists. those gold urists stay inside the vault. When a unit is paying using urists, the unit creates a new stack of coins from the vault where no transportation must be done, then that coinstack gets transported to a linked qsp, and those then get transported to the appropriate vault.
Edit:5 Completed, everything works as intended.
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]
Final Edit:
I forgot to mention that I added the [REACTION_CLASS:COIN_METAL] tag to silver, gold, and copper.