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, 9 months ago
1.1
14.2K
Combat

b [FIXED] Crash on Load

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

When upgrading from version 3.0 to 4.0.1 of this mod, loading the game resulted in the following error:
Error while running event AdvancedArtilleryRemotesContinued::on_configuration_changed
AdvancedArtilleryRemotesContinued/scripts/remotes.lua:596: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
AdvancedArtilleryRemotesContinued/scripts/remotes.lua:596: in function 'get_projectile_damage_radius'
AdvancedArtilleryRemotesContinued/scripts/remotes.lua:640: in function 'get_damage_radius_default'
AdvancedArtilleryRemotesContinued/scripts/remotes.lua:696: in function 'initialise_global_data'
AdvancedArtilleryRemotesContinued/scripts/remotes.lua:747: in function <AdvancedArtilleryRemotesContinued/scripts/remotes.lua:734>

I don't have artillery unlocked yet (besides light artillery, which is a mod), so perhaps that's what's causing the issue?

Notable mod mentions: Light Artillery, True Nukes, Rampant Fixed, Bigger Artillery, Realistic Fusion Weaponry

1 year, 10 months ago

Hello and thanks fore reporting the crash :)

I don't think it has anything to do with the research, this piece of code should more or less iterate over prototypes, independent of forces and players. Looks like some projectile did not have an attack_result property - which is a bit unusual. I'll try to reproduce with the mods you listed to better understand it.

1 year, 10 months ago

Here's a more robust list of turrets I added to my game that adds a lot of different projectile types: https://mods.factorio.com/mod/Combat-modpack/downloads

1 year, 10 months ago

Ok, got the fix in already, so the attack_result for projectile is optional, and the code updates did not take that into the account.

Now, while testing I did noticed that the default damage radius for cluster remote ends-up being pretty high - 400 (basically this is the most destructive artillery ammo assigned to vanilla artillery shell category). You will probably want to change the mod setting Damage radius overrides for cluster targeting and set it to artillery-shell=4 if you want to have default (vanilla) value. Just keep in mind this is a radius, not diameter like in previous mod versions.

So go ahead, test, and let me know if this fixes the issue for you :)

1 year, 10 months ago

The game is able to load now. Changed the mod setting that you recommended and suddenly the remote was working as expected. Before it was targeting a single base with a single target, perhaps due to Rampant Fixed. Anyways, all is fixed and now I know how to edit the radius setting to optimize for nuclear payloads. Thanks :)

1 year, 10 months ago

No worries, and thanks for reporting the crash. :)

Regarding targeting, basically all the different artillery mods you had installed place the artillery ammo within same category - artillery-shell. The new cluster remotes tries to calculate dynamically "optimal" (well, maximum) damage radius for category by going through all ammo types, and picking the one with largest damage radius (this is somewhat imprecise, since it takes into account even area visual effects like smoke etc). And with realistic nukes, that's quite a large radius (400 or so). So basically it places one target, and figures out it covers everything in an area.

I'll mark off the bug as fixed and close off the topic, just to keep things tidy - if you run into any more issues, feel free to let me know :)

This thread has been locked.