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")menu
Supported:
menu: "Choice A": "You picked A" "Choice B": "You picked B"- Each menu creates a JumpDrive
choicenode. - 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
- numbers, strings,
- Parentheses:
(expr)
Notes:
len(value)andre.search(pattern, text)are supported;re.searchreturns 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
jumpnode.
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 + 1Supported in blocks:
$ exprat the top level inside a labelpython:andinit python:blocks with assignments,if/elif/else, andwhilestatements
Notes:
- All assignments are treated as global/environment-scope variables.
init:andinit python:bodies run beforelabel start:.
define
Supported:
- Simple variable definition:
define chapter_title = "Chapter 1"- Character definitions via
Character(...):
define a = Character("Alice")Character style arguments (partial):
who_...(orcolor) styles the speaker name, andwhat_...styles the dialogue text. Supported:color,font,size,min_width,min_height,wrap,text_align.window_...styles the dialogue window with screen properties, such aswindow_xsizeor a solid-colorwindow_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 happyshow alice happy at leftBehavior:
showcreates/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 alicehide alice happy- Clears the character from the screen.
play / stop
Supported:
play music "music/theme.mp3"stop music
play sound "sfx/click.wav"stop soundNotes:
musicmaps to thebgmtrack (loops by default); other channel names, such assoundandvoice, keep their own track names (no loop by default).fadein,volume, andloop/noloopmodifiers onplayare forwarded.fadeoutonplayis reported and dropped.stop <channel>does supportfadeout.- One clip per track: consecutive
play soundcalls cut each other off (no overlapping SFX).
with transitions
Supported on show, hide, and scene:
show alice happy with dissolvescene bg_room with fadehide alice with dissolveSupported 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.fadeuses 0.5 seconds out and 0.5 seconds in; slide, slideaway, and push use 1 second.Dissolve(time)andFade(out_time, hold_time, in_time)support numeric literal durations, inline or through adefine. Other constructor options are unsupported.Move(...),ImageDissolve(...),Pause(...), custom transition objects, andpixellateare 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_rightStatic 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 = 0while i < 3: "Loop body" $ i = i + 1whileconverts to a branch with a loop-back connection.foris not supported, includingrange(min, max). Usewhileinstead. (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_meterscreen name():— screens you show take no parameters. The only exceptions are choice and dialogue screens.show screen name/hide screen namemount and unmount the screen. They do not acceptat; 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-wrappingvbox.fixed/nearrect— plain containers (no layout).
Text:
textandlabelrender text.[var]interpolation is reactive — the displayed value updates when the variable changes.
Buttons:
textbuttonrenders a clickable text label;imagebutton auto "button_%s.png"uses theidleimage and an indentedactionline.- 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, andVariableValue. Variable references update reactively; onlyVariableValuewrites back on drag.AnimatedValuedoes not animate changes over time. - Not supported:
DictValue,FieldValue,LocalVariableValue,ScreenVariableValue,AudioPositionValue,MixerValue,XScrollValue,YScrollValue, andPreference.
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-levelinput.ifblocks are also unsupported, exceptif 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.captionfor the button text andi.actionfor its action. Parameter and loop names are up to you. - The
forloop 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
itemsparameter and writemenu (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 anif) shows the dialogue text. Give its container a definite width so the text wraps.id "who"shows the speaker’s name, andid "window"takes the character’swindow_...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:
callforms that parse — the called label is not invoked. A plaincall helpercauses a parser error. Usejumpinstead.includeset(as a standalone statement)
Author watch-outs
Quick reference for the most common surprises:
callis unsupported — restructure subroutine flow aroundjump.returnjumps tolabel 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. foris unsupported, includingrange(min, max)— usewhile.- Nested collections (a list of lists, a dict of dicts) are rejected.
- Transitions use the names and durations listed above;
Dissolve(...)andFade(...)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
choiceandsayscreens are ignored inscreens.rpyorcommon.rpy. fadeoutonplayandon hideon a sprite’s ATL are dropped.definecalls are limited toCharacter,Position,Dissolve, andFade; other function calls are dropped.