I have a question: My custom reaction that takes 1 plant and 1 stone tablet (custom item) as reagents does not work as intended. The dwarves take a stack of 5 plants (or up to 5) and uses them all in one reaction. What am I doing wrong here?
So far custom reactions don't respect stack sizes (so a Plump Helmet and a Plump Helmet [5] are the same to the reaction) if you want to get stack sizes to work you need a workaround. And to do that you need something to have [MATERIAL_REACTION_PRODUCT:
STUCTURE_MAT:LOCAL_PLANT_MAT:STRUCTURAL] right under your plant's [BASIC_MAT.....] and your reaction would look something like this:
[REACTION:PROCESS_PLANT_TOKEN]
[NAME:make plant tokens]
[BUILDING:(custom workshop):NONE]
[REAGENT:
A:1:PLANT:NONE:NONE:NONE][HAS_MATERIAL_REACTION_PRODUCT:
STUCTURE_MAT]
[PRODUCT:100:1:TOY:
ITEM_TOY_TOKEN:GET_MATERIAL_FROM_REAGENT:
A:
STUCTURE_MAT] -
Note you will have to make a toy item with the Ref ID [SKILL:(whatever skill)]
^^^^ this reaction will make a token based on stack, so a single plant will make one token where as a stack [5] will make 5 tokens.
SO then alter your current reaction to accept
TOY:ITEM_TOY_TOKEN and all will be well with the workaround. also if you want the conversion to give
seeds you need this on the plant as well
[MATERIAL_REACTION_PRODUCT:
SEED_MAT:LOCAL_PLANT_MAT:SEED]
and this product line on the PLANT_TOKEN reaction
[PRODUCT:100:1:SEEDS:NONE:GET_MATERIAL_FROM_REAGENT:
A:
SEED_MAT]
Quick question gents, I'm almost done with the initial testing build of my mod, but I'm still new at reactions.
Can anyone tell me how to make a reaction that would make a Large Dagger from specific stones (native copper and obsidian in this case)?
I've already built a custom workshop for it called the CRUDE_ANVIL, but I'm still not sure how to do the reaction itself.
- So far here's what I have for the reaction:
[REACTION:MAKE_COPPER_SWORD]
[NAME:make native copper Sword]
[BUILDING:CRUDE_ANVIL:NONE]
[REAGENT:A:1:BOULDER:NO_SUBTYPE:INORGANIC:NATIVE_COPPER]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SWORD_SHORT:GET_MATERIAL_FROM_REAGENT:INORGANIC:NATIVE_COPPER]
[SKILL:WEAPONSMITH]
Add a reaction class called CRUDE_METAL and add that to the reaction. so [REACTION_CLASS:CRUDE_METAL] on all the stones you want, then the reagent would be
[REAGENT:raw ore:1:BOULDER:NONE:NONE:NONE][REACTION_CLASS:CRUDE_METAL]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_DAGGER_LARGE:GET_MATERIAL_FROM_REAGENT:raw ore:NONE]
do note that the weapon ID may be wrong
Is the CRUDE_METAL reaction necessary to make it work?
OK, I tested out the custom workshop and while it did make a short sword from the ore, as I requested, the item was just called "short sword" with no material listed or quality/value, and it weighed only 1. It wasn't placed in a weapon stockpile and my militia didn't pick it up...
What did I do wrong?
Check the errorlog it will tell you the issues, and this is why (sorry I missed it, I was more concerned on your reaction to make stone daggers)
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SWORD_SHORT:
GET_MATERIAL_FROM_REAGENT:INORGANIC:NATIVE_COPPER]
it should be:
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SWORD_SHORT:INORGANIC:NATIVE_COPPER]Also stone weapons/ammo and other things don't get stockpiled