Advanced Artillery Remotes Continued

by azaghal

Adds two Advanced Artillery Remotes to the game. Artillery Cluster Remote targets nearby spawners and worms and lays down a carpet of artillery fire against them. Artillery Discovery Remote fires artillery rounds in an arc to assist in map exploration.

Content
1 year, 8 months ago
1.1
14.2K
Combat

i Feature request: Add "Atomic artillery cluster remote" when any atomic artillery mod is installed

2 years ago

I'm currently using AtomicArtillery and AtomicArtilleryRemote for my long ranged nuclear needs.

Cluster targeting with with atomic artilleries would be really nice :)

Would it be possible to add 1 extra targeting remote when e.g. Atomic Artillery Remote -mod is installed?

2 years ago

'ello there :)

For some reason I have been expecting something like this to pop-up sooner or later... :)

Generally speaking, it would be possible, but I would like to give it a bit more thought than just hard-coding another cluster remote.

Most likely I would like the mod to dynamically generate remotes during game startup (if possible) and maybe even make it possible to more easily switch between different remotes (for example using Shift + Mouse Wheel when holding the cluster remote).

No promises made currently, but I'll look into what I can do, though it make take a bit of time :)

Best regards,
Branko

2 years ago
(updated 2 years ago)

For some reason I have been expecting something like this to pop-up sooner or later... :)

 

Happy to be at service! :D

(I can also help with implementation, if you need extra pair of hands or want to test different ideas)

 
 

Generally speaking, it would be possible, but I would like to give it a bit more thought than just hard-coding another cluster remote.

Most likely I would like the mod to dynamically generate remotes during game startup

 

Remotes, I'd like to personally see:

  • Artillery targeting remote : default remote
    • -> Single shot ground and biters
  • Artillery cluster remote : added by AdvancedArtilleryRemotesContinued, (cluster upgrade to default)
    • -> Cluster target nests and worms
    • -> Single shot ground and biters
  • Atomic artillery targeting remote: added by AtomicArtilleryRemote (or by similar mod)
    • -> Single shot ground and biters
  • Atomic artillery cluster remote : added by AdvancedArtilleryRemotesContinued, (cluster upgrade to nuke remote)
    • -> Cluster target nests and worms
    • -> Single shot ground and biters

 

easily switch between different remotes (for example using Shift + Mouse Wheel when holding the cluster remote).

 

I'd also want to have distinct items in my hotbar for normal and atomic artilleries, instead of single remote with different modes:

  • press correct hotkey and click (or click red remote for normal, and green remote for nukes. OR click ?? if you're red/green colorblind and get a surprise)
  • switching item icon and checking correct mode requires more effort than just carrying 1 extra item

 
 

No promises made currently, but I'll look into what I can do, though it make take a bit of time :)

 

I'll believe that you'll implement this and get it done in no time ;)

There's currently at least
Scravers Atomic Artillery
and Atomic Artillery Remote with custom artilleries and remotes. I don't think that there should be a single universal cluster remote for all other remote types, but it should be possible to dynamically generate custom cluster remote for every other artillery remote type.

Currently the main issue with nuclear artillery clustering and autotargeting:

  • Artillery autotarget uses only the initial explosion of the artillery shell prototype, and ignores worms and nests that would be killed by shockwave explosions (= total radius of the explosion), which causes a lot of overkill and wasting shells.
1 year, 11 months ago

'ello - just to give a small heads-up - I have started some work on this one, it's really not that difficult to add, just taking my time.

So far I've figured out how to handle generating multiple cluster remote prototypes for different types of artillery ammunition, and even apply custom tint to targeting circle. The icons for remotes will get a refresh based on latest Factorio release as well (so they will look a bit nicer). Some logic in the code will need to change to cater for multiple types of artillery, but I don't expect much difficulty on that front beyond making the code neat. :)

Actually, a possibly bigger problem could be trying to figure out dynamically how far apart to put the artillery flares, but from what I can tell I should be able to use the capsule (remote) radius. Not 100% how the damage is exactly calculated/applied when the nukes strike, though (I can some quite complex prototypes in the vanilla game for it). We'll see - I'm hoping I can avoid having to hard-code the optimal destruction range for specific mods.

1 year, 11 months ago
(updated 1 year, 11 months ago)

I had to fork atomic artillery and boost instant damage to fix autotargeting, 1500 fire damage wasn't enough to kill behemoth worms.

Exact damage calculations are a bit hard, since there are many stacking effects. Artillery remotes use the first one to show their effect range. Depending on how different mods apply their effects, if the first effect is most of the time the true radius, then that should be pretty safe to use.

For calculating the flares, I would probably use some configurable max radius / area. Fill that with hexagonal flare grid pattern, and remove those flares that didn't have any nests or worms in their radius. Smarter grouping is computationally much less efficient and produces similar effects with large nests anyway.

1 year, 11 months ago

Yeah, I realised basically the next day that capsule radius thing won't really work (I was hoping I could use that instead of having to mess around with complex damage/explosion spread logic I saw in the prototypes).

Regarding overlaps, probably not something I would change from algorithm point of view currently, mainly because I don't have the patience for it. I was at some point trying to look up how complex the algorithm would be to calculate optimal overlaps (basically set of pints, fixed-circle radius, try to touch each point with as few circles as possible), but apparently that's fairly complex piece of math :) However... If you come-up with a good implementation to calculate more optimal layout, should be easy to replace the current function (remoets.optimise_targeting). That part is at least easy.

I'll try to dig in a bit more into how the nuclear explosions are treated first in order to figure out more optimal distances. As you said, maybe at the end of the day it will have to be configurable with some predefined mods support.

1 year, 11 months ago

And now I have first working code prototype for multiple cluster remotes actually working. Let's say that I plan to add a big fat warning to the top of README that people with epilepsy may want to avoid using the atomic bomb-related artillery cluster remotes... (and this is only a half-joke - I will actually add the warning).

Next thing on is probably to try to figure out the radius for doing overlap calculations. Unfortunately, looks like I can't grab it from remote's capsule itself, but that info seems to be dynamically calculated. I think I might be able to iterate over ammo within the same ammo category and observe what projectile it spawns, and then try to figure out the radius based on listed radiuses for target effects. We'll see, I'll experiment a bit.

1 year, 9 months ago

And way more time later than it should have come out... Version 4.0.0 is out with the requested feature. This is also kinda a big addition to the mod, so make sure to backup your savegame before trying it out :)

Additional plus is that the optimisation algorithm should be a bit better as well.

P.S.
Really, I've been sitting on getting this rolled out for way too long, I basically had the solution ready two months ago but got demotivated.

New response