public record class WeaponDefinitionA weapon, as a designer wrote it.
Remarks
Doc 28 § Shooting: hitscan and projectile weapons, spread and recoil patterns, ammunition and reload state, penetration and falloff. What a hit does is Vixen.Gameplay.Combat's damage pipeline, because a headshot is a Crit-stage rule and armour is a Mitigate one.
Fields and properties (18)
public string DisplayNameWhat it is called in the UI.
public WeaponKind KindHow its shot reaches what it hits.
public DamageDefinition? DamageWhat one pellet does.
public int PelletsHow many pellets one shot fires. One is a rifle; eight is a shotgun.
public float RoundsPerSecondHow many shots a second.
public bool AutomaticWhether holding the trigger keeps firing.
public int BurstHow many shots one trigger pull fires. Zero or one is not a burst.
public float RangeHow far a shot reaches at all, in metres.
public float ProjectileSpeedHow fast a projectile travels, in metres per second. Ignored by a hitscan.
public int MagazineHow many rounds a magazine holds.
public int ReserveHow many rounds are carried beyond the magazine. Zero is unlimited.
public float ReloadTimeHow long a reload takes, in seconds.
public bool ReloadsPerRoundWhether a reload puts rounds in one at a time, so it can be cut short.
public FalloffDefinition? FalloffHow much it loses over distance, or null for none.
public SpreadDefinition? SpreadHow wide it goes, or null for perfectly accurate.
public RecoilDefinition? RecoilHow it climbs, or null for none.
public PenetrationDefinition? PenetrationHow far it carries on, or null to stop at the first thing.
public List<string> TagsWhat this weapon is — Weapon.Rifle.Assault.
Methods (1)
public override void CollectTags(ICollection<string> tags)Every tag this definition mentions, so the content build can bake the tag table.
Used by (9)
- ContentVixen.Gameplay.Shooting.Tests
- ShootingModuleVixen.Gameplay.Shooting
- TypeRegistrationVixen.Gameplay.Shooting
- Vixen_Gameplay_Shooting_WeaponDefinitionSerializerVixen.Gameplay.Shooting
- WeaponLibraryVixen.Gameplay.Shooting
- WeaponLibraryTestsVixen.Gameplay.Shooting.Tests
- WeaponStateVixen.Gameplay.Shooting
- WeaponStateTestsVixen.Gameplay.Shooting.Tests
- WeaponTemplateVixen.Gameplay.Shooting