Possible to have simultaneous turns enabled in a single player game? (eliminates waiting for AI turns)

arcvoodal

Chieftain
Joined
Jan 14, 2009
Messages
61
Using simultaneous turns on multiplayer with AIs only eliminates the need to wait for the AI turns (which can take like 1min in the very late game).

The civ mod I am playing (neoteric world) bugs-out when I play a multiplayer LAN game (tried with only AIs). So I was wondering if it is possible to somehow make simultaneous turns an option in single player?

As a side note: I think the AI air recon missions increases the wait time of turns. Is there a way to disable the AI from using air recon missions? (the AI has a big vision already anyway since they can see the distance all their units can move)
 
Not without the ability to recompile the mod's DLL. (And implementing simultaneous turns for SP sounds like a tough task in any case.)

Short of deleting a large number of AI units in WorldBuilder, I don't think there's any quick-and-dirty way to speed up AI turns. (Some mods have an option to "Minimize AI Turn Time", which suspends graphical updates in between turns, but I don't think Neoteric World has that, and the effect isn't great anyway.)

Disabling recon missions only for the AI also doesn't seem possible just through XML. I don't even see a clean way to disable them for everyone. If MISSION_RECON is removed from XML\Units\Civ4MissionInfos.xml, then the list of missions in the DLL (CvEnums.h) would probably have to be changed accordingly. Just for a test - to see whether air units actually affect performance much -, setting iAirRange to 0 for all air units in the mod's XML\Units\Civ4UnitInfos.xml should work. Well, can't rule out that it would cause a crash somewhere ... The Neoteric World code for air recon is probably as in BBAI; that doesn't look expensive to me; in particular, it involves no path finding (since air movement only deals with air distances).
Spoiler :
Source:
(actually the same as in unmodified BtS)
Code:
bool CvUnitAI::AI_exploreAir()
{
	PROFILE_FUNC();
	
	CvPlayer& kPlayer = GET_PLAYER(getOwnerINLINE());
	int iLoop;
	CvCity* pLoopCity;
	CvPlot* pBestPlot = NULL;
	int iBestValue = 0;
	
	for (int iI = 0; iI < MAX_PLAYERS; iI++)
	{
		if (GET_PLAYER((PlayerTypes)iI).isAlive() && !GET_PLAYER((PlayerTypes)iI).isBarbarian())
		{
			if (GET_PLAYER((PlayerTypes)iI).getTeam() != getTeam())
			{
				for (pLoopCity = GET_PLAYER((PlayerTypes)iI).firstCity(&iLoop); pLoopCity != NULL; pLoopCity = GET_PLAYER((PlayerTypes)iI).nextCity(&iLoop))
				{
					if (!pLoopCity->isVisible(getTeam(), false))
					{
						if (canReconAt(plot(), pLoopCity->getX_INLINE(), pLoopCity->getY_INLINE()))
						{
							int iValue = 1 + GC.getGame().getSorenRandNum(15, "AI explore air");
							if (isEnemy(GET_PLAYER((PlayerTypes)iI).getTeam()))
							{
								iValue += 10;
								iValue += std::min(10,  pLoopCity->area()->getNumAIUnits(getOwnerINLINE(), UNITAI_ATTACK_CITY));
								iValue += 10 * kPlayer.AI_plotTargetMissionAIs(pLoopCity->plot(), MISSIONAI_ASSAULT);
							}
							
							iValue *= plotDistance(getX_INLINE(), getY_INLINE(), pLoopCity->getX_INLINE(), pLoopCity->getY_INLINE());
							
							if (iValue > iBestValue)
							{
								iBestValue = iValue;
								pBestPlot = pLoopCity->plot();								
							}
						}
					}
				}
			}
		}
	}
	
	if (pBestPlot != NULL)
	{
		getGroup()->pushMission(MISSION_RECON, pBestPlot->getX(), pBestPlot->getY());
		return true;
	}
	
	return false;	
}
 
I found a post about a "3G switch". I herby confirm it makes a massive difference in reducing turn-times. I am on windows 10, 64bit. I typed this into cmd:
Code:
bcdedit /set IncreaseUserVa 3072

Enormous difference to turn times. However, I am speculating that the game might still go wonky on maps above standard size when playing many turns beyond 500-turns. I don't think that glitchyness is due to memory usage. But anyway, there is a way to massively reduce AI turn time :D
 
News to me. I had only known about making the BtS EXE large-address aware (LAA). Having searched the forum and web for "IncreaseUserVa", it looks like the official version of BtS 3.19 is actually already LAA (that's also what dumpbin.exe tells me), so patching the EXE for LAA is apparently snake oil at this point – good to know.

For the 3GB switch, the picture is less clear. I've found several posts on tech sites claiming that this is only relevant for 32-bit operating systems (and not for 32-bit executables run on a 64-bit OS):
An MS TechNet user said:
Oh - I understand now. As long at the application was compiled with the "IMAGE_FILE_LARGE_ADDRESS_AWARE" option, it will automatically take advantage of 4 GB of memory in 64-bit Windows (no need for /3GB switch); whereas in Windows 32-bit OS, you still need the "IMAGE_FILE_LARGE_ADDRESS_AWARE" option, but you also need to set the /3GB switch in the boot.ini.
(link) The official MS documentation cited in that thread is pretty clear in saying that the switch is "only applicable to 32 bit systems."
On a 32-bit OS, some also warn that the 3GB switch can cause system instability.

On the other hand, here is another report on CFC (edit: maybe the same one that you had found) of a very noticeable gain in speed. Perhaps this is actually the result of just having restarted Civ, which frees leaked or inefficiently allocated memory. On this note, several Realism Invictus players have recommended a tool named Process Lasso to, as far as I understand, get that same benefit without having to restart Civ.
 
Last edited:
Ah okay I will report back about game speeds after a few months of playing and have a feel for the late game beyond the one day of testing. But the test I did went from loading up a civ game, waiting 3-turns in a late-save game. Then enabling the 3g switch, then loading civ again, loading that same save, then doing 3 turns. They went from about 45-sec down to just 15-sec. I also noticed the interface and responsiveness of the UI felt smoother (I am using texture mods). I will experiment with these other suggestions too.

In the link you provided the one comment says "only problem is when I try to load a saved game from a running game. It crashes me to the desktop". I have had a similar problem for a long while. It freezes when trying to load a game while in another game (3g switch didn't fix this). I always exit to main menu and then load from there. Never had problems doing it that way so in my case I don't need to restart the whole game.
 
[...] the test I did went from loading up a civ game, waiting 3-turns in a late-save game. Then enabling the 3g switch, then loading civ again, loading that same save, then doing 3 turns. They went from about 45-sec down to just 15-sec.
Hrm, that test pretty much rules out my proposed alternative explanation. Supposedly, the 3G switch only takes effect after a reboot, but, who knows, maybe that only used to be the case on WinXP or so.
I have had a similar problem for a long while. It freezes when trying to load a game while in another game (3g switch didn't fix this). I always exit to main menu and then load from there. Never had problems doing it that way so in my case I don't need to restart the whole game.
Could be this issue, but, if it freezes permanently (well, can't be sure of that, but, let's say, for a very long time), then it's probably something else.
 
For the original question: You could start a LAN-Game with one human player to get the desired effect. I'm just unsure if this (multiplayer) setting somehow made the AI more passive.
 
Top Bottom