Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Hello, I'm unsure if I worded the title correctly to what my issue is, but I tried my best. I'm using a "renpy.random.choice" in a menu to have two random dialogues happen. I wanted to add a function that made attributes from my character creator into words (I chose blond hair and could reference blond in dialogue). I could make a function to do that in regular dialogue, but I cannot in the random one - it will break the quotes. Here is what it currently looks like.
define nice_dialogue = ["Oh, it is so nice to see you today! your [irises_checker()] eyes look beauitiful!", "Did you do something different with your hair? It is more [hair_color_checker()] than usual."]
$ random_dialogue = renpy.random.choice(nice_dialogue)
While it is unclear what your actual problem is, I assume it's double interpolation. The simplest way to make this work is probably to use renpy.say ( $ renpy.say(e, random_dialogue) ) instead of a standard say statement (e "[random_dialogue]").