MacrosPlugin
Execute button initiated macro scripts.
模組介紹 作者原文
Macros Plugin
This unofficial TaleSpire plugin allows users to create macros which can be launched using a side out menu.
Includes a Lord Ashes Macros Builder (LAMB) which will convert the user macros scripts into the Macros plugin.
The user can then access the macros using a slide out menu. The slide out menu can be made content sensitive
so its contents can change based on conditions provided in the macros.
Change Log
1.0.0: Initial release
Requirements
You will need Visual Studio to create macros but Visual Studio is not needed to use the macros.
Any edition of Visual Studio should work including the free Community edition. You will need the following
plugin to build and/or use the created macros:
Hollo's Radial UI plugin installed.
Lord Ashes' Stat Messaging plugin installed.
Lord Ashes' File Access plugin installed.
Install
Use R2ModMan or similar installer to install this plugin. This will install a sample macro plugin but more
importantly it will install the Lord Ashes Macros Builder (LAMB) so that you can build your own Macros plugin.
Warning: Some manual configuration is required to use LAMB. See the first time use section below.
First Time Use
Before you can use LAMB there is a one time manual configuration needed. Once you configure it, there should
not be any need to configure it again unless you update the plugin.
LAMB can be found in a sub-folder of the Macros Plugin folder.
- Locate the MacrosBuilder.config file and edit it.
- Replace the first line with the drive, path and file name of Visual Studio's MSBuilder file.
(The default entry is for a standard install of Visual Studio 2019 Community edition)
- Replace the second line with the location of the Macros Plugin folder
- Ensure that there are no blank lines before or between the two entries. They must be the 1st and 2nd lines.
- In the MacrosPlugin sub-folder, locate the MacrosPlugin.csproj file and edit it.
- Correct the full path of all references in this file so that they point to the correct location for the
respective assembly. The Microsoft assembly references can be left as is (relative path) but all the
TaleSpire references and the custom plugin references need to be updated to locations on the user's device.
Creating Macros
Each macro script is a seperate file placed in the LAMB macros folder. The file is a text file with the extension
of "macroScript". The contents of the file has two labels and two section. All four of these must be present in
order for the macro to work:
Macro Label
Each macro requires a line starting with "Macro:" followed by the name of the macro. The name is not actually used
in the code itself (but is still required). It is used as a comment header in the source code to make editing errors
more easier. For example:
Macro: Attack 1
Button Label
Each macro requires a line starting with "Button:" followed by the text that will appear on the macro button when
the macro button is visible.
Check Section
Each macro requires a line that contains "Check:". No other text follows on the same line. This section header
indicates that the lines of code that follow are for the available check. The availability check defines the
conditions under which the button will be displayed. It expects the code to return either a true or false. If the
code returns true, the macro button will be displayed when the macro menu is pulled out. If the code returns false
the menu button will not be displayed when the macros menu is pulled out. The condition is continioually checked
while the menu is pulled out so that it can be used to make context sensitive macro options.
If you want a macro button to always be visible when the macro menu is pulled out, simply return true.
Warning: The check code needs to be a quick evaluation of conditions. Do not include any code that will block
execution (such as prompts for user input) or operations which may take a long time to execute such
as disk access. Doing so can lead to memory or stack o
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。
下面這些內容需要先安裝,否則該模組不會生效: