Skip to main content

Config files after updating the mod

This page is part of Troubleshooting. Use it if a config file behaves oddly after you update the RPG Leveling mod.

What the mod does when you update

When you install a new version of the mod and start the server, the mod may need to update some of your config files so they match the new version. For example, a new option might be added, or an old one removed or renamed. The mod does this automatically:
  1. Before changing anything, it makes a backup of the config file (see below).
  2. It updates the config (adds new fields, applies changes defined for that version).
  3. It saves the updated file and continues loading.
You don’t have to do anything for this to work. Your custom values are kept where possible; only the structure and options the mod needs are changed.

Where backups are saved

  • When the mod updates a config file at startup, it saves a copy of the previous content (before the update) with the suffix .pre-migration.
  • Example: if it updates RPGLevelingConfig.json, you’ll see RPGLevelingConfig.json.pre-migration in the same folder (mods/Zuxaw_RPGLeveling/). That file is your config before the update.
The game or the mod may also create .bak files when saving. Those are from normal saves, not necessarily from before the update. To be sure you’re restoring the version from before the update, use the .pre-migration file.

If something goes wrong after an update

If after updating the mod you notice:
  • Missing or wrong options in a config,
  • Errors in the console about a config file,
  • Or the mod not loading correctly,
you can restore the config from the backup the mod made before the update:
  1. Stop the server (or disable the mod).
  2. Open the mod folder: mods/Zuxaw_RPGLeveling/.
  3. Find the .pre-migration file for the config that’s causing trouble (e.g. RPGLevelingConfig.json.pre-migration).
  4. Copy that file and rename the copy to the normal config name (e.g. rename the copy to RPGLevelingConfig.json), replacing the current config file.
  5. Start the server again. The mod will use your old config. You may need to re-apply the update later (e.g. after a fix) or adjust a few options by hand according to the changelog.
If there is no .pre-migration file, the mod didn’t run an update on that config this time (e.g. it was already up to date). In that case, use any .bak backup you have, or restore from your own backups.

Reloading config without restart

After you edit a config file by hand, use /lvl reload (admin/OP) to apply changes without restarting the server. See Commands. Restoring from a .pre-migration backup is best done with the server stopped, so the mod doesn’t overwrite the file again on the next save.