Seventh Sanctum: Seed Files

I’ve described Seventh Sanctum‘s configuration files and vocabulary files in the last couple days. Today I describe the third file type, seed files.

This is, I think, the most complex Seventh Sanctum file type to use. On closer examination, the syntax is not that complex, and there aren’t as many variations as I thought. I suspect it can be difficult to apply correctly to get the desired results.

I’m going to refer to the various symbols as ‘tables’. I am not wholly confident this is strictly correct, but it should do for now.

Static Tables

At its base, the engine has objects that act much like tables. Each object has a name and a set of elements to be chosen (i.e. much like rows). In actionanimaldat.txt, I see

SEED
  <TITLEA> <ANIMALA>
  <TITLEB> <ANIMALB>

TITLEA
  Action
  Adrenalin
  Aikido
  Ambush

ANIMALA
  Aardvark
  Albatross
  Alligator

The lines ‘SEED’, ‘TITLEA’, and ‘ANIMALA’ identify tables, and the indented lines are rows in the table. When resolved, a row is chosen from the table and output. If you want to weight a result, include the same text on multiple lines.

The strings in angle brackets, ‘<TITLEA>’, ‘<ANIMALA>’, etc. mark calls to those tables. When resolving the SEED symbol and the first row is chosen, the engine picks rows from TITLEA and ANIMALA.

Dynamic Tables

The static tables are straightforward. Here’s where things get funky: tables can be ‘built up’ of sets of rows determined at run time.

It looks like maschooldat.txt (martial arts school) has examples of how this is all done. I’ll abridge heavily to keep it manageable.

SEED
  The <ROUTEGETASSOCBACK> <*GETSCHOOL><GENSCHOOLTYPE. <SEEDKNOWNRANGE> <SEEDFOCUSES> <SEEDMOVES>
  The <*GETSCHOOL><GENSCHOOLTYPE of <ROUTEGETASSOCBACK. <SEEDKNOWNRANGE> <SEEDFOCUSES> <SEEDMOVES>

GETSCHOOL
  <*>
    GENSCHOOLTYPE,true
      Academy
    GENKNOWN,true
      <REFREPMEDWELL>
    GENSPREAD,true
      <REFSPREADLOCAL>
    GENSCHOOLFOCUS,false
      bureaucracy
      discipline
      decadance
      literacy
      scholarship
    GENSCHOOLSKILLS,false
      discipline
      language skills
      scholarship
      training well-rounded individuals

The first symbol, SEED, works much the same as in the first example. Where you see <*GETSCHOOL> is where things get different.

First, in ‘<*GETSCHOOL>’ the embedded asterisk (*) says ‘do not print any output from this call’. It resolves the symbol ‘GETSCHOOL’ without adding to the output.

The <*> found in the ‘rows’ of GETSCHOOL also means ‘do not output anything’. I have the sense it also serves as a marker that the children of this element are modifying tables. I see in other data files that ‘<*>’ is sometimes used as a ‘generate no output’ indicator. A table with three <*> rows and one with text will generate output only 25% of the time.

The row saying ‘GENSCHOOLTYPE,true’, says to replace (or create) a table called GENSCHOOLTYPE with the rows below it. The rows ‘GENKNOWN,true’ and ‘GENSPREAD,true’ do much the same thing. In the latter case, I think the row that reads ‘<REFSPREADLOCAL>’ is not resolved at this time. Instead, I think it creates a table of a single row that will resolve <REFSPREADLOCAL> when called.

The row saying ‘GENSCHOOLFOCUS,false’, on the other hand, does not replace an existing table. Instead, it adds its rows to that table. In this case I can imagine calls to several tables gradually building up the table known as GENSCHOOLFOCUS. ‘GENSCHOOLSKILLS,false’ is very similar.

Closing Comments

I did not examine all files of this type, but they look consistent in application. All but one has ‘SEED’ as its first table. I don’t know if this is required, or if it just convention and the engine uses the first table found.

Still, all in all I think I’ve got a handle on all the file types. I’ve created a script that will read vocabulary files and configuration files. I can use these to generate dictionary files my random string generator can use, though I think I’d need to kludge around the ‘multiple types’ vocabulary. I don’t have a way to deal with categories yet. ‘Sets’ or ‘lists’ were not in mind when I wrote this thing, nor checking for validity.

I can deal with the static tables, in fact my first try to parse seed files did so. The dynamic tables threw me for a loop, my engine isn’t prepared to deal with these. It would not be difficult to add a ‘table operator’ or the like that can do it. The harder part will be devising how to encode it.

Okay, all good. I believe I have a good enough understanding of Seventh Sanctum files, at least as far as parsing is concerned. I don’t yet have an engine that can use them. It looks like that’s my next step.

Almost next step. I’m certain that the first stage of building an engine will be to output ‘what is in this file’. Not just the static tables, but what tables are created dynamically, and what static tables get modified dynamically. If I’m editing generator files like this I definitely want a concordance of what exists and what is being called.

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