table: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function table== Gets the text value from the specified Table. If the row is not specified then the default Macros:roll for the Table is used. The row can be either a const...)
 
No edit summary
Line 2: Line 2:


Gets the text value from the specified [[Table]]. If the row is not specified then the default [[Macros:roll|roll]] for the [[Table]] is used. The row can be either a constant or a [[Macros:roll|roll]].
Gets the text value from the specified [[Table]]. If the row is not specified then the default [[Macros:roll|roll]] for the [[Table]] is used. The row can be either a constant or a [[Macros:roll|roll]].
===Usage===
<source lang="mtmacro" line>
    [h: table(tableName)]
    [h: table(tableName, row)]
</source>
   
   
===Usage===
===Examples===
Display a random value from table "tbl1" using default roll. >
Display a random value from table "tbl1" using default roll. >
<source lang="mtmacro" line>
<source lang="mtmacro" line>

Revision as of 10:48, 14 December 2008

Function table

Gets the text value from the specified Table. If the row is not specified then the default roll for the Table is used. The row can be either a constant or a roll.

Usage

    [h: table(tableName)]
    [h: table(tableName, row)]

Examples

Display a random value from table "tbl1" using default roll. >

    [r: table("tbl1")]

Display the first value from table "tbl1".

    [r: table("tbl1", 1)]

Display one of the first 4 values from "tbl1" chosen randomly.

    [r: table("tbl1", "1d4")]