Page 1 of 1

YuMMz Dating Simulator Programming questions

Posted: Wed Jun 27, 2007 5:33 pm
by YuMMz
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!

Re: YuMMz Dating Simulator Programming questions

Posted: Thu Jun 28, 2007 1:18 am
by denzil
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.

Posted: Thu Jun 28, 2007 6:34 am
by monele
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 ^^;

Posted: Thu Jun 28, 2007 1:02 pm
by YuMMz
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!

Posted: Thu Jun 28, 2007 1:18 pm
by monele
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 :)

Re: YuMMz Dating Simulator Programming questions

Posted: Fri Jun 29, 2007 5:40 pm
by absinthe
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. :)

Re: YuMMz Dating Simulator Programming questions

Posted: Sat Jun 30, 2007 8:20 am
by DaFool
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.

Re: YuMMz Dating Simulator Programming questions

Posted: Thu Jul 05, 2007 6:32 pm
by YuMMz
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.

Re: YuMMz Dating Simulator Programming questions

Posted: Fri Jul 06, 2007 3:33 am
by monele

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

Re: YuMMz Dating Simulator Programming questions

Posted: Tue Aug 21, 2007 4:49 pm
by YuMMz
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!

Re: YuMMz Dating Simulator Programming questions

Posted: Tue Aug 21, 2007 4:59 pm
by DaFool
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

Re: YuMMz Dating Simulator Programming questions

Posted: Wed Aug 22, 2007 10:48 am
by monele
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 ^^