

This unofficial TaleSpire plugin is a dependency plugin for creating local chat service functionality. The plugin allows registering of key words with corresponding handlders to create functionality such as whispers or dice rolling functionality.
1.1.0: Added optional deselect action to the character radial menu to deselect the mini and returns the chat box input back to speaking a player (and not creature). Can be turned on or off in the R2ModMan settings for plugin. If on, requires RadialUI plugin. If off, RadialUI plugin is not needed.
1.0.1: Added source in the handler to distinguish messages from gm, player or creature.
1.0.1: Fixed bug when using multiple hanlders and one returns a null.
1.0.0: Initial release
Use R2ModMan or similar installer to install this plugin.
Chat Service Plugin has a soft dependency on Radial UI plugin. If the deselect option is turned on in the settings then Radial UI plugin is required. If the deselect option is turned off then Radial UI plugin is not required.
Reference this dependency plugin in the parent plugin and then use the following syntax to add a chat service:
handlers.Add(serviceKey, handler)
Where the service key is a string that must appear at the beginning of the chat message in order to trip the corresponding handler.
Where hander is a function that takes in two string, the message content and the sender, and a source which is a ChatSource enumeration indicating if the source if a GM message, player message or creature message. The hanlder returns a string, the modified message or null. Returning null prevents the message from being displayed.
An example of adding a inline handler for "/w" function would be:
handlers.Add("/w ", (chatMessage, sender, source)=> { Debug.Log(sender+" whispered "+chatMessage); });```