Skip to content

Chef Shared Loader 1.4.0

Choose a tag to compare

@Th3chef Th3chef released this 29 Oct 08:43
· 26 commits to main since this release
Immutable release. Only release title and notes can be modified.

A hang watchdog that stops a stuck mod instead of letting the game freeze, an on/off switch and a status for every mod, CRASH RECOVERY in F9, a tighter lockdown, richer option rows, and an author kit: type stubs and a simulator.

  • A hang watchdog: a mod's call that runs on for more than 3 seconds (an endless loop; 10 seconds for its start) is stopped and the mod switched off for the session, so a stuck mod no longer freezes the game for good. Other mods' boot scripts are watched too while they load and run. It can't stop a stuck engine call.
  • CRASH RECOVERY (F9 > Chef Shared Loader) lists the mods the crash guard holds back, each with a "Try again next launch" button, so deleting chef_loader_state.txt by hand is no longer the only way.
  • Every mod has an on/off switch at the top of its options, mods without options included (they're listed now): off stops the mod at once and it stays off; on again, it starts again the next time you launch the game.
  • Each mod's title bar in the menu says how it's doing: running, off, kept off, stopped or not started (and why), its start's time and memory, and its last error. A screenshot of it makes a good bug report.
  • No loader mod can make the game write files, change or save its settings, open a browser or run console commands any more, and chef.call says why when it refuses one.
  • No loader mod can read other mods' saved data, the loader's own files or logs it didn't write, or load code under the loader's or another mod's name.
  • While the options menu is open, mods' hotkeys stay quiet, so typing a search never fires one.
  • Richer options for mods: buttons, colors (a palette with a swatch), headings, and a hint for the selected row. Key bindings take combos (Ctrl+Shift+F6) and controller buttons, and the menu captures both.
  • The options menu, reworked: the arrow keys do everything (no Enter, which also opened the game's chat), long mods' options fold under their headings, the compact menu moves out of the performance monitor's way and its hint line follows keys, mouse or controller, and the menu's colors now look as designed in game. Its cursor hides while you use a controller.
  • For mods: a shared mouse hold that always gives the camera back (when the last mod lets go, when a mod holding it stops, when the game closes), new menu, mod_stopped and players events, chef.ray_box, and chef.capture (a screenshot the loader saves itself, for trusted mods it's granted to).
  • For mod authors: type stubs for editor autocomplete (docs/types/chef.lua), a simulator that runs a mod without the game (tools/modsim/), and docs/TESTING.md on both.
  • Each mod's start is measured: its time and the Lua memory it added, in the log, chef_loader_health.txt (two new columns) and chef.mods().
  • The "Game patch files" switch is gone: a trusted mod that builds game patch files can't work without them, so they're now part of its permission. Every file it writes is still checked.
  • When a file-mod installer mod is still deployed while Medic File Mod Merger manages the game's settings files, the log and a notice say so.
  • For mods: chef.save refuses opt. keys (the options menu's own), and chef.own_log takes 8 names and 4 MB a launch at most.
  • Docs: how a mod gets on the trusted list (docs/MODDING.md), and a continuation clause in the LICENSE (what happens if the loader goes 3 months without a release).
  • Fixed: chef.players() counted a peer list keyed by peer id as 1 player; a chef.bitmap could flicker into a white square after another mod drew a lot; world lines (chef.line) stayed on screen after a mod stopped drawing them.
  • Fixed: a chef.notify with a bad color broke every notice for the session; a letter menu key closed the menu while you typed it in a search; sliders with a step of 1 or more showed rounded values; a saved choice a mod no longer has fell back to the first choice, not the default; chef.bind(nil) raised an error.
  • Fixed: chef.wheel, chef.cursor and chef.mouse_down stayed dead for the session when asked in the first frames; the crash guard could blame the wrong job after a long session; after an update, the loader kept reading the old version from its state file, so a crash on one kind of unit was never refused for every mod.
  • Full list: CHANGELOG.md. For mod authors: docs/MODDING.md and docs/TESTING.md.

Updating: replace the old zip (Chef-Shared-Loader-1.3.1.zip, or the one you have) with this zip in your mod manager, keep it at the highest priority, then Purge and Deploy.

Thanks: RatInPlat, for the shock-trooper cape in Unit.paint_private_cape (#10), and luka189, for the reports and analysis behind the chef.bitmap and world line fixes (#12, #13).

Download: Chef-Shared-Loader-1.4.0.zip below (not the source code). Mod authors: chef_loader_stub.lua is the start-up stub to carry as your mod's boot (docs/MODDING.md, "Carrying the stub").