RelayPlugin
Relay plugin connects sources with sinks to produce automatic effects
About this mod Author’s original text
Relay Plugin
This unofficial TaleSpire mod allows connection of sources to sinks allowing
things to occur under certain conditions. If that sounds vague, it is. The reason
why the description is so vague is because, in most cases, Relay Plugin is just
the connection. What things will happen under what conditions depends on the sources
and sinks that are configured.
Install
Use R2ModMan or similar installer to install.
Note: This plugin should only be installed on GM device. Do not install on player device.
Usage
This plugin is passive. The GM or players don't need to do anything once the plugin is configured.
What actions then need to be taken to trigger a source condition to result in a sink trigger
depends on the sources and sinks configured.
Configuration
There are 3 parts to Relay Plugin: Relay, Interactions and Hide.
Relay Configuration
The relay configuration is store in a file called:
`org.lordashes.plugins.relay.Relay._CampaignId_._BoardId_.json`
You can get this file name form the logs.
This means that each board has its own configuration of Relays which makes sense since Relays
are typically specific to creatures or props on the board.
The format for the Relay file is:
{
"sources": {
"ANGEL": "org.lordashes.plugins.angel.*",
"DOOR": "org.lordashes.plugins.relay.interaction"
},
"relays": [
{
"trigger": "DOOR",
"condition": "{N}:{V}|^Door_Right:2$",
"reaction": "HIDE",
"reactionAsset": "{Jester}",
"reactionDelay": 1.0,
"reactionValue": "0",
"description": "Shows/Hides Jester Based On Door state"
},
{
"trigger": "DOOR",
"condition": "{N}:{V}|^Door_Right:6$",
"reaction": "HIDE",
"reactionAsset": "{Jester}",
"reactionDelay": 1.0,
"reactionValue": "1",
"description": "Shows/Hides Jester Based On Door state"
}
],
"sinks": {
"HIDE": "org.lordashes.plugins.relay.hide"
}
}
`sources` is set of sources indexed by a friendly name containing the corresponding Asset Data Plugin subscription.
When an Asset Data Plugin message involving the subscribed key is sent, the message is processed though the relays.
`sinks` is a set of Asset Data Plugin keys used to trigger desired plugins when the relay conditions are met.
The Relay Plugin will write to messages to these keys with the intention that this will trigger an effect in some other plugin.
`relays` are the connection between sources and sinks. The connections can be conditional or unconditional.
When a source generates a message, any relay that has the source as its trigger property will trigger.
If the relay has a condition, it will evaluate it. If the condition is empty, it is assumed the condition always passes.
A `condition` has two parts separated by a pipe character. The first part is what is being compared and the second part is a RegEx
indicating the pattern that must be matched. The first part can utilize a number of place holders which are filled in when
the condition is evaluated:
`{?}` is replaced with the a T if the source is an asset that is owned by a PC or F otherwise. Condition only.
`{A}` is replaced with the message action. Useless in most cases.
`{K}` is replaced with the message key (useless in most cases unless using wild card subscribing).
`{N}` is replaced with the name of the asset assuming the source is a creature board asset (or same as {S} if not). Usually very useful.
`{P}` is replaced with the previous value of the state. Useless in most cases.
`{S}` is replaced with the message source. Useful for asset identification but usually {N} is used instead.
`{V}` is replaced with the current value of the state. Usually very useful.
The RegEx portion is just a regular RegEx except that it needs to be double escaped since it is in a JSON. If the RegEx uses groups, the
group content can be used in the reactionAsset or reactionValue properties.
The `reactionAsset` indicates the source to be used for the sink request if the condition is passed. It can use the same place holders
as the condition did but it also has one ad
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: