Unit Naming by ruff_hi
Overview
This document explains the unit naming convention used in the BUG Mod. It documents what is meant to happen, not necessarily what actually happens. If you find a situation where this document differs from the unit name actually generated within the game, then please report it as a bug.
Unit Naming Convention
The following is the code that controls the name that your unit will have.
^civ4^ - no naming convention, uses standard civ4
^rd^ - random name
^rc^ - random civ related name
^ct^ - City
^cv^ - Civilization
^ut^ - unit (eg Archer)
^cb^ - combat type (Melee)
^dm^ - domain (Water)
^ld^ - leader
^cnt[f]^ - count across all units (increments based on unit)
^cntu[f]^ - count across same unit (increments based on unit)
^cntct[f]^ - count across same city (increments based on unit)
^cntuct[f]^ - count across same unit / city (increments based on unit)
^cntc[f]^ - count across same combat type (increments based on combat type)
^cntd[f]^ - count across same domain (increments based on domain)
^tt1[f][x:y]^ - total where the total is a random number between x and y (number)
^tt2[f][x]^ - total count (starts at x, incremented by 1 each time ^tt is reset to 1)
There are a number of number formats, as follows:
[f] can be either 's', 'A', 'a', 'p', 'g', 'n', 'o' or 'r' for ...
s - silent (not shown)
A - upper case alpha (A, B, C, D, ...)
a - lower case alpha (a, b, c, d, ...)
p - phonetic (alpha, bravo, Charlie, delta, echo, ...)
g - greek (alpha, beta, gamma, delta, epsilon, ...)
n - number
o - ordinal (1st, 2nd, 3rd, 4th, ...)
r - roman (I, IV, V, X, ...)
Some number formats have a built in max (i.e. alpha). In these situations, the numbering loops back to the start. For example, if you pass the number ‘30’ and ask for the number to be formatted with an ‘A’ (upper case alpha) then it will return ‘D’.
Sample Units
The best way to illustrate the naming convention is to work through some examples. I shall use the following units to set through these examples.
Scout built in Moscow
Worker built in Moscow
Galley built in Leeds
Bomber built in Leeds
Axeman built in Moscow
Swordsman built in Moscow
^civ4^ of ^ct^
This naming convention over-rides all other naming conventions because it includes the key ^civ4^. This signifies that the normal Civ4 name should be used. In other words, the unit’s name is not changed. Note, the “of ^ct^” part is ignored.
|
^civ4^ of ^ct^ |
||
|
Scout |
|
Scout |
|
Worker |
|
Worker |
|
Galley |
|
Galley |
|
Bomber |
|
Bomber |
|
Axeman |
|
Axeman |
|
Swordsman |
|
Swordsman |
^rd^ ^cv^ Army
This naming convention over-rides nearly all other naming conventions except the ^civ4^ naming convention because it includes the key ^rd^. This signifies that the unit should be given a totally random name. Note, the “^cv^ Army” part is ignored.
|
^rd^ ^cv^ Army |
||
|
Scout |
|
Who knows, it is random |
|
Worker |
|
Who knows, it is random |
|
Galley |
|
Who knows, it is random |
|
Bomber |
|
Who knows, it is random |
|
Axeman |
|
Who knows, it is random |
|
Swordsman |
|
Who knows, it is random |
^rc^
This naming convention over-rides nearly all other naming conventions except the ^civ4^ and ^rd^ naming convention because it includes the key ^rc^. This signifies that the unit should be given a totally random name that is civilization related.
|
^rc^ |
||
|
Scout |
|
Who knows, it is random |
|
Worker |
|
Who knows, it is random |
|
Galley |
|
Who knows, it is random |
|
Bomber |
|
Who knows, it is random |
|
Axeman |
|
Who knows, it is random |
|
Swordsman |
|
Who knows, it is random |
^ut^ [^cv^]
This naming convention is a straight swapping code. The ^cv^ is replaced by the civilization short description while the ^ut^ is replaced by the unit type.
|
^ut^ [^cv^] |
||
|
Scout |
|
Scout [Persian] |
|
Worker |
|
Worker [Roman] |
|
Galley |
|
Galley [English] |
|
Bomber |
|
Bomber [Russian] |
|
Axeman |
|
Axeman [Russian] |
|
Swordsman |
|
Swordsman [Greek] |
^ut^ ^cnt[r]^
This naming convention is the first example of a count. It includes the unit type and a count that is never reset. The count is shown in the roman format.
|
^ut^ ^cnt[r]^ |
||
|
Scout |
|
Scout I |
|
Worker |
|
Worker II |
|
Galley |
|
Galley III |
|
Bomber |
|
Bomber IV |
|
Axeman |
|
Axeman V |
|
Swordsman |
|
Swordsman VI |
^cnt[A]^ Troop ^tt1[s][5:5]^
This naming convention illustrates a counting convention that resets. It also includes the ‘[s]’ format which hides the total.
|
^cnt[A]^ Troop ^tt1[s][5:5]^ |
||
|
Scout |
|
A Troop |
|
Worker |
|
B Troop |
|
Galley |
|
C Troop |
|
Bomber |
|
D Troop |
|
Axeman |
|
F Troop |
|
Swordsman |
|
A Troop |
^cntc[p]^ Force ^tt1[o][5:5]^ Company, ^tt2[o][101]^ Div
A more complicated naming convention that illustrates a counting convention over combat type. It also includes the phonetic and ordinal number formats.
|
^cntc[p]^ Force ^tt1[o][5:5]^ Company, ^tt2[o][101]^ Div |
||
|
Scout |
|
Alpha Force 1st Company, 101st Div |
|
Worker |
|
Beta Force 1st Company, 101st Div |
|
Galley |
|
Alpha Force 1st Company, 101st Div |
|
Bomber |
|
Alpha Force 1st Company, 101st Div |
|
Axeman |
|
Alpha Force 1st Company, 101st Div |
|
Swordsman |
|
Beta Force 1st Company, 101st Div |
^cnt[f]^ of ^tt1[f][6:10]^, Unimatrix ^tt2[f][1]^
Just for fun!
|
^cnt[f]^ of ^tt1[f][6:10]^, Unimatrix ^tt2[f][1]^ |
||
|
Scout |
|
1 of 7, Unimatrix 1 |
|
Worker |
|
2 of 7, Unimatrix 1 |
|
Galley |
|
3 of 7, Unimatrix 1 |
|
Bomber |
|
4 of 7, Unimatrix 1 |
|
Axeman |
|
5 of 7, Unimatrix 1 |
|
Swordsman |
|
6 of 7, Unimatrix 1 |
FAQ
Q: What is the code if I just want to count all of my units (eg “Warrior 1”)?
A: ^ut^ ^cnt[n]^
Q: What is the code if I just want to count all of my units coming from each city but I don’t want the city name shown (eg “Warrior 1”)?
A: ^ut^ ^cntct[n]^
Q: What is the code if I just want to count my units by combat type?
A: ^ut^ ^cntc[n]^
Q: I really like Nexus’ army naming convention (1st army 2nd corp 8th div). Why haven’t you included this in your naming pack?
A: We don’t need to. Use this code instead …
^cnt[o]^ Army ^tt1[o][5:5]^ Corp ^tt2[o][1]^ Div
Credits
Forum: http://forums.civfanatics.com/forumdisplay.php?f=268
Author: ruff_hi