How to add the "Choose Your Character" feature?

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
Kuzlalala
Regular
Posts: 38
Joined: Tue Jul 14, 2009 7:50 am
Projects: New Dynamic English: The Tour
Contact:

How to add the "Choose Your Character" feature?

#1 Post by Kuzlalala » Fri Aug 14, 2009 8:15 am

My visual novel (which you might see) will have two versions of it, like a "Choose Your Character". But I don't know how. Could you answer the topic title and give me some tips, please?

User avatar
chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

Re: How to add the "Choose Your Character" feature?

#2 Post by chronoluminaire » Fri Aug 14, 2009 9:44 am

If you're happy for it to be a text choice, this can be simply a menu:

Code: Select all

label start:
  "Choose your character!"
  menu:
    "Bob":
      $ name = "Bob"
    "Jane":
      $ name  = "Jane"

"Well, here I am at the start of the game."
"This person treats me the same no matter who I am..."
e "Hello, %(name)s!"  # this will be "Hello, Bob!" or "Hello, Jane!" depending on the player's choice earlier
"But this person is prejudiced!"
if name == "Bob":
  l "Why hello there, handsome. Can I help you?"
else: # we're Jane
  l "Eww. We don't need girls like you in this town. Get lost!"
I released 3 VNs, many moons ago: Elven Relations (IntRenAiMo 2007), When I Rule The World (NaNoRenO 2005), and Cloud Fairy (the Cute Light & Fluffy Project, 2009).
More recently I designed the board game Steam Works (published in 2015), available from a local gaming store near you!

Kuzlalala
Regular
Posts: 38
Joined: Tue Jul 14, 2009 7:50 am
Projects: New Dynamic English: The Tour
Contact:

Re: How to add the "Choose Your Character" feature?

#3 Post by Kuzlalala » Fri Aug 14, 2009 10:11 am

What happens if for each character the story is way different, like using different scenes and stories? Should I use a different RPY? If yes, how do you make them?

User avatar
Hime
Veteran
Posts: 384
Joined: Thu Jun 01, 2006 12:46 pm
Projects: Project Nattsu, Take Rena Home
Contact:

Re: How to add the "Choose Your Character" feature?

#4 Post by Hime » Fri Aug 14, 2009 10:16 am

Stealing the base from chrono, I think it goes like this:

Code: Select all

label start:
  "Choose your character!"
  menu:
    "Bob":
      jump bob_story
    "Jane":
      jump jane_story

label bob_story:
  "Once upon a time, there was a little boy called Bob... etc etc"

label jane_story:
  "It was a dark and stormy night as Jane approached the mansion... etc etc"
Just make a label for each story and use jump commands to get into those labels. :)

For Ren'Py programming related questions, it might be easier to get answers from the Ren'Py board, by the way.

Good luck with your project!
Image

User avatar
Maruta
Regular
Posts: 31
Joined: Wed Jun 25, 2008 12:02 pm
Location: Aivtal
Contact:

Re: How to add the "Choose Your Character" feature?

#5 Post by Maruta » Mon Aug 17, 2009 7:47 pm

I have actually asked a similar question before, and after thinking about it, well, it really would be more easier to work on two paths. The Jane and Bob paths are separate, but meet only at the beginning when the player has to decide.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]