Ren'Py Script

Ren'Py is designed to make developing a Visual Novel easy. The script language focuses on narration, dialogue, displaying backgrounds and character sprites, and menu based interactions with the player. The engine takes care of a lot of things "under the hood", such as saving and loading games, allowing the player to roll-back to previous choices, and running on different platforms.

The scripting language is case sensitive, so spellbook spellBook, Spellbookand SpellBook are all different things. Indentation matters a lot (see Blocks and Indents), so take care when editing or copy-and-pasting examples.

Ren'Py is built using, and on top of, Python , a high-level general purpose programming language. Depending on how complex your game gets you may need to use no, little, or a lot of Python. If your story structure is linear or branching you might not need to use Python at all. The other structures all require variables to hold important state about the game so you will need to learn a little Python to do that.

A "screen language", which can be thought of as a dialect within Ren'Py script is provided for building screens and menus. The screens you see when you launch your game are written in this. We'll get to this later.

An "Animation and Transformation Language" (ATL) is another dialect of Ren'Py script for describing how things on display should move about. As this is more advanced it will (hopefully be covered later).

When your game is launched it takes all the .rpy files and compiles each one into a corresponding .rpyc file. It's these .rpyc files that actually get run. It follows that if you change one of the .rpy files while the game is running it won't actually change the behaviour of the game. There are two ways around this: