rpg game help? multi-endings?

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
shana
Newbie
Posts: 4
Joined: Sat Jul 30, 2011 11:31 pm
Contact:

rpg game help? multi-endings?

#1 Post by shana » Wed Aug 03, 2011 5:26 pm

ahm. it's also my first time using ren'py and im making a game where you can choose between 4 guys.
how do you put in codes where you need to unlock events or make certain choices to get the ending of the guy you want.

i dont understand the point system. sorry >.<

can someone please help..thanks in advance

p.s. i don't really have the hp, charm or wisdom, etc point system. you just have to join a club and unlock events. to get an ending you need to get all the events of your target guy. but i don't know how to put that in codes. help?

thanks in advance..really :)..^.^,
Godbless

User avatar
TakeOverWorld
Regular
Posts: 112
Joined: Fri May 27, 2011 11:00 am
Location: London, UK
Contact:

Re: rpg game help? multi-endings?

#2 Post by TakeOverWorld » Wed Aug 03, 2011 5:37 pm


shana
Newbie
Posts: 4
Joined: Sat Jul 30, 2011 11:31 pm
Contact:

Re: rpg game help? multi-endings?

#3 Post by shana » Wed Aug 03, 2011 5:39 pm

uhm..I've read that . I think I quite understand it..but im quite confused with this:

label date_choice:

b "So, where would you like to go, Mary?"

menu:
"I'd like to go to the park!" if park_date_done == False: <---- why is there false here and true under?
$ park_date_done = True
jump park_date
"I'd like to go to the cafe!" if cafe_date_done == False: <-----same here..pls explain.please :)).thanks..
$ cafe_date_done = True
jump cafe_date
"Can we go tortoise racing?" if gift == "tortoise":
jump tortoise_racing
"Let's just go home" if park_date_done ==True:
jump date_over

label park_date:
b "Well, here we are, at the park!"

m "Yes, it's very interesting. Can we do something else now?"

jump date_choice

label cafe_date:
m "Gee, what an exciting cafe!"

jump date choice # WRONG! should be date_choice

label tortoise_date: # WRONG! Ren'Py will complain about this until you
# correct it to "tortoise_racing"
m "Well! A whole lot of tortoise-related fun!"

b "Yeah, great."

jump date_choice

label date_over:
"... and the game goes on from here."

User avatar
TakeOverWorld
Regular
Posts: 112
Joined: Fri May 27, 2011 11:00 am
Location: London, UK
Contact:

Re: rpg game help? multi-endings?

#4 Post by TakeOverWorld » Wed Aug 03, 2011 6:15 pm

"I'd like to go to the park!" if park_date_done == False: <---- why is there false here and true under?
$ park_date_done = True
Because if you use that code, you can only choose that option if you haven't choosen it before, so before you click it, the variable 'park_date_done' is false, and when you choose it, the variable becomes true, so you can't choose that option again.

shana
Newbie
Posts: 4
Joined: Sat Jul 30, 2011 11:31 pm
Contact:

Re: rpg game help? multi-endings?

#5 Post by shana » Wed Aug 03, 2011 6:38 pm

ahh.okay..

thanks a lot :)

Godbless

User avatar
Rewritten Ennui
Veteran
Posts: 279
Joined: Thu Jul 14, 2011 1:50 pm
Organization: TwinTurtle Games
Contact:

Re: rpg game help? multi-endings?

#6 Post by Rewritten Ennui » Sat Aug 06, 2011 3:51 pm

It's about time I used this account :lol: The point system is actually pretty easy to use and is not at all complex, so maybe I can explain it to you. TakeOverWorld already sent you the link to the Remembering User Choices tutorial, so I'm typing with the assumption that you've read the contents of the page. If you haven't, then I suggest that you read it >_>

If you want Ren'Py to keep track of certain values (eg. how much a guy likes you), then you first have to define the variable. The best place to do this is after the label start. You said that you were developing a game with 4 guys, right? So then it should look something like this:

Code: Select all

label start:
    $ Guy1L = 0
    $ Guy2L = 0
    $ Guy3L = 0
    $ Guy4L = 0
I'm using 'L' to abbreviate 'love' or whatever. So now that we have defined the variables, we can change the values. The best way to do this is by menu choices throughout the game. For example...

Code: Select all

menu:
    "Who should you spend time with?"
    "Guy 1":
        $ Guy1L += 1
        "You decided to hang out with Guy 1."
    "Guy 2":
        $ Guy2L += 1
        "You decided to hang out with Guy 2."
    "Guy 3":
        $ Guy3L += 1
        "You decided to hang out with Guy 3."
    "Guy 4":
        $ Guy4L += 1
        "You decided to hang out with Guy 4."
Always use the dollar sign ($) to indicate the use of a variable. Note that the plus sign (+) before the equal sign (=) tells Ren'Py to increase the value of the variable. To decrease the value, use a minus sign (-). Use this basic code throughout the game to stack up the points. If you want to activate a special event, then set a minimum amount of points that the player must have before activating it. This is where the 'if' statement comes into play.

Code: Select all

if Guy1L >= 5:
    Guy1"Did you know that I really like you?"
else:
    Guy1"Oh, hi there. How is your day?"
'>=' is greater than or equal to, just like in math. So that means if the player's points are equal or greater than 5, Guy 1 will confess his love for you. If the player's points are a lower value like 4, then Guy 1 will greet you as a friend.

That's about all I feel like typing for now :p Hopefully I answered your questions. If not, then you should probably read the other tutorials and just practice using Ren'Py in general. Besides that, you should clarify what kind of game you're developing. From your first post, it sounds more like a Dating Sim sort of game.
I've swapped accounts to CheeryMoya, so this account is no longer in use. Refer to the new account if you want to contact me.

Twinturtle Games Website

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], _ticlock_