If there are more codes than strings, this inserts blank strings to bring them to equal before adding our new codes Local X2AbilityTemplateManagerĚbilityTemplateManager ĪbilityTemplateManager = X2AbilityTemplateManager(class'Engine'.static.FindClassDefaultObject("XComGame.X2AbilityTemplateManager")) Var localized array NewAbilityAvailabilityStrings It can be useful to modify these arrays from code: Declare copies of the arrays in your own class, fill them in from your private configįiles, then copy them over at runtime (code simplified from Rising Tides: The Program): var config array NewAbilityAvailabilit圜odes
One example of this areĪbility availability codes – a config and a localized array that map a tactical condition error code to a user-displayed string. +VarName syntax to add to the array – and explicit indices would be incompatible with other mods. Some base-game config arrays use VarName=. This causes a bunch of issues in practice.
Config load order is rarely guaranteed and should not be relied on by mod authors.
Longest time, the Alternative Mod Launcher had offered a “load order” column that affected only the ActiveMods array.
Of course, the simple act of moving a workshop folder to the local mods folder (for local development or in order to prevent updates)Ī common misconception is that the order of the ActiveMods in XComModOptions.ini determines config load order. This does not mean mods uploaded later load later – in fact, mods with the IDs 20, 100 and 101 will be loaded in the orderġ00, 101, 20 due to how the lexicographic comparison of folder names works. In the workshop directory, these folder names correspond to the strictly monotonically increasing UGC (Steam user-generated content) IDs. Within these orders, mods are loaded alphabetically by their folder name. Order there determines whether workshop mods or local mods are loaded first! The game knows of the mod directories through a config array ModRootDirs in XComEngine.ini, and it turns out that the DLCs happen to be loaded after that, and then it’s mod directories. It is obvious that base-game config is loaded first.