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 tocast.jsonas a speaker. - People shown with
showare added tocast.jsonas characters. - The images and sounds the script uses are copied from
game/images,game/audioand so on to the project'sassets(backgrounds tobgimage, sprites tofgimage, music tobgmand sound effects tosound). The report lists each Ren'Py name and where it was copied. To skip copying, add--no-assets. - Translations in
translateblocks undergame/tl/become translation files such aslang/en.json, and the language is added tolanguagesinliminalia.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 = 0 | game.trust in variables in liminalia.json |
persistent.cleared | system.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 called | The 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.
menu:
a "What should we do today?"
"Go out":
jump go
"Stay home" if trust > 0:
"We spent the day at home."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'Py | What to use in Liminalia |
|---|---|
python: blocks, and $ lines that aren't assignments | Make project-specific behavior into plugin commands (Make your first command) |
call screen, show screen | For screens where players choose something, use image choices in @choice or make them with a plugin |
jump expression | Branch with @if for each destination and @jump |
| Label parameters | Put the values in variables before @call, or make them parameters of a macro (@define) |
in, //, ** and conditional expressions | Rewrite 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 setentryinliminalia.jsonto that file. - Match the image names. Backgrounds are referred to by their Ren'Py names, such as
bg room.png, and sprites likewise, such asakari smile.png, so either put them under those names inbgimageandfgimageinassets, or rename them. - Decide positions.
at leftandat rightbecomeat=auto, which lines up the sprites on screen. Once you've set positions on the Characters screen, you can rewrite them asat=leftand 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.