From e22e4e757958cd2270a7d441c3f3eea06e0b8980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Kosman?= Date: Sun, 25 Aug 2024 21:46:29 +0200 Subject: docs: create the config file page --- Writerside/topics/config-file.md | 137 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 136 insertions(+), 1 deletion(-) (limited to 'Writerside') diff --git a/Writerside/topics/config-file.md b/Writerside/topics/config-file.md index 221f27f..2419406 100644 --- a/Writerside/topics/config-file.md +++ b/Writerside/topics/config-file.md @@ -1,3 +1,138 @@ # Config file -🚧 WIP 🚧 \ No newline at end of file +On top of the gamerules, you can edit a config file, named `molehunt.properties`. +This file is automatically generated when starting a server with the mod installed. + +This file will set the default settings when creating a new world, but that's it. +You will still be able to change the gamerules. Editing this file is recommended +when you plan on having multiple molehunt games with the same settings but on +different worlds. + +> If you only want to change the settings on a single world, or don't want to change +> a lot, I would suggest [playing with the gamerules](gamerules.md) rather than the config +> file, as it is easier and directly in-game +{style=note} + + +## Editing the config file + +You can find the `molehunt.properties` file in your server's `config` folder. +If it is not present, make sure the mod is installed, and start your server. + +Every setting available in the config file reflects a gamerule (they have very +similar names). To know what each setting does, you can check [the gamerules documention](gamerules.md). + +The config syntax is very simple : +- `name_of_the_setting = value` to set a setting to a `value`. Only one setting + can be set on a single line +- A line starting with a `#` is a comment, and will not be counted be the mod. + + +## Troubleshooting the config file + +If you realise the config file isn't being applied correctly, check these potential +solutions before making an issue on GitHub. + +### Checking the file location + +Make sure the config file you're editing is located in your server's `config` directory, +and that the file's name is `molehunt.properties`. + +### Make sure the syntax is correct + +A comment line starts with a `#`, not with `//` nor with anything else. + +Also, you can only set one variable on one line. For exemple, this is incorrect : +```yaml +# This is not a valid config file +first_setting = 1 second_setting = 2 +# The value must also be on the same line as the setting name. This is incorrect : +another_setting = +3 +``` + +### Make sure the setting have the right value type + +A boolean value (one that can either be "on or off") can be set to `true` or `false`, +nothing else. +```yaml +# Good +my_boolean = true + +# Bad +my_boolean = false +``` + +Every numerical value should be integers: there are no decimal values in this mod. +And you should not put the unit after the value (do not put `50 blocks`, but only `50`). + +> If you have checked everything, and there's still a problem, don't hesitate to +> create a new issue on GitHub, **if no existing issue match you problem**. + +## Default configuration + +Here is the default configuration that is automatically generated. Every setting +is listed below. + +To regenerate the default configuration, you can rename, move or delete your +current config file, and then run the server with the mod installed. + +```yaml +# Molehunt mod configuration file +# To regenerate the default configuration, delete, move or rename this file. + +# Game settings + +# The duration of a molehunt game, in minutes. +# Default: 90 minutes (1 hour 30 minutes). +game_duration = 90 + +# Mole percentage. +# For example, a mole percentage of 25% will get 1 mole every 4 players. +# Default: 25 %. +mole_percentage = 25 + +# Mole count (absolute). +# This setting will overwrite the mole_percentage setting. +# If set below 0, this setting is disabled. +# Default: -1. +mole_count = -1 + + +# Client-side settings (applies to all players) + +# Show nametags +# Default: false +show_nametags = false + +# Show skins +# Default: false +show_skins = false + +# Show tab +# Default: false +show_tab = false + + +# World border settings + +# Initial world size (in blocks). +# Default: 200 blocks. +initial_world_size = 200 + +# Final world size (in blocks). +# Default: 50 blocks. +final_world_size = 50 + +# Moving starting time offset (in minutes) +# The time before starting to move the world borders. +# If this value is greater than the game duration, borders will never move. +# Default: 10 minutes. +border_moving_starting_time_offset = 10 + +# Other + +# Enable portals (nether, end, end gateway) +# Default: false +enable_portals = false +``` -- cgit v1.2.3