Jump to content

customize.lua should not use "Levels" for fetching worldsettings

  • Pending

I think customize.lua should not use "Levels.GetDataForLocation(location)" for "Worldsettings", only for "Worldgeneration", because this can be different from TheWorld.topology.overrides (although this also might be a misunderstanding from me, but although I spent 200 hours into it, I'm far away from being able to understand it, since most of it is done in C++ I guess..  the game is calling modworldgenmain.lua several times and it is impossible to know for modders when what is done... and should be done...)

I would be really grateful if someone can write a tutorial for how to change worldsettings via mod properly, see: 

Steps to Reproduce

There are so many locations where "overrides" are saved/used. I thought since the game update that introduced worldsettings, they are no longer saved in levels, but elsewhere eg in topology. At least my mod can not longer change the worldsettings when changing level in AddLevelPreInitAny.
In the result when cave is enabled Zarklords world settings picker mod, which uses customize.lua code, displays wrong worldsettings.

Just in case you want to mess with mods:
Enable cave.
Enable Teleporato mod https://steamcommunity.com/sharedfiles/filedetails/?id=756229217 and set the first modsettings "variate world" to any "Yes" value.
Enable World Settings Picker: https://steamcommunity.com/sharedfiles/filedetails/?id=2421565258
Teleporato mod will randomly choose worldsettings that works fine ingame and match TheWorld.topology.overrides, but "World Settings Picker" == customize.lua will display different values (in current version all default). This is because of worldgenmain.lua running multiple times independently from each other. I don't know why it works without cave.

User Feedback

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...