EDIT: I managed to get it to work, here is the result if anyone wants to use them for their game. You might want to play around with the velocity and the bullet weight, though. At the moment it's fairly good against small-medium sized targets with no or little armor.
Metal armor deflects almost all shots but with pulling and tearing you can still disable armored targets by sheer volume of fire, considering how widely available the ammo is.
I tested 10 dorfs against a hydra and none of the 300 shots didn't manage to deal significant damage - as it should be.
Here's the raws:
Weapon:
[ITEM_WEAPON:ITEM_WEAPON_SLING]
[NAME:sling:slings]
[SIZE:50]
[SKILL:WHIP]
[RANGED:THROW:SLINGSTONE]
[SHOOT_FORCE:2000]
[SHOOT_MAXVEL:2000]
[TWO_HANDED:10000]
[MINIMUM_SIZE:10000]
[MATERIAL_SIZE:1]
[ATTACK:BLUNT:1:10:whip:whips:NO_SUB:5000]
[ATTACK_PREPARE_AND_RECOVER:3:3]
[ATTACK_FLAG_BAD_MULTIATTACK]
Ammo:
[ITEM_AMMO:ITEM_AMMO_SLINGSTONES]
[NAME:slingstone:slingstones]
[CLASS:SLINGSTONE]
[SIZE:200]
[ATTACK:BLUNT:10:50:bash:bashes:NO_SUB:1000]
[ATTACK_PREPARE_AND_RECOVER:3:3]
Reactions:
[
[REACTION:MAKE_SLINGSTONES]
[NAME:make slingstones (from stone)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_B]
[REAGENT:A:1:BOULDER:NO_SUBTYPE:NONE:NONE][WORTHLESS_STONE_ONLY]
[PRODUCT:100:30:AMMO:ITEM_AMMO_SLINGSTONES:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:STONECRAFT]
[REACTION:MAKE_SLING_LEATHER]
[NAME:make sling (from leather)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_L]
[REAGENT:A:1:SKIN_TANNED:NONE:NONE:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SLING:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:LEATHERWORK]
[REACTION:MAKE_SLING_CLOTH]
[NAME:make sling (from cloth)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_S]
[REAGENT:A:10000:CLOTH:NONE:NONE:NONE][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SLING:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:WEAVING]
[REACTION:WEAVE_CLOTH_QUIVER]
[NAME:weave cloth quiver]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:A:10000:CLOTH:NONE:NONE:NONE][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:QUIVER:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
Trying to mod craftable slings, slingstones and cloth quivers into the game. This is what I started with:
Weapon:
[ITEM_WEAPON:ITEM_WEAPON_SLING]
[NAME:sling:slings]
[SIZE:50]
[SKILL:WHIP]
[RANGED:THROW:SLINGSTONE]
[SHOOT_FORCE:2000]
[SHOOT_MAXVEL:2000]
[TWO_HANDED:10000]
[MINIMUM_SIZE:10000]
[MATERIAL_SIZE:1]
[ATTACK:BLUNT:1:10:whip:whips:NO_SUB:5000]
[ATTACK_PREPARE_AND_RECOVER:3:3]
[ATTACK_FLAG_BAD_MULTIATTACK]
Ammo:
[ITEM_AMMO:ITEM_AMMO_SLINGSTONES]
[NAME:slingstone:slingstones]
[CLASS:SLINGSTONE]
[SIZE:200]
[ATTACK:BLUNT:10:50:bash:bashes:NO_SUB:1000]
[ATTACK_PREPARE_AND_RECOVER:3:3]
Reactions:
[REACTION:MAKE_SLINGSTONES]
[NAME:make slingstones (from stone)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_B]
[REAGENT:A:BOULDER:NO_SUBTYPE:NONE:NONE][WORTHLESS_STONE_ONLY]
[PRODUCT:100:30:ITEM_AMMO:ITEM_AMMO_SLINGSTONES:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:STONECRAFT]
[REACTION:MAKE_SLING_LEATHER]
[NAME:make sling (from leather)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_B]
[REAGENT:A:1:SKIN_TANNED:NONE:NONE:NONE]
[PRODUCT:100:1:ITEM_WEAPON:ITEM_WEAPON_SLING:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:LEATHERWORK]
[REACTION:MAKE_SLING_CLOTH]
[NAME:make sling (from cloth)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_S]
[REAGENT:A:1:CLOTH:NONE:NONE:NONE]
[PRODUCT:100:1:ITEM_WEAPON_SLING:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:WEAVING]
[REACTION:WEAVE_CLOTH_QUIVER]
[NAME:weave cloth quiver]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:A:1:CLOTH:NONE:NONE:NONE][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:QUIVER:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
I found the reactions when looking around the forum but they don't seem to work. I can spawn ammo and slings in the arena and I can order them at workshops (i.e. I did not forget to permit these reactions in the entity raws).
I ordered the production of all these items in fort mode and the game crashed:
Errorlog:*** Error(s) finalizing the reaction MAKE_SLINGSTONES
MAKE_SLINGSTONES:Unrecognized Item Token: ITEM_AMMO
*** Error(s) finalizing the reaction MAKE_SLING_LEATHER
MAKE_SLING_LEATHER:Unrecognized Item Token: ITEM_WEAPON
Then I asked in the general modding thread where I got some help, but it seems like there's still missing something:
I changed my raws accordingly and now something very perculiar is happening:
I created a new world, embarked and dug some stone. Built a craftshop and ordered the making of
1 cloth sling
1 cloth quiver
1 slingstones (which should yield 30 stones)
now what happened:
a clothier brought cloth and made 10(!) slings! (How?)
a clothier brought no cloth and didn't make a quiver, job was still 'done' (i.e. he still went to the workshop, stood there for some time and then went back to the meeting area)
a stonecrafter brought no boulder to the shop, didn't make any slingstones and made 0 slingstones, the job was still 'done'
I have no idea how this could be happening.
[REACTION:MAKE_SLINGSTONES]
[NAME:make slingstones (from stone)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_B]
[REAGENT:A:BOULDER:NO_SUBTYPE:NONE:NONE][WORTHLESS_STONE_ONLY]
[PRODUCT:100:30:AMMO:ITEM_AMMO_SLINGSTONES:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:STONECRAFT]
[REACTION:MAKE_SLING_LEATHER]
[NAME:make sling (from leather)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_L]
[REAGENT:A:1:SKIN_TANNED:NONE:NONE:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SLING:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:LEATHERWORK]
[REACTION:MAKE_SLING_CLOTH]
[NAME:make sling (from cloth)]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_S]
[REAGENT:A:1:CLOTH:NONE:NONE:NONE]
[PRODUCT:100:1:WEAPON:ITEM_WEAPON_SLING:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:WEAVING]
[REACTION:WEAVE_CLOTH_QUIVER]
[NAME:weave cloth quiver]
[BUILDING:CRAFTSMAN:NONE]
[REAGENT:A:1:CLOTH:NONE:NONE:NONE][DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:1:QUIVER:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
[SKILL:CLOTHESMAKING]
I already looked into the various arms and amror mods floating around that promised to have slings in them but in none of them I found the reactions for the making of these.