Start · SDK 1.11.0
Make mods for OpenRAC
Your first mod in two minutes
- 1Make a folder with these two files. No compiler, no SDK download.main.luau
-- Each hit passes 0 on: none hurts. openrac.hook("rac1.player.take_damage", function(original, amount: number) original(0) end)openrac-mod.json{ "format": 2, "id": "no-damage", "name": "No damage", "version": "0.1.0", "author": "You", "description": "The hero takes no damage.", "type": "script", "api": "1.11", "scripts": ["main.luau"], "games": {"rac1": ["pal", "ntsc"]}, "hooks": ["rac1.player.take_damage"] } - 2In the launcher's Mods tab, Add a mod and pick the folder. Switch it on and press Play.
- 3Walk into an enemy: Ratchet's health stays full (a fall still costs a life). If it drops, the mod is off or did not load; see troubleshooting.
Next: make it a real mod with the template and share it, or pick another hook point in the hook points.
Pick your way in
Reference
In this release New 1.11
SDK 1.11.0, released , describes mod interface 1.11. Since 1.10.1: 34 new names in the API. What changed
OpenRAC plays Ratchet & Clank natively on a PC. A mod changes how the game behaves: a new way to strafe, swapped buttons, a tweak to an enemy. Players install mods from the OpenRAC launcher's Mods tab, by pasting the address of your repository, and switch them on and off there.
There are two kinds of behaviour mod:
| Script mod | Native mod | |
|---|---|---|
| Written in | Luau (a typed Lua) | C or C++ |
| You need | a text editor | a C/C++ compiler and CMake |
| Runs on | every platform, Android included | the platforms you build it for (the template's workflow builds Windows, Linux and macOS) |
| Safety | sandboxed: it sees only what OpenRAC gives it | runs as code on the player's computer |
| Since | interface 1.1 (SDK 1.1) | interface 1.0 |
Start with a script mod unless you need the speed or the reach of native code. Mods of textures, models and levels are made with the level editor instead (editor/MODDING.md).
Guides#
- Getting started: from the template to a mod players can install.
- The manifest:
openrac-mod.json, field by field. - Settings: options players change in the launcher.
- Hooks: how a mod changes what the game does, and the hook ids that never change.
- Writing the code:
- Packaging and releases: the archive, the workflow, tags.
- Install from a link: what the launcher does with your repository.
- Where mods live: the folders and files on a player's computer.
- Troubleshooting: a mod that does not load, purist mode, crash reports.
- Views of the game: extra views for a VR headset or another display, with OpenGL or Vulkan (native mods, interface 1.4).
Reference#
Generated from the SDK's headers, tables and type files by OpenRAC's sdk/tools/gen_reference.py; never edited by hand:
- C interface (
include/openrac/openrac_mod.h) - C++ layer (
include/openrac/mod.hpp) - Luau API (
types/rac1.d.luau) - Ratchet & Clank's hook points and fields
What is stable#
Stable, and kept working by every OpenRAC of the same interface major version:
the C interface, the manifest, packaging, install from a link, the repository
templates, hook ids, and the openrac script API.
Experimental: anything that names the game's internals: the behaviour catalogue (moby classes, their update functions and pvars), the fields exposed to scripts, and the game functions and addresses a native mod looks up itself. They follow the decompilation and may change. A hook id stays, even when the function behind it is renamed (hooks).
How OpenRAC is built inside will get guides of its own after the port's move to
C++. The design notes are in
docs/port/MODS.md
(docs/MODS.md in the SDK archive, beside these pages).