Register

Roll Table Importer

An Add-on Module for Foundry Virtual Tabletop

Author: David Hudson Project Source Foundry Versions 12 to 13 (Verified 13) Last Updated 3 months ago

Roll Table Importer

GitHub all releases Latest Version Foundry Version License

WARNING - Roll Table Compatibility

Features and Notes

The Roll Table Importer module can create Foundry VTT roll tables from various kinds of text files.

Usage

Screenshot

  1. Click Import Tables button in the Rollable Tables tab in the sidebar.
  2. Enter text of roll table via clipboard or choose a file using the file-picker
    1. Copy text you are trying to import and paste into the clipboard text area
    2. Or use file icon to choose a file.
  3. Click Okay
  4. Roll table will appear in the Rollable Tables tab.

Roll Table Formats

Tables can be imported from a text, JSON, or CSV file. Each method is documented below.

Text File

A .txt file can be used to create a roll table. The filename will be used as the table name. The importer will just treat each new line as an item in the table.

The Roll Table Importer tool comes with a text box where you can copy/paste tables. The first line will be used as the table name. The description field must be the next line and be marked with ### at the beginning of the line. Newlines must be marked with \n as shown in the examples.

Die-type (such as d6 or d100) and ranges can be specified. If the ranges are not stated, the importer will determine the table ranges based on the number of items in the table.

The Behind the Tables subreddit is a good source for random tables in plain-text format.

A simple single table can be created - Example from a file. The filename will be the name of the table.

goods.txt:

Backpacks or sacks
Baskets
Bricks
Books
Cloth
Rope

Die Type, Table Name, Description and Ranges can also be added.

d100 This place is...
### Type of Location \n Has the location fallen into disrepair?
1-10 A stronghold.
11-20 A temple.
21-35 A tomb.
36-40 A prison.
41-55 A mine.
55-70 A lair.
71-75 A palace.
76-80 A storage vault.
81-90 A sewer.
91-100 A maze.

Multiple tables can be part of a collection and will be placed in a folder. Put the name of the folder separately on the first line.

Random Dungeons

d12 The place is currently occupied by...
### Location is filled with enemies \n Roll multiple times on this table
A dangerous outlaw.
An elemental lord.
A vampire.
A lich.
A demon.
A devil.
An orc warlord.
A hobgoblin commander.
An aberrant presence.
A witch.
A giant.
A dragon.

d12 This place was built by...
An ancient dwarvish clan.
An ancient elf prince.
A powerful wizard.
A dark sorceress.
A foreign empire.
An ambitious queen of old.
Prosperous merchants.
A powerful noble family.
Religious zealots.
An ancient race of giants.
A tyrannical king of old.
No one; it's a natural cave.

d100 This place is located...
1-8 Beneath a cold mountain.
9-16 Beneath a fiery mountain.
17-24 Near a well-traveled mountain pass.
25-32 Deep within a forest.
33-40 Deep within a desert.
41-48 Beside the sea.
49-56 On an island.
57-64 Beneath a bustling city.
65-72 Beneath the ruin of an ancient city.
73-80 Beneath a well-known castle or monastery.
81-88 Beneath a the ruin of an old castle or monastery.
89-94 Beneath a body of water.
95-100 In a place reachable only by magic.

JSON

For JSON, both files and pasted text can be used by the importer.

The Foundry VTT Tables Repository is a good source for random tables in JSON format.

A structure similar to Foundry's interface for tables is valid.

{
  "name": "Goods",
  "formula": "1d12",
  "description": "List of equipment \n Non-magical",
  "results": [
    { "range": [1, 4], "text": "Backpacks or sacks" },
    { "range": [5, 6], "text": "Baskets" },
    { "range": [7, 8], "text": "Bricks" },
    { "range": [9, 10], "text": "Books" },
    { "range": [11, 11], "text": "Cloth" },
    { "range": [12, 12], "text": "Rope" }
  ]
}

Or a simpler structure can be passed and the formula and ranges will be automatically calculated and evenly distributed.

{
  "name": "Goods",
  "description": "List of equipment \n Non-magical",
  "results": [ "Backpacks or sacks", "Baskets", "Bricks", "Books", "Cloth", "Rope" ]
}

CSV

Text in CSV format can be used for a roll table. The pipe (|) symbol is used as the delimiter since commas are common in tables. For a .csv file, the file name will be used for the table name. If the csv text was pasted into the dialog, the table will named "CSV Imported Table". The CSV text cannot contain the table name nor description fields.

goods.csv

01-04|Backpacks or sacks
05-06|Baskets
07-08|Bricks
09-10|Books
11|Cloth
12|Rope

Support

For questions, feature requests or bug reports, please open an issue.

Pull requests are welcome. Please include a reason for the request or create an issue before starting one.

Contact

Credits

Module by David Hudson and licensed for use under the MIT license.

This project is based on foundryvtt-importer by Ethan J Wright.

FoundryVTT Modules and Other Resources

Please check out my other modules and resources for Ironsworn, Ironsworn: Starforged and other systems.

FoundryVTT Modules

Itch.io Resources

Categories

Available Versions

  1. Version 1.0.1

    3 months ago
    Foundry Version 12 - 13 (Verified 13) Manifest URL Read Notes
  2. Version 1.0.0

    3 months, 1 week ago
    Foundry Version 12 - 12 (Verified 12) Manifest URL Read Notes