Unit Naming

thx Psyringe - good catch.
 
Open the "BUG mod.ini" and find these lines:

Code:
# Advanced optional naming conventions based on ERA and UNIT CLASS

ANCIENT_SETTLER = ^rd^

This is a setting that is not accessible via the in-game option, but overrides whatever you specify there. Changing "^rd^" to "DEFAULT" in the ini should do the job.

Thanks :)

Edit:
The strange thing is that I had the advanced naming set to 0, so it had to ignore that convention... something wrong here, I suppose...


@ Ruff

I suggest that we provide a BUG.ini file with all the unit-naming options set to DEFAULT, in particular the advanced ones... we'll avoid a lot of questions.
Then maybe we can add a couple examples to the readme about using the advanced options... what do you think about this?

Edit:
I also suggest to include a "Use Advanced Options" check box in the Option screen.
 
Thanks :)

Edit:
The strange thing is that I had the advanced naming set to 0, so it had to ignore that convention... something wrong here, I suppose...


@ Ruff

I suggest that we provide a BUG.ini file with all the unit-naming options set to DEFAULT, in particular the advanced ones... we'll avoid a lot of questions.
Then maybe we can add a couple examples to the readme about using the advanced options... what do you think about this?

Edit:
I also suggest to include a "Use Advanced Options" check box in the Option screen.

Alerumn suggested moving the advanced naming options to a different ini file ... the coding for that defeated me. I took out the 'use advanced' a while back and changed the code to (in order) ...

check for unit / era
check for combat type
check for global

We can put the advanced option back ... any yeas or nays?
 
You currently got a note on the options tab saying that the advanced options are in the INI. I'd change that by putting a checkbox on the tab "Use Advanced Settings (see INI file)", killing two birds with one stone.

If you check that box, it should ignore all the formats on the tab (combat type and global), unless of course the unit being named as "DEFAULT" as its format.

I haven't played with it yet, but does it fallback as I just described? If you have Ancient Archer set to DEFAULT, will it use Combat Type Archer's format, falling back to the Global format if CTA's is DEFAULT? That's what I inferred, but I'm not sure.

In fact, maybe change "Use Advanced Options" to be "Use Advanced Era/Type Formats" so the user knows what they'll get if they enable it without having to open the INI file. Minor suggestion, and maybe there's better wording. Of course, the hover text can be fully descriptive, so maybe ignore this.
 
I haven't played with it yet, but does it fallback as I just described? If you have Ancient Archer set to DEFAULT, will it use Combat Type Archer's format, falling back to the Global format if CTA's is DEFAULT? That's what I inferred, but I'm not sure.
This is what the code does. I'll put the 'Advanced' option back in with a very long hover text.
 
now all units are being named default........... literally !! :lol: :crazyeye:

Spoiler :
[UnitName]

Enabled = 1
UseAdvanced = 0
Default = DEFAULT
CombatAIR = DEFAULT
CombatARCHER = DEFAULT
CombatARMOR = DEFAULT
CombatGUN = DEFAULT
CombatHELICOPTER = DEFAULT
CombatMELEE = DEFAULT
CombatMOUNTED = DEFAULT
CombatNAVAL = DEFAULT
CombatNone = DEFAULT
CombatRECON = DEFAULT
CombatSIEGE = DEFAULT


I liked the old file a little better ;)

Spoiler :
[UnitName]

Enabled = 1
UseAdvanced = 0
Default = ^ut^ ^cnt[r]^ of ^ct^
CombatAIR = Birdie ^cntc[r]^
CombatARCHER = ^rc^
CombatARMOR = DEFAULT
CombatGUN = DEFAULT
CombatHELICOPTER = Whirly Birdie ^cntc[r]^
CombatMELEE = DEFAULT
CombatMOUNTED = Horsie ^cntc[r]^
CombatNAVAL = Floatie ^cntc[r]^
CombatNone = DEFAULT
CombatRECON = ^cntc[p]^ Recon
CombatSIEGE = ^cntc[o]^ Charles (Chuck)
 
