LiminaliaLiminalia
Migration guide: Moving from Ren'Py

Migration guide

Moving from Ren'Py

Ren'Py .rpy files can be imported by converting labels, dialogue, choices, conditional branches, variables, background and sprite display, and sound to .lim. Each .rpy file becomes one .lim file, and labels are shared across files.

How to import

To bring in a whole folder, use the command. Run it in the folder of the project you're importing into.

lim import-renpy ../my_renpy_game/game/
  • The name in define e = Character("Name") is added to cast.json as a speaker.
  • People shown with show are added to cast.json as characters.
  • The images and sounds the script uses are copied from game/images, game/audio and so on to the project's assets (backgrounds to bgimage, sprites to fgimage, music to bgm and sound effects to sound). The report lists each Ren'Py name and where it was copied. To skip copying, add --no-assets.
  • Translations in translate blocks under game/tl/ become translation files such as lang/en.json, and the language is added to languages in liminalia.json.
  • The results are written to renpy-import-report.md (in Japanese).

For a single file, you can also use Import text in Studio (Import in Studio). Choose Ren'Py as the format, or drop the .rpy file in. In Studio, people shown with show aren't added automatically, so add the names shown in the right pane on the Characters screen.

Side-by-side table

These are real results of converting with lim import-renpy.

Ren'Py.lim
label start:# start
define a = Character("Akari") and a "Welcome back."Akari "Welcome back."
"Outside the window, it was raining."Outside the window, it was raining.
default trust = 0game.trust in variables in liminalia.json
persistent.clearedsystem.cleared
$ trust += 1@set game.trust += 1
"Visit number [trust]."Visit number {= game.trust}.
scene bg room and with fade@chara-hide-all and @bg "bg room.png" time=1s
show akari smile at left@chara akari smile at=auto
hide akari@chara-hide akari
play music "audio/main.ogg" fadein 1.0@bgm main.ogg time=1s
play sound, voice, stop music fadeout 2.0@se, @voice, @stop-bgm time=2s
pause 1.0, pause@wait 1s, @wait-click
jump go, call memo@jump #go, @call #memo
if, elif, else@if, @elif, @else, @end
{b}, {i}, {w} and {nw} in the text{b …}, {i …}, {click}, {noclick}
return in a label that isn't calledThe end of the story (by default @title-screen, which returns to the title screen)

menu: becomes @choice. The question becomes a line with {noclick}, which shows the choices without waiting for a click, and what follows each choice goes into a new label.

Ren'Py
menu:
    a "What should we do today?"
    "Go out":
        jump go
    "Stay home" if trust > 0:
        "We spent the day at home."
.lim
Akari "What should we do today?"{noclick}
@choice
  - Go out -> #go
  - Stay home -> #start-c2 if=(game.trust > 0)
@end

# start-c2
We spent the day at home.

Use --end to change what happens at the end of the story. Choose from title (the default), stop and return. The full list of conversions is in Ren'Py import in the technical docs.

What can't be imported, and what to use instead

The following aren't converted. They're kept in the .lim as comment lines and listed in the report.

Ren'PyWhat to use in Liminalia
python: blocks, and $ lines that aren't assignmentsMake project-specific behavior into plugin commands (Make your first command)
call screen, show screenFor screens where players choose something, use image choices in @choice or make them with a plugin
jump expressionBranch with @if for each destination and @jump
Label parametersPut the values in variables before @call, or make them parameters of a macro (@define)
in, //, ** and conditional expressionsRewrite them as Liminalia expressions (list of functions)

Settings such as define config.…, ATL in image, screen, transform, style and init python aren't converted. Recreate the look in Game settings in Studio, and the effects with Liminalia commands.

What to check after importing

  • Decide which file New Game starts from. The information section of the report shows which file has Ren'Py's label start, so set entry in liminalia.json to that file.
  • Match the image names. Backgrounds are referred to by their Ren'Py names, such as bg room.png, and sprites likewise, such as akari smile.png, so either put them under those names in bgimage and fgimage in assets, or rename them.
  • Decide positions. at left and at right become at=auto, which lines up the sprites on screen. Once you've set positions on the Characters screen, you can rewrite them as at=left and so on.
  • Check for errors on the Check screen in Studio or with lim check, and check the flow with the all-routes test and test play.