Difference between revisions of "Tutorial:Modifing Kerbals"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Overhauled and expanded, will request move to "Tutorial:How to modify or create Kerbals")
m (-parenthesis; +warning at the top; -root directory stuff (outsourced); -highlighting of the bug (there is a large title with "bug"); *using MediaWiki style to generate lists; -header for the first entry;)
Line 1: Line 1:
==How to modify or create Kerbals==
+
{{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.}}
 
This tutorial will detail how to modify or create Kerbals. Customization is limited to their names, behavior, and status.
 
This tutorial will detail how to modify or create Kerbals. Customization is limited to their names, behavior, and status.
  
===Requirements===
+
==Requirements==
*Knowledge of the location of the KSP installation directory.
+
*Knowledge of the location of the [[Root directory|KSP installation directory]].
 
*Simple text editor.
 
*Simple text editor.
 
===Installation directory defaults===
 
*'''Steam''': program files(x86)/steam/steamapps/common/Kerbal Space Program
 
*'''Non-Steam''': In your download location, the default directory name varies by operation system:
 
**'''Windows''': KSP-win
 
**'''Mac''': KSP-osx
 
  
 
==Locating and understanding the ROSTER section==
 
==Locating and understanding the ROSTER section==
'''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.'''
+
# '''Open''' the ''saves'' directory in your KSP installation directory.
 
+
# '''Open''' the directory of the specific saved game you wish to modify.
  1.'''Open''' the ''saves'' directory in your KSP installation directory.
+
# '''Open''' the file named ''persistent.sfs'' with any simple text editor.
  2.'''Open''' the directory of the specific saved game you wish to modify.
+
# '''Locate''' the personnel section by either:
  3.'''Open''' the file named ''persistent.sfs'' with any simple text editor.
+
## '''Searching''' for ''ROSTER''. (Win: {{Key press|Control|F}}, Mac: CMD+F) '''or you can'''
  4.'''Locate''' the personnel section by either:
+
## '''Navigate''' (Win: {{Key press|Control|End}}, Mac: ?) to the end of the file and page up until you see ''ROSTER'', it's the last section.
    a.'''Searching''' for ''ROSTER''. (Win: CTRL+F, Mac: CMD+F) '''or you can'''
+
# Once located, the ''ROSTER'' section contains active personnel and personnel awaiting hire:
    b.'''Navigate''' (Win: CTRL+End, Mac: ?) to the end of the file and page up until you see ''ROSTER'', it's the last section.
+
#*'''Active''': Each one is defined by a ''<tt>CREW{}</tt>'' entry.
 
+
#*'''Awaiting hire''': All prospective hires are within an ''<tt>APPLICANTS{}</tt>'' subsection and each is defined by a ''<tt>RECRUIT{}</tt>'' entry.
Once located, the ''ROSTER'' section contains active personnel and personnel awaiting hire:
+
# '''Modify''' or '''create''' Kerbals as you wish. '''Reference''' the statistics below if needed.
*'''Active''': Each one is defined by a ''CREW{}'' entry.
+
# '''Save''' the file and '''close''' it.
*'''Awaiting hire''': All prospective hires are within an ''APPLICANTS{}'' subsection and each is defined by a ''RECRUIT{}'' entry.
+
# '''Run''' KSP to use your new crew.
 
 
  5.'''Modify''' or '''create''' Kerbals as you wish. '''Reference''' the statistics below if needed.
 
  6.'''Save''' the file and '''close''' it.
 
  7.'''Run''' KSP to use your new crew.
 
  
 
==Kerbal statistics==
 
==Kerbal statistics==
Line 42: Line 33:
  
 
===Bug Advisory===
 
===Bug Advisory===
'''As of v0.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. Change at YOUR OWN RISK.'''
+
As of v0.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. Change at YOUR OWN RISK.
  
 
==The Original Three==
 
==The Original Three==
If you change the names of the original three Kerbals (Jebediah, Bob, or Bill), they will no longer have the orange flight suits.
+
If you change the names of the [[original three]] Kerbals, Jebediah, Bob, or Bill, they will no longer have the orange flight suits.

Revision as of 21:17, 11 March 2014

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.

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

Requirements

Locating and understanding the ROSTER section

  1. Open the saves directory in your KSP installation directory.
  2. Open the directory of the specific saved game you wish to modify.
  3. Open the file named persistent.sfs with any simple text editor.
  4. Locate the personnel section by either:
    1. Searching for ROSTER. (Win: ^ Control+F, Mac: CMD+F) or you can
    2. Navigate (Win: ^ Control+ End, Mac: ?) to the end of the file and page up until you see ROSTER, it's the last section.
  5. Once located, the ROSTER section contains active personnel and personnel awaiting hire:
    • Active: Each one is defined by a CREW{} entry.
    • Awaiting hire: All prospective hires are within an APPLICANTS{} subsection and each is defined by a RECRUIT{} entry.
  6. Modify or create Kerbals as you wish. Reference the statistics below if needed.
  7. Save the file and close it.
  8. Run KSP to use your new crew.

Kerbal statistics

File:AmercanKerbal.png
A custom AmeraKerbal

Each Kerbal is defined by the following statistics:

  1. name = Full name, visually limited to approximately 18 characters.
  2. brave = Courage, floating decimal from 0 to 1, as of v0.23 only effects behavior.
  3. dumb = Stupidity, floating decimal from 0 to 1, as of v0.23 only effects behavior.
  4. badS = Badass trait, boolean (true or false), if set to true this kerbal is fearless.
  5. state = State of the kerbal; 0 = unassigned, 1 = on mission, 2 = ?, 3 = dead.
  6. ToD = Time of death, you shouldn't modify this value, for new Kerbals use the ToD value of an existing Kerbal.
  7. idx = Unique ID, you shouldn't modify this value, for new Kerbals set to -1.

Bug Advisory

As of v0.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. Change at YOUR OWN RISK.

The Original Three

If you change the names of the original three Kerbals, Jebediah, Bob, or Bill, they will no longer have the orange flight suits.