Page 10 of 10

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Tue Aug 17, 2010 11:14 pm
by LordShiranai
Video looks awesome.

Hoping that this latest build will be the final or close to it.

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Wed Aug 18, 2010 7:01 pm
by Mihara
CropMove does not correctly interact with ATL containing a "contains" block with "alpha" in it, it loses the alpha value given in ATL during transition. It works fine if there's no "contains", the bug persists if there is only one "contains" block.

Replication follows, image from the tutorial is used.

Code: Select all

init:
    image effect magic:
        around (0.5,0.5)
        anchor (0.5,0.5)
        alpha 0.5
        contains:
            "whitehouse.jpg"
            zoom 0.5
            block:
                rotate 0
                linear 10 rotate 360
                repeat
        contains:
            "whitehouse.jpg"
            zoom 0.8
            block:
                rotate 0
                linear 10 rotate -360
                repeat
        
        
    image bg a = Solid("#eee")
    image bg b = Solid("#fff")

    $ e = Character('Eileen', color="#c8ffc8")

label start:
    
    scene bg a
    show effect magic at truecenter
    e "We have a background, and an ATL animation using two independent 'contains' blocks with 'alpha' in each, using an image with no alpha of it's own."
    e "Now see what happens when I try to cropmove another scene with that ATL animation in."
    
    scene bg b
    show effect magic at truecenter
    with CropMove(3.0,"wipeleft")

    e "During cropmove 'alpha' is lost. If I use an ImageDissolve instead, it isn't."

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Wed Aug 18, 2010 7:58 pm
by PyTom
Mihara >>> Fixed. This will be in the final release, although it was such a straightforward change I won't bother with public testing.

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Thu Aug 19, 2010 1:41 am
by LordShiranai
I think I found some odd behavior with screens and zorder when defining a screen using renpy.define_screen. I am not sure if I am misunderstanding how to declare a zorder in the latest build, or if this is a bug. It doesn't look like the documentation was updated to reflect the changes to renpy.define_screen, so I'm not 100% sure.

Below is the code of a simple reproduction.

Code: Select all

# You can place the script of your game in this file.

init:
    # Declare images below this line, using the image statement.
    # eg. image eileen happy = "eileen_happy.png"

    # Declare characters used by this game.
    
    python:
        
        def screen_a(**kwargs):
            ui.frame()
            ui.vbox()
            ui.text("Test")
            ui.close()

        renpy.define_screen("screen_a", screen_a, "True", "2")

# The game starts here.
label start:

    show screen screen_a
    
    "You've created a new Ren'Py game."

    hide screen screen_a
    
    "Once you add a story, pictures, and music, you can release it to the world!"
It seems that at the point I reach the hide screen statement, the game will not advance. It will be stuck and you can't move on to the next interaction. If I remove the 4th. argument from renpy.define_screen (which I believe should set the zorder to 2), the issue does not seem to occur.

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Thu Aug 19, 2010 2:19 am
by PyTom
You're telling the screen to be modal, and raising it to the top. That prevents the say behavior from working - and you're stuck like this.

(Modal was also documented incorrectly - it actually defaults to "False".)

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Thu Aug 19, 2010 3:15 am
by LordShiranai
PyTom wrote:You're telling the screen to be modal, and raising it to the top. That prevents the say behavior from working - and you're stuck like this.

(Modal was also documented incorrectly - it actually defaults to "False".)
What you're saying makes sense for modal, now that I think about it. The problem is that I observe the behavior when I define a screen using renpy.define_screen regardless of the modal setting I pass to it. (I actually pasted the wrong code the last time, as I had actually been playing around with the values in my test script and pasted the version when I set modal to True. So that probably caused confusion.)

The following example may illustrate it better.

Code: Select all

