KRISS Vector
Ammunition variants New
Two jobs: a new calibre from scratch, and an AP variant made of a vanilla round.
A magazine and its ammunition
- A projectile prefab (
ShellMoveComponent: initial speed, mass, diameter, penetration). Damage follows from the physics, not from a damage value. - A MagazineConfig (
.conf) with anAmmoResourceArraylisting the projectile prefabs. - The magazine prefab points at the config.
AmmoMappingassigns a config entry to each round. - A magazine well class decides which magazines fit which weapon. A second calibre needs its own well, or a .45 magazine goes into a 9 mm weapon.
A vanilla round as it is
An AP magazine does not need a new projectile. A config that lists the vanilla round is enough:
MagazineConfig {
AmmoResourceArray {
"{018D1E98D412F637}Prefabs/Weapons/Ammo/Ammo_9x19_AP_7N31.et"
}
}
The GUID of a vanilla resource is in the resourceDatabase.rdb of the game addon, next to its path.
A new calibre
- Base the projectile on
Ammo_Bullet_Base, set speed and mass; keep a ballistic table of a similar round for the AI. - Casing: the ejected brass is a particle effect that spawns a prefab with a mesh. Copy the vanilla casing effect and point it at your own case prefab.
- Speed: a subsonic round sets the speed below about 343 m/s and the penetration speed to roughly 0.935 of it.
Ammunition type labels
MagazineUIInfo.m_eAmmoTypeFlags decides the icons and labels in the inventory and the weapon info. The flags combine: FMJ is 1, AP is 4, Subsonic is 2048, so a subsonic
full metal jacket is 2049.
A quieter suppressed shot
The vanilla suppressed shot is an audio project (.acp) of banks, filters and buses. Copy the project into your addon and change the numbers: every bank volume lowered by the
same amount makes the shot quieter, an equaliser band on the body bus cuts the high end, and the volume of the slap-back bus decides how much echo remains.