Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Scytheria23 on March 30, 2016, 02:37:41 am

Title: [QUESTION] Random Character Names
Post by: Scytheria23 on March 30, 2016, 02:37:41 am
Well this has me stumped.

I'm trying to change the random names generated at character creation.  The obvious place to do this is namegen.dbc, which I've altered to fit what I'm doing.  It's a simple enough dbc - ID, Name, Race, Gender.

The result, strangely, bears little resemblance to what I put in it.  Neither does it resemble the original, so it's not defaulting to that.  What seems to happen is that the names I list are randomly mashed together to produce new variants.  There seems to be some sort of logic behind the mashing - names generally stick to English syntax and rules - but there are odd exceptions.

This seems to be done in the client somewhere, probably the wow executable, as I can't find anything in the server code that does this job.

Will experiment and let you know what I find!

--

EDIT:  OK, done some playing.  This is really complicated.  What happens is that the client somehow takes parts of the names in the dbc and splices them together.  It seems to apply some rules to prevent the doubling of letters and silly combinations, but these rules are not totally robust.  They seem to work on a vowel-consonant boundary system.  Generally, the front part of a name is spliced with the back part of another (but not always).  For example, if my dbc contained:

Robert
Richard
Michael
Jake
Henry
Montgomery


Conceivable output would be:

Robard
Jakert
Henrael
Richy
Miche
Montry
Montgomard
Jakomery


- anything but the original names in the list (this makes sense, as the Blizzard dbc contains many names of NPCs)

And, if it goes wrong:

Roaely

My dbc contains about 2500 medieval names for both males and females.  Not surprisingly, some of the combinations this spits out are a bit stupid, but nine times out of ten they're ok.  I was really hoping it would just pick a name from the list and use it 'as is', but I can live with the occasional weirdo.