-
-
Notifications
You must be signed in to change notification settings - Fork 299
Description
SMAPI mods write config.json files into the mod folder. This is the usual modding process:
flowchart TD
1[Install mod]
2[Run game to generate config.json]
3[Edit config.json]
4[Run Game]
5{Valid config?}
1 --> 2 --> 3 --> 4 --> 5
5 -- Yes --> Done
5 -- No --> 3
To make modding easier and less error-prone, mod managers should be able to validate the config.json file without requiring the user to run the game and check the SMAPI logs:
flowchart TD
1[Install mod]
2[Run game to generate config.json]
3[Edit config.json]
5{Valid config?}
1 --> 2 --> 3 --> 5
5 -- Yes --> Done
5 -- No --> 3
Currently, mod managers are only able to validate if the config.json file is valid JSON. For validation of properties, mod managers would need a JSON schema file config.schema.json. Such a file could be generated by SMAPI on startup.
Besides validation, a schema file would also allow mod managers to provide rich config editors without requiring users to open external tools like Notepad++ or VS Code. This makes modding even easier and will massively reduce support questions for broken config files.