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.
I'm trying to make it so players can change the clothing and equipment of the character by selecting it as a choice in a menu. Unfortunately, I don't know how to make the choices show only the clothes that the player has in the inventory so right now it's just showing all the items in the game. I've got it so that if the player selects an item that hasn't been purchased yet, it just says "You don't own that." But it takes a lot of the fun out when the player sees all those items then finds out s/he doesn't own any of them.
$ weapons = []
$ equipment = "Bare Fists"
menu:
"Copper Blade":
if "Copper Blade" in weapons:
"%(povname)s equipped herself with the Copper Blade. +10 Combat"
$ equipment = "Copper Blade"
jump choices
else:
"%(povname)s doesn't own that weapon."
jump choices
"Iron Broadsword":
if "Iron Broadsword" in weapons:
"%(povname)s equipped herself with the Copper Blade. +20 Combat"
$ equipment = "Iron Broadsword"
jump choices
else:
"%(povname)s doesn't own that weapon."
jump choices
"Unequip Weapon":
"%(povname)s no longer carries any weapons."
$ equipment = "Bare Fists"
jump choices
"Nevermind":
jump choices
So what I have a problem with is how you can see all the choices, even if you don't have any of those weapons or have any weapons equipped. It's silly to try and unequip your bare fists. Anyone have any tips?
Last edited by nutmeg2736 on Fri Jun 08, 2012 4:51 pm, edited 1 time in total.