Jump to content

Name Prefixes based on exp/job


Venusgate

Recommended Posts

Hey there Modders,

Thinking about the Kseudonym and other mods like it that modify the stock naming convention for the kerbals, wouldn't it me neat if each kerbal had a title prefix based on and upgraded with their job and experience level?

Examples:

Pilot

0=Trainee Jebediah Kerman

1=?

2=?

3= CFI Jebediah Kerman

4=?

5= Capt. Jebediah Kerman

Scientist

0= Asst. Tech Bob Kerman

1=?

2=?

3= Mission Specialist Bob Kerman

4=?

5= Dr. Bob Kerman

Engineer

0=Handyman Bill Kerman

1=?

2=?

3=Flight Engineer Bill Kerman

4=?

5= Sen. Eng. Bill Kerman

Thoughts?

Link to comment
Share on other sites

Since their role (pilot/engineer/scientist) is name-based, actually changing the name from "Doodfrod Kerman" to "Pilot Doodfrod Kerman" might change him into a scientist. Oops.

If we knew the algorithm for name->role, we could reverse engineer it and add a middle initial or something so that the name matches.. "Doodfrod Kerman" might become "Handyman Doodfrod L. Kerman".. but then his middle initial would have to change and he'd be "Flight Engineer Doodfrod F. Kerman" and then "Sen. Eng. Doodfrod X. Kerman".

Maybe instead of a middle initial, a different nickname?

* Handyman Doodfrod 'Maverick' Kerman

* Flight Engineer Doodfrod 'Slappy' Kerman

* Sen. Eng. Doodfrod 'Two Shoes' Kerman

Those names are kind of long though, and might not fit in some windows.

Best case scenario would be that we could add spaces to the end of the name to give a Kerbal the right role.

If you're not actually changing the name, then you'd have to replace all the UI elements where the name is displayed to show your custom name instead. That's a lot of work and may not be possible in all cases.

Link to comment
Share on other sites

Since their role (pilot/engineer/scientist) is name-based, actually changing the name from "Doodfrod Kerman" to "Pilot Doodfrod Kerman" might change him into a scientist. Oops.

Only when the ProtoCrewMember is loaded from a save. They otherwise have public members related to their experienceTrait. I only played a bit with it, but it should be relatively straightforward to rename them. If you can't figure out how to switch the name back before the game saves (and off the top of my head I don't know how you might manage this), then you could use something like KerbalStats to keep track of their "real" trait and override it right after a save instead.

I think the main problem will be with long names. Have you considered putting a symbol in their IVA portrait windows instead? Maybe some pilot's wings with a number of stars around it to denote rank, for example. You get to sidestep all the experience trait problems this way

Link to comment
Share on other sites

Maybe he meant to change the title written under the name instead of changing the kerbal's name itself.

I didn't even think of that - and that would produce mostly the same effect (although I'm kind of married to the idea of seeing "Cmdr. Jebediah Kerman" under jebs IVA face :P ).

It would definitely circumvent the character limitation though.

- - - Updated - - -

Since their role (pilot/engineer/scientist) is name-based, actually changing the name from "Doodfrod Kerman" to "Pilot Doodfrod Kerman" might change him into a scientist. Oops.

If we knew the algorithm for name->role, we could reverse engineer it and add a middle initial or something so that the name matches.. "Doodfrod Kerman" might become "Handyman Doodfrod L. Kerman".. but then his middle initial would have to change and he'd be "Flight Engineer Doodfrod F. Kerman" and then "Sen. Eng. Doodfrod X. Kerman".

Maybe instead of a middle initial, a different nickname?

* Handyman Doodfrod 'Maverick' Kerman

* Flight Engineer Doodfrod 'Slappy' Kerman

* Sen. Eng. Doodfrod 'Two Shoes' Kerman

Those names are kind of long though, and might not fit in some windows.

Best case scenario would be that we could add spaces to the end of the name to give a Kerbal the right role.

If you're not actually changing the name, then you'd have to replace all the UI elements where the name is displayed to show your custom name instead. That's a lot of work and may not be possible in all cases.

I would think that if you're adding code to make middle initials or nicknames, it would be just as simple to add code to produce prefixes. I doubt the algorithm says "look for FIRST word in name."

However, that does give me an idea - perhaps the key would be finding the code that adds "Kerman" to each of the names, add a few if/than statements, and then figure out how to make it auto update each time the Kerbal levels.

Link to comment
Share on other sites

It doesn't. I rename my Kerbals to give them specific professions by changing the "Kerman" in their name to "Ferman" or "Berman" or (in an extreme case) even "Pferman."

You lost me... Is that something that auto detects? or did you have to write something that said "If name contains "Berman", Kerbal is Engineer"?

Link to comment
Share on other sites

You lost me... Is that something that auto detects? or did you have to write something that said "If name contains "Berman", Kerbal is Engineer"?

Nothing so smooth (and that woudln't work). I want a specific name (Say Freddy) to be a specific occupation (Say Engineer). I go into my persistent file and rename a bunch of Kerbals to "Freddy." I'll make Freddy Kerman, Freddy Berman, Freddy Terman, etc. I'll then load that save and see which last names give me the correct occupation and then use that one to name the "real" Freddy.

I actually have a whole sandbox save dedicated to this simple task, so I can just search/replace the first name and have all the same last name possibilities, because I'm doing it for my YouTube series and have about 30 viewers who have submitted their names to be on the roster.

And to be clear, this is not something I designed to work this way. The GAME works this way. This is just my workaround to get Kerbals with the correct first names and jobs.

Link to comment
Share on other sites

Nothing so smooth (and that woudln't work). I want a specific name (Say Freddy) to be a specific occupation (Say Engineer). I go into my persistent file and rename a bunch of Kerbals to "Freddy." I'll make Freddy Kerman, Freddy Berman, Freddy Terman, etc. I'll then load that save and see which last names give me the correct occupation and then use that one to name the "real" Freddy.

I actually have a whole sandbox save dedicated to this simple task, so I can just search/replace the first name and have all the same last name possibilities, because I'm doing it for my YouTube series and have about 30 viewers who have submitted their names to be on the roster.

And to be clear, this is not something I designed to work this way. The GAME works this way. This is just my workaround to get Kerbals with the correct first names and jobs.

Very peculiar. What file do you alter to change the names?

Link to comment
Share on other sites

Very peculiar. What file do you alter to change the names?

persistent.sfs (your main save file). Open it and search for "Roster"

Make sure you do these 5 things:

  1. Back up your save before doing anything
  2. Search for "ROSTER" to find where your roster is.
  3. Don't change applicants, only hired crew.
  4. Don't change the names of anybody who has done anything. If you really want to, change their name EVERYWHERE in the file.
  5. If you change someone you rescued from orbit, you must ALSO change their name in the rescue contract.

After you make the change, before doing anything else in-game, go into the Astronaut complex and back out. If your game freezes, you messed something up (Likely not following 4 or 5 correctly). Restore from your save and try again.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...