You are viewing a potentially older version of this package.
View all versions.
TomlHelper
Helper mod for saving and loading Toml config files for SmoothSpatula mods.
| Date uploaded | a year ago |
| Version | 1.0.1 |
| Download link | SmoothSpatula-TomlHelper-1.0.1.zip |
| Downloads | 14844 |
| Dependency string | SmoothSpatula-TomlHelper-1.0.1 |
This mod requires the following mods to function
MGReturns-ENVY
A plugin to allow ReturnOfModding plugins greater control of their environment.
Preferred version: 1.1.1README
SmoothSpatula-TomlHelper
Helper mod for saving and loading Toml config files for SmoothSpatula mods.
Usage example
- Initializing and loading the config
mods.on_all_mods_loaded(function() for k, v in pairs(mods) do if type(v) == "table" and v.tomlfuncs then Toml = v end end
params = {
max_number = 4,
enabled = true
}
params = Toml.config_update(_ENV["!guid"], params) -- Load Save
end)
- Saving the config
Toml.save_cfg(_ENV["!guid"], params)
CHANGELOG
v1.1.0
- Added ENVY support
- Added reset_default
- Added drop_empty_tables flag (hinyb suggestion)
- Changed writing to cfg to only happen once per ImGui frame (hinyb suggestion)
- Added a way to have multiple configs per plugin
- You can specify cfg_name using a table
- save_cfg defaults to save_cfg_internal if called when Imgui is closed
v1.1.1
- Bugfixes and formatting