• 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.

Generator feature request: global variable introduction

ELF

Generator Sage
Wizard of Story
Wizard of Combat
For me the biggest cause of showstopper issues is how introduction of global variables in handled. As expected, global variables need to be introduced in a generator that uses them:

Code:
globals:
  species: ''
  culture: ''
  civilization: ''

But if that generator calls another generator that utilizes the same global variable, the introduction of that global also resets its value, typically to null ('').

This would not be an issue if there was a single master generator that was always called for everything, but since the generators cover so many topics (and allow only 1 parameter to be passed), this is not a viable approach. The typical use case is that there are numerous generators (like NPC, name, appearance, occupation, clothing, equipment, etc) each of which can be useful individually, but can also call each other to supply additional detail.

I think the simplest solution would be if the globals block in a called generator would be processed only for those globals that have not already been defined. Would this be a workable approach?
 

JohnnFour

Game Master
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Demonplague Author
Borderland Explorer
That makes sense.

If we don't have a backlog item for this in Jira, could you add one?

We're holding off on generators development until we've got Campaigning and Apps projects complete.
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
I have logged this as CL-1373.

Please note that this is a showstopper for complex projects where generators pass variables to each other.
 

JochenL

CL Byte Sprite
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Borderland Explorer
Did the latest update to globals in generators fix this issue?
 
Top