[EDIT: above quote is from this post from the thread Alpha 27 Pre-release/Release Candidate Build Testing of which this thread here has been split off]
You brought me to the idea to search for 'AINames' (I use GitHub Search for that) and I found lines 85-100 of ps/trunk/binaries/data/mods/public/gamesettings/attributes/PlayerName.js. Quote:
// Pick one of the available botnames for the chosen civ
// Determine botnames
let chosenName = pickRandom(this.settings.civData[civ].AINames);
if (!this.settings.isNetworked)
chosenName = translate(chosenName);
// Count how many players use the chosenName
let usedName = this.values.filter(oName => oName && oName.indexOf(chosenName) !== -1).length;
this.values[i] =
usedName ?
sprintf(this.RomanLabel, {
"playerName": chosenName,
"romanNumber": this.RomanNumbers[usedName + 1]
}) :
chosenName;
I don't understand JavaScript much. Thank you very much to everyone helping comprehend what [usedName + 1] means.