Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

[General Purpose] Manually empty and reload ammo

Open CrimRecya opened this issue 11 months ago • 5 comments

  • You can now use the shortcut key to manually empty and reload ammo for units. Aircraft still needs to return to the airport to reload.
    • CanManualReload controls whether this type of techno can manually empty and reload ammo.
    • CanManualReload.WhenFull controls whether can manually empty and reload ammo when the ammo is full.
    • CanManualReload.ResetROF controls whether need to reset rearm timer when manually empty and reload ammo.
    • CanManualReload.DetonateWarhead controls whether need to detonate a warhead at the techno's location with Damage=Ammo when manually empty and reload ammo.
    • CanManualReload.DetonateConsume controls whether CanManualReload.DetonateWarhead require the techno to have more ammo than this value (or equal to) before reloading in order to detonate.
    • For shortcut keys’ localization add TXT_MANUAL_RELOAD and TXT_MANUAL_RELOAD_DESC into your .csf file.

In rulesmd.ini:

[SOMETECHNO]                        ; TechnoType
CanManualReload=false               ; boolean
CanManualReload.WhenFull=false      ; boolean
CanManualReload.ResetROF=true       ; boolean
CanManualReload.DetonateWarhead=    ; WarheadType
CanManualReload.DetonateConsume=0   ; integer

Since it will empty the ammunition first, it will use EmptyReload and EmptyReloadAmount. You can also combine CanManualReload, NoAmmoWeapon, FeedbackWeapon and AttachEffect to make some special attack effects.

CrimRecya avatar Jan 15 '25 11:01 CrimRecya

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

github-actions[bot] avatar Jan 15 '25 11:01 github-actions[bot]

What inspired this idea?

Speederovsky avatar Jan 15 '25 16:01 Speederovsky

What inspired this idea?

A unit that does not require ammunition and can overload (just like a skill), or a unit consumes a lot in the first round but the sustained firepower is insufficient. The combination I first talked about was wave force artillery.

CrimRecya avatar Jan 15 '25 17:01 CrimRecya

is it possible to add a shortcut to trigger this by deploy command? Think that'll be easier to be used by players than adding a new hotkey

Coronia avatar Apr 16 '25 03:04 Coronia

However, Ammo may not be a commonly used springboard. Perhaps detonating warheads on units or something similar would be more universal?

Yes, so there is CanManualReload.DetonateWarhead.

CrimRecya avatar May 08 '25 05:05 CrimRecya