Game refuses to "see" new diplo text

Lemon Merchant

Not Quite Sonic
Retired Moderator
Joined
Jun 27, 2008
Messages
8,773
Location
Red Sector A
Hello, fellow modders. :)

I'm having a problem with some add on packs for BAT 4.1. They are new leaders and civs, and all of the leaders have unique first contact diplo text. The problem is that the game refuses to see it and use it. BAT uses Willowmound's Actual Quotes (in the Modules folder), and those work just fine, but any other diplo text in the Modules folder is ignored.

I've copied the proper schema and diplo text XML files into the add on folders. Everything looks right, but it won't work. The game gets all of the art and units, etc. from the sub folders, but ignores the diplo text.

I'm baffled and nearly tearing out my hair over this. Has anyone run into this before? It's probably something silly and simple, but I have no idea what to do. If anyone has any ideas, I would appreciate a little help. :crazyeye:

Thank you.
 
You may need to check the CvGameTextMgr C++ code to make sure it is looking for the correct tags and possibly update it to correctly find and use the new tags.
 
The DiplomacyInfos.xml cannot be done modular.
Or is the problem only with the text XMLs?
Actual Quotes uses DiplomacyInfos.xml and it seems to work. The game reads all of the other text from the files for the 'pedia, just not any diplo text.

You may need to check the CvGameTextMgr C++ code to make sure it is looking for the correct tags and possibly update it to correctly find and use the new tags.
I'm using the standard BTS tags, nothing special. That shouldn't need extra C++ code, should it?
 
I've run into the exact same problem. I also copied any new leader diplomacy to the xml file where the actual quotes is located.

However like you the game just won't read it. I'm thinking it may be the new civilizations, which are modular. Not sure which xml controls this though.
 
:hmm: I'm not sure if that is a problem, never really dealt with modules. Might be worth testing with a single module :dunno:.

Actual Quotes uses DiplomacyInfos.xml and it seems to work. The game reads all of the other text from the files for the 'pedia, just not any diplo text.

Means the leaders tell you TXT_KEY_NEW_GREETING, or whatever, right?

I'm using the standard BTS tags, nothing special. That shouldn't need extra C++ code, should it?

Right.
 
:hmm: I'm not sure if that is a problem, never really dealt with modules. Might be worth testing with a single module :dunno:.



Means the leaders tell you TXT_KEY_NEW_GREETING, or whatever, right?

Yup. This would be an example:
Code:
<DiplomacyText>
        <Text>AI_DIPLO_FIRST_CONTACT_LEADER_FRANKLIN_ROOSEVELT_1</Text>
	<Text>AI_DIPLO_FIRST_CONTACT_LEADER_FRANKLIN_ROOSEVELT_2</Text>
	<Text>AI_DIPLO_FIRST_CONTACT_LEADER_FRANKLIN_ROOSEVELT_3</Text>
</DiplomacyText>

I've checked all of my code and it seems to be in order. I'm almost about to give up on this. Other people can make it work. Why can't I? :(
 
What is the name of the file you have the translations for the text in?

Unlike for the regular XML\Text folder (where you can name it anything you want) this file in a module folder needs to have a specific name format, like:
SomethingOrOther_CIV4GameText.xml
 
What is the name of the file you have the translations for the text in?
Grace_Omalley_CIV4GameText.xml
Macha_Mong_Ruad_CIV4GameText.xml
Collins_CIV4GameText.xml
Ireland_CIV4GameText.xml

They're all Irish leaders, but none of the other civs that I'm using work either.

