Modding > Spelunky 2 > options cache
Library that saves the mod options to a file, so the player doesn't have to set them every time
- By:
- Mr_Auto
- Downloads:
- 16
- Mod Type:
- Library
- Added:
- 6 months, 2 weeks ago
- Last Update:
- 6 months, 2 weeks ago
- Average Rating:
- No Ratings
Details
Simple library to add saving of the mod options, so they persists between game restarts
Setting it up takes just two lines of code:
require "options_cache"- and under all the
register_option_*lines addcache_options("all")That's it, now all the options will be saved, if you only want specific options, you can also declare them by their names in an array, example:
register_option_bool("optionA", "Option a test", "Test", false) register_option_combo("optionB", "Choose", "", "One\0Two\0\0") register_option_bool("optionC", "Option c test ", "Test", false) cache_options({"optionA", "optionC"})Now only options A and C will be saved, and option B will always be at it's default value
In the background this code runs a callback every 5s, if you don't like that, you can also use the standalone functions to save and load options manually
load_optionsandsave_options, their parameter is exactly the same as forcache_options
Downloads
Latest Download
| Downloads | Name | Uploaded | |
|---|---|---|---|
| 16 | options_cache.lua | 6 months, 2 weeks ago |
Comments (1)
Please log in to leave a comment.
odd that its making me manually download it