Generator feature request: global variable introduction

ELF

Generator Sage
Staff member
CL Add-on Dev
Beta-Tester
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
CL Add-on Dev
Demonplague Author
Wizard of Adventure
Beta-Tester
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
Staff member
CL Add-on Dev
Beta-Tester
I have logged this as CL-1373.

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