Random Tables
v0.2.1random-tables — Pipeworx original composable random tables for tabletop and narrative play…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
roll_table
Pipeworx original random tables: roll one or more entries from a built-in table — encounters_fantasy, encounters_scifi, encounters_modern, loot, weather, complication, npc_personality, npc_secret, npc_occupation, plot_hook, tavern, rumour, settlement_quirk, npc_full. Entries may contain {{table:<id>}} references to OTHER built-in tables, resolved recursively (up to 6 levels deep) — the response gives both the raw entry text and the fully resolved text. Optional seed makes the roll reproducible (same seed + arguments = same result; the seed used is always returned). Optional session_id draw…
| Parameter | Type | Description |
|---|---|---|
table * | string | Built-in table id, e.g. "loot", "npc_full", "encounters_fantasy". Call list_random_tables to see every id. |
count | number | How many entries to roll, 1-20 (default 1). |
seed | string | Optional seed for a reproducible roll. Omit for fresh randomness; the seed actually used is always returned. |
session_id | string | Optional. Omit for an ordinary independent weighted roll. Pass a session_id (your own first time, or one returned by a previous call) to draw without replacement across calls — hosted only. |
roll_custom_table
Pipeworx original random tables: roll one or more entries from a table YOU supply — bring your own weighted list of { text, weight? } and get back a reproducible weighted draw. Entries may contain {{table:<id>}} references to Pipeworx's BUILT-IN random tables (e.g. "{{table:npc_personality}}"), resolved recursively (up to 6 levels deep). Optional seed makes the roll reproducible; the seed used is always returned. No session support for custom tables — use roll_table for session-tracked built-in tables.
| Parameter | Type | Description |
|---|---|---|
entries * | array | Your table: a non-empty array of { text: string, weight?: number > 0 (default 1) }. Up to 500 entries. |
count | number | How many entries to roll, 1-20 (default 1). |
seed | string | Optional seed for a reproducible roll. Omit for fresh randomness; the seed actually used is always returned. |
list_random_tables
Pipeworx original random tables: list every built-in table id, title, genre and entry count, optionally filtered to one genre ("fantasy", "scifi" or "modern"). Genre-agnostic tables (loot, weather, npc_*, complication, plot_hook, rumour, settlement_quirk, npc_full) are included under every genre filter, since they apply regardless of setting.
| Parameter | Type | Description |
|---|---|---|
genre | string | Optional genre filter. Omit to list every table. |
get_random_table
Pipeworx original random tables: fetch one built-in table in full — its title, genre, description, and every raw entry (text + weight) — without rolling. Entry text may contain unresolved {{table:<id>}} references; roll_table resolves those at roll time.
| Parameter | Type | Description |
|---|---|---|
table * | string | Built-in table id, e.g. "loot", "npc_full", "encounters_fantasy". Call list_random_tables to see every id. |