Scripting tutorials¶
These step-by-step guides show how to write #pragma override patches and mod.json files for common scripting tasks. Each guide builds on the Scripting Guide.
- Change what an NPC says: Override an NPC dialogue function in Palm Brinks across all five PAL languages.
- Change enemy behavior: Patch a monster's attack speed, recovery pause, and hitbox radius with
#pragma target monster. - Add a new enemy to a fight: Spawn extra or replacement monsters in a scripted battle and configure the victory trigger.
- Add a cutscene to a town: Run a one-time welcome cutscene when the player enters Sindain.
- Tune the player: Widen Max's melee combo input windows and adjust attack hitboxes in
mainchr/c01_max.c. - Show live captions during a fight: Trigger timed, non-blocking captions during combat with
#pragma every_frame.