Modding Tools > Lucas' Simpsons Hit & Run Mod Launcher > Hacks > Mod Requirable Hacks > Custom Files > Custom Lua Functions > All Functions

All Custom Lua Functions

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.

Learn more...

ComparePaths

Added in an unknown version.

Compares two paths.

Learn more...

Confirm

Added in an unknown version.

Shows a Windows message for debugging purposes with an "OK" button and a "Cancel" button.

Learn more...

DirectoryGetEntries

Added in an unknown version.

Iterates a directory using the specified callback until that callback no longer returns true.

Learn more...

DirectoryRecursiveCreate

Added in an unknown version.

Recursively creates directories with the given path.

Learn more...

Exists

Added in an unknown version.

Returns whether or not the specified path exists.

Learn more...

FixSlashes

Added in an unknown version.

Returns a version of the given path with modified slashes.

Learn more...

GetEnabledMods

Added in an unknown version.

Calls the given callback function for each mod that is enabled.

Learn more...

GetFileExtension

Added in an unknown version.

Returns the file extension of the specified path.

Learn more...

GetFileName

Added in an unknown version.

Returns the file name of the specified path including the extension.

Learn more...

GetLauncherVersion

Added in Version 1.19.

Returns the current version of the Mod Launcher.

Learn more...

GetMainMod

Added in Version 1.19.

Returns the name of the current main mod.

Learn more...

GetModName

Added in an unknown version.

Returns the InternalName of the current mod.

Learn more...

GetModPath

Added in an unknown version.

Returns the path to a mod within the Virtual File System.

Learn more...

GetModTitle

Added in an Version 1.22.

Returns the title of a mod.

Learn more...

GetModVersion

Added in an Version 1.22.

Returns the version of a mod.

Learn more...

GetPathParent

Added in an unknown version.

Returns the parent path of the specified file path.

Learn more...

GetSetting

Added in an unknown version.

Returns the value of a setting in a mod.

Learn more...

GetSettings

Added in Version 1.19.

Returns the values of all of the settings of the a mod as a table.

Learn more...

GetShared

Added in Version 1.23.10.

Returns a table that is shared by all mods.

Learn more...

GetTime

Added in an unknown version.

Returns the amount of seconds the game has been running for.

Learn more...

IsDemo

Added in Version 1.23.10.

Returns true if the user is playing the Demo version of the game.

Learn more...

IsHackLoaded

Added in Version 1.15.2.

Returns whether or not a hack is loaded.

Learn more...

IsLegacyOutput

Added in Version 1.23.9.

Detects whether or not the -legacyoutput command line argument is in use.

Learn more...

IsModEnabled

Added in an unknown version.

Returns whether or not a mod, mod hack or framework is enabled.

Learn more...

IsTesting

Added in Version 1.19.

Returns whether or not the user is currently using the -testing command line argument on the Mod Launcher.

Learn more...

Pause

Added in Version 1.23.10.

Pauses the console and prompts the user to "Press any key to continue...".

Learn more...

ReadFile

Added in an unknown version.

Read a file at the given path.

Learn more...

ReadFileOffset

Added in Version 1.24.

Read part of a file at the given path.

Learn more...

RemoveFileExtension

Added in an unknown version.

Returns the given file path or file name without the file extension.

Learn more...

WildcardMatch

Added in an unknown version.

Compare text using a wildcard.

Learn more...

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.

Learn more...

IsWriting

Added in an unknown version.

Returns whether or not the game is requesting the file in order to write to it.

Learn more...

Output

Added in an unknown version.

Output data to a virtual file.

Learn more...

Redirect

Added in an unknown version.

Redirect the file being requested to a different path.

Learn more...

UseCallbacks

Added in Version 1.19.

Builds a file as the game requests it using callback functions.

Learn more...

Donut Team © 2024 · v4.0