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.
As part of a small project I'm working on (just mucking about with the RenPy system), I have a character select screen that stores a dialog line as a string. This string includes string tags (in particular the alpha tag) and when the string is called later, it displays the full string instead of parsing the tag. Is there any way to get it to parse the tag?
menu:
"Who would you like to play as?"
"Lawrence \"Law\" Dale":
$ char = law
$ diag = "\"Whaddya say kid? Wanna work together?\"\n\nPlay as the Demon Bounty Hunter, Law?"
"Sarah \"Sadie\" Jaegar":
$ char = sadie
$ diag = "\"Let\'s do this! {alpha=0.5}But don\'t tell Law!{/alpha}\"\n\nPlay as Little Scorpion Sadie?"
"\"Desi Ethica\"" if flags.Law and flags.Sadie:
$ char = desi
$ diag = "\"Aw, aren\'t you sweet? I\'ll play with you. ^_^\"\n\nPlay as the Black Cat Desi \"Miss Fortune\" Ethica?"
menu:
char "%(diag)s"
"Yes":
jump ch_00
"No":
jump char_select
I'm rather new to RenPy and Python, so there's no doubt a simple solution I'm missing out on.
Thanks in advance!
Last edited by jacktim on Mon Apr 17, 2017 12:13 pm, edited 1 time in total.