Log in

View Full Version : [WIP] Historic Crew Names


LukeFF
08-05-07, 12:27 AM
Yeah, this will probably go down as the most tedious, time consuming mod in the history of SH4. :D Anyways, I've become pretty peeved at some of the ridiculous names used for AI crewmen, so I've decided to do something about it. Using the comprehensive list of names of all American submariners lost during WWII (from here (http://www.subvetpaul.com/DiedA1Pass.htm)), commissioning crew lists, medal citations, etc., I am creating what will end up being a massive list of names the game can choose from. I'm not even through the letter B yet, but already I have over 60 surnames and first names compiled so far. Beyond the typical first names (tons of Johns, Charles and Georges), there are the others you just don't ever really hear, such as:

Hermas, Hollis, and General (yes, someone named their kid General :D)

and last names, including:

Beutelspacher, Boo, and Argersinger

This is going to take a long time to complete, but I vow to complete it. More news to come later. :yep:

longdog499
08-05-07, 06:22 AM
Great idea Luke.Who on earth thought up these names?I know you Americans come up with some pretty exotic ones sometimes but ' Alexander Wreford B Brighton' and 'Earle Teddy A Lander' ? COME ON! :rotfl:

jdkbph
08-05-07, 10:30 AM
I think the problem with the names might go a bit deeper than just the database.

A typical US/American name will either be...
<firstname> <lastname> or...
<firstname> <middleinitial> <lastname> or...
<firstname> <middlename> <lastname> or, somewhat rarely...
<firstinitial> <middlename> <lastname>
It's pretty obvious that first names and middle names come from the NormalUSNames list, while last names come from the Surnames list. Middle initials are apparently generated by the code (I don't see a list of middle initials anywhere).

I'm guessing somewhere in the real code is a sort of name building algorithm which randomly selects an entry from each of the lists and chains them together, based on a probability for inclusion for each name element (firstname, middlename, middleinitial, lastname). Apparently, the probability for first and last names being included is 1, while middle name and middle initial are both less than 1 but greater than 0.

As a result there is a possibility of generating a combination that looks like this:
<firstname> <middlename> <middleinitial> <lastname>
If this is so, it's probably because the process is missing a step. There should be a function to exclude middle name when middle initial is selected, and vice-versa.

Or at least that's how it looks to me. And if I'm right, unless we can find whatever controls the format for building a name from those lists you're editing, we're still going to end up with silly names upwards of (apparently) 25% of the time.

JD

tater
08-05-07, 10:44 AM
How is it the crew can have long names, but the player is limited to so few characters?

tater

Sailor Steve
08-05-07, 02:39 PM
Well done, LukeFF! JScones put something similar into SH3 Commander, but he was allowed to use Uboat.net's database of all known u-boatmen (at least I think that's what he said).

This will be good to see; I'm just glad it's you doing it and not me.:rotfl: :rock:

LukeFF
08-05-07, 05:11 PM
I think the problem with the names might go a bit deeper than just the database...

Yes, I wish there was a way to fix the issue of such lonnnnnng names being generated by the game. Of all the names I've come across so far in the loss list, only one or two names so far have four parts in it. I'll look into it, but I think it's something hardcoded.

JScones
08-05-07, 07:06 PM
Well done, LukeFF! JScones put something similar into SH3 Commander, but he was allowed to use Uboat.net's database of all known u-boatmen (at least I think that's what he said).
I obtained the names from www.ubootwaffe.net (http://www.ubootwaffe.net) (with permission of course). 40,454 first names and 41,786 last names, meaning 1.7+ billion random crew name possibilities. :doh:

Note, in my list duplicate names were included to reflect commonality. I assume that will also be the case here? Otherwise Hermis will appear just as much as John. ;)

One problem you may have to watch out for are created names being too long for the game display. In SH3Cmdr, I tested the resulting name to make sure that it wasn't longer than SH3's display width. Without such a test, long names may run the risk of appearing truncated. Not a biggy, just something to watch out for.

Fearless
08-05-07, 10:47 PM
Hmmm!! maybe sticking to just <firstname><lastname> will cover it. The spaces between the names are counted as well.

LukeFF
08-06-07, 01:51 AM
Note, in my list duplicate names were included to reflect commonality. I assume that will also be the case here? Otherwise Hermis will appear just as much as John. ;)

Very good idea, but I'm so far along in the project now that I don't want to restart it. Ol' Hermie will have to be just as common as John. :D

JScones
08-06-07, 02:31 AM
Hope you don't mind, I compiled a list of first names for you from the web page you linked, in comma separated format (let me know if you want it any other way)... http://www.users.on.net/~jscones/FirstNames.7z

Took about 10 mins with the right tools. ;)

Will do the surnames if you want too.

