Wow, somehow I missed this hint. Going to delete all the print statements in the mods I have used, as I am experiencing an annoying lag at the beginning of AI turns.
Just to confirm - whit will it do exactly to the mods?![]()
It won't do anything to the mods functionality beyond preventing them from sending dozens of lines of code to your lua.log file.
I'm rather slightly annoyed the mod makers didn't think to do it themselves- it's a bit sloppy, as none of the regular Civs produce console print statements, and it's not really useful unless you're parsing for bugs. Nonetheless, here's how I went about it:
1. Get Notepad++
2. Search for *.lua in your mods folder to bring up all lua files
3. Open them all simultaneously
4. ctrl+f and go to replace tab
5. Replace 'print' with '--print' and 'logger' with '--logger'. Use replace all in open documents
Now this may temporarily break certain mods, particularly if they have print or logger statements that occur in the middle of a line rather than the beginning. To fix this, I loaded up Civ and just let it dump all the run-time errors into lua.log, and then manually fixed them myself. This usually involved simply moving the '--' to the beginning of the line. The other common issue is dprint statements. The find and replace will change them to d--print, so do a replace d--print with --dprint in all documents. There were only 3 or 4 occurances of this in my entire 60+ civ mod-pack; I saved far more time by doing it this way rather than manually replacing every print and logger statement.
For the record, this is for performance tuning. This will not fix your modpack if you are crashing or encountering errors. What it will do is boost your performance and lower your per-turn wait times, and significantly reduce the occurance of re-sync events in multiplayer. So it's only recommended you do this after you've fine tuned your modpack and parsed it for runtime/syntax errors.