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, 3 months ago
1.1
11.8K
Combat

g Compatibility with wider radius shells

1 year, 5 months ago

I'm using Rampant Arsenal which has Incendiary Artillery Shells. They have a very large explosion diameter of 36. If I set the Cluster Target Overlap Radius to 18, I get a lot of shells impacting very close together. Even using the maximum setting of 100 this happens.

I guess the searching algorithm is not designed to merge over such a big radius? Do you know what is the maximum that will work?

Settings:
https://i.imgur.com/nmuHgBO.png

Resulting flares:
https://i.imgur.com/wyah8RS.png

1 year, 5 months ago

Sorry I just read the other thread and it looks like you're already looking at this. Part of my problem might be that the Incendiary Shells have different explosions with difference radius. The algorithm might just be looking at the smaller explosion.

1 year, 5 months ago

Hm... While I am working on multiple cluster remotes support, unfortunately I am not 100% sure that would solve the issue you are currently seeing. The thing is that the optimisation algorithm for targeting is fairly simple and "lazy" - it will only attempt a single pass.

I think that the reason it does not look as bad in case of vanilla artillery is actually ratio between radius and target sizes.

I haven't planned to improve algorithm as part of that other feature request, but looking at how bad your screenshot looks, it seems to me I'll have to try to do something about it. The main catch is that it's apparently fairly complex to find the optimal solution, and my math-solving skills are not that great. But maybe I could make it at least a bit better.

In some ways I am fine with having the overlaps, and would even consider it a bit of a "feature" (you "automate" clicking to save time but at a loss of resources - extra shells fired), but definitively it looks like it needs some improvements.

1 year, 5 months ago

Thanks for taking a look at this. I see the problem yeah. It just checks if one target overlaps the next one. I'm not much of a coder in this language but here is what I would do at a high level:

In the remotes.optimise_targeting function, create a while loop starting at the top-left (first) target in the table, for the entire list of targets remove any that are within the radius of this target. Once this is done, repeat for the next target until the number of iterations of the while loop is greater or equal to the remaining targets in the table. You could also use a for loop with a break condition.

This might get really laggy depending on the area to be shelled though. The lazy algorithm could be there for a reason.

I could also just build more shells.

1 year, 5 months ago

Well, the lazy algorithm is definitively way simpler and faster - and works well with the vanilla explosion diameter and enemy structure sizes.

The solution you described was also something I was thinking about implementing, although thinking about it now, it probably will not work that well for vanilla artillery. Current algorithm provides a decent advantage for the vanilla artillery since it increases chances of using just a single shell for two spawners that are next to each other - this is again related to ratios between target and explosion sizes I think.

Might need to combine current implementation with your proposal (would need a bit more complicated logic to keep track of what targets are covered by what flare).

P.S.
These fixes are going a bit slower since I'm somewhat busy with some IRL stuff.

1 year, 3 months ago

Ok, so I've just released version 4.0.0 of the mod that has support for multiple per-ammo category cluster remotes, and slightly optimised algorithm for target optimisation.

However, with that being said... Take not that multiple artillery shell types may belong to the same ammo category, so remotes are unfortunately not usable per-ammo type.

However... In the settings, you should be able to set damage radius for vanilla artillery shells using an option like artillery-shell=9. Take note that the new setting uses radius, whereas the old one was technically a diameter (so I think half of 18 should be fine).

P.S.
Haven't tested with Rampant Arsenal, truth be told. Also... Lots of changes, backup your save before upgrading, and please let me know if it crash-and-burns in any way.

New response