Command
include
include
Syntax
include "chapter2.vn" as chapter2;
Description
Inlines another script file at parse time and namespaces its labels with the alias (for example chapter2.start).
Use this to split large projects into multiple files without label collisions.
include must appear at the top of the file before any other commands. Alias is required.
Label resolution rules:
- Unqualified labels inside the included file are rewritten to
alias.label. - Use
::labelto jump to a root label in the main script. - Use
other.labelto jump to another namespace explicitly. - Character ids and
showtargets inside the included file are also namespaced toalias.<id>.
Simple meaning:
labelstays inside the included file.::labeljumps to the main script.
Example
include "chapter2.vn" as chapter2;
include "maps/town.vn" as town;