Jump to content

Editing the traits/abilities (pilot/scientist/engineer) of the Kerbals


Recommended Posts

Hi there,

I like to continue my "old" career mode I've been playing now for almost a year. Unfortunately, I'm not really happy with the traits my favorite Kerbals have received after I've upgraded to 0.9. Moreover, I like to adjust their experience level based on all the missions they have done so far.

I was looking through the persistent.sfs, but I have not found any parameter indicating a specific trait or the experience points of my Kerbals.

Any help would be greatly appreciated!

Edited by Sebbi Lebga
Link to comment
Share on other sites

ksp_win/gamedata/squad/experience/traits.cfg controls what skills are applied to each category. There are 2 ways to to go about this. Either assign all skills to the category of pilot in the traits.cfg or you will have to start a new save and then copy the relevant code from the new save into your persistent.sfs. I don't have time to show how to do this right now cause I gotta work, but I'll check back later to see if you figured it out.

Link to comment
Share on other sites

ksp_win/gamedata/squad/experience/traits.cfg controls what skills are applied to each category. There are 2 ways to to go about this. Either assign all skills to the category of pilot in the traits.cfg

No, this would be boring, I like to have different traits for my Kerbals, but I like to assign them a trait based on their career so far.

or you will have to start a new save and then copy the relevant code from the new save into your persistent.sfs. I don't have time to show how to do this right now cause I gotta work, but I'll check back later to see if you figured it out.

Well, I compared a new save game with the "old" save game, but I haven't found "relevant" code, about the traits.

New game - Germore Kerman - Pilot

		KERBAL
{
name = Germore Kerman
type = Crew
brave = 0.3433791
dumb = 0.6005798
badS = False
state = Available
ToD = 190203.179432373
idx = 0
CAREER_LOG
{
flight = 2
0 = Flight,Kerbin
0 = Land,Kerbin
0 = Recover
1 = Flight,Kerbin
1 = Suborbit,Kerbin
1 = Land,Kerbin
1 = Recover
}
FLIGHT_LOG
{
flight = 2
}
}

Old game - Lembro Kerman - Engineer

		KERBAL
{
name = Lembro Kerman
type = Crew
brave = 0.6353436
dumb = 0.0689975
badS = False
state = Available
ToD = 4128972.50526689
idx = 0
CAREER_LOG
{
flight = 0
}
FLIGHT_LOG
{
flight = 0
}
}

At this point, I like to change Lembro's trait to pilot, but how do I do this, if I can't find the "relevant" part in the save game? I searched the "new" game for all the "Germore" entries, but there was no part defining the trait of him.

Moreover, Germore has already gained some experience, but I'm not able to trace his progress in the save file. Is the experience based on the amount of flights?

Link to comment
Share on other sites

I did some tests and edited the "new" save game. At first, I just replaced the entry of "Germore" with the entry of "Lembro". After resuming this game, I had an engineer called Lembro. The next thing I did was changing Lembro's name to "Limbro" and suddenly he was a scientist.

At this point, my assumption is that the trait of the Kerbal is somehow connected with his name. If this is true, then it would be interesting to know which file I need to edit in order to change the traits of my Kerbals.

Finally, I did some changes to the CAREER_LOG and FLIGHT_LOG part and this resulted in more experience points and even higher level for my Kerbals.

As a conclusion, adjusting the experience points/levels of my Kerbals can be done by going through the history of my game and inserting all their missions into the save file.

However, changing the trait of the Kerbals is still a mystery. I don't want to change their name in order to give them the "right" job. So it would be very interesting to find out, how it would be possible to change the connection between the name (or a certain string) and the resulting trait.

Edited by Sebbi Lebga
Link to comment
Share on other sites

Get the crew manifest add on you can edit or make new kerbals and decide of their really brave or really stupid or even badass

This can be also done by editing the save game. Moreover, I want to change if the kerbal is a pilot, scientist or engineer and not their base stats ;)

Link to comment
Share on other sites

At this point, my assumption is that the trait of the Kerbal is somehow connected with his name. If this is true, then it would be interesting to know which file I need to edit in order to change the traits of my Kerbals.

I was afraid of this. If the trait is "hard-coded" to the Kerbal's name, then it's going to take a little more than just a .cfg edit to change Jeb form a pilot to a scientist and etc. for any other Kerbal. I'll work on it some more tonight using some of the ideas you've already tried to see if I can figure it out.

Link to comment
Share on other sites

Is there a file that has all available names for kerbals? Maybe the info is there.

