The weapons interaction is divided into three areas:
This division allows different projectiles to come out of launchers (i.e. alternate firing modes), and recycling of damage types for projectiles (e.g. freeze effect for an ice gun or a freeze mine).
A launcher has these properties:
Launcher may have multiple firing modes.
Firing modes have these properties:
The separation of recoil and reload time was a result of studying the WFA railgun.
The WFA railgun has two firing mode, the regular railgun firing, and a secondary fire where the firing rate is doubled but damage is halved (twice as fast but half the damage).
My rationalization on separating goes something like this:
Projectiles are divided into four main categories.
Properties of projectiles:
Properties:
The damage name is 4 8-bit characters coerced into a 32-bit integer.
This lets the name be used as the MoD (Means of Death) value directly.
It also leads to generic obituaries on unmodded clients ("Joe was killed by Jane").
This object describes a very simple finite-state machine used for repetition of an activity.
This object was originally used for creating a slow-moving rocket that dropped grenades every 0.1s, a very spammy weapon.
Spam properties are checked periodically (i.e. polled).
Properties:
--PhaethonH
Launcher
The strength of a rail slug should depend on how much time the gun spent charging up its accelerator.
On this reasoning, a full-strength rail slug should require a full 1500ms of recharge time before being able to fire, and a half-strength rail slug should require only 750ms of recharge time.
However, in WFA, primary fire will always induce a 1500ms recoil time, and secondary fire will always induce a 750ms recoil time.
This means that pressing secondary-fire then primary-fire will deliver a half-strength then a full-strength rail slugs within 750ms, i.e. the full-strength rail slug was delivered though the railgun only spent 750ms recharging.
This is inconsistent with the above expectations on railgun accelerator recharging.
The sequence of primary-fire then secondary-fire is also similarly inconsistent, where a half-strength rail slug will fire only after the accelerator sits idle for 1500ms.
With the separation of recoil (after-fire time) and reload (time since last firing), the primary and secondary firing of such a railgun can be made more consistent with the theory on the railgun accelerator.
That is, the primary fire can be forced to wait at least 1500ms since the last firing, and secondary fire can fire again 750ms after the last firing, regardless of the previous firing mode.
Projectiles
Damages
Spam