Jump to content

Kerbal Profession


Recommended Posts

Not directly. The profession is DIRECTLY linked to the Kerbal's EXACT name. So any Kerbal named "Jebediah Kerman" or "Valentina Kerman" will be a pilot, for example.

The ONLY way to permanently set a Kerbal's profession is to change his or her name to match that profession. The best way I've found to do this is to keep trying different names until you get one that works.

And yes it's a pain, and yes we've asked them to change it. And no, they haven't even responded as to if they even know how big an annoyance it is.

Link to comment
Share on other sites

Just to be (marginally more) clear:

  1. The "Orange Four" have hard-coded names: Not only will Jebediah Kerman be a pilot, but he'll also be an orange-suit, and changing his name in any way will cause him to be a white-suit.
  2. I've spent some time trying to figure out the "formula" for Name => Profession. I've had... marginal success? The good news is that I can predict with 100% accuracy what the profession will be for a kerbal whose name is five characters or shorter (that's five total characters, and includes spaces, so "Bob Kerman" is a ten-character name). The bad news is that for names longer than five characters I'm basically shooting 33%, so something happens after the fifth character that throws me off. Unfortunately, I have no idea what that is or where to start digging, so unless I get hit by a flash of brilliance, we're pretty much stuck with "random trial-and-error".

Link to comment
Share on other sites

I've spent some time trying to figure out the "formula" for Name => Profession. I've had... marginal success? The good news is that I can predict with 100% accuracy what the profession will be for a kerbal whose name is five characters or shorter (that's five total characters, and includes spaces, so "Bob Kerman" is a ten-character name). The bad news is that for names longer than five characters I'm basically shooting 33%, so something happens after the fifth character that throws me off. Unfortunately, I have no idea what that is or where to start digging, so unless I get hit by a flash of brilliance, we're pretty much stuck with "random trial-and-error".


I suspect there's no "formula" in any meaningful sense of the word, at least not one that you could deduce by trial-and-error experiment.

If I were a software engineer (which I am) :wink: and given the task of making names + professions act like this, by far the simplest and most reliable thing I could do would be to just take the hash code of the name and then modulo-3 that. For a non-programmer, you can think of it as a deterministic random number: the same input (name) will always give the same output (profession), but there's no way to predict which profession a given input will generate without actually doing the math, and the math is complicated enough that you're unlikely to be able to reverse-engineer it. You just need to know what math the code is using.

That's not to say that that's actually how Squad did it, I have no idea what they did; just that it would be the simplest thing to code, and programmers are typically big fans of Occam's razor.

Edited by Snark
Link to comment
Share on other sites

I suspect there's no "formula" in any meaningful sense of the word, at least not one that you could deduce by trial-and-error experiment.

If I were a software engineer (which I am) :wink: and given the task of making names + professions act like this, by far the simplest and most reliable thing I could do would be to just take the hash code of the name and then modulo-3 that. For a non-programmer, you can think of it as a deterministic random number: the same input (name) will always give the same output (profession), but there's no way to predict which profession a given input will generate without actually doing the math, and the math is complicated enough that you're unlikely to be able to reverse-engineer it. You just need to know what math the code is using.

That's not to say that that's actually how Squad did it, I have no idea what they did; just that it would be the simplest thing to code, and programmers are typically big fans of Occam's razor.

That definitely may be the case... I'm not a software engineer (or an anything engineer) (unless "tax accountant" counts as being a "tax engineer") (which I think it should), so I'm just in the "take stabs and see what happens" are when it comes to that stuff.

For what it's worth, names of five total characters or less are determined on the remainder of the sum of the ASCII code values of each character in the name, divided by 3. So if a kerbal's name is "ccccc", then the sum is 500, and the remainder when divided by 3 is 2. So "ccccc" will be a Scientist (remainder of 1 is Engineer, remainder of zero is Pilot).

Unfortunately, that breaks down beyond five characters.

Strangely (to me, at least), every single six-character name I've tested has been an Engineer. After that, it becomes seemingly random.

Thankfully I only spent about three or four hours of my life figuring this out before giving up. :P

Link to comment
Share on other sites

I've spent some time trying to figure out the "formula" for Name => Profession. I've had... marginal success? The good news is that I can predict with 100% accuracy what the profession will be for a kerbal whose name is five characters or shorter (that's five total characters, and includes spaces, so "Bob Kerman" is a ten-character name). The bad news is that for names longer than five characters I'm basically shooting 33%, so something happens after the fifth character that throws me off. Unfortunately, I have no idea what that is or where to start digging, so unless I get hit by a flash of brilliance, we're pretty much stuck with "random trial-and-error".
I suspect there's no "formula" in any meaningful sense of the word, at least not one that you could deduce by trial-and-error experiment.

If I were a software engineer (which I am) :wink: and given the task of making names + professions act like this, by far the simplest and most reliable thing I could do would be to just take the hash code of the name and then modulo-3 that. For a non-programmer, you can think of it as a deterministic random number: the same input (name) will always give the same output (profession), but there's no way to predict which profession a given input will generate without actually doing the math, and the math is complicated enough that you're unlikely to be able to reverse-engineer it. You just need to know what math the code is using.

That's not to say that that's actually how Squad did it, I have no idea what they did; just that it would be the simplest thing to code, and programmers are typically big fans of Occam's razor.

According to a number of conversations I had with various add-on authors and sources close to the devs, a Kerbal's profession is indeed based on the hash of said Kerbal's name. Apparently, the dev's justification was that "allows persistence across savegames".

Personally, I would prefer the system be modified to store the result of the hash generation with each Kerbal as a string; users (and plugins) can then edit this string to change the Kerbal's profession easily.

Link to comment
Share on other sites

According to a number of conversations I had with various add-on authors and sources close to the devs, a Kerbal's profession is indeed based on the hash of said Kerbal's name.

Yes, and some other math bits I think associated with the hashing. It's a clever system, but annoying to deal with inside.

Personally, I would prefer the system be modified to store the result of the hash generation with each Kerbal as a string; users (and plugins) can then edit this string to change the Kerbal's profession easily.

This would be glorious!

Cheers,

~Claw

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...