Forum Mod Bakery Docs

How to setup LUA functionality for mission scripts.

Posted in Support
Please login to contribute to the conversation.
[deleted user]
6 yrs ago (Statistics)
LUA can enhance SHAR modding in more ways than one.

Lua Advantages

1. Loading Lua tables into mission scripts (randomizers, difficulty settings, etc).
2. Lua errors can be fixed while the game is running (some of the time)

Lua Prequisites

LUA Pack

How to use LUA in mfk, con, and spt files.

MFK.lua contains all the script functions for mfk, con, and spt. Just make sure you make the file extension .lua

Differences between mfk and lua.

In lua each line does not require a semi-colon.
LUA
MFK

LUA uses -- to comment out lines.
LUA uses \\ for file paths
LUA uses a separate folder defined in CustomFiles.lua

Is LUA for me?

If you want more functions than MFK like difficulty settings then yes.
But if you don't need those, I'd say no because it can be confusing for people new to mfk.

How to install to your mod


Credit
Donut Team - mfk.lua; CustomFiles.lua