Stormwall

by sh4dow

Build floor tiles that create a force field wall above them when supplied with energy.

Content
3 months ago
1.1
934
Combat

g [fixed] 7 ups/fps after update to 1.4.15

3 months ago

After updating to version 1.4.15, the game speed dropped to 7 fps/ups. If I disable the mod in the settings, the speed returns to normal. When I enable it, it's back to 7 fps. Everything worked perfectly before the update. I continued with a saved game that uses only green walls, although all types have been researched. There are about 25 emitters on the map.

3 months ago

Resource stat
https://ibb.co/jvfG0CH

3 months ago

Which mod version were you updating from?
Could you perhaps upload your save file somewhere, so that I can directly compare the impact of different changes?

3 months ago

On 1.4.15, I'm getting ~ 3ms script load for 16 emitters and 1650 simultaneously regenerating walls, and 0.06ms when all emitters/walls are idle (full HP).
Since I can't really imagine you have more than 30 times that many walls that are currently damaged/being created with just 25 emitters, something unusual seems to be causing all that lag.

Not that the general performance couldn't be improved - but since it should take several 1000 walls regenerating at the same time to have a noticeable impact on performance (and ~10k before this mod alone could start reducing your UPS), this "typical" performance doesn't seem to be an issue for typical usage, as far as I can tell.

So without any further info (ideally your save file) I can't reproduce your issue.

(If you'd leave your game running unattended for ~20min, the walls should be fully generated even at your 7ups, and it would be interesting to see whether your ups would recover after that. Alternatively, copy&paste this in the factorio chat (2 times, if you never ran commands before in that save): /c for i,j in pairs(game.player.surface.find_entities_filtered{name="green-stormwall"}) do j.health=699 end, then the regeneration should only take 1-2 seconds)

3 months ago

Here is my game save file https://fex.net/uk/s/ete78sx.
I tried running the script from the console, and the health of all walls decreased to 699 and did not recover during the 5 minutes the game was running.

3 months ago

I tried start a new game and get error:
The mod Industrial Revolution 3 (3.1.29) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event IndustrialRevolution3::on_player_created (ID 26)
The mod Stormwall (1.4.17) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Stormwall::on_entity_cloned (ID 124)
Stormwall/control.lua:640: attempt to index field 'entity' (a nil value)
stack traceback:
Stormwall/control.lua:640: in function <Stormwall/control.lua:635>
stack traceback:
[C]: in function 'clone'
...dustrialRevolution3__/code/control/control-transmats.lua:189: in function <...dustrialRevolution3__/code/control/control-transmats.lua:188>
(...tail calls...)
IndustrialRevolution3/code/control/control-events.lua:163: in function <IndustrialRevolution3/code/control/control-events.lua:136>

3 months ago

(written before your latest response, but didn't get submitted)
I loaded your file (without syncing all mods), and I get 60 ups with ~0.15ms Stormwall script load.
All 38 emitters were still powered & active, but I didn't have eg. IR3 installed, so a lot of other stuff was missing - but this still seems to indicate that the problem is some strange mod interaction.

I currently don't have the internet bandwidth to download IR3, so I'll look deeper into it next week.

3 months ago

concerning the crash with IR3, it should be fixed in 1.4.18.

3 months ago

concerning the crash with IR3, it should be fixed in 1.4.18.

the new game now starts without errors

3 months ago

Thanks to your save file, I found the issue. With 1.4.20, Stormwalls shouldn't cause any significant script lag on your map.

3 months ago

yes, now everything works fine. Thank you

New response