Skip to content

1.1 lua files and folders

Lothar Thole edited this page Aug 20, 2024 · 1 revision

Lua Files: Naming Conventions and Folder Structure



I would like to start with the absolute basics that do not contribute at all to the knowledge of programming:

Where do these scripts belong, where can I find them, how do I handle them as files?

Basically, all scripts must be located in a subdirectory named "scripts".

This directory is usually located on the data volume/"drive" named "NAND" or "RADIO" for transmitters with larger NAND storage, and on the SD card for transmitters with smaller NAND, such as the X20/X20S.

(For the former, the user can decide whether to offload the scripts to the SD card.)

Lua scripts are identified by the suffix ".lua" (uncompiled) or ".luac" (compiled).

A simple script that exists solely as a single file can be placed directly in the "/scripts" folder with a freely chosen filename.

Alternatively, a subfolder can be created, but then the file MUST be named "main.lua" or "main.luac"!

I generally recommend the subfolder variant for the sake of clarity.

The folder should be given a clearly identifiable name.



image

As always, it is important to adhere to naming conventions for Ethos (pay attention to maximum file length, special characters, etc.).

Clone this wiki locally