Skip to content

EMPulseCannon.InaccurateRadius for projectiles in EMPulseCannon=yes superweapons and Ammo support #1698

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 4 commits into
base: develop
Choose a base branch
from

Conversation

FS-21
Copy link
Contributor

@FS-21 FS-21 commented Jun 4, 2025

  • Buildings with EMPulseCannon=true & Ammo now fire repeatedly until the weapon no longer has enough ammo.
  • EMPulseCannon.InaccurateRadius defines an area around the target location where the projectile can land randomly.

In rulesmd.ini:

[PROJECTILE]                 ; Projectile
EMPulseCannon.InaccurateRadius=0 ; integer

@FS-21
Copy link
Contributor Author

FS-21 commented Jun 4, 2025

Keep in mind Innacurate and other tags doesn't work well in superweapons that needs to fire very long distances. This example was with radius 6 and the structure has Ammo=5 set (I fired it near for the GIF recording but is the same at very long distances).

cabal_sw1_demo_01

Copy link

github-actions bot commented Jun 4, 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.

@Coronia
Copy link
Contributor

Coronia commented Jun 5, 2025

Think it would be better to add an extra tag on the weapon or superweapon to control its maximum shot too, which could allow some more customization. E.g. an EMPulseCannon that can only fire once at a time, but has multiple charges after reloading more ammo

@Coronia Coronia added Tested ⚙️T1 T1 maintainer review is sufficient labels Jun 5, 2025
@FS-21
Copy link
Contributor Author

FS-21 commented Jun 6, 2025

But all is already controlled by the Ammo tags in Building and in Weapon and if I'm not wrong these structures are pacific/dumb unless the attached EMP Superweapon is used.
Currently I checked that works the "ElitePrimary=" so you can have for example:

[Some_EMPCannon_Building]
Ammo=22
Primary=Weapon01
ElitePrimary=Weapon01E
Trainable=yes

[Weapon01]
...
Ammo=5

[Weapon01E]
...
Ammo=2

If the building promotes to Elite the weapon Ammo used by the SW is reduced from 5 (4 shots in total and 2 of Ammo not used) to 2 (11 shots in total).

So I don't understand the use-case of the suggestion. More if the building can use the EmptyReloadAmount, EmptyReload and Reload tags :-/
Or by "maximum shot" are you talking about reusing the Burst tag in Weapons (in addition to Ammo usage)...
Please, can you explain better if I missed something in your example?

@Coronia
Copy link
Contributor

Coronia commented Jun 8, 2025

something like this:

[SOMESW]
RechargeTime=0.01
MaxShot=1

[SOMEBUILDING]
Ammo=6
Reload=900

so this SW doesn't need to recharge, but can't work when there's no ammo. Instead, it'll gain a 'virtual charge' thanks to ammo reload in every minute, up to 6 charge. So in the 6th minutes you can use it for 6 times continuously on different positions

@FS-21
Copy link
Contributor Author

FS-21 commented Jun 8, 2025

If I understood the example, instead of using the same weapon's ammo for consuming the structure's ammo (and limiting the number of shots of that SW instance) a new variable should be created to control the number of shots (as a counter) until the max number of shots is reached for that SW instance (and each SW instance I clicked comsumes 1 ammo).
And then leave the structure's ammo for knowing how many instances this structure's SW can fire a EMPCannon?

Also, Ares has some tags with a similar name (shots or similar) so for avoiding confussion should be something like [SomeSW] -> EMPulseCannon.MaxShots or a better name.

Also, I thing a new label in the sidebar description tooltip should show the current available SW shots (the structure's ammo).

If I'm not wrong from your example I need to backport a SW method rewrite I added in the Battle points PR for checking in the SW is ready to be fired (and that AI obeys) and include checks for EMPCannon ammo and maybe other small checks now I can't see yet.

@Starkku Starkku force-pushed the develop branch 2 times, most recently from b429215 to 280b1c8 Compare June 29, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️T1 T1 maintainer review is sufficient Tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants