Repository navigation
Core Module
STBrian edited this page Nov 9, 2026
·
10 revisions
The Core module contains functions that interact directly with the console, memory, filesystem, or with LunaCore internals.
| Debug | Logging, error handling, and notifications |
| Filesystem | SD card and extdata file/directory operations |
| Keyboard | Software keyboard dialogs for strings, numbers, hex, and lists |
| Memory | Process memory reading, writing, dynamic allocation, and native calling |
| Menu | CTRPluginFramework in-game menu folders and entries integration |
| System | System hardware state, 3D slider position, and Unix time |
| Core._VERSION | LunaCore runtime version string |
| Core.getModpath | Returns the root directory path of a registered mod |
| Core.getCurrentModname | Returns the name of the mod currently being loaded |
| Core.getTitleId | Returns the active 3DS Title ID as a hexadecimal string |
Returns the current LunaCore version string.
Core._VERSION: stringReturns the absolute path corresponding to a registered mod name, or nil if not registered.
Core.getModpath(modname: string) -> string?local modPath = Core.getModpath("my_mod")
if modPath then
Core.Debug.log("Mod located at: " .. modPath)
endReturns the name of the mod that is currently executing its load script.
Core.getCurrentModname() -> stringReturns the title ID of the currently running application formatted as a hexadecimal string.
Core.getTitleId() -> string