Skip to content

Lua features and your scripts

Every Lua feature, built in or yours, works the same way. It has a checkbox that stays as you left it, a hotkey that switches it on and off, and an Options window. A feature's script runs while the feature is on and is unloaded while it is off.

The Lua window's Features tab lists every one of them, built in or yours, in one table: switch it on, show it in the main menu, set its hotkey, open its Options or reload it. From says whether it ships with WololoLabs (Built in or Optional) or is your script; nothing else differs. Filter by name, heading or source, and sort by any column.

Kind Starts In the main menu
Built-in main-menu features (ESP, Minimap, Auto Deer Push...) Off Yes
Optional features (built in) Off, and hidden until you choose to use it No
Your scripts On, unless its manifest says otherwise No, unless its manifest says otherwise

Optional features are built-in features players asked for for their own use. Choose the ones you want in Settings > Optional features: tick Use beside one, and it is listed everywhere like any other feature (the Features tab, Settings > Main menu, Settings > Hotkeys), with On and In the main menu right below it. Untick Use to hide it again; that also switches it off, takes it out of the main menu and clears its hotkey. The Features tab says how many are available and opens that page.

Any feature or script can join the main menu: tick Menu on its row in the Lua window, or tick it in Settings > Main menu.

Settings > Main menu arranges the menu:

  • Drag a heading, or use its arrows, to move it up or down.
  • Drag a feature to reorder it. Drop it on another heading, or on a feature under one, to move it there.
  • Pick a heading from a feature's list, or choose New heading... to make one.
  • Reset order puts headings and features back in their default order.

A script can choose its own heading with SetGroup; the heading you pick replaces it.

Once an optional feature or script is in the main menu, its on/off checkbox and options also appear in Settings. The left column lists features in groups that match their heading: Automation, Map overlays for Map and resources, and otherwise a group named after the heading, such as Scripts or one you made. Optional features still under their own heading are listed under Optional features. Click a feature to open its settings. Move it to another heading and its options move with it. Its Options window in the Lua window still works too. Every feature's hotkey also appears under Settings > Hotkeys. A hotkey can be a combo such as Ctrl + A. Giving a key to one feature takes it from any other that had it, unless Allow several features on one hotkey is on in Settings > Advanced.

The Lua window's Loaded tab lists every script that is running, whichever feature or path started it. It shows where each came from, its average Update and Render time per call, and how many times its callbacks have failed. Hover a name for its path, how long it has run, its slowest Update and its last error. Sort by a column to find the slowest script. Reload reloads one script; Turn off switches its feature off, and Unload stops a script loaded by path.

Click Save settings, in Settings or an options window, to keep on/off states, hotkeys and options for the next session.

User scripts

Put scripts in %APPDATA%\WololoLabs\scripts, or modules with helper files in %APPDATA%\WololoLabs\modules. See Get started. A new script starts on. Switch it off to keep it off, even after a restart. If a script fails to load, its row says so and it switches off. Fix it, then switch it on again.

A script's options are the controls it declares with Settings.Module, named after the script's file. They appear in its Options window after it has run once, or at start-up when the script has an options file. Keybind options also appear under the script's name in Settings > Hotkeys.

A script can choose its own on/off key with AddToggleKey in its options file. The key works from start-up, before the script has loaded.

Manifest

A script can say what it is called and where it starts in a manifest.json, the same file the built-in features ship with. Put it beside a module's entry (modules\my-feature\manifest.json), or beside a standalone script as <name>.manifest.json.

{
  "name": "Scout Helper",
  "description": "Keeps your scout circling the enemy town.",
  "group": "Scouting",
  "mainMenu": true,
  "enabled": false
}
Key Meaning Without it
name Its name in menus. The file name.
description Its tooltip and the line under its name. Its path.
group The main-menu heading it starts under, built in or new. Scripts.
mainMenu true to start in the main menu. Off the main menu.
enabled Whether it starts on. On.
options Its options file, relative to the manifest. options.lua beside a module, <name>.options.lua beside a script.

Your choices in the menus replace these: a heading or position you pick, showing or hiding it, and switching it on or off, once saved. SetGroup in the script replaces group. Built-in features' manifests also carry keys only the build reads (id, entry, files, order, feature, settingsPage, optional, shared); a copy of one works, and those keys are ignored. Any other key, or a value of the wrong kind, makes the whole manifest ignored; the script's row in the Lua window says why.

File access

Built-in features can read only files that ship with that feature. Do not expect a feature to write its own files or load arbitrary files at runtime.