[1.0.9.9] New files imported in FrontEnd only loaded once and unloaded on return to main menu ?

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
11,581
Location
France
Trying to implement this method for mods compatibility, it seems that new files (ie not replacing a game's file) imported in <FrontEndActions> are only accessible for inclusion in a replacement of a game's file when the application is launched.

When starting a game then going back to the main menu, those new files are not included again.

Example:

End of a modded AdvancedSetup.lua imported in <FrontEndActions>
Code:
-- Mod Compatibility <<<<<
print("Including AdvancedSetup_* files...")
include("AdvancedSetup_", true);
-- Mod Compatibility >>>>>
Initialize();

Beginning of AdvancedSetup_YnAMP.lua imported in <FrontEndActions>
Code:
print ("loading AdvancedSetup Add-on for Yet (not) Another Maps Pack...")

lua.log when going into the setup screen after launching the civ exe
Code:
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
AdvancedSetup: loading AdvancedSetup with include for mods... (from Yet (not) Another Maps Pack)
AdvancedSetup: Including AdvancedSetup_* files...
AdvancedSetup: loading AdvancedSetup Add-on for Yet (not) Another Maps Pack...
AdvancedSetup: There are 6 participating players.

lua.log when going back to the setup screen after having started a game then quitting to main menu:
Code:
JoiningRoom: OnFinishedGameplayContentConfigure() g_waitingForContentConfigure=true
AdvancedSetup: loading AdvancedSetup with include for mods... (from Yet (not) Another Maps Pack)
AdvancedSetup: Including AdvancedSetup_* files...
AdvancedSetup: There are 6 participating players.
 
Tested again today, imported file in <FrontEnd> is still unloaded when launching a game then going back to the setup menu, but... if you import it also in <InGameActions>, it's then available and included when going back to the setup screen !

Not sure which one is a feature and which one is a bug here...
 
Top Bottom