[snip]...About the naming issue, is it possible to make a separate file for specific names instead of drawing them out from the language file?
Also, I'm pretty sure that the randomized last names of spouses and heirs is hard-coded but I just want to be 100% sure. Is it possible to make immediate relatives share the same last name? (for the sake of world gen history)
Actually...
yes.
Check out the
Dwarven Heritage Project, which is a Lua script for
DFHack. The author, expwnent, says:
It works on both historical figures and the dwarves in the current fort.
Basically, it renames them to inherit the last names of their ancestors based on certain rules (instead of being completely random).
Even so, a dwarf doesn't necessarily share a last name with a sibling, or even a parent. Instead of the traditional patriarchal surname inheritance most of us are familiar with, it uses it's own system. However, he did say that it could have been written to do names the traditional way and it would have made it a lot simpler. (He wanted to make it more interesting.)
Granted, it was released a while ago and - officially - it hasn't been updated in a while. However, in
this post legendary+1 modder Putnam shares his update to fix it for r3, so it should work.
There is a catch, however. This script needs to be run whenever a child is born in order for it to name the new child. A bit tedious, right?
Perhaps a future release will allow it to do this automatically?

Recently, expwnent wrote:
I've written 95% of a plugin version of this script, which runs about 10 times faster, but it isn't finished and it could be a little while before I finally finalize it.
BTW: I had an idea to automate this and other scripts. Since
SoundSense is already listening to gamelog.txt for logPatterns "(.+) has given birth to a" boy / girl / twins / triplets, I thought it would be
very handy if it could call
heritage.lua. It already has some limited DFHack functionality and zwei (the author) said doing this was possible. I think I'll remind zwei about this request...
EDIT:I may not need to ask. After looking into the SoundSense files (r42), it looks like it already has the capability to call a DFHack plugin. In the "executor" folder of SoundSense there is an "executor.xml" file which, among other things, contains:
<executor logPattern="\*\* Loading Fortress \*\*" call="${baseDir}/dfhack-run soundsense" />
This calls the soundsense.lua script, which automatically changes the background season music to match the current season whenever DF loads a game.
When I start a new fortress I'll have to try out an experiment with something like this:
<executor logPattern="(.+) has given birth to a boy\." call="${baseDir}/dfhack-run heritage" />
<executor logPattern="(.+) has given birth to a girl\." call="${baseDir}/dfhack-run heritage" />
<executor logPattern="(.+) has given birth to ((twins)|(triplets))\." call="${baseDir}/dfhack-run heritage" />