-
-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Borys Stelmakh edited this page Sep 16, 2026
·
5 revisions
A Lua modding toolkit for Sacred Gold (Ascaron, 2004) that lets you add
quests, dialog, NPCs and behavior without touching a single vanilla game file.
Mods are written in Lua, live under custom/, and are loaded by a thin proxy DLL
injected at startup.
Verified on the Sacred Gold Steam edition, build 2.0.2.28 (2006-10-13). The GOG edition works identically (same code, no DRM wrapper).
- Author quests & dialog from scratch in Lua — state machines, journal entries, branching, inline text — baked to Sacred's native bytecode.
- Register a quest with the engine itself so the game writes its journal entry, plays its fanfares and keeps its state in the savegame (Native Quests).
- Use the engine's own verbs — rewards, timers, sounds, area triggers, objective counters, compass, chests, shop windows, cut scenes — one Lua builder per shipped record (Vanilla Verbs).
- Spawn living NPCs at runtime — guards, enemies, quest-givers, companions — set their stance, faction, equipment, level and AI, no FunkCode edits.
- Play a class with another creature's body — the Dwarf as Wilbur, the Battle Mage as Alcalata — keeping the class's skills and combat arts (Hero Classes).
- Give an NPC custom spoken dialog that renders in the game's own talk window (Dialog Text).
- React to game events from Lua — trigger handlers, talk detection, per-tick callbacks, world-load hooks.
- Mutate vanilla content safely — load the decompiled originals and rewrite them, byte-perfect round-trip.
| If you want to… | Read |
|---|---|
| Build three working mods in 15 minutes | Quick Start, also a Steam guide |
| Install the SDK | Installation |
| Write your first mod | Writing Your First Mod |
| Author quests, dialog & state | Quests and Dialog Authoring |
| Let the engine run your quest | Native Quests |
| Reach for a vanilla record | Vanilla Verbs |
| Place chests and clickable objects | World Objects |
| React when the hero walks somewhere, or close a road | Zones and Barriers |
| Stage a cut scene | Cut Scenes |
| Spawn NPCs & companions at runtime | Runtime NPCs |
| Play a class with another creature's body | Hero Classes |
| Give an NPC custom talk-window text | Dialog Text |
Look up a sacred.* function |
Lua API Reference |
| Understand how the SDK works internally | Reverse Engineering |
- Quick start guide on Steam
- DarkMatters forum thread: questions, bug reports, mods
-
The vanilla install is never modified. Everything lives under
<game>/custom/. -
Runtime replay, not file surgery — content is added by spawning/scripting at
runtime or by serving generated
.bin/global.resfiles through a read-time redirect, never by editing Sacred's.binstructs in place. - Native where possible — the SDK drives Sacred's own engine paths (its dialog resolver, quest registry, AI) rather than drawing its own UI over the top.
Getting started
Authoring
- Quests and Dialog Authoring
- Native Quests
- Runtime NPCs
- Hero Classes
- Dialog Text
- Dialog Nodes (catalogue)
The engine's own verbs
Reference