The rest is then up to you.

JScones
08-06-07, 02:49 AM
And surnames... http://www.users.on.net/~jscones/LastNames.7z

That's 3564 first names x 3616 surnames.

Quick and dirty, so you'll need to go through and remove any crap and do some general QA (just noticed a "struck in head" surname still there and a comma after the last first name), but hopefully it will save you some time. All the obvious junk has been removed.

I excluded middle names from the first name list, but can pop them back in if you wish.

Or feel free to discard the lot and continue doing what you are doing.

Enjoy!

LukeFF
08-06-07, 04:22 PM
Wow, JS! Thanks a bunch!

Took about 10 mins with the right tools. ;)

What exactly would those be? :hmm:

LukeFF
08-06-07, 04:42 PM
Grr, now this is frustrating. I just combined those two files together into the proper format for the game, activated it via JSGME, and what do I get? Nothing but blank lines for the crewmember's names. :roll:

Could somebody check this file out and see if I've made a mistake somewhere in the file format?

http://files.filefront.com/Historic+Crew+Names+BETAzip/;8244641;;/fileinfo.html

Frederf
08-06-07, 04:53 PM
What are the side effects when overwriting values in TM1.4 when applying this mod?

LukeFF
08-06-07, 04:53 PM
What are the side effects when overwriting values in TM1.4 when applying this mod?
Nothing

And, might I add, this mod is still a WIP and a beta, as I've not got it working correctly yet. I need someone to see if there's a reason why the game isn't generating names properly with this new file.

JScones
08-06-07, 09:29 PM
Not having SH4 installed, I'm not sure of the file format, but if the list of names is stored comma delimited, like the files I did for you, then you may simply have too many names for SH4 to handle.

As a test, take all but about 20 or so out. If that works, then this will most likely be the problem. Add them back in chunks until it fails.

This is assuming, of course, that your file is set up right to begin with - others can check that possibility first. ;)

jdkbph
08-06-07, 09:53 PM
Grr, now this is frustrating. I just combined those two files together into the proper format for the game, activated it via JSGME, and what do I get? Nothing but blank lines for the crewmember's names. :roll:

Could somebody check this file out and see if I've made a mistake somewhere in the file format?

http://files.filefront.com/Historic+Crew+Names+BETAzip/;8244641;;/fileinfo.html

I experimented with it a little bit to eliminate some possibilties.

I removed all the ' and . characters as well as the spaces between the multi-part names. I also looked at it in Word and removed all the manual line breaks that don't belong there.

None of these things, by themselves, fixed the problem... but I suspect they still need to be removed in order for the list to work correctly.

Anyway, that brought me to file size or the actual number of names in the lists.

So as a test I deleted most of the surnames from both sections (1 and 2) and that didn't work. Then I tried deleting a bunch of names from each of the 4 sections and hey presto!

So the problem appears to be that there's an upper limit on the number of names that can be in each of the four sections (Names 1 and 2, and Surnames 1 and 2).

I'm not sure exactly what that limit is, but I seem to have got under it when I deleted approximately half the names from each of those sections in your list.

BTW, it seems the devs got the labels backward here. For this to work, you need to put first names under the Surnames= section and last names under the Names= sections.

Go figure.

JD

JScones
08-06-07, 11:56 PM
Took about 10 mins with the right tools. ;)

What exactly would those be? :hmm:
Notepad, Excel and Word. Throw in a quick Excel macro, and it's done. :smug:

Anyway, that brought me to file size or the actual number of names in the lists.

So as a test I deleted most of the surnames from both sections (1 and 2) and that didn't work. Then I tried deleting a bunch of names from each of the 4 sections and hey presto!

So the problem appears to be that there's an upper limit on the number of names that can be in each of the four sections (Names 1 and 2, and Surnames 1 and 2).

I'm not sure exactly what that limit is, but I seem to have got under it when I deleted approximately half the names from each of those sections in your list.
Yep, exactly as I mused above. I had the same problem with SH3Cmdr - the earlier versions of it consisted of merely a comma delimited list of names. I had to re-do it a different way to get around it (not possible here unfortunately without dev support).

You may find the limit is 2047 characters. If you are lucky, it could be as high as 32kb. Trial and error, as you have done, is the best way to find out.

LukeFF
08-07-07, 01:18 AM
Hmph, so my suspicion that it's the file size is correct. I'm going to have to figure out then, how to go about getting around this limitation.

JScones
08-07-07, 06:12 AM
Without SH4 dev support (read: a change) you may not be able to...but good luck. :up:

jdkbph
08-07-07, 07:37 PM
Bad news I'm afraid.

It's definitely the number of names in the list that causes the problem.

