Fixing [Z] Adventure
Posted: Tue Jul 12, 2022 5:19 pm
(This is my first topic btw)
So the other day i found this cool mod (https://mods.factorio.com/mod/ZAdventure) about random generated structures, kind of like that ruins mod.
The difference here is that there is much more and the structures can be way bigger with neat features like for example a racing track. Anyway, i was really sad to find out that it's broken. As of 0.18 a single change in the factorio api broke it (https://www.reddit.com/r/factorio/comme ... ?context=3), and i tracked it down to this line: (ZAdventure_2.17.2\lib\bplib.lua line 20)
I went ahead and changed it to this:
I looked at the api and apparently the zzlib.inflate is useless, but idk. Anyway if i do that i get this weird error:
I have used lua alot before but not with factorio api. Can somebody help me revive this ancient mod? Thank you in advance!
So the other day i found this cool mod (https://mods.factorio.com/mod/ZAdventure) about random generated structures, kind of like that ruins mod.
The difference here is that there is much more and the structures can be way bigger with neat features like for example a racing track. Anyway, i was really sad to find out that it's broken. As of 0.18 a single change in the factorio api broke it (https://www.reddit.com/r/factorio/comme ... ?context=3), and i tracked it down to this line: (ZAdventure_2.17.2\lib\bplib.lua line 20)
Code: Select all
return zzlib.inflate(util.decode(prepareInput(input)))
Code: Select all
return zzlib.inflate(game.decode_string(prepareInput(input)))
Code: Select all
22.804 Error ModManager.cpp:1558: Failed to load mod "ZAdventure": __ZAdventure__/lib/bplib.lua:20: attempt to index global 'game' (a nil value)
stack traceback:
__ZAdventure__/lib/bplib.lua:20: in function 'ParseToJson'
__ZAdventure__/lib/bplib.lua:16: in function 'ParseToArray'
__ZAdventure__/lib/bplib.lua:25: in function 'CalculateAreaData'
__ZAdventure__/data-final-fixes.lua:80: in main chunk