|
jcoleman
|
|
Lead Programmer, Big Huge Games
|
|
Actually, if you only want a cosmetic change to the name, change the one in typenames.xml. The idea is that unitrules.xml is common to all languages. Any values that get displayed are looked up in typenames.xml. Typenames.xml differs by translation.
In case you need it, I've included some code for generating the hashes below.
dword primes[ 50 ] = {
127, 811, 1597, 2131, 2749, 4759, 5527, 5953, 8117, 9539
, 10273, 10753, 11159, 12301, 13217, 14207, 15413, 17681, 18661, 19013
, 21089, 22051, 25111, 25801, 27457, 28057, 29581, 30809, 32611, 34469
, 36067, 37511, 38723, 40093, 41983, 43321, 45083, 47431, 49667, 50767
, 53453, 55469, 57193, 59369, 61987, 65071, 73421, 77849, 84223, 89009
};
dword num_primes = 50;
dword generate_hash (const TCHAR*string)
{
int curchar;
dword total = 0;
TCHAR c;
if (!string) return 0;
for ( curchar = (int)_tcslen(string) - 1; curchar >= 0 ; curchar-- ) {
dword base, base2;
base = curchar % num_primes;
c = string[ curchar ];
base2 = (c % num_primes);
total += primes[base2] * (curchar+1);
total += ( primes[ base ] * c );
}
return total;
}
|