There's an important change to the template that will impact anyone who downloaded a version in November 2020 or later. I'm pretty sure this applies to
@civ2units , and it may apply to others.
In the version I shipped, I wanted to make it optional to have certain files. Since the 'require' function causes an error if the file is missing, I used pcall(require,"moduleName") instead, since pcall suppresses errors, and instead just returns a boolean.
I recently realised that this is a problem, however, because if the file is there, but loading it causes an error, instead of telling you about the error, Lua will just act as if the file wasn't found at all. This will make debugging much more frustrating and difficult.
If you're not sure if your scenario is affected, open events.lua and do a search for 'pcall'. You will find numerous lines similar to
Code:
local fileFound,prefix = pcall(require,fileName)
local fileFound, prefix = pcall(require,"recentFeature"..tostring(fileNumber))
pcall(require,"customMusicIntegration")
If you're not sure, send me a copy of your events.lua, and I'll be able to tell.
If you haven't done too much work on your scenario, download the latest version of the template, and copy over what you have done to the new version. If you've already done a lot of work, or aren't comfortable moving the code, send me a copy of your scenario and I'll make the changes line by line.