Welcome to the web repo for Random Tables

Below is a list of all available utility & full tables, and the generator

Contents

Logic

Link below is for the javascript logic for generating random tables

javascript logic/logic.js

Logic has 5 functions is exposes under window.document.RandomTables

window.document.RandomTables.buildIndex(arrayTables, onComplete, onError, asyncFunction) Which takes 4 argument: Any array of table collections, a function trigger on Completion of the the index being built, a function that triggers if building the index errors, and an advanced use case function for getting the Table's data asynchronously and on demand

window.document.RandomTables.appendIndex(table, onComplete, onError) it takes a single table and adds it to the index, it can also take an onComplete & an onError function

window.document.RandomTables.getCall("Collection/subTable/table") the getCall function takes just one argument, a 'callString' which looks though the built Index and returns a random table value, for 'Utility' tables it returns a single string, and 'full' tables return an array, these are lower on this page

window.document.RandomTables.getFromURLArray(URLArray, onComplete, onError) this function allows you to build a random table index using URL's as listed below, see the web-example to see it in use

window.document.RandomTables.inspectIndex() This function returns the built index, it's useful for testing if you've built your index correctly.

Full Tables

Below are full tables which return an Array of descriptive values. Click '+ tables' button to see the tables available, hovering over a table shows you the 'callString' you can use to generate a result

Fantasy NPCshttps://random-tables.netlify.app/npc-fantasy.json
Factionshttps://random-tables.netlify.app/factions.json
Biomeshttps://random-tables.netlify.app/biomes.json

Utility Tables

utility values return a single string and are intended to be used as a sub-library for full tables. Click '+ tables' button to see the tables available, hovering over a table shows you the 'callString' you can use to generate a result

Utility Fantasy Nameshttps://random-tables.netlify.app/utility-names-fantasy.json
Naturehttps://random-tables.netlify.app/utility-nature.json
Utility NPChttps://random-tables.netlify.app/utility-npc.json
Utility NPC Fantasyhttps://random-tables.netlify.app/utility-npc-fantasy.json
Senseshttps://random-tables.netlify.app/utility-senses.json
Utility Factionshttps://random-tables.netlify.app/utility-factions.json
Utility Nameshttps://random-tables.netlify.app/utility-names.json
Utility Names Historichttps://random-tables.netlify.app/utility-names-historic.json

Quickstart Guide

For an example see random-tables-web-example, inspect the html which includes comments.

Alternatively if you know a bit about javascript development you can vist the npm example repo npm-example