ExecuteExternalPlugin
Executes external application based on GUI button clicks.
Last updated | 2 years ago |
Total downloads | 403 |
Total rating | 0 |
Categories | Tweaks Client-side Tools Integration |
Dependency string | LordAshes-ExecuteExternalPlugin-1.0.0 |
Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
bbepisTaleSpire-BepInExPack
Unified BepInEx all-in-one modding pack - plugin framework, detour library
Preferred version: 5.4.10LordAshes-FileAccessPlugin
Provides standardized methods for accessing both local file and url resources. Automatically handles searching local folders for assets.
Preferred version: 1.4.1LordAshes-SmartConvertPlugin
Provides json and number conversion methods for handling inputs from different regions.
Preferred version: 1.1.0README
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.