Ok, but back then soldier name files were not yet being sorted locale-aware. Stoddard only made namepool sorting locale-aware 5 years ago.
Yes, I agree that there are some problems resulting from sorting in different locales. I am with you on that.
For demonstration:
Let's say that a modder defines "Flag25" to be
Resources/Flags/Kenya.png.
How did the modder determine that Flag25 is Kenya? He looked at the SoldierNames (or whatever) folder and saw that the 26th file was Kenyan.nam
So nationality with index 25 is Kenya. Soldier with _nationality = 25 will get this flag.
Soldier also gets a name from
names[_nationality]. So the name pool with index 25 will be used for the name.
names vector was generated after locale-aware sorting files.
As you can guess, this will fail in other locales, because there's no guarantee that Kenyan.nam will be the 26th file after applying a locale-aware sort.
I don't know why Stoddard made name pool sorting locale-aware. It seems like a really bad idea to do that
To being with, anything (_nationality included) referring to the index position of a file in a folder is too fragile and is simply bound to fail one way or another. Add or remove a file and it fails.
So, uhh, what were we talking about again? Ruleset load order... yeah... so there's an issue that a lot of mods rely on the order the rul files are loaded in, while modders don't have any ability to specify what the order is. If you wish, I can try implementing something that would give modders some control over this order.