Is there a way to make an unlockable character?

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.
Post Reply
Message
Author
User avatar
RoseaMarie
Newbie
Posts: 12
Joined: Wed Jun 24, 2015 11:03 pm
Deviantart: Fancymamma
Contact:

Is there a way to make an unlockable character?

#1 Post by RoseaMarie » Mon Nov 30, 2015 9:52 pm

In my dating sim, I have multiple characters you can pick from at the start. I want there to be a way to unlock a character by doing a certain action in the game you can select. If you select the option, I have it set as

Code: Select all

label food_menu_colette:
     menu:
         "Seafood platter.":
             $ unlock_mermaid = True
             W "Right away, sir"
         "Chicken parm":
             W "Of course, sir"
             C "Ah, I do love chicken parm"
             $ chicken_parm = True
         "Rib eye steak":
             W "Right away."
             
             jump colette_2
and so, for the seafood platter you unlock a datable mermaid that I want to appear on the main selection screen. How do you make it appear if you reset the game and start over? Is it possible?

User avatar
Yomuchan
Regular
Posts: 64
Joined: Sun Jun 16, 2013 8:30 am
Projects: Codename: NSD!
Organization: Forkheads
IRC Nick: Yomu
Deviantart: Yomuchan
itch: yomuchan.itch.io
Location: Somewhere over there.
Contact:

Re: Is there a way to make an unlockable character?

#2 Post by Yomuchan » Mon Nov 30, 2015 10:46 pm

I believe you have to set up variables, then use conditional menus. Like this.

Code: Select all

menu:
	"Buy her a box of white panties":
		$ gift = "panties"
		me "Here, please wrap it up. It's a special present."
	"Buy her a cute hat":
		$ gift = "hat"
		me "I'll take that sunhat, my good man!"
	"Buy her a sexy swimsuit":
		$ gift = "swimsuit"
		me "I'll be buying this swimsuit..."

##TIMESKIP

menu:
     "I'd like to go to the park!":
          jump park_date
     "I hear there's a new menu in the cafe! Wanna go?":
          jump cafe_date
     "Can we go to the beach?" if gift == "swimsuit":
          jump beach_date

Explanation - if the variable named gift is 'swimsuit', a new menu option is unlocked. In your case, you can use a variable called "metmermaidgirl==1" or something. Is this what you needed?

Post Reply

Who is online

Users browsing this forum: _ticlock_