📘Customizing Messages
Everything required to modify messages JSON configs
TwitchSpawn refers to the title and subtitle displayed upon an event occurance by "message". Messages are consisted of two parts: event-related part and action-related part.
Those parts can be easily changed into anything desired by editing messages.title.json
and messages.subtitle.json
files. Thanks to Minecraft JSON Text Components, it is pretty easy to prettify messages. You can use following tool to generate JSON Text Components easily: https://minecraft.tools/en/json_text.php
In addition to the default messages, an overriding method for action-related part is also present thanks to DISPLAYING
field of TwitchSpawn Language!
Title Configs (Event-related)
Title configs are nothing but an object that maps event names into Minecraft JSON Text Components.
Event List
JSON Property | TSL Event | Event Description |
"donation" | Donation | Donations on streaming platform |
"twitch follow" | Twitch Follow | Follow on Twitch |
"twitch subscription" | Twitch Subscription | Subscription on Twitch |
"twitch host" | Twitch Host | Host on Twitch |
"twitch bits" | Twitch Bits | Bits on Twitch |
"youtube subscription" | Youtube Subscription | Subscription on Youtube |
"youtube superchat" | Youtube Superchat | Superchat on Youtube |
"youtube sponsor" | Youtube Sponsor | Sponsor on Youtube |
"mixer follow" | Mixer Follow | Follow on Mixer |
"mixer subscription" | Mixer Subscription | Subscription on Mixer |
"mixer host" | Mixer Host | Host on Mixer |
"reflection" | - | Used to construct the reflection message on reflected user (See REFLECT) |
Special Expressions
Expression | Evaluation Description | Example |
${event} | Name of the event. | Twitch Follow |
${actor} | Nickname of the actor of event. (E.g follower on Twitch Follow event) | Neetaa |
${streamer} | Nickname of the streamer | iGoodie |
${message} | Message came with the event | Hey there, dude! |
${amount_i} | Amount of donation as an integer format | 30 |
${amount_f} | Amount of donation with two decimal places | 30.00 |
${currency} | Currency code set in the streaming platform account | USD |
${month} | Months of subscription events | 2 |
${tier} | Tier of subscription (1, 2, 3) or "Prime" | Prime |
${viewers} | Viewers of host events | 100 |
${raiders} | Raiders of raid events | 200 |
${date} | Current date in dd-MM-yyyy format (Depending on machine) | 01-01-2018 |
${date_utc} | Current UTC date in dd-MM-yyyy format | 01-01-1990 |
${time} | Current time in HH:mm:ss format (Depending on machine) | 04:50:49 |
${time_utc} | Current UTC time in HH:mm:ss format | 02:33:14 |
${unix} | Current unix time in seconds | 1570224993 |
Expressions used under irrelevant events are not going to be evaluated. E.g ${viewers}
under "donation"
will not be evaluated and will be left as it is.
Subtitle Configs (Action-related)
Similar to Title configs, Subitle configs are nothing but an object that maps event names into Minecraft JSON Text Components. Any expression available in Title configs are also available in Subtitle configs. However, there are also extra special expressions unique to each action.
Actions and Special Expressions
Some of the actions have their unique expressions, where others have no extra expressions. Here are actions with extra special expressions:
Action: DROP
Expression | Evaluation Description | Example |
${itemName} | Name of the item | Apple |
${itemCount} | Count of the item | 2 |
Action: SUMMON
Expression | Evaluation Description | Example |
${mobName} | Name of the mob/entity | Zombie |
Action: FOR
Expression | Evaluation Description | Example |
${loopCount} | Count of the loop ( | 5 |
Expressions used under irrelevant actions are not going to be evaluated. E.g ${mobName}
under DROP
will not be evaluated and will be left as it is.
Last updated