Unlike for the regular XML\Text folder (where you can name it anything you want) this file in a module folder needs to have a specific name format, like:
SomethingOrOther_CIV4GameText.xml
I double checked and they all have that format, but no success. :(

Should the CIV4DiplomacyInfos.xml file have Ireland prepended to it as well?
 
Should the CIV4DiplomacyInfos.xml file have Ireland prepended to it as well?

All of the examples I have looked at (not a lot) have all of the non-shcema XML files using the same prefix for each group of them. The schema files are named whatever it says they are in the header of the relevant XML data files, which brings up the question as to whether or not you have the game info schema the diplomacy info file is looking for in the folder too. It should be in the same folder.

All I know about this is what I can see in various mods like Caveman 2 Cosmos and Quot Capita. "They work so do what they do" is about all the advice I can give.
 
Well, I was able to get it to work with one leader by doing what G-E said. Unfortunately, I can't get it to work with any of the others doing exactly the same thing.

I'll keep trying... :crazyeye:
 
Well, I was able to get it to work with one leader by doing what G-E said. Unfortunately, I can't get it to work with any of the others doing exactly the same thing.

I'll keep trying... :crazyeye:

I blame it on them being Irish. They are a contentious lot. And that's not even counting the Leprechauns.
 
I blame it on them being Irish. They are a contentious lot. And that's not even counting the Leprechauns.

Yes, we are contentious, but it's mostly we women-folk that are responsible for that.
 
I don't do modular mods so this may be of no relevance
but should the text file not be called SomethingOrOther_CIV4GameText_DiplomacyText_BTS.xml?
rather than SomethingOrOther_CIV4GameText.xml.

For my leaders I add the greetings to CIV4GameText_DiplomacyText_BTS.xml in the Text folder
and as you said, do the CIV4DiplomacyInfos.xml in the GameInfo folder, works fine.
 
Can you zip your mod to see it, please ?
 
I've done it that way before and it works, but since these will be add ons to the BAT Mod, I don't want to alter the core mod files in case the user wants to remove an expansion pack.

That's my reason for going modular. :)

Can you zip your mod to see it, please ?
Yes. I'll try to post it later tonight.
 
I've done it that way before and it works, but since these will be add ons to the BAT Mod, I don't want to alter the core mod files in case the user wants to remove an expansion pack.

That's my reason for going modular. :)
right right got ya, no problem, though I didn't mean you shouldn't do it modular.
Just meant maybe the file name should be Grace_Omalley_CIV4GameText_DiplomacyText_BTS.xml. Good luck with it so.
 
Just meant maybe the file name should be Grace_Omalley_CIV4GameText_DiplomacyText_BTS.xml. Good luck with it so.
Thanks. I tried your suggestion too, with no luck.

I'm uploading the XML only, the mod is too big to zip and post. I've looked at the XML until I'm almost purple, but I can't find an error. Grace O'Malley works fine, but Boru, Collins, Niall, and Ruad do not. I took the file formats and schema from Quot Capita, and those seem to work fine. I'm losing something in the translation, I think, but I can't figure it out.

Any help is appreciated.


View attachment XML.zip
 
I'm not sure about it, but...
normally, the modular files need also their respective schema files in the same directory, and these schema files have to be referenced in the header.
In your case, are all these files in one folder? Because all the DiplomacyInfos.xml reference to the default CIV4GameInfoSchema.xml, and not to their possibly respective own ones.
That might explain why only 1 of them works, because the parser might be confused and somehow override some connections, and you either get only the first or last valid leader in the loading list.

But like said, I'm not sure, and I've never worked modular.
 
When I made modular CIV4DiplomacyInfos.xml files with custom first contact text I first thought that I succeeded since the new leader showed this first contact text. However, some time later I noticed that all the other leaders had no greeting text anymore, so I removed the modular CIV4DiplomacyInfos.xml again from my leaders.

My theory is that the last loaded CIV4DiplomacyInfos.xml overwrites the other files, but only the defined type. So for example this one:
Code:
<?xml version="1.0"?>
<!-- -->
<!-- Sid Meier's Civilization 4 - Beyond the Sword -->
<!-- Diplomacy Infos -->
<!-- Modified for Quot Capita by AbsintheRed -->
<!-- -->
<Civ4DiplomacyInfos xmlns="x-schema:CIV4GameInfoSchema.xml">
	<DiplomacyInfos>
		<DiplomacyInfo>
			<Type>AI_DIPLOCOMMENT_FIRST_CONTACT</Type>
			<Responses>
				<Response>
					<Civilizations/>
					<Leaders>
						<Leader>
							<LeaderType>LEADER_BORU</LeaderType>
							<bLeaderType>1</bLeaderType>
						</Leader>
					</Leaders>
					<Attitudes/>
					<DiplomacyPowers/>
					<DiplomacyText>
						<Text>AI_DIPLO_FIRST_CONTACT_LEADER_BORU_1</Text>
					</DiplomacyText>
				</Response>	
			</Responses>
		</DiplomacyInfo>
	</DiplomacyInfos>
</Civ4DiplomacyInfos>
should remove all other first contact text, but should leave stuff like refuse to talk or no peace alone.

A solution should be to use Willowmound's Actual Quotes CIV4DiplomacyInfos.xml as the modular file and add all the new leaders entries to that file. Not the most elegant way, but it might work.
 
Back
Top Bottom