Unit Names Question

Hammurabi II

Warlord
Joined
Dec 13, 2001
Messages
216
Location
Ohio
Hi I have a quick question for any modders out there. How would one go about changing the name of a unit created, such as instead of "Archer" to - for example - "1st German Archer" or "1st German Archer Division" or something? I thought the Unit Statistics mod had something like this before, such as "Archer 1" or something along those lines, but I can't find it now. If anyone could offer some help I'd really appreciate it! :) Thanks!
 
In the UnitInfo.xml there is a tag for Unique Names. For you UU, you can have a list of unique names to give it. Then, whenever a new one is created it will apply those names in sequence.

But the Archer is a general unit, used by all. If you gave them unique names, then *all* archers (for all civs) would use them when created.

You can click on a unit when it is created to give them a name of your choosing.
 
Hammurabi II said:
I thought the Unit Statistics mod had something like this before, such as "Archer 1" or something along those lines, but I can't find it now. If anyone could offer some help I'd really appreciate it! :) Thanks!
I haven't downloaded the most recent version of Unit Statistics mod but version 1.40 has an option for this in the Config.ini file. If you open the ini file with notepad and scroll down to the botom it should be under the #####Unit Naming##### section.
 
Wyz_sub10 said:
In the UnitInfo.xml there is a tag for Unique Names. For you UU, you can have a list of unique names to give it. Then, whenever a new one is created it will apply those names in sequence.

But the Archer is a general unit, used by all. If you gave them unique names, then *all* archers (for all civs) would use them when created.

You can click on a unit when it is created to give them a name of your choosing.


Sorry I wasn't very specific, I didn't mean changing the name of the unit in general, I meant setting it up so each unit would have a unique name, such as "1st...2nd...3rd...etc German Archer". Each different Archer, or Warrior, or Rifleman, or whatever unit type, would have a name saying it is the <number (like 1st 2nd 3rd)> <nationality> <unit type> <generic name like division, fleet>. I'm sure this is possible, and I initially tried to write something up in Python that would do it, but had no luck. :(
 
Hammurabi II said:
Sorry I wasn't very specific, I didn't mean changing the name of the unit in general, I meant setting it up so each unit would have a unique name, such as "1st...2nd...3rd...etc German Archer". Each different Archer, or Warrior, or Rifleman, or whatever unit type, would have a name saying it is the <number (like 1st 2nd 3rd)> <nationality> <unit type> <generic name like division, fleet>. I'm sure this is possible, and I initially tried to write something up in Python that would do it, but had no luck. :(

That's what I meant too. :) The Unique Names tag in the XML allows this - each new archer would have a unique name.

Here's my Canada Mod entry for the Canada Corp unique unit:

<UnitInfo>
<Class>UNITCLASS_INFANTRY</Class>
<Type>UNIT_CANADACORPS</Type>
<UniqueNames>
<UniqueName>Princess Patricia's</UniqueName>
<UniqueName>Ontario Regiment</UniqueName>
<UniqueName>Western Canada Cavalry</UniqueName>
<UniqueName>Fort Garry Horse</UniqueName>
<UniqueName>The Black Devils</UniqueName>
<UniqueName>Royal Highlanders Black Watch</UniqueName>
<UniqueName>Fighting Van Doos</UniqueName>
<UniqueName>Victoria Rifles</UniqueName>
<UniqueName>Tobin's Tigers</UniqueName>
<UniqueName>Cameron Highlanders</UniqueName>
<UniqueName>Edmonton Overseas</UniqueName>
<UniqueName>Western Scots</UniqueName>
<UniqueName>Seaforth Highlanders</UniqueName>
<UniqueName>Fusillier du Mont-Royal</UniqueName>
<UniqueName>Queen's Own Rifles</UniqueName>...

My point was that this naming is applied to the unit type, irrespective of civ. So you could set up Archers to be called "1st German Archer," etc. But then all civs in the game would use this list (i.e. England's Archers would be called "1st German Archer", etc. In the above example, I use Canada Corps - which no civ has access to but the Canadians. But if I used this list for regular Infantry, then ALL civs would be using the list to name their units. So the Russians might create Western Canada Cavalry.

Know what I mean? But Amra refers to a mod that may be what you need.
 
Back
Top Bottom