ExecuteExternalPlugin
Executes external application based on GUI button clicks.
About this mod Author’s original text
Execute External Plugin
This unofficial TaleSpire plugin is for executing external applications based on GUI button clicks with support
for character specific execution.
Change Log
1.0.0: Initial release
Install
Download and install using R2ModMan.
Configuration is required. Sample configuration provides rage toggle for Chaarcter Sheet plugin.
Usage
When the Execute External menu is displayed using the keyboard shortcut (default RCTRL+E), a set of buttons
appear on the screen. The location of these buttons is configurable via the R2ModMan Edit Config function.
Pressing each button executes the corresponding configured external application with the selected mini and
corresponding external file as parameters (after any pre-configured parameters).
Sample Extenral Application
The sample external application edits the selected mini Character Sheet plugin data file and toggles the
rage property. More specifically it takes the value of {RAGE} to the value of {RAGE_BONUS} if {RAGE} was 0
or set {RAGE} to 0 if it was not zero. This allows the Character Sheet calculation to use the value of {RAGE}
but the rage effect can be toggled between 0 and the value of {RAGE_BONUS} using a External Execute button.
This solution allows the {RAGE_BONUS} to be updated when characters pass levels as opposed to being hard
coded in the external application.
Custom External Application
The Execute External plugin can run any appllication that the OS recognizes. In most cases this is a custom
application that does somerthing specific but it could be a 3rd party application. The configuration file for
the plugin is always called `ExternalTriggerConfig.json` and has the following format:
[
{
"icon": "Rage.png",
"gmOnly": false,
"selectedMiniFilePattern": "Dnd5e.*.chs",
"execute": "CharacterSheetPluginRageSwitch.exe"
},
{
"icon": "Flame.png",
"gmOnly": false,
"selectedMiniFilePattern": "Dnd5e.*.chs",
"execute": "CharacterSheetPluginActivateFlame.exe"
},
]
The configuration is a list of GUIItems. Each GUIItem has the following properties:
`icon`: The name of the icon file to be used for the button.
`gmOnly`: If true the button only appears for GM.
`selectedMiniFilePattern`: This allows the plugin for find a corresponding file and pass its name to the
external application being called. This is useful if the external application will be editing a selected
asset related file since the plugin can find the file among the valid FAP locations more easily. The `*`,
in the pattern, is replaced by the mini name.
`execute`: The application that is to be triggered. Either use the full path of an application or if only
the application name is used, the plugin will search for it in FAP legal locations.
When creating custom external handlers (applications), just create a regular console application which
will get any arguments provdied with the `execute` property. In addition it will get the following added
to the parameter list:
`NAME=_name_ FILE=_file_`
Where _name_ is the name of the selected mini.
Where _file_ is the found associated file specified by the `selectedMiniFilePattern` property.
If no mini is selected, the NAME will be set to N/A.
If the selectedMiniFilePattern property is an empty string, the FILE proeprty will be N/A.
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: