Weird question maybe… I’d like to “chain” two generators together in sequence, via a button that passes a bunch of variables from the first one to the second one. Is this doable?
You can import the other gen into the main gen.
True. But both are pretty big, so I’d like to break it into steps.
Maybe explain the process that you want to achieve and have some test generators? It should simply be something like:
// gen-1 genTwo = {import:gen-2} output [genTwo(something)] // gen-2 genThree = {import:gen-3} $output(input) => genThree(input) // gen-3 $output(input) => // process code hereOkay the process I am trying to achieve:
- generator 1 generates a random Planet and displays a printout plus an image, followed by a few buttons/links allowing you to drill down, choosing the next generator you want: “EXAMINE LIFEFORM” or “EXAMINE GEOLOGY” or “EXAMINE FLORA” etc.
- so generator 2 is a big printout of content (plus image) as well, but it is based on stuff we got from generator 1. That’s why I want to pass some of the content output by generator 1 (gravity, atmosphere, etc) as input to generator 2. Variables from the primary generator will affect the secondary generators (e.g.: if the planet’s atmosphere is methane, then the random lifeform must breathe methane).
You can do something like this on the second generator:
importInputs gravity = default atmosphere = default output [lifeform] // output of the second generator lifeform lifeformOne ^[importInputs.gravity == "something"] lifeformTwo ^[importInputs.atmosphere == "methane"]Then on the first generator:
genTwo = {import:gen-2} generateGenTwo [genTwo.importInputs.gravity = selectedGravity, genTwo.importInputs.atomsphere = selectedAtmosphere, ''] [genTwo.output]This way, you set the variables of the second generator from the first generator, so that the lists used have the correct odds used.
Here are also some references from previous threads:
So Awesome! Thank you! I figured there had to be a way!



