You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Loading
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.
SMAPI mods write
config.jsonfiles 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 --> 3To make modding easier and less error-prone, mod managers should be able to validate the
config.jsonfile 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 --> 3Currently, mod managers are only able to validate if the
config.jsonfile is valid JSON. For validation of properties, mod managers would need a JSON schema fileconfig.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.