This is kind of a complicated question, but here goes. I'm trying to make a visual novel with RenPy that has a custom name input feature, and I want certain characteristics (code names and masks, in this case) that will be relevant later on in the game to be defined for SOME custom names, and have a default setting for any OTHER custom names. This is the code I have right now, which works, but if I enter in anything that is outside the defined names (Gabriel, Ume, Umetaro, Priti, Kai, Kahi, or Alexis) it gives me <code_name unbound> and <mask unbound> in the text box (though no error message). I've tried setting the name in the very last block as "", "%(player_name)s", and "[other]", none of which work. Any idea how to set it up so I can make a true default setting?
n "The letter reads as follows:"
show letter open
n "%(player_name)s--"
n "You are formally invited to a masquerade party on the night of All Hallow's Eve, October 31, 1923. Enclosed in this box, you will find a mask for your use. You have also been assigned a codename, for the sake of discretion."
n "You may use it or not."
if player_name == "Gabriel":
$ code_name="Loki"
$ mask="raven"
if player_name == "Ume":
$ code_name="Shiva"
$ mask="mouse"
if player_name == "Umetaro":
$ code_name="Shiva"
$ mask="mouse"
if player_name == "Priti":
$ code_name="Aphrodite"
$ mask="sparrow"
if player_name == "Kai":
$ code_name="Mercury"
$ mask="racoon"
if player_name == "Kahi":
$ code_name="Kokopelli"
$ mask="frog"
if player_name == "Alexis":
$ code_name="Hera"
$ mask="cat"
if player_name == "%(player_name)s":
$ code_name="Lachesis"
$ mask="python"
n "The code name enclosed is %(code_name)s; when you open the box, a beautifully-carved wood-and-gemstone %(mask)s mask is there. It fits you perfectly."
