Skip to content

[General Purpose] Manually empty and reload ammo #1493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

CrimRecya
Copy link
Contributor

@CrimRecya CrimRecya commented Jan 15, 2025

  • 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.

Copy link

github-actions bot commented Jan 15, 2025

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.

@Speederovsky
Copy link

What inspired this idea?

@CrimRecya
Copy link
Contributor Author

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 CrimRecya changed the title Manually empty and reload ammo [General Purpose] Manually empty and reload ammo Jan 21, 2025
@Coronia
Copy link
Contributor

Coronia commented Apr 16, 2025

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

Copy link
Contributor

@TaranDahl TaranDahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, there are no major issues.
However, Ammo may not be a commonly used springboard. Perhaps detonating warheads on units or something similar would be more universal?

@CrimRecya
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants