Sequence Fire

If you liked this item, please rate it up on Steam Workshop page.

Author: Anter583

Last revision: 27 Jul, 2022 at 02:24 UTC

File size: 217.09 KB

On Steam Workshop

Description:

This mod modifies the way your mech’s fire buttons work while dual-wielding the same arms (or atleast 2 arms with the exact same characteristics)

RMB makes both arms fire at the exact same time.
LMB fires the arms in sequence with the delay between them being half the weapon’s fire time, effectively turning the arms into a single arm with double the fire-rate.

Compatibility:

Compatible with FU, not all arms were thoroughly tested, the mining ones work the way they should.
Compatible with the standalone mech overhaul aswell.
Not tested on any other mech-related mods that change their mechanics.

Compatibility should be measured based on if LMB mode can properly time itself, the controll trackers will work in most situations as long as all other related mods have a lower load priority than this mod, RMB can seem to run well even if the timing is messed up.

This mod uses a special (and somewhat experimental) technique to make mechs accept multiple lua files in their config, this can be tracked by checking whether there’s a "scripts" array in addition to the "script" string that’s normally there.
Any mods that edit what baseline lua file mechs use must be loaded with a lower priority than this mod, otherwise it will override multiScript, disabling this mod in the process.
Same goes with any mod that has a reason to have this mod in their includes/requires list, they must have a priority of 500 or higher, otherwise they risk making the aforementioned issue more likely to happen.

Technical:

The mod tracks the arm’s internal cooldown timer whenever possible to make sure to time shots right.
In cases where that timer isn’t easily accessible it instead uses it’s own prediction timer, which may cause the fire offset to drift after continuous firing or could cause the timing to trip-up if you spam the keys.

Of all 11 vanilla weapon types, only GunArm and GatlingArm feature an externally trackable cooldown timer, every other weapon is either not viable for this mod or stores it as a local variable within a coroutine.

The mod will automatically disengage itself, restoring the vanilla controlls if:

  • The 2 arms don’t have the same characteristics (same weapon type, fire the same projectiles and have the same fire timing)
  • The arm type is a beamarm that fires endlessly
  • The arm type is listed in the internal blacklist

If an arm has a high fire-rate, it messes with the mod’s timing due to speed limitations when it comes to lua, I don’t think I can do anything to fix that.

Here’s a list of all vanilla weapon types and their status:

Fully functional: > GunArm Mostly functional (minor stuff that you have to be looking for to notice): > GatlingArm > BeamArm > MissileBurst Questionable: > MeleeArm (mod effectively spams the buttons to get it to work) > DashArm (works, but the weapon does some weird stuff that might throw off timing) Broken/loss of functionality (manually disabled): > Boomerang (can’t time physics-based fire time properly) > RemoteDetonator (works, but at the sacrifice of most of it’s range & utility) Naturally rejected by the code: > DrillArm > DroneLauncher > DespawnArm
Download
Required items:

Click the title to search on this site.


antrUtilityLibSteam Workshop