LightEditor.exe
New ScriptProject -> Settings, then update Start Script to the filepath of your new script~bg0 id0 bg/street_bg_noon.png | .fadein id0 300
script /Plugins/lvui/_system/macros.txt // macros
~textbox_bottom
"This is my project!
~cg0 id1 scg2.png 310 125 80 | zoom id1 100% | .fadein id1 300
You only need to know the following as a developer.
Folders
Data for all your project dataSaveData save dataScreenshots screenshotsFiles
LightApp.exe the game applicationLightEditor.exe the editorLightTests.exe application to test your environmentsettings.xml game settingsYou can safely ignore all other folders + files.
ctrl + f find and replacectrl + c ctrl + v copy pastectrl + z undotab shift + tab indent, reverse indentWhen first using Light.vn, I'd recommend first learning how to navigate the editor: LightEditor.exe.
I recommend the following steps:
start0.txt)Scripts tabF5 to start test play.F5 again to return to edit mode.
Slam F5 back and forth until you get a good feel for this back and forth.
Double clicking on any command in the script will bring up the Commands tab.
The syntax for each command is displayed like the following:
cg [name] [filename / animation name] [x] [y] [layer] (camera_option)
[] are compulsory inputs() are optional inputsThus resulting in being able to write both:
cg alice2 alice.png 150 30 50cg alice2 alice.png 150 30 50 on_cameraCommand insertion buttons exist on the left (blue) to accelerate common use cases.
The command will insert at the location of the current script cursor.
The current script cursor location can be found using the Scripts tab in the editor. (pink)
When in test play mode, the line auto updates to the current line that's been executed, so you can also know what's currently being executed.
Light.vn commands, are for example:
fadein title_bg0 1500
Commands tab with the syntax and usage info.Dialogue, is any part of the script that is highlighted completely in Blue.
It is started by the following commands:
"-"All lines after are treated as a dialogue section.
To transition back to a Light.vn command section, start a new line with a ~
Macros, are created through ex. commandMacro or macro command.
You know it's a macro by:
If the macro was registered through commandMacro, double clicking on it will take you to the Macros tab, which should also make it clear that it is a macro.
A macro is basically a find and replace: replacing any match of source with changed result.
The function of a macro is usually an encapsulation of a Light.vn command, to prevent needing to write out the same long command(s) - thus just a convenience feature.
Some examples can be found in: /Plugins/lvui/_system/macros.txt
2 main things to remember:
wait command
continueRead command.Thus you'll see continueRead bound to a bunch of keyDown commands inside ex. /Plugins/lvui/_system/keys.txt:
such that when a particular key is pressed, the script will continue to read.
(note: /Plugins/lvui/_system/keys.tx is called within /Plugins/lvui/_system/textbox.txt
which is why when calling the default textbox, key bindings come for free)
PRO Tip: if your script isn't continuing, you've likely forgotten to bind continueRead to a keyDown command.
(or just add script /Plugins/lvui/_system/keys.txt keybind_continueRead in the problem location)
You can check key bindings in the Key Triggers tab in the editor.
A script reads top to bottom.
There are 2 main commands that can change that:
jumpscriptjump
script
Scripts tab.script_fin command),We can see the script stack increasing by ex.
start0.txt)/Plugins/lvui/_system/menu.txt) (script stack increase 1 => 2)/Plugins/lvui/_system/config-system.txt) (script stack increase 2 => 3)We know which script a particular script in the stack came from by looking at the ID tab.
0 (from: n/a): n/a, thus this script has no source, which is right.1 (from: 0): thus we know this script was called by the script with ID: 07 (from: 1): thus we know this script was called by the script with ID: 1Which would match our understanding with how the scripts were called in order.
And then in reverse order,
Thus coming back to start0.txt line: 211, which is the location we started from.
(and can now continue)
From the sections above, you can start to understand how user choices are created in Light.vn.
wait preventContinueRead
continueRead (bound to ex. keyDown) from unlocking the wait state and further parsingjump is attached to the user choice buttons
jump command activatesResult: the user is forced to make a choice (button click) to continue
By default, objects with higher layers (r values) appear higher than those with lower values.
Objects with the same layer value, have no guarantee as to what appears before the other. (may even change mid game!)
You can check object layer values in the editor Objects tab:
Can be done through Project -> Publish
Reminders
SaveData and Screenshots folders should you test play before publishing your game to users.Q. Can I delete LightTests.exe from the published game?
LightTests.exe is Light.vn's method of checking whether the player has all the necessary settings to properly run your game.
"Did LightTests.exe run fine?"Starting Light.vn 16.7, if you need to load a new version of any resource (text file, image, etc.),
you can click
Project -> Reload Resources
and we'll fetch the updated copy.