mtr_extra:resourcepack:make:start
This is an old revision of the document!
Table of Contents
MTR Custom Scripting: Example Script
Overview
Briefly explain what your MTR script or code component does (e.g., train behavior override, station annunciator, or custom JSON resource hook).
Syntax / Setup
Place your code block here. Use appropriate syntax highlighting for JavaScript/JSON.
// Example MTR Script / JS Hook snippet function onStart(train) { train.setName("Express 101"); }
Parameters / Properties
| Parameter | Type | Description |
| :— | :— | :— |
| `train` | TrainObject | Reference to the active MTR train instance |
| `name` | String | Display name shown on destination board |
Usage Example
1. Save script inside your resource pack or addon folder under `assets/mtr/scripts/`. 2. Reference the script via your custom train/station JSON configuration. 3. Test in-game using `/mtr reload`.
Related Pages
mtr_extra/resourcepack/make/start.1789654024.txt.gz · Last modified: 2026/09/17 14:07 by Survival | Anarchy | Nostalgia