Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Community
General Tabletop Discussion
*TTRPGs General
Designing a Random Table Generator
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Janx" data-source="post: 5904627" data-attributes="member: 8835"><p>Let's start at this layer:</p><p></p><p>Let's assume there will be 2 kinds of markup, Lookups and Scripts.</p><p></p><p>Lookups are for Tables and Blocks. They are framed with square brackets and the unique name of the table or block is inside. For example:</p><p>this will lookup a dragon from a table [dragon].</p><p>Lookups are pretty much exactly what you intended.</p><p></p><p>At present, there are 2 kinds of Lookups:</p><p></p><p>Table</p><p>this does a die roll, looks up the result and returns the result. The result MAY have have markup to be processed for another LookUp or Script.</p><p></p><p></p><p>Block</p><p>Blocks are rich text formatted, multi-line blobs of content. They can contain markup, and be referenced by tables, etc. These let you define stat blocks, descriptive text, whatever is meaty.</p><p></p><p></p><p>Scripts need to be differentiated from Lookups so parsing is easier. Scripts are really for denoting dice rolls and logical/programming statements that clever users can make more powerful things happen. Scripts should use curly braces to define a script section. For example:</p><p>This will show the result of 1d6 = {1d6}.</p><p></p><p>Whenever the Parsing Engine is given content, it looks for {} or [] and replaces them in the original content with the correct content. If it sees [dragon] then it will find the Dragon table and replace that with the result.</p><p>The parsing engine applies the same process to every result it returns, so a table result may have markup to indicate further processing is to be done.</p><p></p><p>It is important that all Lookups be treated the same. The editor can easily manage handling renaming of a table because we can search all text in the system including lookup text for [oldname] and replace it with [newname]. </p><p></p><p>We can also look for infinite loops because when I am saving a table called "MyTable" I can find all other tables/blocks that mine uses and so on and see if [MyTable] occurs or not.</p><p></p><p>Hopefully this writeup saves, and will be useful to you.</p></blockquote><p></p>
[QUOTE="Janx, post: 5904627, member: 8835"] Let's start at this layer: Let's assume there will be 2 kinds of markup, Lookups and Scripts. Lookups are for Tables and Blocks. They are framed with square brackets and the unique name of the table or block is inside. For example: this will lookup a dragon from a table [dragon]. Lookups are pretty much exactly what you intended. At present, there are 2 kinds of Lookups: Table this does a die roll, looks up the result and returns the result. The result MAY have have markup to be processed for another LookUp or Script. Block Blocks are rich text formatted, multi-line blobs of content. They can contain markup, and be referenced by tables, etc. These let you define stat blocks, descriptive text, whatever is meaty. Scripts need to be differentiated from Lookups so parsing is easier. Scripts are really for denoting dice rolls and logical/programming statements that clever users can make more powerful things happen. Scripts should use curly braces to define a script section. For example: This will show the result of 1d6 = {1d6}. Whenever the Parsing Engine is given content, it looks for {} or [] and replaces them in the original content with the correct content. If it sees [dragon] then it will find the Dragon table and replace that with the result. The parsing engine applies the same process to every result it returns, so a table result may have markup to indicate further processing is to be done. It is important that all Lookups be treated the same. The editor can easily manage handling renaming of a table because we can search all text in the system including lookup text for [oldname] and replace it with [newname]. We can also look for infinite loops because when I am saving a table called "MyTable" I can find all other tables/blocks that mine uses and so on and see if [MyTable] occurs or not. Hopefully this writeup saves, and will be useful to you. [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*TTRPGs General
Designing a Random Table Generator
Top