ComfyFactory / ComfyFactorio

A compilation of factorio scenarios, featuring many different maps.
GNU General Public License v3.0
45 stars 53 forks source link

Scenario Expanse when loaded with mods don't trigger attacks #466

Closed CazuzaCzz closed 2 months ago

CazuzaCzz commented 3 months ago

After playing for some time in the Expanse scenario i tried to load the saved game with mods (tried with just Factory Search, then with FNEI, then with Factory Planner) the save loads fine, but the attack that should happen in +-30s after loading the game never triggers. On the factorio-current.log i get this error +- 20 times.

3683.899 Script @C:/Users/Czz/AppData/Roaming/Factorio/temp/currently-playing/utils/event_core.lua:23: 
    ...ctorio/temp/currently-playing/maps/expanse/functions.lua:205: attempt to perform arithmetic on field 'delay' (a nil value)
stack traceback:
    ...ing/Factorio/temp/currently-playing/utils/event_core.lua:23: in function '__sub'
    ...ctorio/temp/currently-playing/maps/expanse/functions.lua:205: in function <...ctorio/temp/currently-playing/maps/expanse/functions.lua:204>
    [C]: in function 'xpcall'
    ...ing/Factorio/temp/currently-playing/utils/event_core.lua:32: in function 'call_handlers'
    ...ing/Factorio/temp/currently-playing/utils/event_core.lua:42: in function <...ing/Factorio/temp/currently-playing/utils/event_core.lua:37>
    [C]: in function 'raise_event'
    ...ng/Factorio/temp/currently-playing/maps/expanse/main.lua:404: in function <...ng/Factorio/temp/currently-playing/maps/expanse/main.lua:400>
    [C]: in function 'xpcall'
    ...ing/Factorio/temp/currently-playing/utils/event_core.lua:32: in function 'call_handlers'
    ...ing/Factorio/temp/currently-playing/utils/event_core.lua:79: in function <...ing/Factorio/temp/currently-playing/utils/event_core.lua:77>

Trying to find a solution i tested other releases of ComfyFactorio. What I found is that if replace the files from my save with the files from Release 1.0.281 the attacks trigger like it's supposed to (Releases 1.0.280 and 1.0.179 works too). If i try with the files from Release 1.0.282 the attack doesn't trigger (Releases 1.0.284, 1.0.288, 1.0.297, 1.0.304 and the latest Release (1.0.323)) doesn't work too).

What i did is deleted everything from the folders: maps, modules, utils. Then copied from the specific release the same folders and placed on the save. The other change i made is to remove the require 'utils.whisper_notice' from control.lua.

I tried to compare what changed between the releases 1.0.281 and 1.0.182 but i couldn't find anything obvious that would make mods interfere with the scenario script.

I'm playing with factorio 1.1.107

Here is the save file with the scenario. There should be an attack +-30s after loading. çççoll.zip

Gerkiz commented 2 months ago

This should now be fixed. Feel free to try it out and get back.