This page is out of date

You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.

Some places to look are:

Please do not create new links to this page.


How Ren'Py 6.10 Will Change Your Life

This page will cover some of the ways that Ren'Py 6.10 will change the way you write Ren'Py scripts. This is intended for people who are familiar with Ren'Py, and have written scripts using 6.9.3 and earlier versions.

ATL Replaces Special Purpose Functions

When it came to animation, movement, and transformations, previous versions of Ren'Py had dozens of special purpose functions, each of which had its own defaults. 6.10 replaces all of these special-purpose functions with the Transform function and ATL, the Animation and Transformation Language.

Although ATL is something new to learn, using ATL replaces over a dozen Python functions, each with their own parameter list to memorize, with a regular language. ATL is also more powerful than the special purpose functions, making it easier to do multi-point moves.

Take code that takes two seconds to move a ball from the left side to the right side of the screen:

    show ball at Move((0.0, 0.0, 0.0, 0.0), (1.0, 0.0, 1.0, 0.0), 4.0)

With ATL, this becomes:

    show ball:
         xalign 0.0
         linear 4.0 xalign 1.0

Even when using Python, it's now better to use the function, rather than the special-purpose functions it replaces.

Transformation Property Memory

When we show an image with a transform, and then replace it, the location and other transform properties of the new image are initialized to the values they had for the old image. What's more, the default positions (left, right, and center) are now transforms.

The end result of this is that Ren'Py "remembers" the positions of an image tag. So one can now write:

    show eileen happy at left
 
    e "I'm being shown on the left side of the screen."
 
    show eileen vhappy

    e "I'm still being shown at the left, and you didn't have to write that down!"

You Rarely Need Init Blocks

In older versions of Ren'Py, it was necessary to put code in init blocks in order to run it before the game starts (at init time). In Ren'Py 6.10, this use of init blocks is replaced by three definition statements: define, image, and transform.

These three statements will run at init time, regardless of where they are placed in the program. So it's okay to place them at the top level of the file.

define e = Character("Eileen")
define slowdissolve = Dissolve(1.0)

image eileen happy = "eileen_happy.png"
image eileen vhappy = "eileen_vhappy.png"

transform thirdleft:
    xalign 0.333

The only time you'll need to write an init block is as part of an init python block. Even this is only useful in a couple of places:

Image Names can be Used as Displayables

Now, any place a displayable is required, an image name (in quotes) can be used. For example, instead of having to write:

image eileen happy = "eileen_happy.png"
image eileen vhappy = "eileen_vhappy.png"

image eileen anim:
    "eileen_happy.png"
    pause 1
    "eileen_vhappy.png"
    pause 1
    repeat

we write:

image eileen happy = "eileen_happy.png"
image eileen vhappy = "eileen_vhappy.png"

image eileen anim:
    "eileen happy"
    pause 1
    "eileen vhappy"
    pause 1
    repeat

It's not a big difference, but it does make life easier when using complex ATL definitions.

Automatic Loading of Games on Startup

Ren'Py can automatically load a save game at startup, jumping you back to a known point in the program. This can be done by setting the variable. For example, the following code will automatically load the game in the first save slot.

init python:
    config.auto_load = "1"