EasyAnnouncement allows you to create custom station announcements using JSON files.
Create a JSON file and refer to the following example:
{
"sounds": [
{
"soundPath": "mamonaku",
"duration": 1
},
{
"soundPath": "($track)",
"duration": 2
},
{
"soundPath": "($route)",
"duration": 1.5
},
{
"soundPath": "($routetype)",
"duration": 1.7
},
{
"soundPath": "($boundfor)",
"duration": 2.5
},
{
"soundPath": "mairimasu",
"duration": 0
}
]
}added announcements:
{
"sounds": [
{
"soundPath": "mtr_chime",
"duration": 1.5
},
{
"soundPath": "attention_please_chi",
"duration": 2
},
{
"soundPath": "($track)",
"duration": 1.5
},
{
"soundPath": "($route)_line_chi",
"duration": 2
},
{
"soundPath": "to_($boundfor)_chi",
"duration": 3
},
{
"soundPath": "is_arriving_chi",
"duration": 2
},
{
"soundPath": "mind_gap_chi",
"duration": 3
}
]
}For English announcements:
{
"sounds": [
{
"soundPath": "attention_please_eng",
"duration": 2
},
{
"soundPath": "train_on_platform_($track)",
"duration": 2.5
},
{
"soundPath": "($route)_line_eng",
"duration": 2
},
{
"soundPath": "to_($boundfor)_eng",
"duration": 3
},
{
"soundPath": "is_arriving_eng",
"duration": 2
},
{
"soundPath": "please_stand_clear",
"duration": 2.5
}
]
}| Parameter | Description |
|---|---|
"sounds" |
Required field |
"soundPath" |
Audio file path |
"duration" |
[NOT USED] Audio length - currently not used, only delaySeconds from GUI is used |
| Variable | Content |
|---|---|
($track) |
Platform name |
($route) |
Route name |
($routetype) |
Service type |
($boundfor) |
Destination |
($hh) |
Arrival hour (00-23) |
($mm) |
Arrival minute (00-59) |
resource_pack_name/
├── pack.mcmeta
├── assets/
│ └── easyannouncement/
│ ├── sounds/
│ │ ├── your_announcement.json
│ │ ├── mtr_announcements.json
│ │ └── custom_sounds.json
│ └── sounds.json
- Place JSON file in
<resource_pack_name>/assets/easyannouncement/sounds - Don't forget to register audio files in
sounds.json - Apply the resource pack
`
- Right-click the announcement block to open GUI
- Click "Select JSON" and choose your created JSON
- Enter platform name (required, won't work if empty)
- Enter seconds (entering 10 means announcement plays 10 seconds before)
- Save and you're done
If announcements don't play:
| Problem | Solution |
|---|---|
| Platform empty | Enter platform name |
| Invalid JSON | Check JSON syntax |
| Audio file missing | Check sounds.json |
Default announcement on failure:
- Default announcement plays
For details, see MTR_INTEGRATION_GUIDE.md.
That's how to use it. Please ask if you have any questions.