Help with Randomizing Multiple Routines (with Language Conditions)

Hi everyone,

I’m building an experiment in PsychoPy (2024.2.4) where participants choose their language (monolingual or bilingual) at the beginning. Based on that, they either see 4 routines in their native language or 8 routines total (4 in English + 4 in their native language). I want to randomize the order of these routines dynamically depending on the language selection. Monolinguals should see only the questions in their native language, whereas bilinguals should see all 8 (all questions) fully randomized. I’ve tried using a loop with “random” selected, but it doesn’t randomize the routine flow itself, just the rows in a conditions file. I also tried shuffling routine names in a list and calling them, but couldn’t find a clean way to execute routines from a variable list.

Is there a recommended way in Builder or with a bit of code to control which routines run and in what order? Ideally, I’d like to define the appropriate set of routines (based on language), randomize their order, and present each one accordingly. Any help, suggestions, or working examples would be appreciated!

When you say 8 routines, could they be one customised routine in a loop pointing to four rows of an eight row spreadsheet?