I expanded on MaximumZero's Gem Armor in this post
http://www.bay12forums.com/smf/index.php?topic=79036.msg2508648;topicseen#msg2508648.
-Now the Refractory should let you choose what weapon or armor to produce rather than pooping out something random from item_whatever.txt. Also, some reactions require additional materials when it's simply too silly for the object to made entirely from a couple of gemstones, such as war hammers.
reaction_gem_gear
[OBJECT:REACTION]
[REACTION:GEM_AXE]
[NAME:make a gem battle axe]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_AXE_BATTLE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_MACE]
[NAME:make a gem mace]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_MACE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_SSWORD]
[NAME:make a gem shortsword]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SWORD_SHORT:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_LSWORD]
[NAME:make a gem longsword]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SWORD_LONG:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_SPEAR]
[NAME:make a gem spear]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[REAGENT:B:1:WOOD:NONE:NONE:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SPEAR:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_WHAM]
[NAME:make a gem/metal war hammer]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[REAGENT:B:150:BAR:NO_SUBTYPE:METAL:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_HAMMER_WAR:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_DAGGER]
[NAME:make a gem dagger]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_DAGGER_LARGE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_BOLT]
[NAME:make gem bolts]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[REAGENT:B:1:WOOD:NONE:NONE:NONE]
[PRODUCT:100:25:AMMO:ITEM_AMMO_BOLTS:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_ARROW]
[NAME:make gem arrows]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[REAGENT:B:1:WOOD:NONE:NONE:NONE]
[PRODUCT:100:25:AMMO:ITEM_AMMO_ARROWS:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_BPLATE]
[NAME:make a gem breastplate]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:ARMOR:ITEM_ARMOR_BREASTPLATE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_BOOTS]
[NAME:make gem high boots]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:SHOES:ITEM_SHOES_BOOTS:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_SHIELD]
[NAME:make a gem shield]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:SHIELD:ITEM_SHIELD_SHIELD:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_HELM]
[NAME:make a gem helm]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:HELM:ITEM_HELM_HELM:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_GAUNT]
[NAME:make gem gauntlets]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:GLOVES:ITEM_GLOVES_GAUNTLETS:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
[REACTION:GEM_GREAVES]
[NAME:make gem greaves]
[BUILDING:REFRACTORY:NONE]
[REAGENT:A:1:SMALLGEM:NO_SUBTYPE:INORGANIC:NONE]
[PRODUCT:100:1:PANTS:ITEM_PANTS_GREAVES:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CUTGEM]
-I changed the gem material properties so that the fracture point should always be lower than the yield point (i.e. theoretically they should only shatter, never bend). Noticing that for all the metals IMPACT = COMPRESSIVE and TENSILE = TORSION = SHEAR = BENDING, I figured I should keep the pattern, so the numbers I used were
Ornamental:
[IMPACT_YIELD:150001]
[IMPACT_FRACTURE:150000]
[COMPRESSIVE_YIELD:150001]
[COMPRESSIVE_FRACTURE:150000]
[TENSILE_YIELD:100001]
[TENSILE_FRACTURE:100000]
[TORSION_YIELD:100001]
[TORSION_FRACTURE:100000]
[SHEAR_YIELD:100001]
[SHEAR_FRACTURE:100000]
[BENDING_YIELD:100001]
[BENDING_FRACTURE:100000]
[MAX_EDGE:8000]
semiprecious:
[IMPACT_YIELD:200001]
[IMPACT_FRACTURE:200000]
[COMPRESSIVE_YIELD:200001]
[COMPRESSIVE_FRACTURE:200000]
[TENSILE_YIELD:200001]
[TENSILE_FRACTURE:200000]
[TORSION_YIELD:200001]
[TORSION_FRACTURE:200000]
[SHEAR_YIELD:200001]
[SHEAR_FRACTURE:200000]
[BENDING_YIELD:200001]
[BENDING_FRACTURE:200000]
[MAX_EDGE:10000]
precious:
[IMPACT_YIELD:250001]
[IMPACT_FRACTURE:250000]
[COMPRESSIVE_YIELD:250001]
[COMPRESSIVE_FRACTURE:250000]
[TENSILE_YIELD:500001]
[TENSILE_FRACTURE:500000]
[TORSION_YIELD:500001]
[TORSION_FRACTURE:500000]
[SHEAR_YIELD:500001]
[SHEAR_FRACTURE:500000]
[BENDING_YIELD:500001]
[BENDING_FRACTURE:500000]
[MAX_EDGE:20000]
I don't know if these numbers make any sense. For comparison, the impact yield of copper is 245000 (with all other metals higher than that) and the tension(etc) yield of metals ranges from 70000 (copper) to 430000 (steel). So all gems should resist edge attacks better than copper; Iron is 155000 so ornamental is worse and the others are better; semiprecious should resist edge better than anything but steel and candy, and precious gems should resist edge attacks better than anything that doesn't explicitly break several laws of physics. Is my reasoning correct?
Testing it, it seems to be working, although the weapons are piling up in the Refractory instead of going into a nearby weapon stockpile (despite all hauling labors enabled on everyone) (do I need to add [ITEMS_WEAPON][ITEMS_AMMO][ITEMS_ARMOR] tags to each gem in inorganic_stone_gem?). Stuff seems to be showing up in the right color in-game (i.e. a "pink tourmaline battle axe" is a reddish-pink color; a pyrite battle axe is yellow). I assigned one dwarf to the military and he immediately picked up a pyrite battle axe. Also despite having a bunch of axes and the woodcutter labor enabled on everyone, only the copper battle axe brought on embark is being used. When I activated woodcutter, having only 4 axes by this point for 7 dwarves, the three dwarves in a squad dropped the axes; when I deactivated woodcutter, they picked them up again.
sent military against a badger, and got a bunch of "The Recruit hacks The Badger Boar in the bodypart with his -pink tourmaline battle axe- and the severed part sails off in an arc!" followed by a dead badger and badger chunks littering the battlefield, so I'm calling this basically a success. Huzzah!
Side question about gear. Do dwarves get new equipment of the same slot (for example ditching a copper breastplate for a steel one) based on value in dwarfbucks or is it somehow based on the item's material properties?
edit: okay odd problem, bolts aren't getting used at all, I guess because they're not in the stockpile? I'll try adding the [ITEMS_] tags to the gem raws to see if that fixes it.
edit2: actually they already had them, so I have no idea
edit3: searching the forums, this seems to be just one of those things; is there a way to get them put into at least ANY stockpile?
edit4: okay found a good-sounding answer
http://www.bay12forums.com/smf/index.php?topic=94292.msg2662510#msg2662510edit5: yep, that did it. bolt are the color of the material, sweet! it looks like star wars, pew pew pew