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}.
  • Unknown {...} patterns (that are not text tags like {b}) are escaped to avoid clashing with {var} interpolation.

Text tags:

  • Only {b}, {i}, {s}, {u}, and {br} (plus their closing tags) are passed through as styling.
  • Any other tag{color=...}, {size=...}, {w} / {nw} waits, {k}, ruby, custom tags — is rendered as literal braces, not applied as styling.

Supported:

menu:
"Choice A":
"You picked A"
"Choice B":
"You picked B"
  • Each choice creates a JumpDrive choice node.
  • A menu caption is supported.

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:

  • Function calls inside expressions are not supported (except limited cases in define and image as noted 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, but only assignment expressions inside the block are converted

Notes:

  • All assignments are treated as global/environment-scope variables.

define

Supported:

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

Character style arguments (partial):

  • Arguments prefixed with who_... apply to the speaker name.
  • Arguments prefixed with what_... apply to the dialogue text.

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 support is limited to a known set of transform tags (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 a background music track (loops by default); other channel names map to a “clip” track (no loop by default).
  • fadein, volume, and loop / noloop modifiers on play are forwarded.
  • fadeout on play is silently 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,top,bottom} — slide in from the opposite edge.
  • zoomin, zoomout, zoominout — scale animations.

Each transition is converted to one or more JumpDrive tween blocks that animate opacity, position, or scale.

Notes:

  • Every transition runs at a fixed 0.5 second duration.
  • Class-form transitions (Dissolve(1.0), Move(...), ImageDissolve(...), and any custom transition object) are not evaluated — they produce no tween.
  • pixellate is 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.

See Renpy ATL for full ATL coverage details.

renpy.input

Supported:

$ pet_name = renpy.input(“Pet's name:”)

Converts to an input node with the prompt text and variable name.

String interpolation

Supported:

“You picked the name [pet_name].”

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

while / for loops

Supported at script level (inside a label and inside python: blocks):

$ i = 0
while i < 3:
"Loop body"
$ i = i + 1
for n in range(0, 3):
"Counting [n]"
  • while converts to a branch with a loop-back connection.
  • for supports only range(min, max). Iterating a list, using a step (range(a, b, c)), or any other iterable emits an error and is skipped.

screen (Screens & UI)

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

screen affinity_meter():
vbox:
text "Affinity: [affinity]"
bar value AnimatedValue(affinity, 100)
label start:
show screen affinity_meter
hide screen affinity_meter
  • screen name():zero-argument screens only. Declaring screen parameters (screen foo(x, y):) causes a parser error.
  • show screen name / hide screen name mount and unmount the screen, with optional entry/exit tweens via at.

Containers:

  • hbox / vbox — horizontal / vertical layout.
  • frame / window — 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 and imagebutton render a clickable button with a label and a click action.
  • Supported actions: SetVariable, ToggleVariable, Jump, Start, NullAction, If, Show, Hide, Play, Stop. A list of actions runs in sequence.
  • Any other action leaves the button inert (it renders but does nothing).

Sliders (bar / vbar):

bar value VariableValue("volume", 100)
vbar value AnimatedValue(affinity, 100)
  • Supported value sources: AnimatedValue, StaticValue, DictValue, FieldValue, VariableValue, LocalVariableValue, ScreenVariableValue. Variable-backed sources bind reactively and write back on drag.
  • Not supported (no-op): AudioPositionValue, MixerValue, XScrollValue, YScrollValue, Preference.

Screen properties: color, spacing, text_align, plus font, 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, screen-level input, and if blocks inside a screen. Text tags inside screens follow the same {b}{i}{s}{u}{br}-only rule as dialogue.

Parsed but ignored / not converted

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

  • pause — no timed wait (with Pause(n) is also a no-op).
  • return — control does not return to a caller.
  • call — the called label is not invoked and control does not resume. Use jump instead.
  • include
  • init (outside of limited assignment parsing)
  • set (as a standalone statement)

Author watch-outs

Quick reference for the most common surprises:

  • call / return / pause do nothing — restructure subroutine flow around jump.
  • Text tags beyond {b}{i}{s}{u}{br} render as literal braces (no {color}, {size}, {w}).
  • for iterates only range(min, max) — no lists, no step.
  • Nested collections (a list of lists, a dict of dicts) are rejected.
  • Transitions are a fixed name set at 0.5s; class-form transitions (Dissolve(1.0)) are no-ops.
  • Screens can’t take parameters, and many displayables (viewport, vpgrid, imagemap, use, grid, screen-level if) cause parser errors.
  • fadeout on play and on hide on a sprite’s ATL are dropped.
  • Non-Character define x = SomeFunc(...) is dropped.