init:
    # Declare images below this line, using the image statement.
    # eg. image eileen happy = "eileen_happy.png"

    # Declare characters used by this game.
    
    screen screen_a:
        modal False
        zorder 1
        text "Screen A"
    
    python:
        def screen_b(**kwargs):
            ui.text("Screen B")

        renpy.define_screen("screen_b", screen_b, "False", "1")

# The game starts here.
label start:

    "Go screen A!"
    
    show screen screen_a
    
    "Go Away Screen A!"

    hide screen screen_a
    
    "Go screen B!"
    
    show screen screen_b
    
    "Go Away Screen B!"

    hide screen screen_b
    
    "Okay, done?"
In the above example screen_a will go away just fine, but screen_b will still get "stuck." Even though it should not be modal if I'm using renpy.define_screen correctly.

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Sat Aug 21, 2010 11:15 pm
by Samu
Hello when trying to port my game to 6.11.0 y encountered a problem... when trying to run my game in 6.11.0 this error pops:

Code: Select all

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


On line 483 of C:\Users\Nikolas\Desktop\renpy-6.10.2\Project1/game/script.rpy: 'return' outside function
return


Ren'Py Version: Ren'Py 6.11.0l
This is weird because with 6.10 the game was running just fine and now its not allowing the code to have a return statement outside a function :?

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Sat Aug 21, 2010 11:23 pm
by PyTom
6.11.0 uses a new parser, which is a bit stricter about incorrect code. Can we see your code, so I can suggest how to fix it?

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Sat Aug 21, 2010 11:41 pm
by Samu
Here, it is in the atached script.rpy

or

Code: Select all

label show_statsT:
    python:
        action = 1
        while action:
            Teacher_name = Teachers_list [Tindex] [0]
            Tgender = Teachers_list [Tindex] [1]
            Tsubject = Teachers_list [Tindex] [2]
            Tage = Teachers_list [Tindex] [3] [0]
            Tpedagogy = Teachers_list [Tindex] [3] [1]
            Tautority = Teachers_list [Tindex] [3] [2]
            Tsex = Teachers_list [Tindex] [3] [3]
            Tmorality = Teachers_list [Tindex] [3] [4]
            Texperience = Teachers_list [Tindex] [3] [5]
            Tsalary = Teachers_list [Tindex] [3] [6]
            show_menu1 = False
            display_statsT()
            if Tindex:
                ui.vbox(xpos = 0.01, ypos = 0.55)
                ui.textbutton("Prev Teacher", clicked=ui.returns(1))
                ui.close()
            if Tindex != (len(Teachers_list) - 1):
                ui.vbox(xalign = 0.99, ypos = 0.55)
                ui.textbutton("Next Teacher", clicked=ui.returns(2))
                ui.close()
            ui.vbox(xalign = 0.5, ypos = 0.55)
            ui.textbutton("Fire This Teacher", clicked=ui.returns(3))
            ui.close()
            return_button()
            action = ui.interact()
            if action == 3:
                del Teachers_list [Tindex]
                if Tindex != 0:
                    Tindex -= 1
                elif len(Teachers_list) != 0 and Tindex == 0:
                    pass
                else:
                    show_menu1 = True
                    return()
            elif action == 2:
                Tindex += 1
            elif action == 1:
                Tindex -= 1
            else:
                pass
        show_menu1 = True
        return()
The script.rpy file is a bit of a mess because i'm experimenting a bit to become familiar with the code.

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Sat Aug 21, 2010 11:43 pm
by PyTom
To get out of a while loop, you want to use break, rather than return. The last return doesn't do anything.

Re: Ren'Py 6.11.0 Public Pre-Release

Posted: Sat Aug 21, 2010 11:48 pm
by Samu
the while loop breaks with the return_button() that returns 0 to the ui.interact() and ultimately makes the action variable 0 thus breaking the while loop

the return() is there because i call this bit of code from another part with a call statement

edit: anyway the code works fine in the 6.10.2 version of renpy, it does what is intended to do without errors so I wonder...

edit2: Nevermind, I found the problem. Calling a return statement inside a python block is what raises the error.