ExecuteExternalPlugin
Executes external application based on GUI button clicks.
模組介紹 作者原文
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.
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: