LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
291 stars 160 forks source link

Including InGame.lua breaks modpack #6334

Closed rikonen closed 4 years ago

rikonen commented 4 years ago

1. Mod version (i.e Date - 2/9):

3/1

2. Mod list (if using Vox Populi only, leave blank):

Default set that gets installed.

3. Error description:

When you create a modpack using the modpack creation tool, it creates a file named InGame.lua, which Civ core executes when starting up the game. The generated InGame.lua loads all the lua scripts that were defined in InGameUIAdding EntryPoints in modinfo files to make them work when using the modpack.

The inclusion of another file named InGame.lua under the modpack directory (in Community Patch/Core Files/CoreLua) causes Civ core to load the incorrect InGame.lua file, which does not load the additional lua modules. This causes things like event system, promotion tree, corporation info etc. not to work.

It's not clear if there's any reason for including InGame.lua under the mod. The commit that introduced it had no description. While the workaround for the problem is easy (manually delete the extra file), it would probably make sense to get rid of the file from the core distribution unless it is actually needed to make creating modpacks have fewer gotchas.

Disclaimer: I haven't created modpacks (or mods or anything) before so my understanding of how this works could be incorrect.

4. Steps to reproduce (optional):

Create new modpack and start new game using that. Observe promotion tree, corporation overview etc. to be gone, event actions not to work, and some other issues.

rikonen commented 2 years ago

This was closed but for the benefit of anyone happening to come across this ticket, this appears to be valid still. Just tested with version 2.6. I used the instructions in https://civ-5-cbp.fandom.com/wiki/Creating_a_Modpack to create a new modpack and event system was not working; when any event occurred clicking the action did nothing and game essentially stalled at that point. Deleting DLC\MP_MODSPACK\Mods\(1) Community Patch (v 109)\Core Files\CoreLua\InGame.lua, deleting everything under Documents\My Games\Sid Meier's Civilization 5\cache and restarting the game fixes the issue.