EMPulseCannon.InaccurateRadius for projectiles in EMPulseCannon=yes superweapons and Ammo support
- Buildings with
EMPulseCannon=true&Ammonow fire repeatedly until the weapon no longer has enough ammo. EMPulseCannon.InaccurateRadiusdefines an area around the target location where the projectile can land randomly.
In rulesmd.ini:
[PROJECTILE] ; Projectile
EMPulseCannon.InaccurateRadius=0 ; integer
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).
Nightly build for this pull request:
- compiled-dll-6e8e21f716ff65ff7c3e3109678050468be24137.zip These artifacts will expire in 90 days and will not be available for download after that time.
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.
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
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?
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
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.