Re-training all kerbals that you have used is also a slog. I think I'll make a SSTO that takes 16+ kerbals to low kerbin orbit and back just to have them all with at least one level in their skill.

Possibly fire all engineers first, they are almost useless.

Edit: After thinking for a little bit more, making a numerical hash of the name and then taking modulo 3 would be less resource intensive and more robust.

Edited by bakanando
Link to comment
Share on other sites

Is there a file that has all available names for kerbals? Maybe the info is there.

Re-training all kerbals that you have used is also a slog. I think I'll make a SSTO that takes 16+ kerbals to low kerbin orbit and back just to have them all with at least one level in their skill.

Possibly fire all engineers first, they are almost useless.

Edit: After thinking for a little bit more, making a numerical hash of the name and then taking modulo 3 would be less resource intensive and more robust.

Here is the section from my save for Jeb, who has 12 flights I think :

ROSTER
{
KERBAL
{
name = Jebediah Kerman
type = Crew
brave = 0.5
dumb = 0.5
badS = True
state = Available
ToD = 0
idx = 0
CAREER_LOG
{
flight = 12
0 = Flight,Kerbin
0 = Suborbit,Kerbin
0 = Land,Kerbin
0 = ExitVessel,Kerbin
0 = Recover
1 = ExitVessel,Kerbin
1 = Flight,Kerbin
1 = BoardVessel,Kerbin
1 = Suborbit,Kerbin
1 = Orbit,Kerbin
1 = Land,Kerbin
1 = Recover
2 = Recover
3 = Recover
4 = Flight,Kerbin
4 = Suborbit,Kerbin
4 = Orbit,Kerbin
4 = Land,Kerbin
4 = Recover
5 = Flight,Kerbin
5 = Suborbit,Kerbin
5 = Orbit,Kerbin
5 = Land,Kerbin
5 = Recover
6 = Flight,Kerbin
6 = Suborbit,Kerbin
6 = Orbit,Kerbin
6 = Land,Kerbin
6 = Recover
7 = Flight,Kerbin
7 = Land,Kerbin
7 = ExitVessel,Kerbin
7 = BoardVessel,Kerbin
7 = Recover
8 = Flight,Kerbin
8 = Land,Kerbin
8 = Recover
9 = Flight,Kerbin
9 = Suborbit,Kerbin
9 = Orbit,Kerbin
9 = ExitVessel,Kerbin
9 = BoardVessel,Kerbin
9 = Escape,Mun
9 = ExitVessel,Mun
9 = BoardVessel,Mun
9 = Orbit,Mun
9 = Land,Kerbin
9 = Recover
10 = Flight,Kerbin
10 = Suborbit,Kerbin
10 = Orbit,Kerbin
10 = Escape,Mun
10 = Orbit,Mun
10 = Suborbit,Mun
10 = Land,Mun
10 = ExitVessel,Mun
10 = PlantFlag,Mun
10 = BoardVessel,Mun
10 = Land,Kerbin
10 = Recover
11 = Flight,Kerbin
11 = Suborbit,Kerbin
11 = Orbit,Kerbin
11 = Escape,Minmus
11 = Orbit,Minmus
11 = ExitVessel,Minmus
11 = BoardVessel,Minmus
11 = Suborbit,Minmus
11 = Land,Minmus
11 = PlantFlag,Minmus
11 = Land,Kerbin
11 = Recover
}
FLIGHT_LOG
{
flight = 12
}
}

As you can see, the game tracks activities for each flight for each Kerbal. Modifying each Kerbal from a .25 save is doable, but is going to be time consuming.

As far as I can tell from looking at the source code from sarbian's Kerbal Crew Manifest, the game generates Kerbal's much like it would generate a contract. The new abilities system looks to be tied in with this. So I think that once a Kerbal is assigned as an engineer, there is no way to change it through a .cfg edit. Hopefully, someone will update an existing mod or make a new mod that can do this.

Link to comment
Share on other sites

Here is the section from my save for Jeb, who has 12 flights I think :

-snip-

As you can see, the game tracks activities for each flight for each Kerbal. Modifying each Kerbal from a .25 save is doable, but is going to be time consuming.

As far as I can tell from looking at the source code from sarbian's Kerbal Crew Manifest, the game generates Kerbal's much like it would generate a contract. The new abilities system looks to be tied in with this. So I think that once a Kerbal is assigned as an engineer, there is no way to change it through a .cfg edit. Hopefully, someone will update an existing mod or make a new mod that can do this.

You might be able to modify it by adding just one flight (flight 0) that includes everything you've done with that particular kerbal, this way you'd get all the xp without having to do it verbosely.

Edit: I wonder if you get a log each time you perform a change of flight state (I.E. landed->orbit->landed->orbit->mun->landed would get one instance each or just once per flight).

I did some tests and edited the "new" save game. At first, I just replaced the entry of "Germore" with the entry of "Lembro". After resuming this game, I had an engineer called Lembro. The next thing I did was changing Lembro's name to "Limbro" and suddenly he was a scientist.

This is what I was talking about, maybe the assigned jobs are a function of the kerbal's name so it doesn't matter if you create a new kerbal that has a personalized name.

Edited by bakanando
Link to comment
Share on other sites

As you can see, the game tracks activities for each flight for each Kerbal. Modifying each Kerbal from a .25 save is doable, but is going to be time consuming.

Yep. In my case, I just have to rewatch all the episodes of my video series and insert the flights into the save file. Sure, it's a boring task, but it's doable.

As far as I can tell from looking at the source code from sarbian's Kerbal Crew Manifest, the game generates Kerbal's much like it would generate a contract. The new abilities system looks to be tied in with this. So I think that once a Kerbal is assigned as an engineer, there is no way to change it through a .cfg edit. Hopefully, someone will update an existing mod or make a new mod that can do this.

I don't think that this happens at the point of the Kerbal generation. As I did some tests, I also inserted a new Kerbal with a completely random string as his name. Afterwards I created a fresh save game and inserted the same random string, too. Both save games then had this random Kerbal with the exact same trait.

This is what I was talking about, maybe the assigned jobs are a function of the kerbal's name so it doesn't matter if you create a new kerbal that has a personalized name.

I would assume that a random number (1-3) which is generated during the Kerbal generation would work just as well. This number could then be stored inside the save file. Furthermore, this would even open up the whole system for modders, who like to create additional traits.

Maybe I should start a thread in the suggestion forum ... :cool:

Link to comment
Share on other sites

I'd like to make a little "up" on this tread, because i'm looking for a way to edit the kerbals class too, to give them the name i want.

Il tried to simply hire kerbals ingame, and then change their name in the persistent file, but whatever the name i'll give them, they always become "pilots" even if they where engeneers or scientists before. It looks like the kerbal classes changes according to their names, but i didn't found no rules about it (the use of specific letters, names length, etc)

Link to comment
Share on other sites

...It looks like the kerbal classes changes according to their names, but i didn't found no rules about it (the use of specific letters, names length, etc)

<technicalstuff>I don't know how the code they use works; but i'm gonna guess that it generates it via random seed. The letters turn into a pseudo-random number based on the name, and the class code randomly picks a class using that seed.</technicalstuff>

That's how random-seed systems work in most games, anyhow.

Link to comment
Share on other sites

Erk. It sounds a lot like "they're nothing you can do".

But once a kerbal got a class, he keeps it, until you change is name. So if it is randomly generated at first, shouldn't it be saved somewhere ?

I think it might be randomly-determined on game-load, and since it uses the name as a random seed and since the name should be the same one each time, it's always the same; which is really weird, considering it limits what modders can do with classes (without breaking every save, anyways)

In theory, it should mean if you have a Kerbal named Billy-Bobdock on one save, and he's a pilot, if you get another kerbal named Billy-Bobdock in another save, he'll also be a pilot. I haven't done any tests to confirm this, though.

Link to comment
Share on other sites

At this point, my assumption is that the trait of the Kerbal is somehow connected with his name. If this is true, then it would be interesting to know which file I need to edit in order to change the traits of my Kerbals.

I thought that too, but am not so sure now.

I renamed a few Kerbals, noticed that this also changes their profession, didn't hire them. Soon after that, my game crashed. Upon the next launch of KSP, the renamed Kerbals had the professions I had intended. Being quite happy with that result, I didn't explore it any further, though.

Link to comment
Share on other sites

looks like the only think you can do is swap the names of the kerbals around - so if you have a pilot in orbit around LKO and wanted an engineer but have an engineer in a base on duna but wanted a pilot you could swap the two names around. Whether you would consider this cheating or just upgrading an old save to the new game or not (personally I'd be the latter - if you started from scratch you would've made sure you had the right mix before launch).

Link to comment
Share on other sites

I've been curious on this as well. I don't think it is random since there are three constants that appear in every game and they are always the same profession.

I would bet that the names are converted to numbers and profession is derived from prime multiples. Might be a straight substitution (A=1, B=2...) or something less mundane. If I can figure out Jeb, Bill and Bob, the rest should readily follow. Will have a crack at it when I have a bit more time. (Unless someone else figures it out sooner, someone usually does in this community!)

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