"%s1": How does this work and what does it do?

Reveilled

Warlord
Joined
Nov 6, 2005
Messages
283
I'm trying to modify Civ4DiplomacyText.xml in order that phrases like "Declare war on Isabella" become "Declare war on Spain", but while some texts have simple variables like "[OUR_NAME]" that can easily be changed to "[OUR_CIV_SHORT]", others have a value named "%s1" that I have little idea what to do with. So, what I'm wondering is if this is an XML variable I can easily edit or I'm going to have to learn Python to change this. Does anyone know how I can change this value so that it refers to the country rather than the leader?
 
%s1 I believe is telling you it's a string from the file. Some files have schemas that tell the python what data type it is. You might also see %d, and that would be an integer. Don't know if this is helpful to you though.
 
%s1_blah signifies a string being passed in from C++. The %s is the string part, the # is the variable order and the "_blah" is the name to help people in understanding what is being passed in.

If you want to change "Declare war on Isabella" to "Declare war on Spain" you'll need to look for a place where that might be passed in to the "Declare war on %s1_Leader" TXT_KEY. However, it's likely that is determined in the code and can't be changed.
 
Top Bottom