Skip to content

Getting started

You need Node.js 20 or newer and the path to the game’s Modules folder. Nothing has to be installed globally.

  1. Create and install a project

    Terminal window
    npx killscript@0.1.2 new MyModule --modules "/path/to/KILLSCRIPT/Modules"

    This creates a regular client module, installs its dependencies, builds it and writes the game-readable folder to Modules/MyModule. Add --reflex only when you also need server-side logic:

    Terminal window
    npx killscript@0.1.2 new MyModule --reflex --modules "/path/to/KILLSCRIPT/Modules"

    The version is pinned intentionally: a future generator release cannot silently change a project created from this guide. Upgrade it deliberately after reading that release’s notes.

    You can omit --modules when the game is on another machine or the share is not mounted yet. Connect it later with:

    Terminal window
    cd MyModule
    npm run install:game -- --modules "/path/to/KILLSCRIPT/Modules"
  2. Start hot reload

    Terminal window
    cd MyModule
    npm run dev

    The machine-specific path is saved in .killscript/local.json and ignored by Git. Every successful save now updates the generated module folder; a failed build leaves the previous working version in place.

    Client and Reflex code are reloaded from the folder automatically. A real scripts/server.lua update prints a notice and requests a server reload for the current match. Do not cycle the module just to apply server code: in some game builds that restarts only the client side.

  3. Enable the folder module

    Open or reopen the in-game module list and enable MyModule once. The game scans direct children of Modules, not TypeScript project folders. The generated folder keeps the same module ID, so later builds replace it in place. If an already open list does not refresh, restart the game once.

  4. Make a visible change

    The starter binds F6. Press it in game to toggle the starter feature and display a hint. Edit src/client/features/module-toggle.ts, save, and try it again—there is no .KillScript import step during development.

  5. Build a release

    Terminal window
    npm run build

    The distributable file is written to dist/MyModule.KillScript.

Run:

Terminal window
npm run doctor

It checks the project configuration, every configured compiler context and the saved game connection. See Troubleshooting for console filters, SMB locks and folder ownership errors.