I've done it. It isn't pretty but it works (sorry EP). I've managed to move the advanced unit name codes out of the bug mod.ini file and into an ini file of their own. The advanced unit naming conventions are now in a separate ini file (Adv Unit Naming.ini). To use this file, you must check the 'use advanced' option.

So, the code does this ...

PHP:
if use advanced, try to get unitnameconv from separate advanced ini file else unitnameconv = default

if not default, return

get combat unitnameconv

if not default, return

get default unitnameconv

return
 
I've done it. It isn't pretty but it works (sorry EP). I've managed to move the advanced unit name codes out of the bug mod.ini file and into an ini file of their own. The advanced unit naming conventions are now in a separate ini file (Adv Unit Naming.ini). To use this file, you must check the 'use advanced' option.

:goodjob: :goodjob: :goodjob:

PHP:
# Advanced optional naming conventions based on ERA and UNIT CLASS

see other ini file (Adv Unit Naming.ini)

I'm not a py expert, but before the second line probably a "#" is missing... but I'm not sure of how comments works in py... :confused:
 
errr - might be an error. Which file?
 
I think the idea of unit names is really cool. I like to see how a unit evolves over time. E.g., see centuries later that this was my capitol's first unit, etc.

However, the long names mess up the mouse over display, preventing stats from appearing on the same line as the name, usually with an awkward line break. This has caused me to revert to normal short names. Any ideas on how to fix that?

Thanks!
 
I think the idea of unit names is really cool. I like to see how a unit evolves over time. E.g., see centuries later that this was my capitol's first unit, etc.

However, the long names mess up the mouse over display, preventing stats from appearing on the same line as the name, usually with an awkward line break. This has caused me to revert to normal short names. Any ideas on how to fix that?

Thanks!
Yes - set up your own naming convention but with short names ... eg "Axe 4"
 
If you want to keep long names and have less wrapping, you'd need to modify the C++ DLL to specify a wider hover area. Unfortunately, this isn't done from Python code.

I am getting more and more tempted to add some features to the DLL. I hesitated before because I used BetterAI, but now that it's baked into the game, I might go for it. It would still be unaltered gameplay, but I'd probably package it separately from BUG.

However, I'm short on time so this is still just an idea. I'd like to add other things to the hover text:

  • City: culter and GP turns, happiness and health
  • Units: the latest PLE adds some nice things I think. For one, the minimum movement points for a stack of selected units.
I guess I don't really have that many things to add. I'm sure I'm forgetting some.
 
I am getting more and more tempted to add some features to the DLL.

The big problem with that is that anyone who wants to use a DLL mod for something else e.g. the BTS 3.13 unofficial patch is stuffed.

EDIT: I realise that those who are handy with C++ could merge changes in but a lot of us lack those skills.
 
as long as the dll changes are separate from the BUG, then it wouldn't be a problem.

also, i was wondering if it was possible to get rid of the "(unit type)" naming that is still displayed once you change a unit's name, eg, my units read: "1st Rome Swordsmans (Swordsman)" ~ is that deletable??
 
also, i was wondering if it was possible to get rid of the "(unit type)" naming that is still displayed once you change a unit's name, eg, my units read: "1st Rome Swordsmans (Swordsman)" ~ is that deletable??
No. Nothing we can do about that.
 
Don't worry. Any changes I made to the DLL would be complete separate and unneeded by BUG. It would truly be an "extra" feature you could install. If I did it, I'd probably install it with BUG as "game.dll.removethisextensiontoinstall" or something. It would be unused by default and not clash with anything.

But this is a loooong way off.
 
We've had reports of unit naming occurring even when it is disabled.

Hi,
I noticed that some units (not all) show custom names even if I have
customized unit names neither in the BUG options menu nor in the Adv Unit
Naming.ini file; and overall the unit naming is NOT ENABLED;.
There are 2 conventions showed; examples:

1) "Archer (Archer 1 of Washington)"
2) "Spy (Spy)"

I'm using Varietas Delectat 4.0 mod and not BAT mod.
BtS version is 3.17 (latest)

Thank you for your attention.
I got some saves from this game but ...


I guess I should have read the write up. What is 'Varietas Delectat 4.0 mod'?
 
Top Bottom