Diplomacy question

megalink

Chieftain
Joined
Jan 4, 2010
Messages
5
I have extensively edited the XML of BTS to play the game a certain way that I like, but Ive came upon a problem thats part of the game and ruins the way i play the game. This has to do with the negative hit to relationships when "you've traded with our worst enemy!" since the way I play involves giving techs to every civ. at a certain period in the in-game year I get that penalty with all the civs even allies. I just want to know how can i completely eliminate that penalty changing a XML file. Ive been looking for a while and i cant really seem to find it, any help would be appreciated.
 
If I'm wrong someone correct me, but I don't think this is possible in XML. To do this you would have to edit the SDK. All it would take is to comment out one line, so it wouldn't be hard at all. If you don't know how to do this, you can check out this tutorial on setting up the SDK. To actually mod it, change this line in CvPlayerAI.cpp (line 4839) from:

Code:
iAttitude += AI_getRivalTradeAttitude(ePlayer);

to:

Code:
//iAttitude += AI_getRivalTradeAttitude(ePlayer);

This will remove the 'you have traded with our worst enemies' attitude modifier from the game. To actually remove the message from appearing in the diplo screen, remove this from CvGameTextMgr.cpp (lines 10717-10723):

Code:
iAttitudeChange = kPlayer.AI_getRivalTradeAttitude(eTargetPlayer);
		if ((iPass == 0) ? (iAttitudeChange > 0) : (iAttitudeChange < 0))
		{
			szTempBuffer.Format(SETCOLR L"%s" ENDCOLR, TEXT_COLOR((iAttitudeChange > 0) ? "COLOR_POSITIVE_TEXT" : "COLOR_NEGATIVE_TEXT"), gDLL->getText("TXT_KEY_MISC_ATTITUDE_RIVAL_TRADE", iAttitudeChange).GetCString());
			szBuffer.append(NEWLINE);
			szBuffer.append(szTempBuffer);
		}

Then compile your DLL, move it to yourmodname/Assets, and play!

Hope this helps
 
cheers I'm trying this now, but what if i dont have my own mod, where am i suppose to put the newly made DLL file?
 
cheers I'm trying this now, but what if i dont have my own mod, where am i suppose to put the newly made DLL file?

Do you mean you edited the XML of the original game? :eek: This is never a good idea. If this is what you did, however, you should put your .dll in Beyond the Sword\Assets (just make sure you keep the original CvGameCoreDLL.dll which should already be in that folder).
 
Do you mean you edited the XML of the original game? :eek: This is never a good idea. If this is what you did, however, you should put your .dll in Beyond the Sword\Assets (just make sure you keep the original CvGameCoreDLL.dll which should already be in that folder).

yup that is exactly what i did, i taught myself how to edit xml and what civ4 xml functions do i dont know about those dangers this is actually the first time i looked at a tutorial from here. Im also having problem with my visuals C++ program, every time i click to change something i.e. typing those // my computer goes into an infinite loop and blue screens.
 
Im also having problem with my visuals C++ program, every time i click to change something i.e. typing those // my computer goes into an infinite loop and blue screens.

I have no idea why it would be doing that. Perhaps you should post in the guide thread I gave you. Maybe the writer would have an idea.
 
finally got it to work dont know how though, four crashes then it gave up, maybe. your advice worked too thank you very much for your help :goodjob:
 
Back
Top Bottom