API:ModulesLoadFromListFile
From RoR Wiki
UI Lua API · Module functions
Version: WAR 1.4.8
Loads the definitions of the UI modules listed in a text file.
ModulesLoadFromListFile(listFilePath, moduleType, allowLooseFiles)
Arguments
- listFilePath
wstring– Path of the list file. It must be a wide string (L"...").- moduleType
number– ASystemData.UiModuleTypevalue from 1 to 5. Every listed module is given this type.- allowLooseFiles
boolean–false: the list file must be inside the game archives.true: the client first looks for it on disk and then in the archives.
Returns
Nothing.
Details
- The stock list file
interface/default/EADefaultMods.txtcontains one.modpath per line, for exampleinterface/default\EASystem_DialogManager\EASystem_DialogManager.mod. - The modules are only registered with the client. Call ModulesInitializeAllEnabled afterwards to run them.
allowLooseFilesis also passed on to the loader. The stock UI passesIsInternalBuild(), which is alwaysfalse.allowLooseFilesmust be a real boolean, andlistFilePatha wide string, or an Invalid Parameters error is raised.
Errors
These are written to the UI log; the call returns normally.
Error in function call 'ModulesLoadFromListFile': file %ls does not exist.Error in function call 'ModulesLoadFromListFile': Module Type %d is invalid.
Example
From interfacecore/interfacecore.lua:
ModulesLoadFromListFile( SystemData.Directories.DefaultInterface..L"/EADefaultMods.txt", SystemData.UiModuleType.DEFAULT_INGAME, IsInternalBuild() ) ModulesLoadFromListFile( L"interface/MythicApprovedAddOns/MythicApprovedMods.txt", SystemData.UiModuleType.MYTHIC_APPROVED_ADDON, IsInternalBuild() )
