Difference between revisions of "Script:Muler"
From Roll20 Wiki
Andreas J. (Talk | contribs) m |
Andreas J. (Talk | contribs) (Add TokenMod example) |
||
Line 1: | Line 1: | ||
<noinclude>{{revdate}} {{main|Meta-Toolbox}}{{Meta-ToolboxNav}} | <noinclude>{{revdate}} {{main|Meta-Toolbox}}{{Meta-ToolboxNav}} | ||
=Muler=</noinclude> | =Muler=</noinclude> | ||
− | '''{{fpl|10005710/ Muler}}''' provides a way to store values on a [[character sheet]] in an ability ( | + | '''{{fpl|10005710/ Muler}}''' provides a way to store values on a [[character sheet]] in an '''[[Character#Abilities|ability]]''' (not ''[[Character#Attributes|attribute]]''), which we call a "Mule". Syntax tokens can be used in any API command line to load a mule, retrieve a variable, and/or set a variable. Since the variables are stored on a character sheet, they persists between rolls, game sessions, or even campaigns. |
+ | |||
+ | A clever bit about this is that usually people use character attributes to store custom stats, but as Mule store the as Abilities, they can be more easily read, and can't de accidentally deleted by commands that updates character attributes. | ||
* {{fpl|10292476/ Muler (thread 2)}} | * {{fpl|10292476/ Muler (thread 2)}} | ||
<noinclude>__TOC__</noinclude> | <noinclude>__TOC__</noinclude> | ||
Line 16: | Line 18: | ||
<noinclude>==</noinclude>'''Example'''<noinclude>==</noinclude> | <noinclude>==</noinclude>'''Example'''<noinclude>==</noinclude> | ||
− | <pre | + | |
+ | <pre>!somescript --stuff|get.thestuff {& mule ModMule} --tacos | ||
!somescript --mod|get.initMod {& mule Viper.ModMule}</pre> | !somescript --mod|get.initMod {& mule Viper.ModMule}</pre> | ||
+ | |||
+ | '''[[TokenMod]] + Muler''' | ||
+ | |||
+ | Sets the value of bar3 on the selected token to the value of the "Stunned"-variable, which is stored in an character ability named "ConditionTable", for a character named "Blue". To make this command work, Create character named {{c|Blue}}, with and ability named {{c|ConditionTable}}, and save it's content as <code>Stunned=5</code>. | ||
+ | <pre>!token-mod {{!token-mod {{ | ||
+ | --set bar3|get.Stunned {& mule Blue.ConditionTable} | ||
+ | }}</pre> | ||
+ | |||
<noinclude> | <noinclude> | ||
==Meta-Toolbox Examples== | ==Meta-Toolbox Examples== |
Revision as of 16:01, 12 March 2022
Page Updated: 2022-03-12 |
API:Meta-Toolbox
APIs to patch other API commands
Meta-Toolbox Scripts
created by Timmaugh
Related APIs
Muler
Muler(Forum) provides a way to store values on a character sheet in an ability (not attribute), which we call a "Mule". Syntax tokens can be used in any API command line to load a mule, retrieve a variable, and/or set a variable. Since the variables are stored on a character sheet, they persists between rolls, game sessions, or even campaigns.
A clever bit about this is that usually people use character attributes to store custom stats, but as Mule store the as Abilities, they can be more easily read, and can't de accidentally deleted by commands that updates character attributes.
- Muler (thread 2)(Forum)
Contents |
Syntax
Drop these syntax tokens into any API command to trigger the associated behavior. They will be filtered out (or replaced with the appropriate data) by the script.
{& mule ModTable} => loads the first ModTable mule it finds (from characters you control) {& mule TableMule.ModTable} => loads the ModTable mule from the TableMule character {& mule Cake Izzard.OrDeath} => loads the Cake mule (first found) as well as Izzard's OrDeath mule get.4 => if mules are loaded, attempts to retrieve the variable "4" get.ModTable.4 => gets the variable "4" from the ModTable mule (ModTable must be loaded) get.TableMule.ModTable.4 => same, but specifically from the TableMule character set.Izzard.Cake.Rush = We're all outta cake/set => sets the "Rush" variable in Izzard's Cake mule to "We're all outta cake" note the ending /set to close the variable's value
Example
!somescript --stuff|get.thestuff {& mule ModMule} --tacos !somescript --mod|get.initMod {& mule Viper.ModMule}
TokenMod + Muler
Sets the value of bar3 on the selected token to the value of the "Stunned"-variable, which is stored in an character ability named "ConditionTable", for a character named "Blue". To make this command work, Create character named Blue
, with and ability named ConditionTable
, and save it's content as Stunned=5
.
!token-mod {{!token-mod {{ --set bar3|get.Stunned {& mule Blue.ConditionTable} }}
Meta-Toolbox Examples
Examples using one or more Meta-Toolbox APIs
- Managing PathFinder Sizes with TokenMod and Metascripts (Muler + TokenMod, extra stuff w/ ZeroFrame, SelectManager, Fetch)
- Using TokenMod to update multiple token tooltips (TokenMod + SelectManager + Fetch + ZeroFrame)
- Macro to read current face of Rollable Token
- Repeating Sections & ChatSetAttr(Forum)
- First example: Plugger and SelectManager; Second example: Plugger, Muler, SelectManager, and ZeroFrame.
- Using MathOps standalone, more details(Forum)
- API Logic and Libinline(Forum)
- selectmanager example(Forum)
- ZeroFrame example with ColorEmote(Forum)
- Table example with Muler & ZeroFrame(Forum)
- Muler + more example(Forum)
- Dealer -- Is there a way to deal to a player, even if that player's token is not selected?(Forum) - Selectmanager example
- Audio Master API(Forum) - fixes with MathOps & Muler
- Fix "It's a Trap" with selectmanager(Forum)
- Search Attributes(Forum) - InsertArg example
- Is there an API that can roll saves for groups then apply a condition to the tokens that failed?(Forum) - selectmanager example
- TokenMod API - how to select token without clicking it(Forum) selectmanager fix TokenMod limitation
- default token size fix(Forum) Muler & Fetch examples
- Multi-step table resolution (Pacesetter system)(Forum) - Muler with ZeroFrame example
- Creating a HUD(Forum) - ZeroFrame, Fetch example working with TokenMod
- Retrieving next item in list(Forum) - Muler, ZeroFrame, and APILogic example
- Retrieving or assigning individual data to/from many tokens with deferred inline rolls(Forum) - examples of SelectManager's forselected handle using various metascripts with TokenMod