Explosive Trees


Randomly trees will violently explode when damaged or destroyed.

1 year, 9 months ago
1.1
428

b Desync risk ?

2 years ago

When someone ran this mod with heavy_mode enabled it triggered a desync.
From a quick look it seemed that the use of some local variables within control.lua where desync risks as some players may end up with them set and others not. i.e. LastNuke should be a Factorio global as it is set to current game tick and used to decide future game logic?
https://github.com/Sil3ntStorm/factorio-explosive-trees/blob/main/control.lua#L7

I may be wrong on this specific instance, only looked when someone told me the mod failed heavy_mode test.

2 years ago
(updated 2 years ago)

I don't know what heavy_mode even is or does.
Regardless a potential (albeit rare) desync was already reported a few days ago and has since been fixed in the latest version.
It could only happen if a player joined within up to 10 seconds of a nuke being triggered and then a new tree exploding within the up to 10 second window of the last nuclear explosion. In that scenario different clients could theoretically come to a different outcome, and thus desync.

2 years ago
(updated 2 years ago)

Ah well that's good its fixed. I'd just looked at the source code quickly today on the github link, but I now see that's old code so :D

Just for your info; Heavy_mode is a built in debug feature to Factorio where the game saves and loads the map every tick. This detects a lot of desync situations when your modded events occur.
https://wiki.factorio.com/Console#:~:text=/toggle%2Dheavy%2Dmode,Yes

2 years ago
(updated 2 years ago)

accidental double post

2 years ago

Yeah I forgot to push the code to Github.

This thread has been locked.