View Full Version : Changing GP Born Text


deanej
Mar 07, 2008, 05:28 PM
For my Star Trek mod, I'm changing the GP text so that it says that a GP was born in a system and not a city. I managed to change the faraway land one properly, but how do I change the one for a known city? "City of" is returned as part of %s2_CityName; how do I change it from "the city of ___" to "the system of _____"?

deanej
Mar 11, 2008, 06:57 PM
Does anyone know? I'm trying to make my mod all nice and professional looking!

Shiggs713
Mar 12, 2008, 03:28 AM
I wish I could help you more on some of these Questions, deanej. If I figure any of them out, I'll be sure to let you know. ;)

perhaps the %s2_CityName is defined somewhere in the text files, and a simple change could be all you need... maybe?

you appear to know a great deal of modding, so I dunno, maybe you've already looked for that... just trying to help

Sto
Mar 12, 2008, 06:54 AM
For my Star Trek mod, I'm changing the GP text so that it says that a GP was born in a system and not a city. I managed to change the faraway land one properly, but how do I change the one for a known city? "City of" is returned as part of %s2_CityName; how do I change it from "the city of ___" to "the system of _____"?

I don't know how to change "the city of ___" to "the system of _____" , but you can simply change %s2_CityName by %s2 and add "the system of " in the text key !?

Tcho !

deanej
Mar 12, 2008, 04:33 PM
I don't know how to change "the city of ___" to "the system of _____" , but you can simply change %s2_CityName by %s2 and add "the system of " in the text key !?

Tcho !

How do I do that? I have no idea where %s2 is defined. And won't that make it say "the system of the city of"?

Sto
Mar 12, 2008, 04:48 PM
How do I do that? I have no idea where %s2 is defined. And won't that make it say "the system of the city of"?

<TEXT>
<Tag>TXT_KEY_MISC_GP_BORN</Tag>
<English>%s1_GPName has been born in %s2_CityName!</English>
</TEXT>


I think Civ4 normalize text string but i don't know where .

_ s specify that the argument is a string .
_ The number is the argument number . ie : when you call the translator the arguments are for an example ("TXT_KEY_SOMETHING", arg1, arg2) . But you can have different placements for this text in function of the language . For an example , "arg1 is born in arg2 " or "in the arg2 city , arg1 is born" .
_ _GPName and _CityName are the function to call for text normalization . _CityName makes return "The city of arg2" instead of "arg2"

So if you replace "%s2_CityName" by "the system of %s2" the text will not be formatted , and it just take the city name as argument .

Tcho !

PS : tested

deanej
Mar 12, 2008, 05:34 PM
Wow, I didn't know it doesn't need the _CityName part! Thanks.