API Reference#

Load modules with require() in Luau, or import * as X from "..." in TypeScript.

Module Description
Script entry point mod() class and lifecycle
Petrichor.Standard Globals newclass(), mod(), log(), Levels
Augment.Hook Hook builder
Augment.Mixin Symbols, calls, memory
Augment.Class Actor subclassing in Luau
Petrichor.Log Logging
Petrichor.Events Pub/sub between mods
Petrichor.Task Async/await on the main thread
Petrichor.Async Coroutine async/await helpers
Petrichor.Timer Timers
Petrichor.Net TCP and UDP
Petrichor.Json JSON
Petrichor.Random Deterministic PRNG helpers
Petrichor.Hash MD5 / SHA-256
Petrichor.Bits 6-bit ASCII bit packing
Petrichor.Storage Per-mod JSON persistence
Petrichor.Math Math helpers
Courage.Audio Audio file playback
Courage.Shaders Custom HLSL
Courage.Assets Asset paths and CReact texture keys
Courage.Game Namespace: shaders, assets, world, player
Courage.Layout BLO screens rasterized to CReact assets
Courage.World Stage name, warp, projection, viewport, control state
Courage.Actors Spawn actors and query skeleton joints
Courage.Attach Attach model resources to game actors
Courage.Anim Skeletal animation playback and joint control
Courage.Camera Camera eye, target, up vectors, and FOV
Courage.Attention Actor attention enrollment, talk messages, offsets, and hints
Courage.Input Key and controller input queries
Courage.Player Hearts, rupees, position
Courage.Save Save data and items
Courage.Hooks Reusable hook recipes
Courage.Timer Frame timers and Petrichor.Timer
Courage.Bmg Runtime message text overrides
Courage.Settings Settings schema helpers
Courage.Config Read-only game configuration
Courage.UI CReact panels and popups

Shader mods use HLSL. See shader guides and Shader mod.

Hook symbols: Game Hooks. Vanilla stage, actor, and archive data: TP Ultimate Spreadsheet.