Storage
Helps with storing data that persists through different runs of the game using JSON.
Load<T>
Section titled “Load<T>”Loads an object (of type <T>) from the given file path. Loads the default of T if the file doesn’t exist.
Load Parameters
Section titled “Load Parameters”(italicized = optional)
string filename: The file path, relative to your mod’s directory, of the JSON file to load the object from.bool fixBackslashes: Replaces backslashes with forward-slashes, this can mess up escape characters; defaults totrueJsonSerializerSettings settings: Use custom JsonSerializerSettings.
Save<T>
Section titled “Save<T>”Saves an object (of type <T>) to the given file path. Creates a new file if one doesn’t exist.
Save Parameters
Section titled “Save Parameters”T obj: The object to save.string filename: The file path, relative to your mod’s directory, of the file to save the object to.