I'm for the entity file flag. One wrinkle is that there are two axes of naming that are almost independent. Not always do the parents change their name upon marriage, even when the children take a family name. Perhaps we want two flags:
[MARRIAGENAME:PATRONYM:40:MATRONYM:40:RANDOM:10]
[CHILDNAME:PATRONYM:40:MATRONYM:40]
The MARRIAGENAME tag indicates how, and whether, individuals change their surname when getting married. My example doesn't add up to 100; any leftover percentage points should go to the default setting, KEEP.
I considered various ways of combining each of the three words of each parent's name (one in the first name, two in the surname), before noticing that the language file has certain rules about what words can appear where. Immortality, for example, might only be allowed as the first word of a compound noun. That limits the number of possibilities significantly, unless we come up with more ways to decide on one of the names:
- PATRONYM: Take the father's surname.
- MATRONYM: Take the mother's surname.
- PATMAT: Take the first part of the father's surname, and the last part of the mother's surname.
- MATPAT: Take the first part of the mother's surname, and the last part of the father's surname.
- HIGHSKILL: Take the surname of the most skilled parent.
- RANDOM: Roll an entirely new random surname.
- KEEP: Parents keep their own surnames (MARRIAGENAME only).
- FUSENAME: Parents hyphenate or otherwise use both of their surnames (MARRIAGENAME only).
I would not be surprised to see FUSENAME remain unimplemented at first, because it's the most complicated. Ideally, it would keep track of each parent's surname individually, for child name calculations, while combining them on display. Historically, such a system has been far more common among royalty or other high-class citizens than among the common members of a civilization, so I don't care too much about it.
The CHILDNAME tag indicates how each child's surname is generated. The default here would be RANDOM, to match current behavior. Note that with a MARRIAGENAME of anything but KEEP or FUSENAME, and a CHILDNAME of anything but RANDOM, each listed algorithm degrades to giving the child the same surname as the parents.
I considered a BY_CASTE algorithm for CHILDNAME, but that runs into problems if the castes are not strictly male and female. It can also be rendered obsolete by making CHILDNAME a caste-level token. For example, a civ could have male children prefer to take their father's surname, while female children prefer their mother's. Or perhaps, in a mod with a nobility caste, the noble children use a different method than the commoners.
Using MARRIAGENAME as a caste-level token could be problematic, though, because there can be (and usually are) two castes involved. It's tempting to have each one list a percentage to switch to the partner's surname, but then what if a couple decides to swap names? Does that make sense for any civilization?
On the other hand, maybe I'm making the whole thing too complicated.