setTableRoll: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{MacroFunction |name=setTableRoll |version=1.4.0.1 |description= Sets the roll expression for the specified table. May only be used by GM or a trusted macro. |usage= <source...") |
No edit summary |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
|name=setTableRoll | |name=setTableRoll | ||
|version=1.4.0.1 | |version=1.4.0.1 | ||
|trusted=true | |||
|description= | |description= | ||
Sets the roll expression for the specified table | Sets the roll expression for the specified table. | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getTableRoll(tableName, roll) | getTableRoll(tableName, roll) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|tableName|A string containing the name of the Table.}} | {{param|tableName|A string containing the name of the Table.}} | ||
{{param|roll|A string containing the new roll expression. If the value is "" the roll will be set to a default expression that should cover all table entries.}} | {{param|roll|A string containing the new roll expression. If the value is "" the roll will be set to a default expression that should cover all table entries.}} | ||
|examples= | |examples= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r:setTableRoll("test","")] | [r:setTableRoll("test","")] | ||
[r:setTableRoll("test","1d6+1")] | [r:setTableRoll("test","1d6+1")] | ||
</ | </syntaxhighlight> | ||
|also= | |also= | ||
{{func|getTableRoll}} | |||
}} | }} | ||
[[Category:Table Function]] | [[Category:Table Function]] |
Latest revision as of 23:59, 14 March 2023
setTableRoll() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.4.0.1
Sets the roll expression for the specified table.
Usage
getTableRoll(tableName, roll)
Parameters
tableName
- A string containing the name of the Table.roll
- A string containing the new roll expression. If the value is "" the roll will be set to a default expression that should cover all table entries.
Examples
[r:setTableRoll("test","")]
[r:setTableRoll("test","1d6+1")]