LunaDLL Autocode

WARNING: Autocode is OUTDATED!!!
Autocode is Outdated, NEVER use it!!

For SMBX2: See the document page for LunaLua.
For TheXTech: Please wait for LUA script system support.


LunaScriptLogo.png

LunaDLL Autocode is the language used by LunaDLL to execute simple commands. These commands are written in an "assembly-like" language and saved in a file "lunadll.txt" located in the level folder, and "lunaworld.txt" for the episode folder, and also saves the file in the main projects folder "lunaglobal.txt" which executes these codes in every level. Autocode is not Turing complete language and lacks many generic and common features.

Since the 30th of January, it is now implemented in the latest Dev Build of TheXTech as a native part. The TheXTech's LunaScript is a minor and backward compatible dialect of the LunaDLL Autocode: it has minor functionality and syntax additions, but keeps full compatibility with almost all scripts initially made for the LunaDLL. The first stable release of TheXTech that introduces LunaDLL Autocode support is 1.3.6.

Here you can find information about

Differences of TheXTech implementation

  • The sub-system is called "LunaScript version 9" at TheXTech.
  • Doesn't require the installation: the sub-system is the native embedded part of the engine itself.
  • Can work on non-Windows operating systems and on non-x86 processors.
  • It doesn't provide direct memory access because of binary incompatibility. Instead, TheXTech has the abstract layer (called "memory emulator") that maps direct memory addresses at scripts into actual native fields of TheXTech with the proper raw type conversion. It won't cover all of SMBX's internals, except for well-known addresses used in released episodes.
  • Allows comments placed at the end of code lines.
  • Introduces some new commands such as OnEvent, CancelSMBXEvent, SFXPreLoad, etc.
  • SFX command is able to play more sound formats such as OGG, FLAC, MP3, VOC, etc.
  • LoadImage command is able to load PNG and GIF with native transparency and alpha-channel, and JPEG and BMP with a selected colour as a transparent.
  • Variables bank is no longer saving in the episode directory through LunaSavedVarsX.txt files. Instead, the variables bank is now written into SAVX gamesave file directly.
  • Death counter no longer works globally. Now, the death counter works for every episode per game save.
  • Has native UTF-8 support for filenames and string data.

Trivia

  • True Autocode is the name of a family of "simplified coding systems", later called programming languages, devised in the 1950s and 1960s for a series of digital computers at the Universities of Manchester, Cambridge and London. Kil didn't know that when gave a name for its scripting language in the original LunaDLL.