YuMMz Dating Simulator Programming questions

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
YuMMz
Regular
Posts: 90
Joined: Tue Sep 20, 2005 1:27 pm
Contact:

YuMMz Dating Simulator Programming questions

#1 Post by YuMMz » Wed Jun 27, 2007 5:33 pm

Okay, so as I start inputting my project into Ren'Py I am going to have lots of questions since I am not the greatest programmer. I also don't want to flood PyTom with questions since he has already helped me so much. By the way, the new Ren'Py demo is SO MUCH BETTER than the old one :). Way easier to understand. I figured instead of starting a bajillion threads I will put them all in here as they come up.

Question 1:
When I use the "with fade" command how do I extend the duration of the fade? I searched the forum for fade but did not see anything.

Question 2:
As I was searching for the fade answer I noticed something about nvl_mode? Anyone got a quick explanation for what this is? At the beginning of my game I have about 10 lines of text using the "centered" command, does nvl_mode work better than the centered command? Also can I make the text fade in a bit more dramatically for these few lines?

Thanks!

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

Re: YuMMz Dating Simulator Programming questions

#2 Post by denzil » Thu Jun 28, 2007 1:18 am

YuMMz wrote:By the way, the new Ren'Py demo is SO MUCH BETTER than the old one :).
Yep, but I still haven't figured out how to ask Eileen for date in the new one. :D
YuMMz wrote:When I use the "with fade" command how do I extend the duration of the fade? I searched the forum for fade but did not see anything.
From manual:

Code: Select all

init:
    $ fade = Fade(.5, 0, .5)
Fade (out_time, hold_time, in_time)

out_time - The amount of time that will be spent fading from the old scene to the solid color. A float, given as seconds.
hold_time - The amount of time that will be spent displaying the solid color. A float, given as seconds.
in_time - The amount of time that will be spent fading from the solid color to the new scene. A float, given as seconds.

So all you have to do is copy the code above, rename it from fade to something else, change the values to your liking and use it.
Practice makes purrrfect.
Finished projects: Broken sky .:. colorless day .:. and few more...

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

#3 Post by monele » Thu Jun 28, 2007 6:34 am

And if you want to use a specific time at a single point in the story :

Code: Select all

with Fade(.5, 0, .5)
"fade" (with a lower case) is really just a shortcut.

NVL mode is meant to display a larger text window and each line of text will stay after you click, until you clear it. But NVL mode is a bit of a pain to configure the first time, so if it's for a single use, it might be annoying to do this way ^^;

User avatar
YuMMz
Regular
Posts: 90
Joined: Tue Sep 20, 2005 1:27 pm
Contact:

#4 Post by YuMMz » Thu Jun 28, 2007 1:02 pm

Thanks, the fade worked perfectly. Another question:

Is it better to create a seperate script file for the game's script? I loaded the magical boutique open source just to see what it looked like and noticed that the script was in a different file. Is this how most of the games are? Or should I just put 50k words into the script file?

Thanks!

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

#5 Post by monele » Thu Jun 28, 2007 1:18 pm

It's up to you. You can have a single file or many files. I chose many files because of the complex nature of the game... and I like organizing things that way. But it's really up to you.
Just know that if you use multiple files, in the end they'll all be concatenated in one big script when running the game anyway... so it's really just for ease of scripting :)

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

Re: YuMMz Dating Simulator Programming questions

#6 Post by absinthe » Fri Jun 29, 2007 5:40 pm

I use multiple files too, for what it's worth. I like keeping my functions, my main story, and my endings each in separate files, minimum. Just makes it easier to test, proofread, and troubleshoot.

For a straight, no extra programming frills, linear with looping branches story, I prefer a single file, or at most two. The most scripts I've ever used for a single game is eight, but I think that's a little excessive even for me. :)
My 2007 NaNo entry: Eidolon

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: YuMMz Dating Simulator Programming questions

#7 Post by DaFool » Sat Jun 30, 2007 8:20 am

