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

arcvoodal

Chieftain
Joined
Jan 14, 2009
Messages
30
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)
 

f1rpo

plastics
Joined
May 22, 2014
Messages
1,260
Location
Germany
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;	
}
 

arcvoodal

Chieftain
Joined
Jan 14, 2009
Messages
30
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
 

f1rpo

plastics
Joined
May 22, 2014
Messages
1,260
Location
Germany
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 IncreaseUserVa, a. k. a. 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 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.
 
Top Bottom