scripts/Custom are switched off (see custom scripts).
Reading a script
Open Game library, pick Data, and search forlua. Open the script’s LuaAsset document; its page has a Script tab. The tab shows the source file’s name, its number of lines and the source, read only, with your mod’s version once it has one.
Studio does not edit the source itself: edit it in a text editor.
Saving and replacing
1
Save it
On the Script tab, press Save as .lua….
2
Change it
Edit the file in any text editor.
3
Bring it back
Press Replace with a .lua file… and choose your file. The tab shows the new source, and the script is changed in your mod.
What a replacement must be
- UTF-8 text, at most 64 MB.
- No control characters other than tabs, line ends, form feeds and vertical tabs.
ShaderParams or CommonAssets. Your text cannot add or remove a binding: the script keeps the ones the game gave it.
On the command line
lua says where a game script’s source comes from and how long it is; it reads the game’s version only. import ... lua names the script by its LuaAsset document or its resource: they share one name. See the command line.