Currently using 3...
-options for all the declarations and customizations
-engine for all the calls and loops for the most interactive portions (so I do not need to rewrite dialogue everytime a certain situation occurs)
-script which is pretty much linear which is the bulk of the story, including a few branches and the few endings I have

Surprisingly, they are about the same length, due to things getting progressively more complex.

If I want to test the engine quickly, I just set some values, then have a shortcut go down to a label in the script that invokes the engine.

User avatar
YuMMz
Regular
Posts: 90
Joined: Tue Sep 20, 2005 1:27 pm
Contact:

Re: YuMMz Dating Simulator Programming questions

#8 Post by YuMMz » Thu Jul 05, 2007 6:32 pm

Questions, questions.

1. When changing the font for italics. I looked at the Ren'Py cookbook and it said to use the config.font_replacement_map command to change the font for italics. My question is which file do I put this in? Do I put it in the script.rpy or options.rpy or something else? Should I not put it first in the list? Sorry if this is a dumb question :-P.

2. Regarding using the centered command to display text. Is there a way to make the actual text fade in and out. For example at the beginning of the game there are about 10 lines of text that come on and off the screen. I think it would look alot better if the text faded in and out instead of just popping on the screen. This is how I currently have it.

Code: Select all

show black
    
    centered "I want this text to be dramatic."
    
    centered "I wish it did not just pop on the screen."
    
    centered "If I could make it fade in and out dramatically that would be sweet!"
Thanks.

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

Re: YuMMz Dating Simulator Programming questions

#9 Post by monele » Fri Jul 06, 2007 3:33 am

Code: Select all

show black
   
    centered "I want this text to be dramatic." with dissolve
    with dissolve
   
    centered "I wish it did not just pop on the screen." with dissolve
    with dissolve   
    centered "If I could make it fade in and out dramatically that would be sweet!" with dissolve
    with dissolve

User avatar
YuMMz
Regular
Posts: 90
Joined: Tue Sep 20, 2005 1:27 pm
Contact:

Re: YuMMz Dating Simulator Programming questions

#10 Post by YuMMz » Tue Aug 21, 2007 4:49 pm

Okay, more questions.

I have to create seperate script files for each day of my game, otherwise there is no way I can possibly work on it efficiently. So I am wondering if someone can give me a quick and dirty explanation of how to do this. I tried to do the following:

1. I created a new file and saved it as oct30.rpy
2. typed "init python:" on line one and then typed "label oct30:" on line 3.
3. I then put "call oct30" at the appropriate location in script.rpy.
4. I then put "return" at the end of oct30.rpy

Now when I try to run the game I get errors. It tells me the following:

"I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


On line 1 of C:\Documents and Settings\mjohnson\Desktop\My Stuff\flash stuff\my games\Dating Simulator\System\Ren'Py\renpy-6.3.0-full\renpy-6.3.0\datingsim/game/oct30.rpy: python block expects a non-empty block.
init python:
^

On line 545 of C:\Documents and Settings\mjohnson\Desktop\My Stuff\flash stuff\my games\Dating Simulator\System\Ren'Py\renpy-6.3.0-full\renpy-6.3.0\datingsim/game/oct30.rpy: with statement does not expect a block. Please check the indentation of the line after this one.
with dissolve
^

Ren'Py Version: Ren'Py 6.3.0d"

Can anyone tell me what I did wrong?
Thanks!

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

Re: YuMMz Dating Simulator Programming questions

#11 Post by DaFool » Tue Aug 21, 2007 4:59 pm

No need for init lines.... just head straight to labels. These are assuming all renpy lines.

e.g oct30.rpy:

Code: Select all

label oct30:
    blah blah
    return

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

Re: YuMMz Dating Simulator Programming questions

#12 Post by monele » Wed Aug 22, 2007 10:48 am

What DaFool said :). The reason for your error is that you have, indeed, an empty init block. Either have an init block with something in it, or don't have an init block ^^

Post Reply

Who is online

Users browsing this forum: Google [Bot], Kia, namastaii