MTscript functions related to Add-on libraries: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Link to data.getStaticData() and macro().)
m (Added additional notes regarding use of add-on libraries)
 
Line 1: Line 1:
= MTScript Add-on Considerations =
There are some differences to be aware of when using library token property support for manipulating add-ons.
* The name field is case-sensitive when accessing an add-on library.
* The values stored do not need to be converted to or from strings like they do with library token properties, so in many cases large json values should see a speed improvement.
* The default properties list for the campaign are not present for add-ons as they are not tokens.
= MTScript Add-on Library functions =
= MTScript Add-on Library functions =


The following functions have been added to MapTool Macro Script to work with [[Add-On Library|Add-On Libraries]]:
The following functions have been added to MTScript to query information related to [[Add-On Library|Add-On Libraries]]:


* {{func|library.getInfo}}
* {{func|library.getInfo}}
Line 8: Line 16:
* {{func|library.getContents}}
* {{func|library.getContents}}


The following MTScript functions can be used to interact with Add-on Libraries:


The following MapTool Macro Script functions can be used to interact with Add-on Libraries:
* To read data from files in the add-on Library: {{func|data.getStaticData}}
 
* To run macros in the add-on Library: [[macro (roll option)]]
* To read data from files in the Add-on Library: [[data.getStaticData]]
* To add or change properties within an add-on:
* To run macros in the Add-on Library: [[macro (roll option)]]
** {{func|setLibProperty}}
** {{func|getLibProperty}}
** {{func|getLibPropertyNames}}
** {{func|getMatchingLibProperties}}

Latest revision as of 02:42, 11 February 2024

MTScript Add-on Considerations

There are some differences to be aware of when using library token property support for manipulating add-ons.

  • The name field is case-sensitive when accessing an add-on library.
  • The values stored do not need to be converted to or from strings like they do with library token properties, so in many cases large json values should see a speed improvement.
  • The default properties list for the campaign are not present for add-ons as they are not tokens.

MTScript Add-on Library functions

The following functions have been added to MTScript to query information related to Add-On Libraries:

The following MTScript functions can be used to interact with Add-on Libraries: