How to deactivate display of military units in enemy cities?

alaska_hal

Chieftain
Joined
Aug 17, 2006
Messages
6
Hi,
i would like to deactivate the funktion of seeing all military units in an enemy city by mouse over.
Does anybody know where and how to deactivate this?
 
If you mean the popup info pane on mouseover, you'll have to change the sdk. In CvGameTextMgr.cpp, look for this function:

Code:
void CvGameTextMgr::setPlotListHelp(CvWString &szString, CvPlot* pPlot, bool bOneLine, bool bShort)
{
	CvUnit* pLoopUnit;
	bool bFirst;
	int iI;

	bFirst = true;

	[B]CvCity* pCity = pPlot->getPlotCity();
	if (pCity && (pCity->getOwner() != GC.getGameINLINE().getActivePlayer() ) ){
		return;
	}[/B]

	for (iI = 0; iI < pPlot->getNumUnits() && iI < 20; iI++)
	{
		pLoopUnit = gDLL->getInterfaceIFace()->getInterfacePlotUnit(pPlot, iI);

		if (pLoopUnit != NULL)
		{
			if (!bFirst)
			{
				szString+= NEWLINE;
			}
			setUnitHelp(szString, pLoopUnit, bOneLine, bShort);
			bFirst = false;
		}
	}

	if ( iI == 20 )
	{
		szString+= NEWLINE;
		szString+=L"...";
	}
}

The emboldened code is what I added as an example for how to do this. I haven't tested this, but hopefully it gives you an idea of what needs to be done. Basically, it checks if the active player (the player who is controlling the interface) is the owner of the city, and if it isn't, will not go through and list all of the units. You could further change this to just apply to enemies or other fun things.
 
@The Great Apple:
No, i mean, that it ist gerenraly impossilbe to see, what and how many military units are in a City.
@Gerikes:
hmm, i think, this will only change the Interface. It was my fault, I explained imprecise what I want and Why.
Like in real war (and older Civ), the force level should not be easy known for the enemy (of course, also not for the Computerplayer). The reason is, that I want to play without always having a big offensive Army and hustle to and fro , for preventing the Computer to pass my well defenced front Citys and attack my outback.
This ist one of the Things i hate on Civ 4. Normaly, Information, deception and well positioning ist an importand part of Strategy, but if everybody always know, where the biggest forces are concentrated, this makes no sense.
 
alaska_hal said:
@The Great Apple:
No, i mean, that it ist gerenraly impossilbe to see, what and how many military units are in a City.
@Gerikes:
hmm, i think, this will only change the Interface. It was my fault, I explained imprecise what I want and Why.
Like in real war (and older Civ), the force level should not be easy known for the enemy (of course, also not for the Computerplayer). The reason is, that I want to play without always having a big offensive Army and hustle to and fro , for preventing the Computer to pass my well defenced front Citys and attack my outback.
This ist one of the Things i hate on Civ 4. Normaly, Information, deception and well positioning ist an importand part of Strategy, but if everybody always know, where the biggest forces are concentrated, this makes no sense.

Ah. Well, like in most mods, changing how the AI thinks takes a good deal of work and knowlege of how AI thinks. This one's no exception, and I would be hard pressed to find an easy answer.
 
@Gerikes
---like in most mods, changing how the AI thinks takes a good deal of work and knowlege of how AI thinks---

Oh yes, I belife, that this woud be a deep intervention into Programm. I think this would be beyound my abilities.
But it woud be enough, just to hide information of units positioned in the citys, to human and AI. I thougth, that may be this could be simple to change if there would be an xml file, where it is regulated. If this is controled otherwise, i have to accept (or play civ 3 aggain;-).
 
Back
Top Bottom