Why do some mods have longer loading times between turns?

mirrutatep

Chieftain
Joined
Dec 1, 2024
Messages
6
I am developing a mod and I'm encountering an issue with the game taking so long between turns around 500-600AD that it freezes and becomes unplayable. I've already been tweaking some things in recent iterations based on some common suggestions I am reading on forum pages such as:
-lowering map size to reduce number of cities
-limiting buildings that boost production to reduce number of units
-I installed the C3X patch mainly to make the game more efficient at computing trade routes in later turns

Despite these changes I am still experiencing the slowdown. We'll refer to it as "Mod A" from now on. Comparing Mod A to older mod I have, known as "Mod B", I can't figure out what else could be behind the slowdown. In Mod B I am able to get deeper into the tech tree without having a slowdown at all...

Mod A has more possible units to build, a few new buildings/wonders, and some new strategic and luxury resources. Mod A has an expanded tech tree to about 33 techs per era. I am getting stuck in Mod A at around 160 turns in (early Industrial era), whereas in Mod B I have a game at about 120 turns (early modern era) in without any slowdown. This is despite playing on a smaller map than Mod B. Mod A is played with 31 civs on 223x223. Mod B's map is massive, with so much land that the tundra is unsettled due to reaching the city limit. The Mod B save file is also in the modern age, with factories in most cities, with ~100 shields per turn being the norm. The cities in mod A are generating far fewer shields per turn, so for most civs that would mean less units. If Mod A has slower production (less units) and a smaller map (less cities), then why is operating so much less efficiently in the later game? The naval units in Mod A have a few additional movement points (up to 10 moves for Galleons for example) Could this be overburdening the late game in calculating AI move possibilities in open sea?

One thing to note about both Mod A and Mod B is both games have plenty of active war between the AI civs.

I am not sure what is behind the slowdown if I have been keeping number of units and cities in check for Mod A. Is it the number of turns I have played? Did the games of Mod A have the chance to accumulate more units for all AI civs, therefore having more units than the Mod B game despite having slower production per city? I find this hard to believe but I am not sure what else could be behind this. Could it be related to the number of techs? The added resources complicating trade calculation? What should I tweak for another iteration of Mod A?
 
Last edited:
I noticed the same phenomenon and my guess is the following: These slowdowns (I never had freezes here) could be triggered by diplomatic negotiations between AI civs. The calculation of the tradenet is one fact, but the diplomatic actions of the AI civs (per example what goods may be traded on the tradenet) are another fact. In my private gameplay of the current CCM succession game on a 250 x 250 map with raisen movement rates for ships I noticed that phenomenon again when several backward AI civs came into contact. The higher movement rates of ships in my eyes here are not the direct problem, but the diplomatic calculations when AI civs come into contact could be the real reason.

Here are links to posts about that problem in the C3X thread:

https://forums.civfanatics.com/thre...rd-and-much-more.666881/page-87#post-16544800
https://forums.civfanatics.com/thre...rd-and-much-more.666881/page-87#post-16545906
https://forums.civfanatics.com/thre...rd-and-much-more.666881/page-87#post-16545947
 
Last edited:
Interesting, so you think maybe having the strategic and luxury resources maxed out in my newer mod may be behind it? I could definitely explore toggling a few of them off and making them into just bonus resources. I was quite baffled how it could slow down so much in Mod A despite the fact that there's only 14 civs remaining in my current save file of Mod A whereas my save file of Mod B is running smoothly with 25+ civs in the modern era. Thanks!
 
I mean all sorts of diplomatic negotiations and spying actions, not only trading goods and maps. In one of the links above, the appearance of protection pacts caused significant longer interturn times. On island maps the time of interturns seems to explode when more civs come into contact. In SOE the first two turns are lasting much longer than the following turns, so the following turns have much more combat.

In my eyes the movment of thousands of units is the most time consuming part - and here the naval movement of escorting ships thanks to the findings of Flintlock, is a special time consuming part: The main naval power AI routine calls out eight times to a method that searches for a unit to escort. As an aside, the reason there are eight different calls is because the unit runs searches with different and loosening parameters. For example it searches first for a transport to escort then, if it doesn't find one, a carrier. It searches first for a unit that's the same speed or slower than it is, and if it doesn't find one, it searches again for one that's faster, etc.

https://forums.civfanatics.com/thre...rd-and-much-more.666881/page-98#post-16597885
 
Last edited:
So would this be addressed if I went into the C3X config settings and set "dont_escort_unflagged_units" to true rather than false? I plan to try that out and see what happens

I am also going to reduce the maximum number of AI escorts from 3 to 2 per unit but that might not have any effect if I implement the change above...
 
So would this be addressed if I went into the C3X config settings and set "dont_escort_unflagged_units" to true rather than false? I plan to try that out and see what happens
This was just my plan, too, but with the addition that the transport ships as a unit should be added with an escorting warship, so they have the defense values as if they would be escorted (Convoy unit). Unfortunately the units that I had planned to use for this task had severe graphical problems.
https://forums.civfanatics.com/thre...rd-and-much-more.666881/page-98#post-16597943
error-convoy-jpg.667085


I am also going to reduce the maximum number of AI escorts from 3 to 2 per unit but that might not have any effect if I implement the change above...
I have done this, too, but it had no significant influence in reducing the interturn times.
 
Last edited:
If I implemented the change to "dont_escort_unflagged_units" in the C3X config settings, would that affect existing save files? I changed it to true and loaded my problematic save file and I still had the game freeze on me when I clicked "end turn". Or do I need to start up a new game entirely and play until I get to the same point to see if it has the intended effect?

I may fire up a new game regardless to test out what would happen if I changed some luxury resources to be bonus resources to see if that unclogs some trade decision time.

I was thinking about your idea that the arrival of Mutual Protection Pacts slowing down the interturn and that does seem plausible for "Mod A" I referenced in my initial post because it is indeed slowing down around the time where some civs are unlocking MPPs but in my save file of "Mod B" I am in the Modern era so most/all civs have long unlocked MPPs and have been using them yet there is no slowdown whatsoever
 
For Mod A, I decided to gift starting techs to all civs (I initially had them all starting the game with no techs discovered yet)

I am testing my theory of number of turns played leading to too many units being built. In theory, I should be able to at least get a little deeper into the era before I experience interturn slowness if I jump-start all of the civs with a few free techs

I have not successfully been able to figure out how to identify the total number of units for all civs for each of the save files. I tried messing around with the Civ3 Multi Tool to see the units each civ has but I can't see the quantity of each unit unless I could somehow manually count them (I'd rather not do that for hundreds of units lol)
 
If I implemented the change to "dont_escort_unflagged_units" in the C3X config settings, would that affect existing save files?
According to the C3X instructions, changes in the config file should affect the future gameplay by using the changed parameters even during a game.
 
That's what I thought, but I was almost certain that fixing this escort issue would help me get through the AI turn freezing. Perhaps it has a positive effect but not enough in this case. Something else must be jamming it up. Back to the drawing board unfortunately!
 
It seems to be a combination of all the factors I posted above. For me the result isn´t a freeze but interturn times of 15-20 minutes.
 
Top Bottom