Unit Naming

You are just sitting there dreaming up this questions to bug me, aren't you!

That's what happens when I put on my Quality Assurance hat! ;)
 
That's what happens when I put on my Quality Assurance hat! ;)
Question for you - do you think that I actually ran the new code that I banged together?
 
I am willing to test this if you still looking for a tester. Of course I am still a little unsure of how to set up the code, So if you could give me the code for the example I had listed which started this. That would be great!!
 
Great! Firstly, you will need to turn on 'advanced naming convention'. Then you will need to edit that appropriate ini file and use the following for your group 1 units (warrior, axe, sword, mace, etc):

Naming code = "^tt2[o][1]^ Div ^cnt[o][m1]^ ^ut^ Bgd ^tt1[5:5]^"

For your anti-horse units (spears, pikes, other?), you will need to use the following:

Naming code = "^tt2[o][1]^ Div ^cnt[o][m2]^ ^ut^ Anti-Mount ^tt1[5:5]^"

I think this should work. It should count over the 'm1' group and separately over the 'm2' group.
 
Alright created my first Spearman and the unit name came out to be
1st Div 6th Spearman Bgd.

I expected 1st Div 1st Spearman Bgd. Here is the order of the Warriors, Axes, and Spearman I created were
Warrior - Warrior (inital one at start)
Warrior - 1st Div 1st Warrior Bgd
Warrior - 1st Div 3rd Warrior Bgd
Axeman - 1st Div 4th Axeman Bgd
Spearman - 1st Div 6th Spearman Bgd
Axeman - 1st Div 7th Axeman Bgd
Spearman - 1st Div 8th Spearman Bgd


I am not sure why 2nd Warrior Bgd was not built.
 
that is great news! ie - it didn't crash and seems to have (almost) produced sensible names. Suggest changing the 'Bgd' to 'anti-mount' for spears so that we can make sure that it is actually picking up the spear naming convention.

I'll create my own file and see if I can find #2 and #5 tomorrow.
 
Okay. I will change the Spearman name tonight. Also I had in mind that Swords would be totally different from Spears and Axe/Warriors, so is it conceivable I can use m3 for those?

Also, I thought the spearman was going to be 1st Div 1st Spear?
 
Okay. I will change the Spearman name tonight. Also I had in mind that Swords would be totally different from Spears and Axe/Warriors, so is it conceivable I can use m3 for those?
sure - that 'should' work.
Also, I thought the spearman was going to be 1st Div 1st Spear?
that was my expectation too.
 
I ran through the game again to add the AntiMount for the Spearman and I noticed while modifying the ini file that AntiMount was already there, since I copied your example. So I checked the settings and everything was set coorrectly in BUG, but I was producing the incorrect names.

I have BUG 3.6 and BAT 1.1 installed. I had been testing this in BUG 3.6. BUG is installed in my
C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Gold\Beyond the Sword\Mods\BUG Mod 3.6\BUG Mod

directory, but was using the ini files

...\Documents\My Games\Beyond the Sword\BUG Mod

which is where BAT installed its BUG files. Is there an option I needed to change to use the BUG only files installed in the Program Files area?

Anyway, I changed the ini file there and it started producing the correct names, however the it grouped spears with axes. So I am wondering if the correct .py file is being used. I can copy the .py file over to the other area, but the BUG version there I believe is 3.5.

Nevertheless I ran threw some unit creations and here is what I got.

Warrior - Warrior (initial)
Warrior - 1st Div 1st Warrior AME Bgd (Washington)
Warrior - 1st Div 2nd Warrior AME Bgd (New York)
Warrior - 1st Div 3rd Warrior AME Bgd (Washington)
Axeman - 1st Div 4th Axeman AME Bgd (New York)
Spearman - 1st Div 5th Spearman AntiMount Bgd (New York)
Spearman - 2nd Div 1st Spearman AntiMount Bgd (New York)
Archer - 6th A2 Bn (Washington)
Archer - 7th A2 Bn (New York)
Axeman - 2nd Div 2nd Axeman AME Bgd (Washington)
Axeman - 2nd Div 3rd Axeman AME Bgd (New York)
Spearman - 2nd Div 4th Spearman AntiMount Bgd (Washington)
Swordsman - 2nd Div 5th Swordsman Raiders (Washington)
Spearman - 3rd Div 1st Spearman Bgd (New York)
Aseman - 3rd Div 2nd Axeman AME Bgd (Washington)
Axeman - 3rd Div 3rd Axeman AME Bgd (Washington)
Axeman - 3rd Div 4th Axeman AME Bgd (New York)
Swordsman - 3rd Div 5th Swordsman Raiders (Washington)
Spearman - 4th Div 1st Spearman AntiMount Bgd (New York)
Swordsman - 4th Div 2nd Swordsman Raiders (New York)

