RPTools

From MapToolDoc

table

Contents

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

  1. table(name)
  1. table(name, row)
  1. tbl(name)
  1. 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:

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

Example 2: Display the first value from table "tbl1":

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

Example 3: Display one of the first four values from "tbl1", chosen randomly:

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

Example 4: Display a table row that corresponds to a token property's value (the value must be numeric):

  1. [r: table("tbl1", Intelligence)]
  2. [r: table("tbl1", getProperty("PCLevel"))]

See Also

Tables, tableImage()