Originally by Syokora, AdlC, rexfactor Adapted by Praedyth & ChatGPT
- GUI in
assets/optimizer_gui.html(v7) defaults to a 14-day event. - Start resources default: all 0 except Bat=500000, FREE_EXP=1, GROWTH=1.
- All levels and speed levels default to 0.
- Second tab lets you rename resources per event; names are saved to
resourceNamesin JSON. - C++ reads
resourceNamesfromconfig.jsonand uses them for labels/logs.
- Install Visual Studio 2022 with "Desktop development with C++".
- Open this folder as a CMake project and build target
IdleOptimizer.
Bundled with a minimal single-header JSON parser under
third_party/so the project builds fully offline.
- Open
assets/optimizer_gui.htmlin your browser. - Fill in your starting resources and toggles on the Optimizer Settings tab.
- "Write log file" enables disk logging and will create the target folder if it does not exist.
- "Add to existing log file (append)" keeps prior runs in the same file when disk logging is enabled.
- "Pause on exit" keeps the console window open after the run finishes.
- "Max optimization iterations" caps how many non-improving iterations the search will attempt (set to
0to stop immediately after the initial evaluation). - The live preview on the right summarises which logging destinations (console / file) are active.
- Click Save JSON to export
config.json(or use the bundledconfig.example.jsonas a starting point). - Place
config.jsonnext to the EXE (or run from this folder). - Double-click
RunWithLog.batto capture output inrun_log.txt, or launch the built executable directly. - Logs written to disk land in the folder configured by the GUI (defaults to
logs/IdleOptimizer.log).
- Event duration in C++ is compiled as 14 days for now (matches the GUI).
resourceNamesare read at runtime fromconfig.json.busyTimesStart/busyTimesEndvalues inconfig.jsonare expressed as hours from when you launch the optimizer, not clock-of-day. For example, if you start a run at 08:00 and want a nightly pause from 19:00–03:00, enter start/end hours11and19(11 and 19 hours after launch) or use the GUI schedule generator, which outputs the correctly offset values. These fields now accept either decimal hours (11,19.5) orHH:MMstrings (19:00,03:30) and we’ll convert them automatically.- To disable log file output, uncheck Write log file in the GUI before exporting your configuration.