I have a custom material intended only for armour, but civs still bring finished goods made of that material. Is this because of some error on my part in the raws? If not, is there a way to prevent this from happening?
Here's the raw for the material.
[INORGANIC:CARAPACE]
[USE_MATERIAL_TEMPLATE:METAL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:carapace]
[STATE_NAME_ADJ:LIQUID:molten carapace]
[STATE_NAME_ADJ:GAS:boiling carapace]
[DISPLAY_COLOR:2:2:0]
[BUILD_COLOR:2:2:0]
[MATERIAL_VALUE:300]
[SPEC_HEAT:7500]
[MELTING_POINT:25000]
[BOILING_POINT:50000]
[ITEMS_ARMOR]
[SOLID_DENSITY:7850]
[LIQUID_DENSITY:6980]
[MOLAR_MASS:55845]
[IMPACT_YIELD:810000000]
[IMPACT_FRACTURE:820000000]
[IMPACT_STRAIN_AT_YIELD:1]
[COMPRESSIVE_YIELD:8000000]
[COMPRESSIVE_FRACTURE:8000000]
[COMPRESSIVE_STRAIN_AT_YIELD:800]
[TENSILE_YIELD:8000000]
[TENSILE_FRACTURE:8000000]
[TENSILE_STRAIN_AT_YIELD:800]
[TORSION_YIELD:8000000]
[TORSION_FRACTURE:8000000]
[TORSION_STRAIN_AT_YIELD:800]
[SHEAR_YIELD:810000000]
[SHEAR_FRACTURE:820000000]
[SHEAR_STRAIN_AT_YIELD:1]
[BENDING_YIELD:8000000]
[BENDING_FRACTURE:8000000]
[BENDING_STRAIN_AT_YIELD:800]
[MAX_EDGE:100000]
[STATE_COLOR:ALL_SOLID:GREEN]
[NO_STONE_STOCKPILE]
Metal_template, for reference (all it really adds is [IS_METAL], I think?)
[MATERIAL_TEMPLATE:METAL_TEMPLATE]
[STATE_COLOR:ALL_SOLID:GRAY]
[STATE_NAME:ALL_SOLID:metal]
[STATE_ADJ:ALL_SOLID:metal]
[STATE_COLOR:LIQUID:RED]
[STATE_NAME:LIQUID:molten metal]
[STATE_ADJ:LIQUID:molten metal]
[STATE_COLOR:GAS:RED]
[STATE_NAME:GAS:boiling metal]
[STATE_ADJ:GAS:boiling metal]
[DISPLAY_COLOR:7:0:0]
[MATERIAL_VALUE:1]
[SPEC_HEAT:450]
[IGNITE_POINT:NONE]
[MELTING_POINT:12768]
[BOILING_POINT:15150]
[HEATDAM_POINT:NONE]
[COLDDAM_POINT:NONE]
[MAT_FIXED_TEMP:NONE]
[SOLID_DENSITY:7850]
[LIQUID_DENSITY:6980]
[MOLAR_MASS:55845]
[IMPACT_YIELD:1080000] used average for stainless steel
[IMPACT_FRACTURE:1080000]
[IMPACT_STRAIN_AT_YIELD:1000]
[COMPRESSIVE_YIELD:1080000]
[COMPRESSIVE_FRACTURE:1080000]
[COMPRESSIVE_STRAIN_AT_YIELD:1000]
[TENSILE_YIELD:520000]
[TENSILE_FRACTURE:860000]
[TENSILE_STRAIN_AT_YIELD:1000]
[TORSION_YIELD:520000]
[TORSION_FRACTURE:860000]
[TORSION_STRAIN_AT_YIELD:1000]
[SHEAR_YIELD:520000] used stainless steel
[SHEAR_FRACTURE:860000]
[SHEAR_STRAIN_AT_YIELD:1000]
[BENDING_YIELD:520000]
[BENDING_FRACTURE:860000]
[BENDING_STRAIN_AT_YIELD:1000]
[MAX_EDGE:10000]
[ABSORPTION:0]
[IS_METAL]
And the reaction the civ gets to have access to the material, which does not occur naturally.
[REACTION:FREE_CARAPACE]
[BUILDING:SMELTER:NONE]
[NAME:xxxFREE CARAPACE FOR CIVSxxx]
[PRODUCT:100:1:BAR:NONE:INORGANIC:CARAPACE][PRODUCT_DIMENSION:150]
[SKILL:SMELT]
Is the problem here that IS_METAL implicitly allows the material to be used for crafts and tools? If I remove it, will the civ be unable to bring armour made of that material?
Or is it that ITEMS_ARMOR also allows crafts, and I'm shafted either way if I want that armour?
Does nobody have an answer for this?
This is a catch 22.
IS_METAL is indeed your problem. Because your material is qualified as metal, many hard coded reactions will use the material, such as making things like bins or cages, that don't have a requisite ITEMS_XXX material usage token. IS_METAL also means that your material (Carapace) can be melted down at a smelter.
If you remove IS_METAL, then your material won't be used by or brought by outside entities unless they use wood weapons / armor, in which case you must have your carapace derive from wood. This is because the game only has entities use METAL equipment.
Sorry, I didnt see your question before.
You have two solutions for this:
The metal gets the SPECIAL tag, which will stop it from being traded. Its best to test this, if you still see it at embark, it will still appear in caravans. If its missing, it worked, and its only locally available.
Remove your reaction that produces bars, and replace it with reactions that directly make the item (armors) instead of bars. As soon as your civ gets access to bars (through mining and smelting, or a reaction like you posted) they will trade all HARD_MAT items made from this material.
These two are the only things that work. The first removes it completely from trading and embark, and you can locally use the material, although your metalcrafters will still make tools/crafts/furniture from it, if you want to.
The second solution removes it from embark and trading, and you can only generate armor with it, but requires custom reactions.
See the volcanic foundry in MDF for an example, I had the same problem.