Hi everyone,
new version inbound. This version fixes the crashes and some other bugs that occurred in 4.17. Also, Community Patch and Multiplayer now work again. The AI handling of enemy submarines and the AI behavior when fleeing from danger have been improved, and improvements have also been made to AI trade route scoring.
This version introduces popup warning messages that are shown when an error in the game logic is detected. These warnings will help us fix some bugs we weren't able to find the exact cause of yet. If you encounter a warning message, please report it on github. In multiplayer, the warning messages are shown in the chat and not in a popup window.
Severe logic errors that will lead to corrupted save games or cause otherwise undefined or gamebreaking behavior will cause a CTD. Less severe logic errors will allow you to continue the game.
With this message system, sudden CTDs without a prior warning should be very rare from now on, although they might still occur occasionally. As before, if you encounter a reproducible CTD please report it on github. The irregular CTDs caused by memory issues won't trigger a warning message.
Thanks to @azum4roll, @ilteroi, and @KungCheops for their contributions, and in particular JohnsterID for implementing message boxes.
Link to the installer:
Full changelog:
Online as of 8:39 AM CDT on January 6. Not savegame compatible.
Version 4.18.1 has been released. Link above has been updated.
Changelog:
Online as of 5:40 PM CDT on January 6, compatible with 4.18 savegames.
---
Version 4.18.2 has been released. Link above has been updated.
Changelog:
Online as of 5:50 PM CDT on January 11, compatible with 4.18 savegames.
---
Version 4.18.3 has been released. Link above has been updated.
Changelog:
With the new error messages exposing longstanding issues, we're starting to, as @Stalker0 once put it, "remove a lot of bad, buggy code and replace it with the good stuff."
Online as of 7:02 PM CDT on January 15. Savegame compatible with 4.18 versions.
---
Version 4.18.4 has been released. Link above has been updated.
Changelog:
Online as of January 21, 4:46 AM CDT, savegame compatible with 4.18 versions.
new version inbound. This version fixes the crashes and some other bugs that occurred in 4.17. Also, Community Patch and Multiplayer now work again. The AI handling of enemy submarines and the AI behavior when fleeing from danger have been improved, and improvements have also been made to AI trade route scoring.
This version introduces popup warning messages that are shown when an error in the game logic is detected. These warnings will help us fix some bugs we weren't able to find the exact cause of yet. If you encounter a warning message, please report it on github. In multiplayer, the warning messages are shown in the chat and not in a popup window.
Severe logic errors that will lead to corrupted save games or cause otherwise undefined or gamebreaking behavior will cause a CTD. Less severe logic errors will allow you to continue the game.
With this message system, sudden CTDs without a prior warning should be very rare from now on, although they might still occur occasionally. As before, if you encounter a reproducible CTD please report it on github. The irregular CTDs caused by memory issues won't trigger a warning message.
Thanks to @azum4roll, @ilteroi, and @KungCheops for their contributions, and in particular JohnsterID for implementing message boxes.
Link to the installer:
Full changelog:
Code:
Bug fixes:
- Fixed several CTDs from version 4.17
- Fixed a longstanding bug causing a CTD when obtaining the Archaeology technology in Ancient Era
- Fixed Community Patch not working
- Fixed multiplayer games crashing immediately after map generation
- Fixed a bug that allowed two units to heal on the same tile, violating 1UPT
- Fixed Genesis (Great Work of Writing) not being archaeology only as intended
- Made trade units immune to plot damage, such as fallout
- Made trade units immune to nukes if the owner controls Firaxite Materials (with a special exception if the nuke destroys the corporate HQ city in the same explosion)
AI improvements:
- Improved AI handling of enemy submarines (and invisible units in general)
- Improved AI logic when fleeing
- Improved AI trade route scoring
AI is now able to intentionally take advantage of invincible trade routes (Firaxite Materials)
AI more likely to send Trade Routes to civs it identifies as 'strategic trade partners' (Diplomacy AI)
Misc:
- Implemented warning messages when logic errors in the code occur and before crashes
- Removed non-functional game option "New Random Seed"
- Performance improvements
Modmodding/Coding:
- Added define ESPIONAGE_SPY_POINT_UNIT to modify the number of spy points granted (a value of x in database columns like Buildings.ExtraSpies, Era.SpiesGrantedForPlayer corresponds to
(x * ESPIONAGE_SPY_POINT_UNIT) spy points given to the player. used to be hard-coded x * 100)
- Implemented a remapping algorithm in the DLL, which changes the IDs of the rows in each database table to make sure they start at 0 and don't have any gaps. Gaps in the IDs of a table
could be caused by modmods that use SQL DELETE to remove rows, and they were a frequent cause of CTDs (and bad for performance at loops in the DLL or in lua also included the missing IDs).
Note: This will fix a lot of crashes that can't be easily reproduced, so it's a big stability improvement for modmod users in general
- For DLL developers: Warning messages can be triggered using
PRECONDITION(expression);
for severe errors that should cause a crash, and using
ASSERT(expression);
for less severe errors. The message will be shown if 'expression' evaluates to 'false'.
When using the debug configuration of the DLL, the message popup will contain additional debug information and allow you to break into the debugger.
Online as of 8:39 AM CDT on January 6. Not savegame compatible.
Version 4.18.1 has been released. Link above has been updated.
Changelog:
Code:
Fix CTD (Error message: "Expression 'i > -1', File 'CvImprovementClasses.cpp', Line 1749")
Online as of 5:40 PM CDT on January 6, compatible with 4.18 savegames.
---
Version 4.18.2 has been released. Link above has been updated.
Changelog:
Code:
- Fixed a CTD when the Aztecs found a religion (Message "BuildingTypes eIndex not expected to be NO_BUILDING" in CvBuildingClasses Line 5012)
- Fixed a CTD caused by a city-state declaring war on itself, which happened when a player got an SoI while being at war with the CS
(Message: "eTeam is not expected to be equal with GetID()" in CvTeam Line 1248)
- Fixed a CTD when a feature was created on a plot (Message "eIndex1 is expected to be non-negative" in CvPlayer Line 11308)
- Fixed a CTD caused by a 4UC bug (Message "ePlayer is expected to be within maximum bounds" in CvMinorCivAI Line 12012)
- Fixed a bug that caused bonus yields from city-states to be subtracted twice when a city-state was conquered, so cities had negative yields per turn from the CS
(Expression "GetBaseYieldRateFromCSFriendship(eIndex) > 0" in CvCity Line 25220)
- Fixed a bug in AI unit gifting logic (Expression "pUnit" in CvPlayer Line 36330)
- Fixed many other warning messages
- Fixed Germany UA giving 4 science per turn per CS ally instead of the intended 2 (fix doesn't apply to existing alliances in savegames)
- CP only: Fixed all Policies being available already in Ancient Era (you need to start a new game for this to apply)
- Fixed an EUI bug that allowed the player to change production of a city during an AI's turn (could be exploited for example by switching from a
Defense Process to a Building/Unit between the turn of the AI attacking the city and the player's turn)
Online as of 5:50 PM CDT on January 11, compatible with 4.18 savegames.
---
Version 4.18.3 has been released. Link above has been updated.
Changelog:
Code:
- Autosaves now occur after player 0's turn ends, but before the AI turns begin
Since many CTDs, questionable AI decisions, and other problems occur on other players' turns, this makes the process of uploading them easier for players (provided they have autosaves turned on)
It also makes debugging easier for devs since they don't have to make decisions for 40 units before hitting End Turn - which could also harm reproducability of an issue
Thanks for this, ilteroi!
- Numerous improvements to Tactical AI by ilteroi, aimed in part at fixing its passivity issues
Unified and simplified a large chunk of the combat simulator code
Fixed a bad bug in naval unit withdrawal code
AI less likely to be distracted by embarked units when there are bigger threats around
Improved handling of combo moves
Improved handling of situations with large numbers of units
Improved handling of civilian units
AI less likely to travel an unnecessarily large distance to heal wounded units
Increased AI willingness to make attacking moves
AI now trained to sacrifice some units to make a push forward in specific circumstances, favoring lower-XP ones
Various other improvements to corner cases
Fixed a merge issue that blocked AI from occasionally using air sweeps for recon
- Fixed a crash when a building class doesn't have a default building
- Fixed a crash when cancelling a trade route
- Fixed a crash when loading a game with the More Wonders modmod
- Removed a lot of unnecessary null checks
- Added some missing NO_* checks, asserts, or preconditions
- Simplified invested building cost so it bottoms at (production completed) + 1
Currently the lower bound is (production completed) + (1 turn of production)
- Changed ReplacementBuildingClass and unit upgrades to only update production queue when the building/unit is first in queue
Previously it updates the first building/unit in the queue regardless of position
This saves a tiny bit of turn processing time, and a lot of lines of code
- Allowed a player to be beaten to a World Wonder by multiple players, in case limit > 1
This affects the Diplomacy AI
Also removed the diplomatic impact of beating yourself to a wonder (with IGE), which hits an assert
- Removed arbitrary yield increase (worth 25 production) from being beaten to a World Wonder after investment
- Removed era scaling for wonder consolation (it's already scaling with cost)
- Fixed Gold still being given for wonder consolation when BALANCE_WONDER_BEATEN_CONSOLATION_PRIZE is 0
- Fixed Science consolation being turns of science instead of science points (seems immensely OP)
- Fixed Belief_BuildingClassHappiness not being scored for pantheons
- Fixed assert hit when Austria marries a City-State
- Also fixed AI not willing to improve tiles of CS that it plans to marry (gold isn't a factor for this consideration)
- Fixed an assert hit from adding an improvement that claims an unowned plot (e.g. Eki) to an unowned plot, without a builder specified.
- Also fixed assert hit from adding an improvement that may spawn a resource to an unowned plot
- Also fixed assert hit from adding an improvement that spawns an adjacent resource without a builder set (e.g. via IGE+)
It now does nothing if builder is NO_PLAYER, so IGE+ needs to be changed to accommodate
- Fixed false positive assert hit "City is NULL when checking if it is adjacent to a unit"
- Fixed an issue in CvCity::calculateInfluenceDistance()
- Fixed Lua warning
- Minor text fixes
- Added UI_DISPLAY_PRECISE_MOVEMENT_POINTS CustomModOption, which can be used to show the precise # of movement points a selected unit has left (not useful for the average player)
With the new error messages exposing longstanding issues, we're starting to, as @Stalker0 once put it, "remove a lot of bad, buggy code and replace it with the good stuff."

Online as of 7:02 PM CDT on January 15. Savegame compatible with 4.18 versions.
---
Version 4.18.4 has been released. Link above has been updated.
Changelog:
Code:
Fixed several crashes and warning messages
Fixed a bug in river generation introduced in 4.18.2
Fixed some cases of the AI not withdrawing units and evaluating danger properly
Fixed texture glitch for Ordo and Hacienda in DX9
Compressed some texture atlases, which makes the project ~25MB smaller and hopefully also reduces late game memory issues
AI recon units can now target non-resource improvements for hit-and-run attacks
Online as of January 21, 4:46 AM CDT, savegame compatible with 4.18 versions.
Last edited by a moderator: