• Hello game master! Welcome to our growing community. Please take a moment to Register (top right button, see how: Slides).

    If you use Campaign Logger, you can use the same login details - we've linked the app to this forum for secure and easy single sign-on for you.

    And please drop by the Introductions thread and say hi.

Hierarchy of generators

Hannu

Mythras Guru
Gold WoA
Wizard of Story
Wizard of Combat
How would one go about doing something like following.

You have town event generator.

You would like to generalise that for multiple towns but for each their own subtables.

For example

In generic town event generator
- common stuff
- localCharacterListKindX
-- randomMerchantX1
-- randomMerchantX2
- localCharacterListKindY
-- randomMerchantY1
-- randomMerchantY2
- localCharacterListKindZ
-- randomMerchantZ1
-- randomMerchantZ2

Town A
-localCharacterListKindX-A
- "Mikko Joosepinpoika, Ainutkertainen tyrkyttaja"
- "Joosua Aataminpoika, lestinheittäjä

-localCharacterListKindY-A
- Jakob Svensson, kyttä
- Jesper Adamsson, rosvo

for localCharacterListKindZ
uses one from generic

Town B
-localCharacterListKindX-B
- "Lena Schawabsson, shopkeeper"
- "Adam Schmidt, pushy salesguy"

-localCharacterListKindY-B
"Christina The actor"
but for the rest uses the list from generic

for localCharacterListKindZ
uses the list from generic
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
I am planning to do something like this with different 'sets' for various cultures, milieus, species, etc.

The idea is to use a generic generator that selects a global variable that is then used as a part of a generator name to call. You can see a rough test draft for this method here:
https://github.com/open-campaign-logger/generator-library/blob/evesala/json/Dungeon_map.json
(That is just a simple proof of concept.)

In this example, a set matching different environments is first randomized (it would be oh so cool to be able to do this interactively):
Code:
{
      "name": "set",
      "explanation": "List of supported set tables.",
      "entries": [
        "set-castle",
        "set-dungeon",
        "set-city",
        "set-forest"
      ]
    },

This may not be optimal, but for clarity I'm then separately setting the generator call based on the previously randomized set value. The #location string is added to the generator name to call that subtable from the randomized set generator. The selected set and location values are then exported as global variables.

Code:
    {
      "name": "randomset",
      "explanation": "Randomize the room.",
      "entries": [
        {
          "v": "",
          "export": {
            "set": "{set}",
            "location": "{set}#location"
          }
        }
      ]
    },

Then a generator matching the location global variable is called:
Code:
   {
      "name": "randomroom",
      "explanation": "Randomize the room.",
      "entries": [
        {
          "v": "",
          "export": {
            "room": "{lib:{global:location}}"
          }
        }
      ]
    },

Let's say the randomized set is castle. The set-castle generator has a location subtable that calls other tables in that set:
Code:
    {
      "name": "location",
      "explanation": "Locations matching the set.",
      "entries": [
        "{wall}",
        "{storage}",
        "{servant}",
        "{chapel}",
        "{hall}",
        "{private}"
      ]
    },

These tables contain details specific to the set, for example:
Code:
    {
      "name": "wall",
      "explanation": "Locations around the outer wall.",
      "entries": [
        "gatehouse",
        "guardroom",
        "barracks",
        "casemate (vaulted chamber under the ramparts)",
        "place of arms (covered area for assembling troops)",
        "dovecote (pigeon housing)",
        "stables"
      ]
    },

So this way the generator has a generic framework that can be used for producing values from other sets of data, each specific to one type of environment.

Currently the downside is that the available sets must be hardcoded in the main generator. It would be cool if it was possible to use wildcards in the set names, for example like this: set-fantasy-wilderness-temperate-*.
 
Top