Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character importing and names #488

Open
IohannesIohannium opened this issue Nov 25, 2023 · 1 comment
Open

Character importing and names #488

IohannesIohannium opened this issue Nov 25, 2023 · 1 comment

Comments

@IohannesIohannium
Copy link
Contributor

Due to how heavily it would need to do calculations, make the following as an optional thing that is turned off by default.

When we import a character from EU4, the converter should check if the names already exist as localized strings in blankMod/output/localization/english/replace/names/99_names_l_english.yml and [...]/replace/dynasties/99_dynasty_names_l_english.yml. The checking process implies stripping the original name from diacritics, converting the spaces into underscores, then find out if there are any strings in the file that are [2 or 3 characters], underscore, normalized string (with an initial dyn_ if a last name). If yes, it is matched. Although technically more strings may match, for simplicity we use the first one found.

Example: we have a EU4 general named François D'Estienne d'Orves. The given name, François, gets normalized into Francois and is then matched with fr_Francois; the last name is normalized to D'Estienne_d'Orves and matched with dyn_fr_D'Estienne_d'Orves. Thus, when creating him in Vic3 as a general, we'll have the following:

create_character = {
	first_name = fr_Francois
	last_name = fr_D'Estienne_d'Orves
	...
}

This ensures our general is displayed as François D'Estienne d'Orves in most languages, as Франсуа Д'Естиен д'Орв in Russian, etc.

Because EU4 puts regnal numbers in the first-name field, it is clear that monarch names are never going to be matched, but that is something for another issue.

@IohannesIohannium
Copy link
Contributor Author

In case (as I cannot check) Victoria 3 does not employ regnal numerals, we can also apply the above procedure to monarch names, provided we strip them of the number (easily check by regex to remove [space][I, V or X][I, V, X, none][I, V, X, none] at the end of any found name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant