Expose affected area and artillery entities for artillery remote
Posted: Fri Feb 10, 2023 9:23 am
Hello,
The Advanced Artillery Remotes Continued mod (of which I am the maintainer) provides players with additional artillery remote that can be used to carpet-bomb a wide area of biter nests via single click.
The mod tries to somewhat optimise the number of fired artillery shells by calculating the (maximum) damage radius for all possible projectiles within (artillery) ammo category, and removing overlaps between artillery flares/impact points. The way the mod currently calculates damage radius is by (recursively) iterating over attack result for projectiles and getting the largest radius value for results of type area.
Through trial and error I've figured out that this corresponds to the damage area indicator shown to player when holding an artillery remote. Given that this information is already available to the game engine, I would find it useful if the modding API could expose the following information:
The benefits for the mod I'm maintaining would be:
Since I already have manage to calculate damage radius via existing API, that one would be less of an issue, but being able to get list of artillery entities (wagons/turrets) within range of specific coordinates would certainly be useful.
The Advanced Artillery Remotes Continued mod (of which I am the maintainer) provides players with additional artillery remote that can be used to carpet-bomb a wide area of biter nests via single click.
The mod tries to somewhat optimise the number of fired artillery shells by calculating the (maximum) damage radius for all possible projectiles within (artillery) ammo category, and removing overlaps between artillery flares/impact points. The way the mod currently calculates damage radius is by (recursively) iterating over attack result for projectiles and getting the largest radius value for results of type area.
Through trial and error I've figured out that this corresponds to the damage area indicator shown to player when holding an artillery remote. Given that this information is already available to the game engine, I would find it useful if the modding API could expose the following information:
- Damage radius for artillery remote when held in hand by player.
- List of artillery entities that can target coordinates that the player is pointing to with the artillery remote.
- Damage radius for artillery remote held in player's inventory (since this is based on player's own position).
- List of artillery entities that can target coordinates that the player is currently on.
- Damage radius for particular artillery shell.
- Damage radius for particular artillery projectile.
The benefits for the mod I'm maintaining would be:
- Dropping calculation of damage radius, and depending on value already made available/calculated by the game engine - thus reducing complexity of code as well, and making it more reliable.
- Ability to do more dynamic calculation of damage radius based on what ammo the artillery entities within range have loaded-up.
Since I already have manage to calculate damage radius via existing API, that one would be less of an issue, but being able to get list of artillery entities (wagons/turrets) within range of specific coordinates would certainly be useful.