import { Steps, Aside } from '@astrojs/starlight/components';
Macro System
Section titled “Macro System”Define the macro with
[macro name=…]…[endmacro]:[macro name=fade_to_black][fadeout time=500 color=0x000000][wf][endmacro]Invoke it anywhere by its name:
[fade_to_black]Pass parameters at the call site; access them with
%keyor thempRhai map inside the body:[macro name=say_hello]Hello, %name|stranger![endmacro][say_hello name=Alice]
[erasemacro name=…]
Section titled “[erasemacro name=…]”Delete a macro definition at runtime.
Rhai Script Blocks
Section titled “Rhai Script Blocks”[iscript] / [endscript]
Section titled “[iscript] / [endscript]”Execute a multi-line Rhai script block. All text between the tags is run as Rhai code.
[iscript] let total = 0; for i in 0..10 { total += i; } f.total = total;[endscript]Open URL
Section titled “Open URL”[web url=…]
Section titled “[web url=…]”Open a URL in the system browser.
[web url="https://example.com"]Variable & Stack Management
Section titled “Variable & Stack Management”| Tag | Clears |
|---|---|
[clearvar] | All f game flags |
[clearsysvar] | All sf system flags |
[clearstack] | Call, if, and macro stacks |