About Wax
Wax is a Lua scripting framework for ICARUS. It runs your mods inside the game.
Wax lets you write mods for ICARUS in Lua.
A mod is a folder with one file in it, called init.lua. Wax runs that file inside the game.
The download is on the Installing page. Security says what Wax puts on your PC and what a mod can do.
What a mod looks like
This is a whole mod. It makes a window with one button.
local window = ui.Window({ title = "Hello" })
window:Button("Say hi", function()
ui.Notify("Hi from my mod!")
end)Switch the mod on once, on the Mods page of the Wax menu. Wax gives the mod a key and tells you which. Press that key in the game and the window is there. Click the button and a message shows in a corner of the screen.
What you can do
- Read and change the game's objects. Start at
gameand go to the world, the player and every other object. See The game tree. - Make an interface with windows, buttons, switches, sliders, lists, overlays and notifications. See Controls.
- Run code over time. Wait, repeat and delay without freezing the game. See Tasks.
- Run a function when something happens, such as a map change or a flipped switch. See Signals.
- Keep settings between game sessions. See Saving settings.
What Wax does for you
- When you save a file, the mod reloads in the running game. You don't restart anything. See Hot reload.
- A key shows and hides your mod's windows and frees the mouse. See The menu.
- A panel in the game lists your mods, shows the log and runs a line of Lua. See The Wax panel.
- Wax catches an error in your mod. The error shows as a notification and in the log, with the line it happened on.
- Everything your mod makes is removed when the mod reloads. You don't write clean-up code.