Skip to content

Supported Ren'Py Syntax

This page documents what the current Renpy converter parses and turns into playable JumpDrive content.

If a statement is listed as “ignored”, it may parse but does not produce gameplay behavior in the output.

Supported statements

label

  • Used to define jump targets.
  • label start: is treated as the main entry point.

Dialogue ("..." and speaker "...")

Supported forms:

"Narration text"
alice "Spoken text"

Text interpolation:

  • Renpy [var] is converted to {var}.

Text tags:

  • {b}, {i}, {s}, and {u} (plus their closing tags) apply styling; {br} adds a line break.
  • {w} / {w=...} waits and {cps=...} dialogue speed changes are also supported.
  • Other tags - including {color=...}, {size=...}, {nw}, {k}, ruby, and custom tags — are removed by the player, not applied as styling.

Per-line overrides take the same literal arguments as Character(...) and apply to that line only:

e "Just this line is orange." (what_color="#ffbb66")

Supported:

menu:
"Choice A":
"You picked A"
"Choice B":
"You picked B"
  • Each menu creates a JumpDrive choice node.
  • A menu caption is supported.
  • The look of the choices can be customized. See Custom choice screens.

if / elif / else

Supported:

if score >= 10:
"High score"
elif score >= 5:
"Medium score"
else:
"Low score"

Supported expression operators (as implemented by the converter):

  • Arithmetic:
    • +, -, *, /, %
  • Comparison:
    • ==, !=, >, <, >=, <=
  • Boolean:
    • and, or, not, in
  • Unary:
    • not expr (boolean negation) and -expr (numeric negation)
  • Literals:
    • numbers, strings, True, False, None
  • Parentheses:
    • (expr)

Notes:

  • len(value) and re.search(pattern, text) are supported; re.search returns a boolean match test, not a Python match object. Other calls are limited to the cases described below.

jump

Supported:

jump some_label
  • Converts into a JumpDrive jump node.

default

Supported:

default affinity = 0
  • Declares a global variable and its initial value.

  • Does not create a runtime “script node” (the engine initializes defaults).

$ python assignments

Supported:

$ affinity = affinity + 1

Supported in blocks:

  • $ expr at the top level inside a label
  • python: and init python: blocks with assignments, if / elif / else, and while statements

Notes:

  • All assignments are treated as global/environment-scope variables.
  • init: and init python: bodies run before label start:.

define

Supported:

  • Simple variable definition:
define chapter_title = "Chapter 1"
  • Character definitions via Character(...):
define a = Character("Alice")

Character style arguments (partial):

  • who_... (or color) styles the speaker name, and what_... styles the dialogue text. Supported: color, font, size, min_width, min_height, wrap, text_align.
  • window_... styles the dialogue window with screen properties, such as window_xsize or a solid-color window_background.
  • screen="..." picks a custom dialogue screen.
  • define narrator = Character(None, ...) styles narration.

Examples:

define a = Character(
"Alice",
who_color="#ffcc00",
what_color="#ffffff",
what_size=42
)

image

Supported aliasing:

image bg_room = "images/bg_room.png"

Also supports Image("..."):

image bg_room = Image("images/bg_room.png")

scene

Supported:

scene bg_room
image bg_room = "images/bg_room.png"
label start:
scene bg_room
  • Sets the current background scene.

show

Supported:

show alice happy
show alice happy at left

Behavior:

  • show creates/updates a character sprite.
  • The first token in the shown image name is treated as the “character id”, and the remaining tokens are treated as “tags”.

at supports named positions and declared transforms (see Media and Resolution Specs).

hide

Supported:

hide alice
hide alice happy
  • Clears the character from the screen.

play / stop

Supported:

play music "music/theme.mp3"
stop music
play sound "sfx/click.wav"
stop sound

Notes:

  • music maps to the bgm track (loops by default); other channel names, such as sound and voice, keep their own track names (no loop by default).
  • fadein, volume, and loop / noloop modifiers on play are forwarded.
  • fadeout on play is reported and dropped. stop <channel> does support fadeout.
  • One clip per track: consecutive play sound calls cut each other off (no overlapping SFX).

with transitions

Supported on show, hide, and scene:

show alice happy with dissolve
scene bg_room with fade
hide alice with dissolve

Supported transition names:

  • dissolve, fade — opacity fade in/out.
  • movein{left,right,top,bottom}, moveout{left,right,top,bottom} — linear slides.
  • easein{left,right,top,bottom}, easeout{left,right,top,bottom}, ease — eased slides.
  • slide{left,right,up,down} — slide in from the opposite edge.
  • slideaway{left,right,up,down} / push{left,right,up,down} — slide out / slide old and new images together.
  • zoomin, zoomout, zoominout — scale animations.
  • hpunch, vpunch — horizontal / vertical shake.

Transitions can produce JumpDrive tween blocks that animate opacity, position, or scale. hpunch and vpunch produce a screen shake.

Notes:

  • dissolve, move/ease, and zoom transitions use 0.5 seconds. fade uses 0.5 seconds out and 0.5 seconds in; slide, slideaway, and push use 1 second.
  • Dissolve(time) and Fade(out_time, hold_time, in_time) support numeric literal durations, inline or through a define. Other constructor options are unsupported.
  • Move(...), ImageDissolve(...), Pause(...), custom transition objects, and pixellate are not supported.

transform / ATL

ATL (Animation and Transformation Language) transforms are supported:

transform slide_right:
xalign 0.0
linear 1.0 xalign 1.0
label start:
show alice at slide_right

Static positioning properties from a transform populate the setCharacter block’s position fields. Animation steps (e.g. linear 1.0 xalign 1.0) are converted to tween blocks chained after the setCharacter block.

String interpolation

Supported:

"You picked the name [pet_name]."

Ren’Py [var] interpolation is converted to JumpTree {var} interpolation.

while / for loops

while is supported inside a label and inside python: blocks:

$ i = 0
while i < 3:
"Loop body"
$ i = i + 1
  • while converts to a branch with a loop-back connection.
  • for is not supported, including range(min, max). Use while instead. (Exception: the loop in a custom choice screen.)

screen (Screens & UI)

Screens are supported for building custom UI. Declare a zero-argument screen and populate it with containers and components:

default affinity = 0
screen affinity_meter():
vbox:
text "Affinity: [affinity]"
bar value AnimatedValue(affinity, 100)
label start:
show screen affinity_meter
hide screen affinity_meter
  • screen name(): — screens you show take no parameters. The only exceptions are choice and dialogue screens.
  • show screen name / hide screen name mount and unmount the screen. They do not accept at; put transforms on the elements inside the screen for entry/exit tweens.

Containers:

  • hbox / vbox — horizontal / vertical layout.
  • frame / window id "name" — mapped to a shrink-wrapping vbox.
  • fixed / nearrect — plain containers (no layout).

Text:

  • text and label render text. [var] interpolation is reactive — the displayed value updates when the variable changes.

Buttons:

  • textbutton renders a clickable text label; imagebutton auto "button_%s.png" uses the idle image and an indented action line.
  • Supported actions: SetVariable, ToggleVariable, Jump, Start, NullAction, Show, Hide, Play, Stop, with positional arguments. A list of actions runs in sequence.
  • Unsupported actions, including If(...), are reported and skipped. A button is inert if no supported actions remain; supported actions in a mixed list still run.

Sliders (bar / vbar):

bar value VariableValue("affinity", 100)
vbar value AnimatedValue(affinity, 100)
  • Supported value sources: AnimatedValue, StaticValue, and VariableValue. Variable references update reactively; only VariableValue writes back on drag. AnimatedValue does not animate changes over time.
  • Not supported: DictValue, FieldValue, LocalVariableValue, ScreenVariableValue, AudioPositionValue, MixerValue, XScrollValue, YScrollValue, and Preference.

Screen properties: color, spacing, text_align, plus size, width, and height via style mapping. Screen elements accept at <transform> (static props → styles, animated steps → entry/exit tweens).

Not supported in screens — these cause parser errors, not graceful skips: viewport, vpgrid, imagemap, use, transclude, grid, side, key, mousearea, and screen-level input. if blocks are also unsupported, except if who: in a dialogue screen. Screen text supports {b}{i}{s}{u}{br} styling.

Custom choice screens

Define screen choice(items) to replace the built-in choice buttons for every menu:

screen choice(items):
vbox:
xalign 0.95
yalign 0.5
spacing 16
for i in items:
textbutton i.caption action i.action
  • Use i.caption for the button text and i.action for its action. Parameter and loop names are up to you.
  • The for loop must be the only element in its container, and can’t be nested or repeated.
  • The player shows the screen automatically, so don’t use show screen choice. Entry/exit animations aren’t supported.
  • To use another screen for one menu, define it with the same items parameter and write menu (screen="compact_choices"):.

Custom dialogue screens

Define screen say(who, what) to replace the built-in dialogue box:

screen say(who, what):
window id "window":
xalign 0.5
yalign 0.9
xsize 900
if who:
text who id "who"
text what id "what"
  • id "what" (required, exactly one, not inside an if) shows the dialogue text. Give its container a definite width so the text wraps.
  • id "who" shows the speaker’s name, and id "window" takes the character’s window_... styles.
  • if who: hides its contents during narration. No other conditions are supported.
  • To use another screen, set Character(..., screen="phone_say") or add (screen="phone_say") to one line.
  • Not supported: extra parameters, image window backgrounds, entry/exit animations, and NVL mode.

Define custom choice and say screens in a regular script file such as choices.rpy. They’re ignored in screens.rpy or common.rpy.

Parsed but ignored / not converted

These statements are accepted by the parser but do not produce runtime behavior:

  • call forms that parse — the called label is not invoked. A plain call helper causes a parser error. Use jump instead.
  • include
  • set (as a standalone statement)

Author watch-outs

Quick reference for the most common surprises:

  • call is unsupported — restructure subroutine flow around jump. return jumps to label end: if defined; otherwise it ends the story.
  • Text tags support {b}{i}{s}{u}{br}, dialogue waits with {w}, and speed changes with {cps=...}. Unrecognized tags are removed; color and size tags are unsupported.
  • for is unsupported, including range(min, max) — use while.
  • Nested collections (a list of lists, a dict of dicts) are rejected.
  • Transitions use the names and durations listed above; Dissolve(...) and Fade(...) support custom literal durations.
  • Screens can’t take parameters, except choice and dialogue screens. Many displayables (viewport, vpgrid, imagemap, use, grid, if) cause parser errors.
  • Custom choice and say screens are ignored in screens.rpy or common.rpy.
  • fadeout on play and on hide on a sprite’s ATL are dropped.
  • define calls are limited to Character, Position, Dissolve, and Fade; other function calls are dropped.