Anyone has experience with unique unit names?

MatteM

Prince
Joined
Sep 7, 2015
Messages
319
Location
Stockholm
Good evening.

Well I'm making a big mod with lot's of unique unit (will post it when a first releas is done), one thought I had for when there is time is to add unique unit names, say I have a list of historical British Frigates, and want to have them in game for historical immersion, is there any way to add the names directly into unitinfo- xml rather than making a single entry for every name in the text-xml? The XML-reference seem to hint at that possibility?
 
Do you want your units to behave like great people? Because it sounds like that's the same functionality (a list of predefined names that are randomly chosen for a unit type).

In that case, you can use the UniqueNames entry in the unit XML. Simply look up one of the great people units to see how it works.
 
Here is a mod that has a TON of unique names, just be careful not to use it totally because it very very old, just look at it and see how things are done is all:

http://forums.civfanatics.com/showthread.php?t=138477

If u look at its 1st page about 2/3 way down it even says it changes a lot of units to unique names, hope this helps . . .
 
[...] is there any way to add the names directly into unitinfo- xml rather than making a single entry for every name in the text-xml? The XML-reference seem to hint at that possibility?

If it's also part of your question, yes, you can type the name directly in the UniqueNames of the UnitInfos file, no need to go through a TXT_KEY_.

TXT files are for texts that need a translation.
 
If it's also part of your question, yes, you can type the name directly in the UniqueNames of the UnitInfos file, no need to go through a TXT_KEY_.

TXT files are for texts that need a translation.

Thanks! That was What I was looking for, any insight in how to wright the list of names?

Could it look something like this:

<UniqueNames>
Ship 1
Ship 2
Ship 3
Ship 4
Ship 5
</UniqueNames>

Or do they have to be separated by comma or something?
 
Thanks! That was What I was looking for, any insight in how to wright the list of names?

Could it look something like this:

<UniqueNames>
Ship 1
Ship 2
Ship 3
Ship 4
Ship 5
</UniqueNames>

Or do they have to be separated by comma or something?
Each entry is enclosed in its own <UniqueName></UniqueName> tag, see the unique great scientist names for instance:
Code:
			<UniqueNames>
				<UniqueName>TXT_KEY_GREAT_PERSON_MERIT_PTAH</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_XI_LING_SHI</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_NABU_RIMANNI</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_SOCRATES</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_PLATO</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ARISTOTLE</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_EUCLID</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_PTOLEMY</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_HYPATIA</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ZU_CHONGZHI</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ARYABHATA</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_AL_KINDI</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_AL_KHWARIZMI</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_AL_RAZI</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ALHAZEN</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_NICOLAUS_COPERNICUS</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_FRANCIS_BACON</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_TYCHO_BRAHE</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_JOHANNES_KEPLER</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ISAAC_NEWTON</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_GALILEO_GALILEI</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_RENE_DESCARTES</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ANTONY_VAN_LEEUWENHOEK</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_GOTTFRIED_LEIBNIZ</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_MIKHAIL_LOMONOSOV</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ANTOINE_LAURENT_lAVOISIER</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_CARL_FRIEDRICH_GAUSS</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_JOHN_DALTON</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_MICHAEL_FARADAY</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_JAMES_CLERK_MAXWELL</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_LOUIS_PASTEUR</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_CHARLES_DARWIN</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ERNEST_RUTHERFORD</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_MARIE_CURIE</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ALBERT_EINSTEIN</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_NIELS_BOHR</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_WERNER_HEISENBERG</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ENRICO_FERMI</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ROSALIND_FRANKLIN</UniqueName>
				<UniqueName>TXT_KEY_GREAT_PERSON_ANDREI_SAKHAROV</UniqueName>
			</UniqueNames>
Don't worry about the fact that these are not the names that show up in the game and instead those text keys, that's only for translation purposes. You can also put in the name directly and it will work.
 
Back
Top Bottom