« Back to search

Mod

World Settings

by Codiac · score 155.3 · license: GPL-3.0-or-later

World Settings

Download latest release

Supports per world settings in Luanti games and mods

developer_tools library world_tools

This mod adds an API for managing per-world settings for Luanti games and mods.

Settings can be managed in code using the API and in game by players with the server privilege using the wset chat command.

Settings are saved to the world_settings.conf file in the world's directory.

Settings are updated in the config file immediately on being registered or altered.

Setting names consist of two parts, a domain and a name. The domain should be unique for your game or mod. This allows settings in different mods to use the same name.

Domain and name cannot contain a dot '.' or whitespace, if they do they will be rejected.

Once a setting has been set on the world, which will happen automatically when they are registered, any changes to the default in the code, or in the global settings, will not affect the world setting.

You can copy a world setting file to a new world after it is created but before it is run to have a standard set of world settings applied to a new world.

You will need to restart a world if you want to change the settings by updating the config file.