A Ren'Py newbie needing help with the point system~

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
Hime
Veteran
Posts: 384
Joined: Thu Jun 01, 2006 12:46 pm
Projects: Project Nattsu, Take Rena Home
Contact:

A Ren'Py newbie needing help with the point system~

#1 Post by Hime »

I am planning to write this visual novel, where there are some girls that have two kind of points (which happen to be study and love, if you'd like to know). There would be a maxium of 10 for each stat, and you'd gain the points from the choices you make. The points would define not only the ending, but also the girl's reaction to some choices. But I have no idea hwo I could make this system. ^^; I have tried to make it with the things from the tutorials and cookbook, but an error appeared with those (propably because I had to improvize a bit with the combinating of choices, stats and everything). So uh... Any help for this Ren'Py beginner? :(

Raikiri
Regular
Posts: 58
Joined: Mon Jan 29, 2007 10:32 am
Location: Sweden
Contact:

#2 Post by Raikiri »

While I'd hardly call myself a Ren'Py expert, I do have some experience of playing around with variables and branching... Though I'd need some more information before I'd be able to offer any help.
What kind of error did you encounter, and when in the script? Could you post the code in question?
Lucifer status:
It Will Be Done When It's Done™

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

#3 Post by Hime »

Raikiri wrote:While I'd hardly call myself a Ren'Py expert, I do have some experience of playing around with variables and branching... Though I'd need some more information before I'd be able to offer any help.
What kind of error did you encounter, and when in the script? Could you post the code in question?
I unfortunetly happened to clear it already in my disappointment, so I can't post it... But it had the two first codes from here plus something that with I tried to hand a point by a choice, but I can't remember how it went...
The program was closed and the Sc1 reported something about Ren'Py not functioning right with that code or something. Then it posted a long list of some files that didn't seem to like the code either.

That's all I can say, unfortunetly. ^^;

Raikiri
Regular
Posts: 58
Joined: Mon Jan 29, 2007 10:32 am
Location: Sweden
Contact:

#4 Post by Raikiri »

Well, if you've already baleeted the code in question already, there isn't much I can do about it. Good luck with your future endeavors, though.
Lucifer status:
It Will Be Done When It's Done™

absinthe
Regular
Posts: 194
Joined: Sat Dec 10, 2005 12:26 am
Contact:

#5 Post by absinthe »

Wow, I hadn't seen that cookbook recipe before. It's impressive, but I'm not embarrassed (much) to say that all those options makes my brain hurt.

Why not try something simpler if you just need two stats? This thread:
http://lemmasoft.renai.us/forums/viewtopic.php?t=1618

...has some pointers that might help. :)
My 2007 NaNo entry: Eidolon

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

#6 Post by Hime »

Thank you a lot, I've got - well, a step closer to getting it work... But it still has an error, duh :(

My code is: (without the extra of course)

Code: Select all

label start:
    $ a_L = 3
    $ a_S = 3
    $ f_L = 3
    $ f_S = 3
    $ m_L = 3
    $ m_S = 3

    scene bg gray
-> And so on 'till ->
    menu:
        "Nah, she looks like she got it already, so..."

        "It's important to check it out"
            $ a_L += 1
            $ a_S += 1
            T "Anna, did you get it too?"
Ren'Py says:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 102 of C:\Program Files\renpy-5.6.7\Nattsu/game/script.rpy: caption menuitem does not expect a block. Please check the indentation of the following line.
"It's important to check it out"
^

Ren'Py Version: Ren'Py 5.6.7c

Counter Arts
Miko-Class Veteran
Posts: 649
Joined: Fri Dec 16, 2005 5:21 pm
Completed: Fading Hearts, Infinite Game Works
Projects: Don't Save the World
Organization: Sakura River
Location: Canada
Contact:

#7 Post by Counter Arts »

You are forgetting to put the colon after the choice.

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#8 Post by monele »

Also, aren't menus supposed to be named ?

Code: Select all

menu something:

denzil
Veteran
Posts: 293
Joined: Wed Apr 20, 2005 4:01 pm
Contact:

#9 Post by denzil »

I think it should be:
(note the : after each choice)

Code: Select all

    menu:
        "Nah, she looks like she got it already, so...":

        "It's important to check it out":
            $ a_L += 1
            $ a_S += 1
            T "Anna, did you get it too?"
Practice makes purrrfect.
Finished projects: Broken sky .:. colorless day .:. and few more...

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

#10 Post by Hime »

Oh, thank you so much everyone! I never noticed that you need to have a : with the choice, he he he~... But I've got it working now! ^^

absinthe
Regular
Posts: 194
Joined: Sat Dec 10, 2005 12:26 am
Contact:

#11 Post by absinthe »

I make that mistake -- leaving off the colons -- *all* the time. I don't know why; it just feels weird to use colons on two lines in a row? But then, it took me ages to get used to colons at all instead of semi-colons.

Oh, and I think you can get away without naming your menus as long as you aren't planning on jumping directly back to them?
My 2007 NaNo entry: Eidolon

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#12 Post by monele »

Oh, and I think you can get away without naming your menus as long as you aren't planning on jumping directly back to them?
It seems so! That'll save me time XD

Post Reply

Who is online

Users browsing this forum: Google [Bot]