Difference between revisions of "Tutorial:Modifing Kerbals"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Spliced the two tutorials)
(33 intermediate revisions by 14 users not shown)
Line 1: Line 1:
For years (all those ones you spent timewarping to Jool) Kerbal kind has had the last name Kerman, but no longer..
+
{{Underlinked|date=April 2014}}
 +
{{TOC|align=right}}
 +
{{Box|type=warning|This tutorial requires you to edit the main configuration file for a saved game. It is recommended that you make a backup copy of the file prior to editing in the event your editing prevents the saved game from loading.  If you attempt to complete this tutorial while KSP is running, your save file will be severely damaged.}}
 +
This tutorial will detail how to modify or create Kerbals. Customization is limited to their names, gender, type, behavior, and status.
  
Today, I'm going to teach you to rename your Kerbals with whatever name you like! You can make Yuri Kerman, Neil Armstrong, or Mr. Munman if you really want. I personally use it for giving them the names of my friends and pile driving them with a rocket.
+
==Requirements==
 +
*Knowledge of the location of the [[Root directory|KSP installation directory]].
 +
*Simple text editor. (e.g. Notepad on Windows, TextEdit on Mac)
  
==NOTICE==
+
==Locating and understanding the ROSTER section==
This tutorial works on '''both Windows and Mac'''. The only difference is that the Kerbal Space Program directory will be named '''KSP-osx''' rather than '''KSP-win.'''
+
# If you are running KSP, '''quit''' to main menu. You don't have to quit the entire game.
 +
# '''Open''' the ''saves'' directory in your KSP installation directory.
 +
# '''Open''' the directory of the specific saved game you wish to modify.
 +
# '''Open''' the file named ''persistent.sfs'' with any simple text editor.
 +
# '''Locate''' the personnel section by either:
 +
## '''Searching''' for ''ROSTER''. (Win: {{Key press|Control|F}}, Mac: {{Key press|Command|F}}) '''or you can'''
 +
## '''Navigate''' (Win: {{Key press|Control|End}}, Mac: {{Key press|Command|Down}}) to the end of the file and {{Key press |page up}} until you see ''ROSTER'', it's the last section.
 +
# Once located, the ''ROSTER'' section contains active personnel and personnel awaiting hire, each in a ''<tt>KERBAL{}</tt>'' section. Crew that can be hired have the type “Applicant”.
 +
# '''Modify''' or '''create''' Kerbals as you wish. '''Reference''' the statistics below if needed.
 +
# '''Save''' the file and '''close''' it.
 +
# '''Run''' KSP to use your new crew.
  
==Stage one: File locating!==
+
==Kerbal statistics==
Go to your KSP directory! Steam users can find it in their program files(x86)/steam/steamapps/common/Kerbal Space Program and non-steam users will find it in their downloads folder, assuming you haven't used it. Then, enter your saves file. Enter the file that is named after the save you wish to edit. See that file that says 'persistent'? Open it with a word file. Now we'll find the part to edit.
+
In the persistent.sfs file, all of the Kerbals visible, but not necessarily controllable, in the game are described in the “ROSTER” block of text.  Within that block, each Kerbal is defined in their own “KERBAL” block by the following parameters:
 +
#'''name''' = Full name, visually limited to approximately 18 characters. Must be unique, as the game uses this name to reference Kerbals.
 +
#'''gender''' = The gender, possible values are: “Male” and “Female”.
 +
#'''type''' = Recruit type, can be “Crew”, “Applicant”, “Tourist” or “Unowned”.
 +
#'''trait''' = Kerbal Specialty, can be "Pilot", "Scientist", "Engineer", or "Tourist".  If a Keb
 +
#'''brave''' = Courage, floating decimal from 0 to 1, as of v0.23 only effects behavior.
 +
#'''dumb''' = Stupidity,  floating decimal from 0 to 1, as of v0.23 only effects behavior.
 +
#'''badS''' = Badass trait, boolean (true or false), if set to true this Kerbal is fearless.
 +
#'''veteran''' = Determines whether or not the kerbal wears the orange space-suit of the original four.
 +
#'''state''' = State of the kerbal; One of the following: “Available”, “Assigned", “Missing” and “Dead”.
 +
#'''ToD''' = Time of death, you shouldn't modify this value, for new Kerbals use the ToD value of an existing Kerbal.
 +
#'''idx''' = Seat Index. If the kerbal is currently occupying a seat in a crew-containing part with an internal space, this value references the InternalSeat module the Kerbal is currently occupying. The first InteralSeat module in the part's internal space is 0, the second is 1, and so on. If the kerbal is on EVA, or in an External Seat, or in the Astronaut Complex, this will be -1. For new Kerbals set to -1.
 +
#''<tt>CAREER_LOG{}</tt>'' = A summary of the activities performed by the recruit. It has a ''flight'' para that is set to the number of completed flights the Kerbal has been on.  Activities are listed by flight number, starting with the first flight as number 0.  Activities generally consist of a flight event (Flight, Orbit, Deorbit, Land, ExitVessel, BoardVessel) and an Sphere of Influence or celestial body (Kerbin, Mun) separated by a comma.  The “Recover” event is an exception and does not have an SOI parameter.
 +
#''<tt>FLIGHT_LOG{}</tt>''
 +
##flight = The number of flights the Kerbal has started. If the Kerbal is currently on a flight, this will be one higher than the number of flights in the CAREER_LOG, and the activities from the current flight will be listed, as above.
  
==Stage two: Kerbal to Armstrong!==
+
Kerbals generated by a tourism contract are not initially created as tourists. They will have type = Unowned, trait will be Pilot, Scientist, or Engineer, and state will be "Assigned" unless the contract is accepted, at which point, type = Tourist , trait = Tourist, and state = Available
Press both CTRL (Control) and F at the same time: It will pull up a window which allow you to find the names. Type in Applicants and press Up or Down - there will only be one. Then close the small popup window and scroll down a little. Kerbal names! You can now replace them at will.
 
  
Now all you have to do is change the values of each astronaut.
+
Each section for the Kerbals look like this:
name = The astronauts name.  It can be changed to anything.
+
<pre>KERBAL
brave = The astronauts bravery.  Adjusting this will change how the astronaut reacts to different situations.  Acceptable Values are anything from 0 to 1.
+
{
dumb = The astronauts intelligence. The higher the number, the dumber the astronaut.  Acceptable Values are anything from 0 to 1.
+
name = Jebediah Kerman
badS = Stands for Bad Ass.  IF you set this to true, the kerbonaut will not be afraid of anything.  Jebediah Kerman has this enabled.
+
gender = Male
State = The state of the Kerbonaut.  0 = For hire.  1 = Hired.  2 = On a mission. 3 = Dead.
+
type = Crew
'''Don't mess with the other values.'''
+
trait = Pilot
 +
brave = 0.5
 +
dumb = 0.5
 +
badS = True
 +
tour = False
 +
state = Available
 +
ToD = 0
 +
idx = 0
 +
CAREER_LOG
 +
{
 +
flight = 1
 +
0 = Flight,Kerbin
 +
0 = Suborbit,Kerbin
 +
0 = Orbit,Kerbin
 +
0 = Land,Kerbin
 +
0 = Recover
 +
}
 +
FLIGHT_LOG
 +
{
 +
flight = 1
 +
}
 +
}</pre>
  
[[File:AmercanKerbal.png|thumb|A custom AmeraKerbal]]
+
===Bug Advisory===
'''WARNING:''' If the ToD is below the time of your save, the Kerman won't show up until the time passes.
+
In version [[0.23]], modifying an existing Kerbal's "brave" or "dumb" values will result in the Kerbal acting in an undesired way despite displaying accurately in the Astronaut Complex and Crew Tab within the Vehicle Assembly Building. Previous and later versions are not affected.
  
==Stage Three: Using the Kerbals!==
+
==The Original Four==
You can now use your kerbals after recruiting them. You can change the names of recruits if you want to make sure not to name one you can't use yet, but it's not required.
+
In previous versions, if you change the names of the [[original four]] Kerbals ([[Jebediah]], Bill, Bob, and Valentina) they will no longer have the orange flight suits. Newer versions have changed this, as the orange suit is now determined by the veteran stat instead of the name, making this no longer apply. Kerbal can also be “promoted” to orange suits by editing the veteran parameter to “True”.  
  
Untill next time! Note: If you change Jebediah, Bob, or Bill's names, they will no longer have the Orange flight suits, so don't do that!
+
== Mods ==
 +
These mods may be of interest to further customize your kerbals:
 +
 
 +
* Texture Replacer
 +
* Kerbal Stats
 +
* Final Frontier
 +
* Portrait Stats
 +
 
 +
[[Category:Modding Tutorials|Tutorial:Modifing Kerbals]]

Revision as of 07:01, 22 May 2018

This page needs more links to other articles to help integrate it into the Kerbal Space Program Wiki
This tutorial requires you to edit the main configuration file for a saved game. It is recommended that you make a backup copy of the file prior to editing in the event your editing prevents the saved game from loading. If you attempt to complete this tutorial while KSP is running, your save file will be severely damaged.

This tutorial will detail how to modify or create Kerbals. Customization is limited to their names, gender, type, behavior, and status.

Requirements

Locating and understanding the ROSTER section

  1. If you are running KSP, quit to main menu. You don't have to quit the entire game.
  2. Open the saves directory in your KSP installation directory.
  3. Open the directory of the specific saved game you wish to modify.
  4. Open the file named persistent.sfs with any simple text editor.
  5. Locate the personnel section by either:
    1. Searching for ROSTER. (Win: ^ Control+F, Mac: Command+F) or you can
    2. Navigate (Win: ^ Control+ End, Mac: Command+) to the end of the file and Page Up until you see ROSTER, it's the last section.
  6. Once located, the ROSTER section contains active personnel and personnel awaiting hire, each in a KERBAL{} section. Crew that can be hired have the type “Applicant”.
  7. Modify or create Kerbals as you wish. Reference the statistics below if needed.
  8. Save the file and close it.
  9. Run KSP to use your new crew.

Kerbal statistics

In the persistent.sfs file, all of the Kerbals visible, but not necessarily controllable, in the game are described in the “ROSTER” block of text. Within that block, each Kerbal is defined in their own “KERBAL” block by the following parameters:

  1. name = Full name, visually limited to approximately 18 characters. Must be unique, as the game uses this name to reference Kerbals.
  2. gender = The gender, possible values are: “Male” and “Female”.
  3. type = Recruit type, can be “Crew”, “Applicant”, “Tourist” or “Unowned”.
  4. trait = Kerbal Specialty, can be "Pilot", "Scientist", "Engineer", or "Tourist". If a Keb
  5. brave = Courage, floating decimal from 0 to 1, as of v0.23 only effects behavior.
  6. dumb = Stupidity, floating decimal from 0 to 1, as of v0.23 only effects behavior.
  7. badS = Badass trait, boolean (true or false), if set to true this Kerbal is fearless.
  8. veteran = Determines whether or not the kerbal wears the orange space-suit of the original four.
  9. state = State of the kerbal; One of the following: “Available”, “Assigned", “Missing” and “Dead”.
  10. ToD = Time of death, you shouldn't modify this value, for new Kerbals use the ToD value of an existing Kerbal.
  11. idx = Seat Index. If the kerbal is currently occupying a seat in a crew-containing part with an internal space, this value references the InternalSeat module the Kerbal is currently occupying. The first InteralSeat module in the part's internal space is 0, the second is 1, and so on. If the kerbal is on EVA, or in an External Seat, or in the Astronaut Complex, this will be -1. For new Kerbals set to -1.
  12. CAREER_LOG{} = A summary of the activities performed by the recruit. It has a flight para that is set to the number of completed flights the Kerbal has been on. Activities are listed by flight number, starting with the first flight as number 0. Activities generally consist of a flight event (Flight, Orbit, Deorbit, Land, ExitVessel, BoardVessel) and an Sphere of Influence or celestial body (Kerbin, Mun) separated by a comma. The “Recover” event is an exception and does not have an SOI parameter.
  13. FLIGHT_LOG{}
    1. flight = The number of flights the Kerbal has started. If the Kerbal is currently on a flight, this will be one higher than the number of flights in the CAREER_LOG, and the activities from the current flight will be listed, as above.

Kerbals generated by a tourism contract are not initially created as tourists. They will have type = Unowned, trait will be Pilot, Scientist, or Engineer, and state will be "Assigned" unless the contract is accepted, at which point, type = Tourist , trait = Tourist, and state = Available

Each section for the Kerbals look like this:

KERBAL
{
	name = Jebediah Kerman
	gender = Male
	type = Crew
	trait = Pilot
	brave = 0.5
	dumb = 0.5
	badS = True
	tour = False
	state = Available
	ToD = 0
	idx = 0
	CAREER_LOG
	{
		flight = 1
		0 = Flight,Kerbin
		0 = Suborbit,Kerbin
		0 = Orbit,Kerbin
		0 = Land,Kerbin
		0 = Recover
	}
	FLIGHT_LOG
	{
		flight = 1
	}
}

Bug Advisory

In version 0.23, modifying an existing Kerbal's "brave" or "dumb" values will result in the Kerbal acting in an undesired way despite displaying accurately in the Astronaut Complex and Crew Tab within the Vehicle Assembly Building. Previous and later versions are not affected.

The Original Four

In previous versions, if you change the names of the original four Kerbals (Jebediah, Bill, Bob, and Valentina) they will no longer have the orange flight suits. Newer versions have changed this, as the orange suit is now determined by the veteran stat instead of the name, making this no longer apply. Kerbal can also be “promoted” to orange suits by editing the veteran parameter to “True”.

Mods

These mods may be of interest to further customize your kerbals:

  • Texture Replacer
  • Kerbal Stats
  • Final Frontier
  • Portrait Stats