Re: Mod Concatenator (v1.0 15:52 GMT 05/12/18)
Here's a version that'll work just with a click, no python installation required.
It works differently than Duh102's version and I've seen load times almost halved when used.
The .zip only needs to be extracted into the same folder as Cortex Command, the same way you might with a .rte.
Download Here._________________________________________________________________
compile.exe - Compiles the code of each mod into one file with no comments or whitespace, decreasing load time. Can run the game after it finishes.
uncompile.exe - Conveniently uncompiles each mod, restoring them to their original state. Can run the game after it finishes.
benchmarker.exe - Will accurately measure the time it takes to load your current mods, and save a log file to the benchmarks subfolder. Use this to find out how much time you're saving by compiling! (Runs 5 times, and includes an average load time in the log)
_________________________________________________________________
compile.exe is intelligent and only does its thing when it has to; it'll skip up-to-date, already compiled mods. This means you can use it as a sort of launcher for the game, and it'll automatically make sure you're loading as fast as possible. Feel free to replace your Cortex Command shortcut with a shortcut to this exe.
Additionally, there's a file called CompileSettings.ini in the folder. This can be used to control aspects of compile.exe and uncompile.exe:
Code:
RECOMPILE - If this is True, already compiled mods will be recompiled. This is False by default, but you can turn it on if you want to test out how long it takes to compile all of your mods.
RECOMPILE_IF_ORIGINAL_MODIFIED - What it says on the tin. If this is set to True and the backup of the original Index.ini has been modified since the last compile, compile.exe will recognize it and recompile the code. True by default.
VERBOSE - 0 will show only critical information, 1 will show a bit more, 2 will show everything. 2 by default.
CONDENSE - Removes whitespace if True. True by default, but you can turn it off to potentially make the compiled code a little more readable. True is optimal for loading speed.
RUN_GAME - compile.exe and uncompile.exe will run Cortex Command after they finish if this is set to True. True by default.
CLOSE_DELAY - The time in seconds that compile.exe and uncompile.exe will wait after completion before they close. Set to 0 to get them out of your way, or set it to a high number to read at your own pace. 5 by default.
BLACKLIST - You can list rte names here. Listed rtes won't be compile, which is useful if you're working on a mod and you want the error messages to be meaningful. Names are comma separated, like so:
BLACKLIST = Base.rte,Coalition.rte
Python source files included.
Full release with all the trimmings on steam and mod releases section pending me remaining interested in this project. Let me know if you find any bugs.
If the compiler manages to break any of the mods somehow, delete the broken mod and reextract it from the steam workshop folder or have CC redownload it. If it's a base game rte, then try verifying the install through steam.
_________________________________________________________________
known issues: gdi.rte somehow manages to ruin everything. (????) and eventhorizon.rte breaks the comment handling code. All other mods I've tested seem to work fine, including every mod on the steam workshop. If you have these mods, or if any other mod breaks the compiler, add them to the blacklist.
With every mod on the steam workshop, my load times at 640x480 went from 43 seconds uncompiled to 32 seconds compiled. Each mod varies in how many lines of code it has, and how many files that code is in, and thus benefit to varying degrees from being compiled. Most large faction mods have their load times greatly improved by the compiler, while smaller mods blunt the effect.
For example, with just the base game and a couple faction mods (untitled, wh40k, saw) my load times at 640x480 went from 12 seconds to 7 seconds.
Higher resolutions definitely do increase load times, as Duh102 mentioned, because of flaws in CC's rendering. For me, load times at 1920x1080 are roughly tripled for both uncompiled and compiled.