Expose affected area and artillery entities for artillery remote

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
azaghal
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Jun 27, 2020 11:13 am
Contact:

Expose affected area and artillery entities for artillery remote

Post by azaghal »

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:
  • 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.
For completeness sake, it might be also useful to be able to somehow get the damage radius/list of artillery entities for a provisional coordinate on some surface - this could theoretically be more universal way of implementing the functionality.

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.
P.S.
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.

Post Reply

Return to “Modding interface requests”