Page 1 of 1

World settings system

PostPosted: Sun Jan 24, 2016 10:42
by Gael de Sailly
Many mods store per-world settings in the world directory. They all have a different way to do it.
I propose to add a core feature, providing a settings system that is automatically saved in a world.conf, like minetest.conf.
Mod can store everything they want in that file, with functions like minetest.world_setting_get. Or maybe overriding minetest.setting_get and similar, to get the world.conf value if defined, and the minetest.conf value if not.

And (if possible, may be a big builtin rewrite), adding the ability for mods to show a formspec just after mods loading, with the mods config, that will be stored in world.conf when fields are sent.

Re: World settings system

PostPosted: Tue Apr 19, 2016 19:10
by 843jdc
The money2 mod creates a file for each player.

Having a world-specific directory for mod data would be nice. I don't know if that is possible or not. I haven't tried it yet. I will try this soon and hope I don't mess things up too badly.

Re: World settings system

PostPosted: Tue Apr 19, 2016 22:53
by bobomb
https://github.com/minetest/minetest/bl ... .txt#L3063
trying to figure out how this works.