Q: Units with identical names

You are very welcome and you will see, if the unit names are not too long, they will look well in the game with the added spaces. :)
 
I found 1-2 look almost non-existent, but once you get to 4 then its noticeable in the build menu.
 
I use Steph's and Quintillus's editors (in addition to the standard editor), both which allow units to have the exact same name without issue. Highly recommended.
 
There's a method for using characters that get read but not shown by the game. It involves editing a font file or two. There's a tutorial for it somewhere on this site, and it does work. I used it to turn the "@" invisible. It doesn't display a space like if you were to enter a space in the name. It can also be used anywhere in the unit name, and since it is read by the game, it also helps sorting units of the same name. I'm not sure if using Steph's or Quintillus's editors has the issue where units with the same name aren't group sorted by the game. Whereas editing the font file does allow the game to group sort units of the same name, although you still have to figure out which one is the last/first in the group, since they all will appear the same.

Example, you have 10 units that are all named Swordsman. But you have two types of Swordsman. In the editor, the units are named "Swordsman" and "Swordsman@" but in the game it's just "Swordsman" for both units, with no spaces after the last letter, even if you have a unit "Swordsman@@@@@@@" which would be 7 spaces if you did the spacebar trick, rendering the goofy issue where in certain menus it messes with text boxes.

So let's say out of those 10 Swordsman units, you have 3 "Swordsman" and 7 "Swordsman@"

The game will then sort it so all 3 units that are "Swordsman" will be at the top, and all 7 "Swordsman@" will be sorted after the first 3 units. It's a great trick. The downside is you have to sacrifice a font character. "@" is easy for me, because I don't care about email addresses in my civilopedia. This method is also great for using it as a sorting method to separate units of the same name that are in different eras.

Another useful tool for this is to bypass the character limit in the unit name in the official editor. Let's say you have a very long unit name, but want to create several versions of that unit with the same name. Well you can insert the invisible character, in my case, "@" anywhere in the unit name. So for example, "Main Universal Tank" already takes up much of the character limit in the unit name, so you don't have too many more spaces to add "@" after the last letter. Well, if you don't mind the game sorting the unit weirdly in game, then you can do something like "Main Un@iversal Tank" for example. This is nice if you want every single foot unit in your game, no matter the era, to be called "Infantry" but you have several hundred types.

Here's the tutorial, but if I remember correctly, I had to do a little guess work as the tutorial is incomplete. It's been so long since I did this, I don't remember exactly what I did or what program I used;

https://forums.civfanatics.com/threads/two-units-with-the-same-name.203187/

I am using this method in my current mod (in production), AGON. It works great.
 
Last edited:
Yeah, Civinator already linked to that thread. But I would rather not mess with the font files because of bad past experiences.

(Basically, I copied the font file, changed some characters in the copy, and used that in the game. But the line spacing got too big, so when you have several lines of text, it doesn't fit into the various text boxes. I have since then deleted the modded font file, and put back the original, but the faulty line spacing and changed characters still remain in the game for some reason.)
 
Yeah, Civinator already linked to that thread. But I would rather not mess with the font files because of bad past experiences.

I didn't click his link since he was talking about using the spacebar in that post. *shrug*

(Basically, I copied the font file, changed some characters in the copy, and used that in the game. But the line spacing got too big, so when you have several lines of text, it doesn't fit into the various text boxes. I have since then deleted the modded font file, and put back the original, but the faulty line spacing and changed characters still remain in the game for some reason.)

As I stated in my stuff, there is no line spacing with taube's method. His file may be out of date, and the editing may have to be done manually. I now remember I didn't use his file because I found inconsistencies. I just used it as an example of how to do it myself. I believe his file actually erases out several characters, and the characters may be out of whack or something.
 
Top Bottom