C3X: Executable Mod for Civ 3 Complete
Release 4
INCLUDES (* = new in latest version):
* Detailed city production info
* Option to limit railroad movement
* Removed unit limit
Stack bombard
Disorder warning
Bugs fixed:
- AI pathfinding collides with invisible units (called the "submarine bug")
- Science age beakers not actually awarded
- Pink line in Civilopedia
Option to prevent autoraze and razing by AIs
Stealth attack activates even when there's only one target
INSTALLATION AND USAGE:
Begin by extracting the mod and copying its folder into the Civ install directory (that is, the folder containing Civ3Conquests.exe). Then activate the mod by double-clicking the INSTALL.bat or RUN.bat scripts. INSTALL.bat will install the mod into Civ3Conquests.exe, RUN.bat will launch Civ 3 then apply the mod to the program in memory. The mod's behavior is highly adjustible by editing a text configuration file. It is named "default.c3x_config.ini".
Notes about installation:
1. When installing, the original executable will be copied over to "Civ3Conquests-Unmodded.exe".
2. To uninstall the mod, delete the modded executable then rename the backed up version mentioned above to "Civ3Conquests.exe".
3. It is not necessary to uninstall the mod before installing a different version; the installer knows to check for the backed up EXE.
4. Even after installation, the mod still depends on some files in the mod folder, specifically the config file and the Art & Text folders (which you must NOT merge into the game's main folders or you'll break your install).
5. I've received multiple reports that RUN.bat doesn't work while installing does, so know that installation is the more reliable option.
COMPATIBILITY:
The mod is only officially compatible with the GOG and Steam versions of Civ 3 Complete. It may be compatible with other versions if they use the same executable as one of those two. Multiplayer is untested.
STACK BOMBARD:
Activate stack bombard on any unit capable of bombarding by clicking the stack bombard button or by activating normal bombard then CTRL+clicking the target tile. The selected unit will bombard the tile, then all other units of the same type on the same tile will automatically bombard the target as well. Stack bombard is pretty smart and will stop bombarding once it can no longer do any damage, and it knows about lethal bombard, that you can't damage air units in an airfield, etc.
DISORDER WARNING:
If you try to end the turn with unhappy cities, the domestic advisor will pop up to warn you and give you the option to continue that turn. One minor annoyance is that the game does not recompute city happiness when you sign a deal to import a luxury, so doing so won't remove the warnings. To make the game recompute city happiness, simply bump the luxury slider back and forth. I hope to fix this annoyance for the next version (this time for sure).
LIMITED RAILROAD MOVEMENT:
The mod adds the option to limit railroad movement to a certain number of tiles. To enable this, edit the config file. The limitation works like in Civ 4 in that it applies the same limit to all units regardless of how many movement points they have. Be advised, because this setting affects how movement is calculated, changing it in the middle of a turn (i.e. after some units have already moved) is likely to cause units to have extra or missing moves.
NO-RAZE:
NoRaze has been re-implemented inside C3X but is not enabled by default. To enable it, edit the config file mentioned above.
HOW IT WORKS:
Some parts of the mod (bug fixes, no-raze, no unit limit) are really just hex edits that are applied to the Civ program code. The real secret sauce is a system to compile and inject arbitrary C code into the process which makes it practical to implement new features in the game. The heart of the system is TCC (Tiny C Compiler) and much work puzzling out the functions and structs inside the executable (and thanks to Antal1987 for figuring out most of the structs years before I came along).
The injected code, along with the rest of the mod, is fully open source. If you're curious how stack bombard was implemented, check out "patch_Main_Screen_Form_perform_action_on_tile" in "injected_code.c", I assure you the code is quite readable.
MORE INFO, QUESTIONS, COMMENTS:
See my thread on CivFanatics:
https://forums.civfanatics.com/threads/sub-bug-fix-and-other-adventures-in-exe-modding.666881/
SPECIAL THANKS:
1. Antal1987 for his work reverse engineering Civ3. See:
https://github.com/Antal1987/C3CPatchFramework
2. Rômulo Prado for his help testing the mod