Random Table Roller: Seventh Sanctum Features

In a recent post I documented my random table roller, prompted by my exploration of Seventh Sanctum files. As part of that exploration, I found several features I’d never considered. While I did not think of those features myself, I’m not above stealing interesting ideas.

Masking Entries

Seventh Sanctum vocabulary files are functionally merged when loaded, giving two tables. (I’m leaving out the categories for now.)

  • Organization, which has the templates used to create the output string.
  • Vocabulary, which has the word list to choose from.

Superficially, at least. The format makes heavy use of bitmasks to simulate multiple tables within this.

mushroom,6

This matches types 4 (6 & 4 == 4) and 2 (6 & 2 == 2).

There’s probably an easy way to do this. Change entry weight from purely numeric, to optionally numeric:mask. I’d probably take steps to allow mask to be hexadecimal, makes my life easier. All masks default to (unsigned) -1 (i.e. 0xffff or 0xffffffff, depending on bit width) if not specified. That is, if you make an unqualified call to the table, all entries qualify. Any entry without a mask qualifies for any call to the table.

#0001 prefix
#0002 suffix

&EpithetTerm
|1:0001 Avenging
|1:0002 Vengeance
|1:0003 Gold

&Epithet
|1 &EpithetTerm{:0001} Angel
|1 Angel of &EpithetTerm{:0002}

This can give ‘Avenging Angel’ or ‘Gold Angel’, or ‘Angel of Vengeance’ or ‘Angel of Gold’.

I don’t know how often I’d actually use this, unless I’m using Seventh Sanctum files. On the other hand, why not include it?

Dynamic Tables

Modifying random tables during resolution is a somewhat scary idea… but also, an intriguing one. I can easily see myself using it for Divine Trappings. For any particular table, grab the generic version and append all the domain-specific additions. Nice.

I don’t expect to use a syntax like Seventh Sanctum’s, though. That seems much heavier than I want to try to implement.

Instead, I think I’ll go with a set of functions that can manipulate tables.

  • @reset{tableName} resets the named table to its original (loaded) state.
  • @append{targetTable}{sourceTable} appends all entries of sourceTable to targetTable.
  • @replace{targetTable}{sourceTable} replaces all entries of targetTable with sourceTable.
  • @resetDictionary{} resets all tables in the dictionary to their original state.

I’m not sure what to do with LowEntry and HighEntry of each table, though.

The simplest implementation is probably

  • Load all tables into an ‘internal’ dictionary.
  • Clone each table into a ‘public’ dictionary that actually gets used.
  • Operations call the public dictionary, invoking or manipulating the tables as needed.

I can instead load into just the public dictionary and back up the original when it gets manipulated. That means keeping track of more state and asking more questions at runtime. I think it’ll be easier to always have the original as backup. If that feature never gets used, that’s fine.

Internal Tables

This may be inspired by the configuration files.

My random dictionaries often have tables that are used only internally, not called directly. Dynamic tables suggest many tables can exist only to be appended to other tables. In other places I can have subtables. For instance, the Armor table from Divine Trappings: Object Tables for Making Artifacts is five tables in my dictionary.

d4ArmorRollOptions
1Helmetd121..4: helmet, 5: basinet, 6: burgonet, 7: casque, 8..10: helm, 11:morion, 12: sallet
2Pieced81: bracers, 2: breastplate, 3: cuirass, 4: gauntlet, 5: gauntlet, 6: gorget, 7: pauldron, 8: vambrace
3Shieldd101..5: shield, 6: aegis, 7: buckle, 8: bulwark, 9: guard, 10: rampart
4Suitd31: mail, 2: plate, 3: brigandine

I can imagine a mode for the random table roller that prints usage information for the dictionary:

  • Default table name (what gets called if nothing is specified).
  • Published table names (the entry points but ignoring subtables and utility tables).
    • New feature? first comment line inside a table is used as a description of the table?

What if I amend the declaration syntax? '&&' indicates this table is not publicized. It can still be called like any other table, but is not included in the usage summary.

I think I like this idea.

Closing Comments

I’m not above stealing good ideas. Even ideas I find only interesting will get some side-eye while I think about it.

These look easy to implement, so let’s do that.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top