Getting Started
Epitaph loads JRuby scripts from epitaph/scripts/**/*.rb. Each .rb file becomes a script feature you can enable and disable inside the client.
Managing Scripts
Section titled “Managing Scripts”$script load$script load my_script$script reload my_script$script unload my_script$script loaded$script list$script folder$script folder prints the exact scripts directory on your machine. Scripts can be referenced by file name, stem, or relative path under that directory.
Minimal Script
Section titled “Minimal Script”script = { name: "Example Script", description: "Small example script", category: "MISC",
on_enable: lambda do client.message("Example Script enabled") end,
on_disable: lambda do client.message("Example Script disabled") end}Wrong — top-level
defmethods are ignored by Epitaph:def on_enable # does NOT work...end
Metadata
Section titled “Metadata”Epitaph reads metadata from the first available source:
- the value returned by the file
- a global
script
If any field is missing, the fallback is the file name for name, "Script feature" for description, and MISC for category.
Lifecycle Callbacks
Section titled “Lifecycle Callbacks”These run regardless of enable state:
| Callback | When |
|---|---|
on_load | After the script is registered |
on_unload | When the script is unloaded |
on_enable | When the feature is enabled |
on_disable | When the feature is disabled |
get_info / on_get_info | When the client requests feature info text |
Event callbacks like on_tick and on_render_2d only run while the script is enabled.
Failure Behavior
Section titled “Failure Behavior”If any callback throws, Epitaph reports the error and callback name in chat, then disables the script to stop repeated failures.
Naming
Section titled “Naming”Script names must be unique across all loaded features. If a name collides with an existing feature, loading fails.