This page documents all the custom Lua functions provided by custom files.
General Functions
Alert
Added in an unknown version.
Shows a Windows message box for debugging purposes with an "OK" button.
ComparePaths
Added in an unknown version.
Compares two paths.
Confirm
Added in an unknown version.
Shows a Windows message for debugging purposes with an "OK" button and a "Cancel" button.
DirectoryGetEntries
Added in an unknown version.
Iterates a directory using the specified callback until that callback no longer returns true.
DirectoryRecursiveCreate
Added in an unknown version.
Recursively creates directories with the given path.
Exists
Added in an unknown version.
Returns whether or not the specified path exists.
FixSlashes
Added in an unknown version.
Returns a version of the given path with modified slashes.
GetEnabledMods
Added in an unknown version.
Calls the given callback function for each mod that is enabled.
GetFileExtension
Added in an unknown version.
Returns the file extension of the specified path.
GetFileName
Added in an unknown version.
Returns the file name of the specified path including the extension.
GetLauncherVersion
Added in Version 1.19.
Returns the current version of the Mod Launcher.
GetMainMod
Added in Version 1.19.
Returns the name of the current main mod.
GetModName
Added in an unknown version.
Returns the InternalName of the current mod.
GetModPath
Added in an unknown version.
Returns the path to a mod within the Virtual File System.
GetModTitle
Added in an Version 1.22.
Returns the title of a mod.
GetModVersion
Added in an Version 1.22.
Returns the version of a mod.
GetPathParent
Added in an unknown version.
Returns the parent path of the specified file path.
GetSetting
Added in an unknown version.
Returns the value of a setting in a mod.
GetSettings
Added in Version 1.19.
Returns the values of all of the settings of the a mod as a table.
GetShared
Added in Version 1.23.10.
Returns a table that is shared by all mods.
GetTime
Added in an unknown version.
Returns the amount of seconds the game has been running for.
IsDemo
Added in Version 1.23.10.
Returns true if the user is playing the Demo version of the game.
IsHackLoaded
Added in Version 1.15.2.
Returns whether or not a hack is loaded.
IsLegacyOutput
Added in Version 1.23.9.
Detects whether or not the -legacyoutput
command line argument is in use.
IsModEnabled
Added in an unknown version.
Returns whether or not a mod, mod hack or framework is enabled.
IsTesting
Added in Version 1.19.
Returns whether or not the user is currently using the -testing command line argument on the Mod Launcher.
Pause
Added in Version 1.23.10.
Pauses the console and prompts the user to "Press any key to continue...".
ReadFile
Added in an unknown version.
Read a file at the given path.
ReadFileOffset
Added in Version 1.24.
Read part of a file at the given path.
RemoveFileExtension
Added in an unknown version.
Returns the given file path or file name without the file extension.
WildcardMatch
Added in an unknown version.
Compare text using a wildcard.
Path Handler Functions
These functions can only be called with a Path Handler script.
GetPath
Added in an unknown version.
Returns the path of the file being requested.
IsWriting
Added in an unknown version.
Returns whether or not the game is requesting the file in order to write to it.
Output
Added in an unknown version.
Output data to a virtual file.
Redirect
Added in an unknown version.
Redirect the file being requested to a different path.
UseCallbacks
Added in Version 1.19.
Builds a file as the game requests it using callback functions.