weapons config

From Onset Developer Wiki
weapons.json
Config Description
Name Name of the weapon that will be shown on the weapon HUD.
RateOfFire How often this gun can be fired per minute.
Damage How much this damage causes on players.
Range Bullet range.
MagazineSize How many rounds per magazine.
CameraShake Camera shake when shooting.
CameraShakeCrouching Camera shake when shooting and crouching.
SpreadMin Spread minimum.
SpreadMax Spread maximum.
SpreadMovementModifier Spread factor when walking while shooting.
SpreadCrouchingModifier Spread factor when crouching while shooting. Negative value makes sense here because you have more stability when crouch aiming.

Example weapons.json

{
	"weapons": [
		{
			"Name": "Fist",
			"RateOfFire": 120.0,
			"Damage": 15.0,
			"Range": 60.0,
			"Recoil": 0.0,
			"MagazineSize": 0,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Pistol01",
			"RateOfFire": 90.0,
			"Damage": 40.0,
			"Range": 6500.0,
			"Recoil": 0.3,
			"MagazineSize": 8,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Pistol02",
			"RateOfFire": 130.0,
			"Damage": 22.0,
			"Range": 7100.0,
			"Recoil": 0.3,
			"MagazineSize": 10,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Pistol03",
			"RateOfFire": 150.0,
			"Damage": 21.0,
			"Range": 7400.0,
			"Recoil": 0.3,
			"MagazineSize": 14,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Pistol04",
			"RateOfFire": 100.0,
			"Damage": 23.0,
			"Range": 7000.0,
			"Recoil": 0.2,
			"MagazineSize": 9,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Shotgun01",
			"RateOfFire": 50.0,
			"Damage": 50.0,
			"Range": 3000.0,
			"Recoil": 0.3,
			"MagazineSize": 12,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Shotgun02",
			"RateOfFire": 60.0,
			"Damage": 55.0,
			"Range": 3100.0,
			"Recoil": 0.3,
			"MagazineSize": 10,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "SMG01",
			"RateOfFire": 480.0,
			"Damage": 19.0,
			"Range": 7500.0,
			"Recoil": 0.3,
			"MagazineSize": 40,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "SMG02",
			"RateOfFire": 550.0,
			"Damage": 12.0,
			"Range": 6000.0,
			"Recoil": 0.3,
			"MagazineSize": 50,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "SMG03",
			"RateOfFire": 450.0,
			"Damage": 20.0,
			"Range": 9000.0,
			"Recoil": 0.33,
			"MagazineSize": 35,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle01",
			"RateOfFire": 450.0,
			"Damage": 21.0,
			"Range": 10000.0,
			"Recoil": 0.3,
			"MagazineSize": 31,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle02",
			"RateOfFire": 450.0,
			"Damage": 21.0,
			"Range": 8700.0,
			"Recoil": 0.3,
			"MagazineSize": 31,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle02 Gold",
			"RateOfFire": 450.0,
			"Damage": 23.0,
			"Range": 8700.0,
			"Recoil": 0.3,
			"MagazineSize": 31,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle03",
			"RateOfFire": 440.0,
			"Damage": 20.0,
			"Range": 8800.0,
			"Recoil": 0.3,
			"MagazineSize": 31,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle04",
			"RateOfFire": 240.0,
			"Damage": 24.0,
			"Range": 9800.0,
			"Recoil": 0.3,
			"MagazineSize": 20,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle05",
			"RateOfFire": 600.0,
			"Damage": 21.0,
			"Range": 9400.0,
			"Recoil": 0.37,
			"MagazineSize": 36,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle06",
			"RateOfFire": 240.0,
			"Damage": 25.0,
			"Range": 11500.0,
			"Recoil": 0.25,
			"MagazineSize": 20,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle07",
			"RateOfFire": 450.0,
			"Damage": 22.0,
			"Range": 9800.0,
			"Recoil": 0.31,
			"MagazineSize": 30,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Rifle08",
			"RateOfFire": 550.0,
			"Damage": 22.0,
			"Range": 11000.0,
			"Recoil": 0.33,
			"MagazineSize": 20,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 2.0,
			"SpreadMovementModifier": 0.2,
			"SpreadCrouchingModifier": -0.3
		},
		{
			"Name": "Sniper",
			"RateOfFire": 60.0,
			"Damage": 80.0,
			"Range": 13000.0,
			"Recoil": 0.4,
			"MagazineSize": 7,
			"CameraShake": 1.0,
			"CameraShakeCrouching": 0.5,
			"SpreadMin": 0.1,
			"SpreadMax": 1.0,
			"SpreadMovementModifier": 0.4,
			"SpreadCrouchingModifier": -0.2
		}
	]
}