Jump to content

How are Kerbal Experience Stats and Specializations stored? (In the Savefile?)


Recommended Posts

I've been working on a career save since the release of v0.25, where I've gone to the trouble of recording My Kerbals' flight experience manually. That is, I've recorded each of their Flights, achievements, EVA Time, etc. So with the release of Kerbal XP and Specialization, I was hoping to fix the random assignments to better match what My Kerbals have actually achieved thus far. That and I'd like to assign their roles manually, not randomly.

Now I'm no stranger to editing save files to customize my game, everything from cheating vessels into orbit around other planets to test them there, to resurrecting Kerbals, to Giving myself unlimited Funds and Science. I've become something of a master of save file editing, but I can't for the life of me find out where the information on Crew Roles is stored. I checked the ROSTER[] section of the .sfs and found the flight experience logging, but there's nothing there, at least as far as I can tell, indicating what role each Kerbal is assigned. I've searched the entire .sfs and come up dry. Does anybody have any clue where this data is stored?

EDIT: Through Trial and Error, I've found that the individual role of each Kerbal is assigned based on their randomly generated name. This Allows the original Three crew to always have the same roles, and randomly generates them in tandem with the generation of names for random Kerbals.

Edited by MarcRan17
Adding findings
Link to comment
Share on other sites

There's no entry for assigning Kerbals to a job. There is no obvious pattern to any of the attributes of a Kerbal being used to assign their roles either. Not Brave, Dumb, or BadS. The only conclusion I can draw from that is the role is determined by using the Kerbal's name as a random seed, or used against some pattern in a similar method, which seems rather lazy and overly clever at the same time. I'm a bit disappointed by this. (It does mean Kerbals are predetermined to their fates simply by their names alone. There is no fate but that which we create? Ha.)

While I'm only a few (7) flights into a test save, it appears that Kerbal experience level is determined either by raw number of flights or by a number of flight events. I need more data for that one.

Edit: The best way to conclude what determines their role would be science: Copy kerbals between saves, see if the role is the same. Swap around Brave/Dumb/BadS settings, see if that has any bearing. I was too busy building/tweaking code and poking about the KSP API tonight to really give that a stab.

Edited by Cydonian Monk
Link to comment
Share on other sites

Huh. Never thought of the name having an effect... that would be clever though. It guarantees that the original trio always stay the same and would mesh nicely with the random name generator. As far as Experience, yeah I've figured about as much as you have. Lemme know what you turn up, I'll see what I can find by tossing Kerbals back and forth over saves...

EDIT 1: Moving A Kerbal's Roster Definition from one .sfs to another without changing any values, yields identical roles.

EDIT 2: Changing one letter in a Kerbal's Name appears to change his profession (name = random seed theory looking good)

EDIT 3: Giving two Kerbals Identical names without changing any of their other values, yields identical roles.

EDIT 4: Removing one letter at a time does not yield a pattern wherein the number of letters determines the role.

EDIT 5: Adding the BadS Trait does not yield a change in role.

EDIT 6: Changing Brave and Dumb stats also does not change a Kerbal's Role.

CONCLUSION: Kerbal Specialization is derived directly from his/her name, and disregards any other identifying stats such as Courage, Stupidity, "Badass", or other.

Edited by MarcRan17
Science
Link to comment
Share on other sites

Well, this is unfortunate for those of us who already have a single kerbal on a long term mission who needs to be able to fix stuff, and has a name that can't be changed for reasons. But, having reviewed the traits of the OoE/CoM cast, I'm reasonably happy.

Plus, pilots can be made redundant by mechjeb. Engineers can be done without if you make sure that certain parts aren't going to break.

Perhaps a mod will be able give multiple specialisations to kerbals in the near future.

Edited by Tw1
Link to comment
Share on other sites

Might as well copy this here....

I too was hoping for a more in-depth solution. Really I was expecting to just grab raw recruits and be able to train them at the Astronaut Complex for their future roles in life.

For those kerbals of mine that simply have to have a certain job: I'm giving them Middle Initials, changing until they fall into the right class. Think I'll look at the various plugins that let you rename kerbals and see if I can find an easy software-based solution for this.

Edited by Cydonian Monk
Link to comment
Share on other sites

I was really hoping for a lot of customizable options and modding support with this feature. Then you could have a kerbal be half skilled in 2 jobs, third skilled in 3, or make mods for new skills altogether. I suppose a mod could still do this, but it would require a LOT more work. One thing a mod could try to do is creating a second name for each kerbal, so that one name controls the skill set, and the other is the one that is actually displayed.

Edit: That middle initial idea is really clever, I'd like to know if it works.

Link to comment
Share on other sites

I've found that the individual role of each Kerbal is assigned based on their randomly generated name.

How disappointing.

This Allows forces the original Three crew to always have the same roles...

Well, it looks like the first step in starting a new career is going to be wiping out two Kerbals from the save file. And it will always be the same two.

Link to comment
Share on other sites

An update: There's a nice little file in GameData/Squad/Experience named Traits.cfg. You can copy all of the effects of each "class" into each of the others. All Kerbals are then effectively of the same class, though they'll still have the job titles. Meh, not fun gameplay wise.

This file is also how you add custom traits. I added a TestPilot class that was both Engineer and Pilot that was then randomly assigned to my kerbals. This would allow for some interesting cross-class kerbals, but is really just as "cheaty" as the first. Doesn't handle being able to select the class of the kerbal.

Middle initials don't work reliably for changing the class, but prefixes seem to. Think: PhD, Dr. Still not foolproof.

Edited by Cydonian Monk
Link to comment
Share on other sites

  • 2 weeks later...

If initials fail to reliably change traits, what about the Sr. Jr. III, IV, IX suffixes?

On that note, has anyone tried simplifying things down to naming their kerbals 1, 2, 3 (and if those are all the same specialty, adding in 4-0)? Once we get a number=specialty we can work on cracking the code for letters=number, then it's just a matter of how the various letters combine (is Bob Kerman B+o+b+K+e+r+m+a+n modulo 3, or maybe B+o+b-(K+e+r+m+a+n) modulo 3, or something else entirely). Is Jebediah Kerman XXIX still a pilot?

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