Homebrew: Table

From 5etools Community Wiki
Jump to: navigation, search


Building a table

An Example

The _Meta is normally included in a full JSON, for this example it has been removed. See the link for how to develop the _meta.

"table": [
			"name": "Example Table",
			"source": "A_Unique_Name",
			"caption": "Optional Caption",
			"intro": [
				"Optional intro entry."
			"outro": [
				"Optional outro entry."
			"footnotes": [
				"** Optional footer entries"
			"colLabels": [
				"Col 1",
				"Column the Second",
				"Third Column"
			"colStyles": [
				"col-4-6 text-right ",
				"col-2-6 text-center"
			"rows": [
					"This is a table row",
					"The number of entries should match the number of columns, naturally.",
					"Otherwise, the table will not render properly."
					"As with any other entry, tags such as {@bold bold text} work.",
					"{@spell Eldritch Blast|Links work as well}",
					"Nested entries (generally) work, too.",
						"type": "list",
						"items": [
							"For example, here's a list.",
							"Although why you would put a list in a table is beyond me."
					"But hey, you do you."
					"type": "row",
					"style": "row-indent-first",
					"row": [
						"Rows may also be defined",
						"As objects with additional properties, such as indentation.",
Learn More
In the example; The "sources" is defined.

Field List (Table)

The following is the list of fields that can be included in the object array, "sources". All fields are enclosed by quotation marks (").

Key Data Type Description Required
name String The name of the table. True
source String The JSON identifier, as seen in Homebrew: Meta. True
caption String Simmilar to the name field, appears above the table. False
intro String Text that precedes the table. False
outro String Text that succeeds the table. False
footnotes Array of entries This text is rendered right after the table, before the outro. False
colLabels Array of strings Title of each column False
rowLabels Array of strings Currently unused False
colStyles Array of strings Stylistic appearance of each column, both size and alignment. False
rowStyles Array of strings Stylistic appearance of each row, both size and alignment. False
rows Array of arrays of strings Where most of the data will be. Each row is an array, and each cell in that row is a string. True
style String Defines the style of the object it's in? Ask Giddy. False

πŸ—„οΈ Reference Files:
[Requirements Specs (Schemata) ]
[[ |🧾 Blank Template]]
|πŸ“– Sample JSON
Functional Example]
Repository of Other Examples

Reference Tag: (how to link to entries within the strings)
"{@action <table_name> | <json_source> | <optional_text_information>}":
{@table } assumed DMG as a json_source by default

 "Has a dusty {@table Adventuring Gear|phb} on the table"
 {@table 25 gp Art Objects}

Homebrew Support

Known Issues
Looks like its perfect... (Did we miss anything?)

Nothing's here (Do you have any suggestions?)
Best Practices
Quick Tip: You can use sites such as extracttable to quicken the process of converting tables from images and PDFs.

Related Features

Did that answer your question(s)?

If not please check the under Support; Troubleshooting or the Known Issues page for further guidance, or go to the Discord community and leave a comment in the issues channel.

If you enjoy the project, please follow this link to see how you can contribute and help make it even better.