MyopicCat
Chieftain
- Joined
- Jan 6, 2014
- Messages
- 73
Disclaimer: I'm a complete newbie (in both Civ modding and Lua), so please go easy on me.
I've created an XML mod that adds new difficulty levels, and I want them to show up on the basic game setup screen. Not entirely trivial, because by default they only show up on advanced setup.
I've looked through the Lua code in \Assets\UI\FrontEnd\GameSetup, and I think I've found the problem. SelectDifficulty.lua only populates the difficulty list once. So I modified the code slightly to repopulate the difficulty list when the AfterModsActivate event fires.
For some reason, my mod doesn't work. Since I can't find my diagnostic messages in the log files, I suspect my Lua code isn't even running. I've just copied the existing SelectDifficulty.lua to my mod, changed it, flipped the "import into VFS" flag to true and thought that it would replace the existing file automatically. Is this assumption wrong? Can anyone see why my code isn't working?
I've created an XML mod that adds new difficulty levels, and I want them to show up on the basic game setup screen. Not entirely trivial, because by default they only show up on advanced setup.
I've looked through the Lua code in \Assets\UI\FrontEnd\GameSetup, and I think I've found the problem. SelectDifficulty.lua only populates the difficulty list once. So I modified the code slightly to repopulate the difficulty list when the AfterModsActivate event fires.
For some reason, my mod doesn't work. Since I can't find my diagnostic messages in the log files, I suspect my Lua code isn't even running. I've just copied the existing SelectDifficulty.lua to my mod, changed it, flipped the "import into VFS" flag to true and thought that it would replace the existing file automatically. Is this assumption wrong? Can anyone see why my code isn't working?