Split the script into several files
On this page
When the script gets long, splitting it into files by chapter or by day makes it easier to find your way around. You create files, add scenes and rename them in the scene list on the left of the “Script” screen. Here, as a continuation of the tutorial, you create a file for the second day and connect it from the end of start.lim.
The examples on this page use the project you make in the tutorial, “Shiori of the Library.” The background hill_morning.webp is from the sample assets (“Add sample assets” in the ”…” menu of the Assets screen adds it).
Create a new file
- Click “New file” at the bottom of the scene list.
- Type the file name (here,
day2) in the name field and press Enter. Don’t type the.limextension.

File names can use letters, digits, _ and -. Separate parts of the name with / to put the file in a folder (such as chapter1/day2).
The new file opens. It contains one scene with the same name as the file (# day2). Add backgrounds and narration as you did in the tutorial.
Add a scene
- In the scene list, click the ”+” to the right of the file name (or “Add a scene” in the right-click menu).
- Type the scene name (here,
night) and press Enter.

A # night label is added at the end of the file. In the scene list, each scene is shown with a small picture of its background and its first line of text. Click one to go to that scene.

Jump to another file
- In the scene list, click
start.limto open it, and select the last narration line (“On the way home, I walked…”). - Double-click “Jump” in the “Flow” section of the parts panel, change the input field to
@jump day2, and press Enter.

There are three ways to write a jump target.
| How to write it | Jump target |
|---|---|
#night | A label in the same file |
day2 | The start of that file |
day2#night | A label in that file |
When you play, the first line of day2.lim follows the last line of start.lim.
The game no longer reaches the lines after the jump (such as the @title-screen line added at the end in chapter 8 of the tutorial), so delete them if you don’t need them.

Rename a file
- In the scene list, right-click the file and click “Rename.”
- Type the new name (here,
chapter2) and press Enter.

When you rename a file, jump targets in other files that point to it are rewritten too (“Renamed (rewrote targets in 1 files)” appears at the bottom). The names of the labels in the file (# day2) don’t change.

The blocks of the file you had open may not show the change right away. If so, open another file in the scene list and then open this one again.
The same menu also has “Duplicate” and “Move to trash” for the file. The file where “New Game” starts (start.lim at first) can’t be moved to the trash.
Move a scene to another file
Right-click a scene in the scene list to see “Rename scene,” “Duplicate scene,” “Move to another file,” “Split the file from here” and “Delete scene.”
- Move to another file: Type the name of the destination file, and the scene moves to the end of that file. If there is no file with that name yet, a new file is created.
- Split the file from here: Moves everything from that scene to the end of the file into a new file.
Both rewrite the jump targets that point to the scene (@jump, @call, choices and so on) so that they point to the file it moved to.
In code
// End of start.lim
On the way home, I walked down the hill, holding the {= game.book} to my chest.
@jump chapter2
// chapter2.lim
# day2
@bg hill_morning.webp
The next morning, I put the book in my bag and climbed the hill again.
# night
That night, I opened the borrowed book to its first page.