GameText Question

Wingmate

Commander
Joined
Aug 31, 2008
Messages
67
I would like to be able to change the text that appears when a civilization is destroyed to

"The endless thunder of (civ that destroys them adjective) troops have crushed the (whoever gets destroyeds civ adjective) into dust!!!"

but I cant find what to put for the civ that destroyes them I had this code

Code:
<TEXT>
		<Tag>TXT_KEY_MISC_CIV_DESTROYED</Tag>
		<English>The endless thunder of the [CT_CIV_ADJ] troops have crushed the %s1_CivAdj into dust!!!</English>
</TEXT>

that works fine for when you destroy someone in a single game but if someone else destroys on it will come up with your civs adjectvie same in multiplayer games the message always comes up with your civadj instead of who destroyed thems.
if someone could please get back to me on this I would appreciate it.
 
CT_CIV_ADJ calls up your own Civ adjective, so i'm not sure how. It's great though, and way better than the regular text.
 
It would be a slightly more complicated thing to set up unfortunately:

In CvPlayer.cpp you have the origin of the text call, during CvPlayer::setAlive(bool bNewValue)

Code:
					szBuffer = gDLL->getText("TXT_KEY_MISC_CIV_DESTROYED", getCivilizationAdjectiveKey());

Now the problem is that you don't know who killed you. So you need that information to have been provided to this function along with bNewValue. Searching for when the game runs setAlive(false), it only happens during CvPlayer::verifyAlive(), and that only happens during a check at the start of each turn.

So, the only way you could add the proper Civ name of who wiped them out would be if you create a new variable for CvPlayer which specifically tracks who killed you, and set the variable to hold the player number of the last person to kill one of your units (during CvUnit::kill you would have a line which sets the player getOwner() to store in their new variable the identity of ePlayer, as provided to ::kill function)
 
Back
Top Bottom