Mod author cookbook
Task-by-task recipes for writing a T3SDK mod: short, concrete answers to "how do I...", each with a minimal working example. Start with Your first mod if you have not built one yet; come back here once you have something loading and want to do something specific with it.
Every recipe links back to the mod API reference and to the mod author guide's own pages (The mod lifecycle, Packaging, Content and texture packs, Publishing, Map editing) for the full rules; the recipes only show how to apply them to one task.
Getting going
- Run code every frame — a per-frame callback, and running something once when the engine comes up.
- Write to the log, and read the engine's own lines —
api->Log, and watching the engine's own log output. - Find and inspect objects —
FindObject, walking the object table, and reading a name, path or class.
Going further
- Hook a game function — replace or wrap a documented engine function safely, and what to do when another mod got there first.
- Give your mod its own settings — a plain INI file next to your DLL, with no API support needed.
Content
- Replace game files with a content pack — a code-free package that overlays or replaces game files.
- Map edit recipes — moving, rotating, scaling and editing properties on an existing map.
Keeping it working
- Debug a mod — why a mod did not load, watching it run, reading a crash report, and attaching a debugger.
- Play well with other mods — hook conflicts, load order, API versions, and what T3SDK does and does not isolate between mods.