AgriCraft

AgriCraft

30M Downloads

JSON defaults

heatherhaks opened this issue ยท 3 comments

commented

Currently when a JSON file does not contain all possible fields, the mod seems simply to not load it at all. Could we instead implement default values? This would mean that you would only need to add to the JSON file what fields you want to be different than default. This would greatly simplify the presentation for the user, since it is likely that the JSON files will grow in complexity as more and more features get exposed to the user for editing.

It might be easier as well if we choose a couple JSON files to be 'documentation' files. Like Wheat and Weed, we just make those ones generate with every possible option filled in, so that users can see all options. This might be more useful right now than continually updating the wiki since things are likely to rapidly change within the JSON files.

commented

I'm not sure I want the mod to provide the default values so that they load when half defined. I may make it so that it does add blank fields to the file though, so that you can fill out what is missing. This is an issue that will require some discussion and time to sort out.

commented

Also this: once the plant creation gui is in place, itll be impossble to have missing fields.

commented

I'll just consolidate this with issue #740, since it is directly related to it.