A Decal plugin that can send Webhooks in response to ingame events.
TownCrier cannot be used to send info into AC such as sending Discord messages into fellowship chat. I think the idea is interesting but I'd probably start another plugin to build this because of how different it is from how TownCrier is built.
GET
and POST
webhooks with arbitrary query parameters and/or JSON
payloads@tc
ingame)Download the latest release installer and run it.
To get started using TownCrier, you need to:
I expect most people using TownCrier probably want to use TownCrier with Discord so below are instructions for doing that:
Create a new TownCrier Webhook using the URL from the previous step
POST
{ "content": "@" }
in the JSON field. This is specific to Discord.Your screen should look something like this:
Note: The @
symbol in the JSON payload field is a special symbol.
When TownCrier triggers your Webhook, the @
symbol is replaced by whatever Message or event triggered it.
If you set the JSON field in the above examples to { "content": "Hi" }
, all your Webhook would ever do is send the text "Hi" to your Discord channel.
Triggers are what cause Webhooks to be sent so your newly-created Webhook won't do anything without setting at least one Trigger up. There are three types of Triggers:
The trickiest part of setting up a trigger is using the Message field.
The Message field is optional and gives you a way to customize what's sent to your webhook target. If left blank, a message corresponding to the event that triggered your Webhook will be sent. For example, if your character's name is "Asheron" and you have an Event Trigger for "You log in", when you log in, you're webhook target will be sent the message "Asheron has logged in". If, instead, you set the Message field to "Hey, I logged in", you'd get that message instead.
In the Message field, you can make use of special variables to send information about your character and the game world. You can use as many variables as you want in each Message and each variable starts with a '$' (e.g., $LOC gives your coordinates).
Available variables are $NAME, $SERVER, $LEVEL, $UXP (unassigned xp), $TXP (total XP), $HEALTH, $STAMINA, $MANA, $VITAE, and $LOC (Your location). For example, a Message of 'Hello, $NAME' would print 'Hello, ' followed by your character's name.
Event and Chat Triggers can also make use of a special variable, $EVENT, that lets you print the text of the event or chat message that triggered the webhook. For example, a Chat trigger with the Pattern 'You say' and a Message of '$EVENT' will send everything you say to your webhook. $EVENT does not apply to TimedTriggers but all other Variables work.