Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

Config gets nuked if there's a JSON error

Profilename1 opened this issue ยท 4 comments

commented

A lot of time and effort goes into tweaking a config file, especially since the only way to tweak recipes is to mess with the config file. Tonight I lost essentially an entire evening's worth of work on my modpack because all the changes I made were wiped when I loaded up. In my opinion the best fix would be to go back to conventional nonJSON configs and crafttweaker scripts which are the standard, but alternatively the overrides could be moved to their own json that would be ignored if errored. or the mod could simply crash if the json is incorrect, though I realize that last one probably isn't something you would like to into mod.

commented

So I'm not going to use Crafttweaker. Not when they won't provide documentation. However, I can for sure split the configs out to two individual configs. The whole reason the main gets nuked is I have to have something in there for the game to run. That being said, I think the idea of crashing for an invalid config is a good idea, as it'll tell you where the error is rather than just blowing the config out. Plus the only way you'll get an invalid config is if you change something to an invalid value, so it's something you'll want to see before you release the config to the wild in a pack.

commented

We switched to a non-standard config specifically because it allows recipes to be inserted right into the config, because you wouldn't believe how many people ask how to switch them. Crafttweaker is dumb, really. Splitting the item overrides into a separate file, though... that would actually make a lot of sense.

commented

For what it's worth, Geolosys, an ore deposit mod, does something similar with it's config. There's a config file for the general config stuff and then a separate JSON for setting up the deposits. In that specific instance a bad JSON leads to various errors but it doesn't get overwrite itself.

commented

Split off in V18.2.0. Now overrides will just fail to be applied if the config is fouled up rather than nuking it.