So, I couldnât figure out how to make a piece of furniture be able to fire a projectile, or be reloaded. It looks like there isnât an examine action available at present to make that possible. Also, per @mlangsdorf the gundata flag wonât work with furniture, so I have no idea how to link the weapon stats to a furniture item.
Since I couldnât code my way out of a wet paper bag, Iâve come up with an alternative, at least for the 20mm rifle. I decided to take advantage of the existing MOUNTED_GUN flag, and just made the thing humongous. Weight is accurate based on the high end model. Price is based on their website: http://www.anzioironworks.com/MAG-FED-20MM-RIFLE.htm
I THINK the barrel length should be correct. Wiki says anzio barrel is 1.9 meters, and the Barrett .50 has a barrel length of 50cm.
In the code, barrett barrel length is 5, so that means the anzio should be 19 if barrel length =1= 10cm.
I had to kind of fudge the volume. Just using density of steel says it should be 7 liters, but the volume in game of the barrett .50 is higher than that. Based on density of steel, barrett should have a volume of 1.73 liters, but in game it has a volume of 3.5 liters, which is roughly double. So I just did the same thing, and made the 20mm Rifle volume 14 liters.
I havenât made the ammunition yet, but the overall power is going to be 3.93 times that of the standard .50 BMG round, based on the kinetic energy data from wiki, and come in several varieties, based off the different versions of the 20mm vulcan round used by the military: https://en.wikipedia.org/wiki/M61_Vulcan#Ammunition
Magazine will hold 3 rounds per the manufacturerâs website.
This is the prototype, see what you think. Am I missing anything it should need, or anything I need to add for balance purposes?
{
âidâ: âanzio_20mmâ,
âcopy-fromâ: ârifle_baseâ,
âtypeâ: âGUNâ,
ânameâ: âAnzio 20mm Rifleâ,
âname_pluralâ: âAnzio 20mm Rifleâ,
âdescriptionâ: âA massive anti-materiel rifle chambered for 20mm rounds, designed to destroy armored vehicles & equipment. This weapon is too large to wield directly, and must be set up on a stable surface to fire.â,
âweightâ: 59000,
âvolumeâ: 56,
âpriceâ: 1190000,
âlooks_likeâ: âm107a1â,
âto_hitâ: -1,
âbashingâ: 12,
âmaterialâ: âsteelâ,
âammoâ: â20mmâ,
ârangeâ: 45,
âranged_damageâ: -5,
âdispersionâ: 50,
âdurabilityâ: 8,
âbarrel_lengthâ: 19,
âdefault_modsâ: [ âbipodâ, ârifle_scopeâ, âmuzzle_brakeâ ],
âmagazine_wellâ: 1,
âmagazinesâ: [ [ â20mmâ, [ âanziomagâ ] ] ],
âflagsâ: [ âNEVER_JAMSâ,âMOUNTED_GUNâ ]
},