Also I was trying a name for Archers that was set in the UnitName.ini (not the advance), so this was bring used. So I was wondering if I have use Advance Naming enabled, but still have a name in UnitName.ini but DEFAULT in Advanced.ini is it supposed to use the UnitName name?
 
Last edited:
3.6 ... 3.5 ... makes no difference. We haven't changed the naming code for ages. It looks like the codes are still not producing the names you are after.

Re your question re archers ... I think that if you have DEFAULT in the advanced naming file, it picks the naming convention you have entered under 'default'. I could be wrong - it might look at the combat type one first - not sure (you could test it to see :D).
 
I actually did some testing of my code, located the issue and fixed it. Re-tested it and it works fine. Will upload to SVN in a few minutes.
 
I actually did some testing of my code, located the issue and fixed it. Re-tested it and it works fine. Will upload to SVN in a few minutes.

Was there something you wanted me to test? If so I am not sure how to get the code from the SVN.

Thanks again.
 
Hmm ... been looking at this in Legends of Revolutions, and I am wondering, is there a way to give each unit a different name taken from a list? Say you want to name your battleships USS Maine, USS Arizona, USS Missouri, and so forth.
 
Having lists of names is something we've wanted to add for a while now, we've just been so busy with other things. It shouldn't be that hard for a modder to pick up and add, and we'd gladly fold it into BUG.
 
Create a counting code at the front of the program, allowing for several counters, allowing people to count across units, unit types, units from certain cities, as well as longer counting strings.
 
alerum's idea will probably need totally different code to count stuff. It will NOT be backwards compatible ... do we need to worry about that or should we add an option to use the old method and the new (yet to be written) method?
 
here is my preliminary thoughts ...

add a counter control somewhere in the naming code ... something like this ...

{5,[2:5,6:10,x,y],[5:5,10:10],[2:2,4:4],[1:1,10:15],[101:101]}

translation

  • {5,...} means there are 5 counters
  • {...,[2:5,6:10,x,y],...} means that the 1st counter starts at a random number between 2 and 5 and counts up to another random number between 6 and 10, it counts over 'x' (same type of code as previous, city, combat type, city & combat type, etc) with special code 'y' so you can tell spears from axes
  • {...,[5:5,10:10],...} means that the 2nd counter starts at a random number between 5 and 5 and counts up to another random number between 10 and 10, it gets incremented once the 1st counter exceeds its max
  • {...,[2:2,4:4],...} means that the 3rd counter starts at a random number between 2 and 2 and counts up to another random number between 4 and 4, it gets incremented once the 2nd counter exceeds its max
  • {...,[1:1,10:15],...} means that the 4th counter starts at a random number between 1 and 1 and counts up to another random number between 10 and 15, it gets incremented once the 3rd counter exceeds its max
  • {...,[101:101]} means that the 5th counter starts at a random number between 101 and 101 and just keeps increasing, it gets incremented once the 4th counter exceeds its max

The balance of the naming code would tell you where to put each counter ...

"Group ct1[f], ct2[f] Div, etc"

where ct1 represents counter 1, ct2 represents counter 2, etc and the [f] controls the formatting.
 
will there be a limit on the amount of counters you can create, or will it be unlimited?

We need to make sure that counting between all different types, (unit, city, unit from city, etc) have their own counter. Right now only cnt will work, while cntu, cntuct, and things like that aren't working.

Also, there should be some kind of command or button to clear the counter.
 
## - ^cnt[f]^ - count across all units (increments based on unit)
## - ^cntu[f]^ - count across same unit (increments based on unit)

It seems these two codes are reversed. ^cnt[n]^ counts across same units (e.g. Warrior 1, Warrior 2, Archer 1). ^cntu[n]^ counts across all units (e.g. Warrior 1, Warrior 2, Archer 3).

## - ^cntc[f]^ - count across same combat type (increments based on combat type)

This isn't working the way I was expecting. I thought it should give something like Archer 1, Longbowman 2, Warrior 1, Axeman 2, Swordsman 3. It seems to be just counting across all units.
 
Hello guys!


I've updated my BUG to 4.0 and noticed that the numbering system is different. In 3.6 you'd have the units numbered based on what type of units they were. For example, if I went worker first, built 1 workboat and 2 warriors in London, they would be called Worker 1 (London), Workboat 1 (London), Warrior 1 (London), Warrior 2 (London). Now in the new version the number of the units have been following the total of all types of units you've produced. In the same build order, the names are Worker 1 (London), Workboat 2 (London), Warrior 3 (London), Warrior 4 (London). Was this intended? If so, is there a way I can set the naming system to the way it was before?

Thanks in advance.

Edit. I think what I asked is what is already being discussed, but I'm a total dummy for codes.
 
Top Bottom