Unit Naming

No, this is indeed a bug introduced in 4.0 somehow. I'm seeing it in my current game as well, and I didn't change my own codes from the defaults. I'll ask Ruff to look at it.
 
consider myself asked.
 
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?
Opps - I made a change to the counting code (developed a new counting convention) and failed to update the documentation or the default. Here is the translation (old to new) ...

OLD
  • ^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)

NEW
  • ^cnt[f][r]^ - counting code, if the code isn't there - return 'ALL'
    • r = 'a' means count across all units (just increments)
    • r = 'u' means count across same unit (increments based on unit)
    • r = 'c' means count across same city (increments based on city)
    • r = 't' means count across same unit / city (increments based on unit / city)
    • r = 'b' means count across same combat type (increments based on combat type)
    • r = 'd' means count across same domain (increments based on domain)
    • r = other, means count across units that have the same code

Sorry about that. I did this so that the user can implement their own groupings to count over. For example, say you wanted to count over anti-mounted units differently than other melee units, then ...
  • turn on advanced unit naming
  • put ^cnt[f][Mount]^ against the spears, pikes, etc
  • put ^cnt[f][Other]^ against the other melee units
 
Please, help me understand.

If I want to go back to the old naming system, I should press ctrl+alt+o and go the the "Naming" tab. There I have a first line with a code. What should I type there?

Sorry if it's a stupid question. I'm really ignorant when it comes to programming.
 
Code:
^ut^ ^cnt[n][u]^ (^ct^)

This will produce names like these:

  • Warrior 1 (London)
  • Axeman 1 (London)
  • Warrior 2 (Edinburg)
  • Swordsman 1 (London)
 
Thanks. I'll test it when I get home and then confirm to you it's working.

Edit. Let me see if I get it. If I want to keep separate counts for the units/cities, I should replace the
Code:
^cnt[n][u]^
by
Code:
^cnt[n][t]^
Is that right?
 
to be honest with you, this was changed way ago (I always download SVNs), not in 4.0

I had to discover the new convention by trial and error, until I found how, some 1 month ago. I thought I was crazy and confused the original coding.

Nice to know I'm not. Yet. :D
 
Opps - I made a change to the counting code (developed a new counting convention) and failed to update the documentation or the default. Here is the translation (old to new) ...

OLD
  • ^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)

NEW
  • ^cnt[f][r]^ - counting code, if the code isn't there - return 'ALL'
    • r = 'a' means count across all units (just increments)
    • r = 'u' means count across same unit (increments based on unit)
    • r = 'c' means count across same city (increments based on city)
    • r = 't' means count across same unit / city (increments based on unit / city)
    • r = 'b' means count across same combat type (increments based on combat type)
    • r = 'd' means count across same domain (increments based on domain)
    • r = other, means count across units that have the same code

Sorry about that. I did this so that the user can implement their own groupings to count over. For example, say you wanted to count over anti-mounted units differently than other melee units, then ...
  • turn on advanced unit naming
  • put ^cnt[f][Mount]^ against the spears, pikes, etc
  • put ^cnt[f][Other]^ against the other melee units

I notice that even in the BUG version 4.1, chm guide and contextual help report the old counting format (different codes with 1 parameter), not the new one (unique code with 2 parameters).
Please, have a look and update docs.
Thanks in advance.
 
Is there are a FAQ or documentation for the "Unit Naming.ini" or "Adv Unit Naming.ini" config file? I saw in earlier posts there were references to it, regarding specific unit types:
* turn on advanced unit naming
* put ^cnt[f][Mount]^ against the spears, pikes, etc
* put ^cnt[f][Other]^ against the other melee units

I'd like to do things like that, but I don't know exactly how to define new categories like this. If such documents don't exist, I won't want you to write one just for this request, but maybe you could direct me to the Python (assuming it's not a DLL) file(s) which reads and interacts with it. I can probably figure it out from there.

Also, I wanted to thank the whole BUG team for all your hard work which has made the best video game in history even better! :goodjob:

EDIT: Please disregard everything before the last paragraph. I was looking at the wrong file.:hammer2:. Fail!
 
I want to insert a lot of units into "Adv unit naming.ini" (53 units per era, 371 units total) for BASE-Mod (BtS Additive Selective Enhancement; it is a collection of different mods into one mod), but while testing, the units aren't named as well.
I've tested with the simple rule for a few land units: ^cnt[o]^ Infantry, but the game called it with standard names like Warrior for Warriors and Archer for Archers instead 1st Infantry, 2nd Infantry and so on.
If I insert the same rule into BUG naming menu for close combats, they are named with 1st Infantry, 2nd Infantry and so on.

The field for extended unit naming was checked on in all cases.

There is a limit in BUG-Mod about the lines of units?
I've attached the file here. I had testet it without blank lines between the blocks, but with the same result. I hope, anyone can help me with my problem. Thanks!
View attachment Adv Unit Naming.zip
 
The file looks okay, and blank lines are ignored. Did you try setting naming rules for the pre-existing lines in the file? You said you named close combat in the screen so I assume you mean you set naming for some combat type on the BUG Options screen. Is that what you meant?

Otherwise, make sure that the file is the correct file. Do you have another Adv Unit Naming.ini file that's being used elsewhere?
 
I've a backup here, so I can test it in original state.
Yes, the rules works in BUG-option screens, but doesn't works in Adv Unit Naming.ini with cleared screen (close combat field is clear).

I was little confused, because before I've inserted all neccessary lines, I've successfully tested with an unit. Now, after inserting 53 units per era, it doesn't works.

In next days, I'll test it step for step. At first with original file, then inserting 1 to 3 lines and then more and more.
For further tests, which file has higher priority: standard Unit Naming (BUG-Option screen) or Adv Unit Naming.ini?
 
That sounds very much like it was not finding the right file. I believe that if you have the Advanced checkbox on the screen checked, the other fields on the screen are ignored and the file is used instead.
 
Mhmm, maybe the file has been modified by MS Word. It's easier to edit with Word than Wordpad or Notepad (it's a hard work to edit the lines every era), but I guess, it's a very stupid software to convert into txt-file.

I try to edit with Notepad and use copy & paste.
 
I highly recommend getting Notepad++ (free). It's a great all-around text editor that would make adding those extra lines a breeze.
 
Thanks for your tip! I'll test it today evening.
I'll report here, if it's successful or not.

P.S.
You're working until deep in the night? At the moment, it's 01:30 AM in CA?! :)
 
Top Bottom