A little help with a text string in Civ4GameText_BTS.xml

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Hi

For a while I've had a message of an event that really bothers me. It's the one that tells you that a farm, mine, etc. has been destroyed by enemy infiltrators.

The thing is that it doesn't tell you where this has happened (as it does when a spy is caught near xxx). As I'm playing on large to huge maps it's hard to see the tine red dot on the mini map that shows the location of the event and scrolling though 30+ cities to evaluate nearby improvements is just irritating. :mad:

Therefore I thought I could modify the message found in Civ4GameText_BTS.xml. It goes:

A %s1_ThingName was destroyed by enemy infiltrators!

Inspired from other messages I tried changing it to :

A %s1_ThingName near %s2_CityName was destroyed by enemy infiltrators!

This however does not work and neither does anything else I tried. :(

Can anyone tell me if it's possible to modify the message so it tells me where the event has occurred and if so how it should go?

Any help would be very much appreciated!! :goodjob:

\Skodkim
 
The problem is that the tag you have added means nothing unless it's accompanied by a variable passed to it through Python or SDK. What you would have to do is change the function (no, unfortunately I don't know where it is) to find the nearest city and then output that to the text.
 
First of all thanks for the repply!!

Second I had a feeling it would be as hard as this. While I have some experience modding the xml files I have no idea whatsoever about what do do with the python files.

Anyway to me it seems like a really dumb thing: You're told the where enemy scouts are caught but not where one of your improvements are destroyed.

I can only hope I can persuade some friendly guy with python knowledge to "fix" this. :mischief:

\Skodkim
 
Actually I think I now know where to make the neccesary edits: \CvGameCoreDll\cvPlayer.cpp

I have no idea what to do but now it goes:

Spoiler :
// Destroy Improvement

if (kMission.isDestroyImprovement())
{
if (NULL != pPlot)
{
// Blow it up
if (pPlot->getImprovementType() != NO_IMPROVEMENT)
{
szBuffer = gDLL->getText("TXT_KEY_ESPIONAGE_TARGET_SOMETHING_DESTROYED", GC.getImprovementInfo(pPlot->getImprovementType()).getDescription()).GetCString();
pPlot->setImprovementType((ImprovementTypes)(GC.getImprovementInfo(pPlot->getImprovementType()).getImprovementPillage()));
bSomethingHappened = true;
}
else if (pPlot->getRouteType() != NO_ROUTE)
{
szBuffer = gDLL->getText("TXT_KEY_ESPIONAGE_TARGET_SOMETHING_DESTROYED", GC.getRouteInfo(pPlot->getRouteType()).getDescription()).GetCString();
pPlot->setRouteType(NO_ROUTE, true);
bSomethingHappened = true;
}

if (bSomethingHappened)
{
bShowExplosion = true;
}
}
}


\Skodkim
 
Back
Top Bottom