M3wM3w / ComfyFactorio

A chonky factorio scenario, featuring a whole compilation of different maps.
74 stars 71 forks source link

[Bug v0.167 + v0.28] Oasis map does not work when game is modded #217

Closed estebanthebad closed 3 years ago

estebanthebad commented 3 years ago

Hi there,

I noticed that the oasis map does not work, when the game is modded.

In the scenario files freeplay.lua does a lot of testing against is_game_modded and does things differently if mods are installed. Maybe that is the cause.

Anyways, when the game is modded, the oasis map does not draw the oasis tiles and does not relocate the resources.

estebanthebad commented 3 years ago

Hang on, I downloaded v0.167 as linked on the wiki page. I just noticed that the latest version is 0.28 though. Correct? 'Going to download v0.28 and test again.

estebanthebad commented 3 years ago

Ok, I tested it with v0.28 (I am running Factorio v1.0) and the oasis map also is broken when the game is modded.

Side question: Is v0.2x WIP? Should I usev0.167 or v0.28? 'Asking because v0.167 is advertised on the wiki page.

estebanthebad commented 3 years ago

And another thing I can add, which might be interesting: The mods I tested this with were Warehousing and ToDo List. Why I mention this is, because these mods do not interfere with chunk generation in any way.

estebanthebad commented 3 years ago

I debugged a little bit and I found out that when the game is modded, the player character starts on surface nauvis instead on surface desert_oasis where all the desert and oasis chunks are generated. I suspect this to be due to the fact, that when the game is modded, the comfy scenario plays the cutscene (/utils/freeplay.lua), that the cutscene plays only on nauvis and that vanilla teleports the player to nauvis to witness the cutscene.

So for a blind stab I just commented out the line --require 'utils.freeplay' in control.lua and everything just worked fine after that. The player starts on surface desert_oasis and the map looks like expected. I don't know what that file does and why it is required and hope I did not break anything else.

Gerkiz commented 3 years ago

Hi, the freeplay module is used because some mods like to alter either the resources or the tiles. So whenever we use mods we try to play as vanilla as possible but with the comfy functions, hence why I have in the freeplay module pointed that the default surface should be 'nauvis'.

I might have to check into this more to make it 100% functional. Maybe add it as an option to control.lua - that is - if the player that starts the scenario wants 'nauvis' or the custom surface name.

estebanthebad commented 3 years ago

Hello! For an unsuspecting user it would be helpful when the line, where one has to activate the desert_oasis map, also included a comment, that tells to user to deactivate/comment freeplay.lua or the scenario will not work with mods. I imagine it to be pretty hard to forsee all the special cases. The scenario might then not work becaus it id modded and freeplay is deactivated.

Gerkiz commented 3 years ago

Hi, This is now fixed. The player will automatically get teleported back to the original custom surface after the crash site intro is done or if skipped.

Try it out and let me know if you run into any issues!