Well, I saw somebody asked about if is possible to make a script to give more than two names to a settlement depending who conquers it. And yes, it's possible, and there is no limit of possible settlement names. I'm proud to announce you my guide to show you how to add more than two possible names to a settlement.
I will use an made example from my Reconquista's mod, all the possible names of Perpignan's city, depending who conquers it:
-Catalan Domain --> Perpinyà


-Castilian Domain --> Perpiñán


-French Domain --> Perpignan
-Muslim Domain --> Bârbanyân


Required files
-Campaign_script.txt (found in data/world/maps/campaign/campaign_name)
-Expanded.txt (found in data/text)
Steps
To start with, you should decide what names will you asign to a specific settlement, once you have decided them, open expanded.txt and write there the original settlement name placed in descr_regions (found in data/world/maps/base) and it's translation and the other names you will asign to that settlement, for example:
Code:
{Rosello}Perpinyà -> Original name
{Perpinan}Perpiñan
{Perpignan}Perpignan
{Barbanyan}Bârbanyân
Once you have finished this step, you should open campaign script.txt.
Here, you will make a counter for each possible name, so I will have to make three counters in my case, for each change of name.
Castilian type factions are Navarra (venice), Portugal (portugal), Portugal (hre), Castile (norway), León (denmark), Galicia (scotland).
Catalan type factions are Barcelona (spain), Urgell (sicily), Aragón (milan), Tolosa (antioch), Aquitania (jerusalem).
French type factions are France (france) and England (england).
Muslim factions are Córdoba (moors), Zaragoza (egypt), Sevilla (turks), Granada (byzantium), Badajoz (hungary), Toledo (poland), Almería (lithuania), Dénia (russia), Almoravids (timurids) and Almohads (mongols).
You need to create a counter first, indicating that the settlement name will be Spanish if a Castilian faction takes it, so:
Code:
;;;;; Perpiñán
declare_counter conquesta_de_Perpinan
;;; No Castilians conquer Perpinyà
monitor_conditions I_SettlementOwner Rosello = norway
and I_CompareCounter conquesta_de_Perpinan = 0
set_counter conquesta_de_Perpinan 1
change_settlement_name Rosello Perpinan
end_monitor
monitor_conditions I_SettlementOwner Rosello = denmark
and I_CompareCounter conquesta_de_Perpinan = 0
set_counter conquesta_de_Perpinan 1
change_settlement_name Rosello Perpinan
end_monitor
monitor_conditions I_SettlementOwner Rosello = scotland
and I_CompareCounter conquesta_de_Perpinan = 0
set_counter conquesta_de_Perpinan 1
change_settlement_name Rosello Perpinan
end_monitor
monitor_conditions I_SettlementOwner Rosello = venice
and I_CompareCounter conquesta_de_Perpinan = 0
set_counter conquesta_de_Perpinan 1
change_settlement_name Rosello Perpinan
end_monitor
monitor_conditions I_SettlementOwner Rosello = hre
and I_CompareCounter conquesta_de_Perpinan = 0
set_counter conquesta_de_Perpinan 1
change_settlement_name Rosello Perpinan
end_monitor
Now, you must indicate that when catalans get the settlement again, the name will be in catalan back, so you must indicate that the name will be catalan if the settlement is not had by any faction except catalan ones:
Code:
;Catalans get Perpinyà again:
monitor_conditions not I_SettlementOwner Rosello = scotland
and not I_SettlementOwner Rosello = norway
and not I_SettlementOwner Rosello = denmark
and not I_SettlementOwner Rosello = venice
and not I_SettlementOwner Rosello = hre
and not I_SettlementOwner Rosello = france
and not I_SettlementOwner Rosello = egypt
and not I_SettlementOwner Rosello = hungary
and not I_SettlementOwner Rosello = poland
and not I_SettlementOwner Rosello = moors
and not I_SettlementOwner Rosello = russia
and not I_SettlementOwner Rosello = turks
and not I_SettlementOwner Rosello = lithuania
and not I_SettlementOwner Rosello = byzantium
and not I_SettlementOwner Rosello = timurids
and not I_SettlementOwner Rosello = mongols
and not I_SettlementOwner Rosello = england
and I_CompareCounter conquesta_de_Perpinan = 1
set_counter conquesta_de_Perpinan 0
change_settlement_name Rosello Rosello
end_monitor
Now, you have to indicate that the name will be French if France has that settlement, so it will not belong to the rest of factions, so you will have to indicate that the name will be French if the settlement does not belong to any faction except France:
Code:
;;; If France occupies Perpinyà
monitor_conditions not I_SettlementOwner Rosello = scotland
and not I_SettlementOwner Rosello = norway
and not I_SettlementOwner Rosello = denmark
and not I_SettlementOwner Rosello = venice
and not I_SettlementOwner Rosello = hre
and not I_SettlementOwner Rosello = spain
and not I_SettlementOwner Rosello = milan
and not I_SettlementOwner Rosello = sicily
and not I_SettlementOwner Rosello = antioch
and not I_SettlementOwner Rosello = jerusalem
and not I_SettlementOwner Rosello = egypt
and not I_SettlementOwner Rosello = hungary
and not I_SettlementOwner Rosello = poland
and not I_SettlementOwner Rosello = moors
and not I_SettlementOwner Rosello = russia
and not I_SettlementOwner Rosello = turks
and not I_SettlementOwner Rosello = lithuania
and not I_SettlementOwner Rosello = byzantium
and not I_SettlementOwner Rosello = timurids
and not I_SettlementOwner Rosello = mongols
and I_CompareCounter conquesta_de_Perpinan = 1
set_counter conquesta_de_Perpinan 0
change_settlement_name Rosello Perpignan
end_monitor
Now, you have to create another monitor conditions to indicate that the name will change to Barbanyan (muslim name) if the settlement is taken by a muslim faction, so it should belong to a muslim faction -> it should not belong to the rest of factions. If the settlement doesn't belong to any Christian faction, it will belong to a muslim faction, so you should indicate that the name will be arabian when the settlement doesn't belong to any Christian faction.
Code:
;;; Muslims occupy Perpinyà
monitor_conditions not I_SettlementOwner Rosello = scotland
and not I_SettlementOwner Rosello = norway
and not I_SettlementOwner Rosello = denmark
and not I_SettlementOwner Rosello = venice
and not I_SettlementOwner Rosello = hre
and not I_SettlementOwner Rosello = spain
and not I_SettlementOwner Rosello = milan
and not I_SettlementOwner Rosello = sicily
and not I_SettlementOwner Rosello = antioch
and not I_SettlementOwner Rosello = jerusalem
and not I_SettlementOwner Rosello = france
and I_CompareCounter conquesta_de_Perpinan = 1
set_counter conquesta_de_Perpinan 0
change_settlement_name Rosello Barbanyan
end_monitor