That doesn't sound too hard. What you need first is to build a json object library of your weapons.
Code: Select all
[h:newWeaponName = "Shotgun"]
[h:newWeaponObject = json.set("{}", "Category","Ranged", "Group","Solid Projectile", "Class","Basic", "Range",30, "SingleShot",1, "SemiBurst",0, "FullBurst",0, "WpnDamDice",1, "WpnDamDiceType",10, "WpnDamMod",4, "DamType","Impact", "Penetration",0,"Clip",0,"ClipSize",2,"NumClips",0, "ClipType","-","RldTime","2 Full", "TwoHanded",1, "Special","Reliable, Scatter", "Weight",5, "Cost",60, "Availability","Common", "Page",133, "Source","Dark Heresy")]
[h:WeaponLibrary= json.set(WeaponLibrary,newWeaponName,newWeaponObject)]
[h:newWeaponName = "Hand Bow"]
[h:newWeaponObject = json.set("{}", "Category","Ranged", "Group","Primitive", "Class","Pistol", "Range",15, "SingleShot",1, "SemiBurst",0, "FullBurst",0, "WpnDamDice",1, "WpnDamDiceType",10, "WpnDamMod",2, "DamType","Impact", "Penetration",0,"Clip",0,"ClipSize",1,"NumClips",0, "ClipType","-","RldTime","1 Full", "TwoHanded",0, "Special","Primitive, ", "Weight",1, "Cost",200, "Availability","Rare", "Page",135, "Source","Dark Heresy")]
[h:WeaponLibrary= json.set(WeaponLibrary,newWeaponName,newWeaponObject)]
etc.
Finally you need to adjust my code you're referring at a bit, change the "l" and "s" into "long" and "short" and add "extreme". And you can feed primaryWeapon into the code.