Macros:Roll:types: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==[]/{} Roll Types and Options== Text that you type into MapTool or execute from a macro button is scanned for [ ] and { } blocks. The text within these blocks is evaluated and the out...)
 
No edit summary
Line 2: Line 2:
Text that you type into MapTool or execute from a [[macro button]] is scanned for [ ] and { } blocks. The text within these blocks is evaluated and the output from this evaluation is placed into the string in its place.
Text that you type into MapTool or execute from a [[macro button]] is scanned for [ ] and { } blocks. The text within these blocks is evaluated and the output from this evaluation is placed into the string in its place.


==={ } Rolls===
When the text is contained within { } then the the text is evaluated and the output copied in its place without any special formatting.
When the text is contained within { } then the the text is evaluated and the output copied in its place without any special formatting.
For example {2 + 2} produces
For example {2 + 2} produces
[[Image:Brace2Plus2.png‎]]
[[Image:Brace2Plus2.png‎]]


===[ ] Rolls===
Text that is within [ ] is evaluated, the output from [ ] is inserted with a tool tip that displays the details of the evaluation -- the tool tip can be displayed by leaving the mouse pointer over the result. For example [2 + 2] produces
Text that is within [ ] is evaluated, the output from [ ] is inserted with a tool tip that displays the details of the evaluation -- the tool tip can be displayed by leaving the mouse pointer over the result. For example [2 + 2] produces


Line 12: Line 14:
There are also several options that can be used within [ ] to change the formatting. Options are specified after the [ and the option string is terminated with a ':'. If you have more than one option then need to separate them with a ',' eg [opt1, opt2: ...], if there are any arguments for an option they are enclosed within (). All options are case insensitive, so [opt: ...] is the same [OPT: ...].
There are also several options that can be used within [ ] to change the formatting. Options are specified after the [ and the option string is terminated with a ':'. If you have more than one option then need to separate them with a ',' eg [opt1, opt2: ...], if there are any arguments for an option they are enclosed within (). All options are case insensitive, so [opt: ...] is the same [OPT: ...].


===[ ] Output Formatting Options===
===[ ] Hidden Rolls===
====Hidden====
'''[h: ]''', '''[hide: ]''', '''[hidden: ]''' evaluates the text after the ':' but completely discards the output. This is useful for setting variables or other similar tasks where you want change something but not display any output. [h: 2 + 2] would display.
'''[h: ]''', '''[hide: ]''', '''[hidden: ]''' evaluates the text after the ':' but completely discards the output. This is useful for setting variables or other similar tasks where you want change something but not display any output. [h: 2 + 2] would display.


Line 19: Line 20:




====Expanded====
===[ ] Expanded Rolls===
'''[e: ]''', '''[expanded: ]''' evaluates the text after the ':' and displays the detailed output of the evaluation. [e: 2 + 2 ] would display.
'''[e: ]''', '''[expanded: ]''' evaluates the text after the ':' and displays the detailed output of the evaluation. [e: 2 + 2 ] would display.


Line 26: Line 27:




====Result====
===[ ] Result Rolls===
'''[r: ]''', '''[result: ]''' evaluates the text after the ':' and displays the plain output without any formatting or tool tips, the result is the same as using { }. [r: 2 + 2] would display.
'''[r: ]''', '''[result: ]''' evaluates the text after the ':' and displays the plain output without any formatting or tool tips, the result is the same as using { }. [r: 2 + 2] would display.


Line 32: Line 33:




====Unformatted====
===[ ] Unformatted Rolls===
'''[u: ]''', '''[unformatted: ]''' evaluates the text after the ':' and displays the detailed output without coloring or tool tips. [u: 2 + 2 ] would display.
'''[u: ]''', '''[unformatted: ]''' evaluates the text after the ':' and displays the detailed output without coloring or tool tips. [u: 2 + 2 ] would display.


Line 38: Line 39:




====Tool Tips====
===[ ] Tool Tip Rolls===
'''[t: ]''', '''[tooltip: ]''' evaluates the text after the ':' and displays the result with a tool tip that displays the details of the evaluation -- the tool tip can be displayed by leaving the mouse pointer over the result. For example [t: 2 + 2] produces.
'''[t: ]''', '''[tooltip: ]''' evaluates the text after the ':' and displays the result with a tool tip that displays the details of the evaluation -- the tool tip can be displayed by leaving the mouse pointer over the result. For example [t: 2 + 2] produces.



Revision as of 20:26, 16 December 2008

[]/{} Roll Types and Options

Text that you type into MapTool or execute from a macro button is scanned for [ ] and { } blocks. The text within these blocks is evaluated and the output from this evaluation is placed into the string in its place.

{ } Rolls

When the text is contained within { } then the the text is evaluated and the output copied in its place without any special formatting. For example {2 + 2} produces

[ ] Rolls

Text that is within [ ] is evaluated, the output from [ ] is inserted with a tool tip that displays the details of the evaluation -- the tool tip can be displayed by leaving the mouse pointer over the result. For example [2 + 2] produces

There are also several options that can be used within [ ] to change the formatting. Options are specified after the [ and the option string is terminated with a ':'. If you have more than one option then need to separate them with a ',' eg [opt1, opt2: ...], if there are any arguments for an option they are enclosed within (). All options are case insensitive, so [opt: ...] is the same [OPT: ...].

[ ] Hidden Rolls

[h: ], [hide: ], [hidden: ] evaluates the text after the ':' but completely discards the output. This is useful for setting variables or other similar tasks where you want change something but not display any output. [h: 2 + 2] would display.


[ ] Expanded Rolls

[e: ], [expanded: ] evaluates the text after the ':' and displays the detailed output of the evaluation. [e: 2 + 2 ] would display.



[ ] Result Rolls

[r: ], [result: ] evaluates the text after the ':' and displays the plain output without any formatting or tool tips, the result is the same as using { }. [r: 2 + 2] would display.


[ ] Unformatted Rolls

[u: ], [unformatted: ] evaluates the text after the ':' and displays the detailed output without coloring or tool tips. [u: 2 + 2 ] would display.


[ ] Tool Tip Rolls

[t: ], [tooltip: ] evaluates the text after the ':' and displays the result with a tool tip that displays the details of the evaluation -- the tool tip can be displayed by leaving the mouse pointer over the result. For example [t: 2 + 2] produces.

You can also specify an argument for the tooltip option. If you specify an argument then this argument is evaluated and displayed, the text after the ':' is evaluated and used as the tool tip. [t:("four"): 2 + 2] produces.