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?

      • VioneT@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        2
        ·
        9 months ago

        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 here
        
        • CalibanStorm@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          9 months ago

          Okay the process I am trying to achieve:

          1. 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.
          2. 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).