table: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 47: | Line 47: | ||
[[Tables]], [[tableImage|tableImage()]] | [[Tables]], [[tableImage|tableImage()]] | ||
There is a tool available to import tables from excel. You can find more about this | There is a tool available to import tables from excel. You can find more about this [http://forums.rptools.net/viewtopic.php?f=3&t=11568#p124557 here] | ||
}} | }} | ||
[[Category:Table Function]] | [[Category:Table Function]] |
Revision as of 14:04, 12 October 2012
table() Function
• Introduced in version 1.3b39
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
table(name)
table(name, row)
tbl(name)
tbl(name, row)
Parameters
name
- A string containing the name of the table.row
- The row of the table that should be returned.
Examples
Example 1: Display a random value from table
"tbl1"
using default roll:
[r: table("tbl1")]
Example 2: Display the first value from table "tbl1"
:
[r: table("tbl1", 1)]
Example 3: Display one of the first four values from "tbl1"
, chosen randomly:
[r: table("tbl1", "1d4")]
Example 4: Display a table row that corresponds to a token property's value (the value must be numeric):
[r: table("tbl1", Intelligence)]
[r: table("tbl1", getProperty("PCLevel"))]
See Also
Tables, tableImage()
There is a tool available to import tables from excel. You can find more about this here