The list of first names is easy to pare down just by removing duplicates in equal proportions, and all of the nick names (eg, Joe, Frank, Bill) that have proper name equivalents in the list (eg, Joseph, Francis or Franklin, William).

Unfortunately, the list of last names is not so easy. I first tried reducing the proprtions of the duplicates to about a half, then a third, but it was still too many. Then I removed ALL the duplicates, and it's still too big.

So unless you want to start dropping names entirely (which I understand is not in the spirit of the thing) there's no way that I can see to make it work.

I tried.... :-?

JD

LukeFF
08-07-07, 07:40 PM
Bad news I'm afraid.

It's definitely the number of names in the list that causes the problem...

JD

Grr...Thank you for trying, though. I was going to do what you did, but I guess I'll spare myself the effort. Looks like I might just have to drop some names, but I really don't want to do that.

LukeFF
03-24-08, 01:01 AM
Finally got around to trying my hand at this again. Using the above-mentioned list of names, I cut out all of the duplicates and then re-loaded the file. Now I get a "Can not find 'Surnames' in 'CrewMemberNames 1'" error when I try to load up a mission with an American sub. :damn:

Why do things like this have to be more difficult than in SH3? It's a simple little text file, but the game doesn't like it? Utterly ridiculous.

groomsie
07-23-08, 12:05 PM
I'm into my 1st career, commencing my 6th War Patrol. I've worked out a system to rotate crew, and thought I'd seen some duplicate names, but in looking over my crew in more detail last night I was shocked to find I have currently on board:

2 Charles Bush
3 Edward D. Mann
2 Otis Finn

Their ranks differ (as they have been on board for different times) but it is clear their base ratings were identical. Clearly the name generation database is too small, and searching today I saw there has been some work on this. However, it appears that it was stopped (or is at least not yet complete). Any update?

Probably too much to hope for a fix in 1.5?

aanker
07-23-08, 07:57 PM
I'm into my 1st career, commencing my 6th War Patrol. I've worked out a system to rotate crew, and thought I'd seen some duplicate names, but in looking over my crew in more detail last night I was shocked to find I have currently on board:

2 Charles Bush
3 Edward D. Mann
2 Otis Finn

Their ranks differ (as they have been on board for different times) but it is clear their base ratings were identical. Clearly the name generation database is too small, and searching today I saw there has been some work on this. However, it appears that it was stopped (or is at least not yet complete). Any update?


I can confirm this too in SH4 ver. 1.5 US Pacific Theatre. In Base the names of at least 2 (available) crewmembers are the same as crew onboard, with the same ability levels, but different ranks of course. Despite their high abilities I'm reluctant to recruit them in case having 3 "Kevin H. Schmitt's" affects (triples) their fatigue level or does something else ...

Art

Seminole
07-24-08, 08:31 AM
:lurk:


and General (yes, someone named their kid General


:hmm: ..1970's..early...I served with a guy who's last name was: CUSTER... just guess what his first name was....:yep: :yep: :yep:



...and what POed us most, his felow servicemen, was the fact that with a name like that..it was impossible to come up with the appropriate smartass nickname for the guy. :huh: :nope:...which of course we all gave one another...

groomsie
07-24-08, 08:57 AM
Well, I have not observed fatigue doubling or tripling with duplicate (or triplicate) names so I'm not worried about that, but the skills being so similar leads to placing them in same compartment so that can be confusing.

Seminole, that is pretty funny. The nicknames are a big part of service life. I recall on my 1st class midshipman cruise I was sent to USS Bunker Hill (CG-52) in Japan. I checked onboard after the longest flight (up to that point) in my life, exhausted. The officer of the deck introduced himself as "Brooks Ensign". I was tired and thought, since he was an Ensign, that his last name was Brooks and that it was an odd way to introduce yourself. Only later did I find he was actually Ensign Brooks Ensign, or Ensign Ensign as the crew on 1MC delighted in announcing...

RFB Team
07-24-08, 11:47 AM
Their ranks differ (as they have been on board for different times) but it is clear their base ratings were identical. Clearly the name generation database is too small, and searching today I saw there has been some work on this. However, it appears that it was stopped (or is at least not yet complete). Any update?

Probably too much to hope for a fix in 1.5?

The American names database has been greatly updated for the RFB mod. Probably should release it as a stand-alone mod at some point...

groomsie
07-24-08, 02:11 PM
Thanks for the direction there "RFB_Team"...Once I'd set up with TMO I've been playing with that and haven't downloaded RFB to try yet...I'm working through an issue with freeing up some hard drive space (had decided to buy the U-Boat Expansion, but not enough free space so need to work on that--if anyone can offer tips (off topic) to removing a volume from a RAID-1 mirror set-up drop me a note please).

Once I fix that issue and finish the career I'm on I think I'll need to give RFB a try and see which I prefer.