Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
kerbalExpressionSystem Class Reference
Inheritance diagram for kerbalExpressionSystem:

Public Member Functions

IEnumerator SetNewIdleExpression ()
 Function to change the expressions in the new idle animations at a specific time. More...
 

Public Attributes

Animator animator
 
Part evaPart
 
float expression
 
float expressionLerpRate = 1f
 
string expressionParameterName = "Expression"
 
float fearFactor
 
float flight_angularV
 
float flight_gee
 
float flight_velocity
 
string hasHelmetName = "hasHelmet"
 
string idleBoolName = "isIdle"
 
string idleFloatName = "IdleFloatController"
 
int idlePlayChance = 10
 
int idleRandomNumberLimitHelmet = 11
 
int idleRandomNumberLimitNoHelmet = 6
 
float idleThreshold = 0.2f
 
float idleTimer = 0f
 
float idleUpdateInterval = 10
 
bool isIVAController
 
Kerbal kerbal
 
KerbalEVA kerbalEVA
 
float newIdleFearFactor
 
float newIdleWheeLevel
 
float panicLevel
 
ProtoCrewMember protoCrewMember
 
float secondaryVarianceLerpRate = 1f
 
string secondaryVarianceParameterName = "SecondaryVariance"
 
float secondaryVarianceTimer = 0f
 
float secondaryVarianceUpdateInterval = 1f
 
float startExpressionTime
 
bool useNewIdleExpressions = false
 
float varianceLerpRate = 1f
 
string varianceParameterName = "Variance"
 
float varianceTimer = 0f
 
float varianceUpdateInterval = 1f
 
float wheeLevel
 

Static Public Attributes

static bool showInactive = true
 

Protected Member Functions

virtual void Awake ()
 
virtual void EVAUpdate ()
 Kerbal Fuzzy AI EVA:: calculate wheee and panic levels based on flight conditions and fear factor More...
 
virtual void explosionReaction (GameEvents.ExplosionReaction er)
 
virtual void FixedUpdate ()
 
virtual void IVAUpdate ()
 Kerbal Fuzzy AI IVA:: calculate wheee and panic levels based on flight conditions and fear factor More...
 
virtual void OnDestroy ()
 
virtual void Start ()
 
virtual void Update ()
 
virtual void UpdateExpressionAI ()
 

Protected Attributes

float courage
 
int currentExpressionCacheIndex = 0
 
int expressionHash
 
float[] expressionSampleCache
 
int expressionSampleSize = 20
 
bool hasHelmet
 
int hasHelmetHash
 
int idleBoolHash
 
float IdleFloat
 
int idleFloatHash
 
bool isBadass
 
bool isIdle
 
bool isJetpackOn
 Use this for initialization. More...
 
float normalizedExpression
 
bool running
 
float secondaryVariance = 0f
 
int secondaryVarianceHash
 
float stupidity
 
float targetExpression
 
float targetSecondaryVariance
 
float targetVariance
 
float variance = 0f
 
int varianceHash
 

Member Function Documentation

virtual void kerbalExpressionSystem.Awake ( )
inlineprotectedvirtual
virtual void kerbalExpressionSystem.EVAUpdate ( )
inlineprotectedvirtual

Kerbal Fuzzy AI EVA:: calculate wheee and panic levels based on flight conditions and fear factor

Rules:

  1. all kerbals like feeling weightless
  2. badass kerbals enjoy high speeds, while their passengers don't.
  3. badass kerbals don't mind spinning around as much as meek ones do.
  4. stupid kerbals find spinning around entertaining(to a certain point)
  5. all kerbals panic when spinning way too fast
  6. fear will make all kerbals panic(stupid ones, a little less)
  7. brave kerbals regain their nerve faster than yellow ones
  8. stupid kerbals are more easily excited than less stupid ones
  9. Kerbals are Scared of ragdolling around.Badass Kerbals a little less
  10. Regular Kerbals are afraid of falling at high speeds, badass kerbals like going fast
  11. Jetpacks are freaking sweet, seriously.
  12. kerbals panic as they begin to go unconscious. Badass helps here though. end effect is a balance between wheee and panic, with neutral (idle) in the middle.

< rule 1 (weight 0.6)

< rule 2

< rule 4

< rule 6

< Rule 11 (weight 0.3)

< rule 8

< rule 2 and 3

< rule 3 and 5

< rule 6

< rule 11

< waagh

< Still scary, but I'm a badass.

< Yay! Going fast is awesome!

< rule 7

< balance out wheee vs panic

virtual void kerbalExpressionSystem.explosionReaction ( GameEvents.ExplosionReaction  er)
inlineprotectedvirtual
virtual void kerbalExpressionSystem.FixedUpdate ( )
inlineprotectedvirtual

< this isn't actually gee force... but it looks funnier like this

virtual void kerbalExpressionSystem.IVAUpdate ( )
inlineprotectedvirtual

Kerbal Fuzzy AI IVA:: calculate wheee and panic levels based on flight conditions and fear factor

Rules:

  1. all kerbals like feeling weightless
  2. badass kerbals enjoy high speeds, while their passengers don't.
  3. badass kerbals don't mind spinning around as much as meek ones do.
  4. stupid kerbals find spinning around entertaining (to a certain point)
  5. all kerbals panic when spinning way too fast
  6. fear will make all kerbals panic (stupid ones, a little less)
  7. brave kerbals regain their nerve faster than yellow ones
  8. stupid kerbals are more easily excited than less stupid ones
  9. kerbals panic as they begin to go unconscious. Badass helps here though.

end effect is a balance between wheee and panic, with neutral (idle) in the middle.

< rule 1 (weight 0.6)

< rule 2

< rule 4

< rule 6

< rule 8

< rule 2 and 3

< rule 3 and 5

< rule 9

< rule 6

< rule 7

< balance out wheee vs panic

virtual void kerbalExpressionSystem.OnDestroy ( )
inlineprotectedvirtual
IEnumerator kerbalExpressionSystem.SetNewIdleExpression ( )
inline

Function to change the expressions in the new idle animations at a specific time.

virtual void kerbalExpressionSystem.Start ( )
inlineprotectedvirtual

< Grab the first entry of the protoCrew member.

virtual void kerbalExpressionSystem.Update ( )
inlineprotectedvirtual
virtual void kerbalExpressionSystem.UpdateExpressionAI ( )
inlineprotectedvirtual

Member Data Documentation

Animator kerbalExpressionSystem.animator
float kerbalExpressionSystem.courage
protected
int kerbalExpressionSystem.currentExpressionCacheIndex = 0
protected
Part kerbalExpressionSystem.evaPart
float kerbalExpressionSystem.expression
int kerbalExpressionSystem.expressionHash
protected
float kerbalExpressionSystem.expressionLerpRate = 1f
string kerbalExpressionSystem.expressionParameterName = "Expression"
float [] kerbalExpressionSystem.expressionSampleCache
protected
int kerbalExpressionSystem.expressionSampleSize = 20
protected
float kerbalExpressionSystem.fearFactor
float kerbalExpressionSystem.flight_angularV
float kerbalExpressionSystem.flight_gee
float kerbalExpressionSystem.flight_velocity
bool kerbalExpressionSystem.hasHelmet
protected
int kerbalExpressionSystem.hasHelmetHash
protected
string kerbalExpressionSystem.hasHelmetName = "hasHelmet"
int kerbalExpressionSystem.idleBoolHash
protected
string kerbalExpressionSystem.idleBoolName = "isIdle"
float kerbalExpressionSystem.IdleFloat
protected
int kerbalExpressionSystem.idleFloatHash
protected
string kerbalExpressionSystem.idleFloatName = "IdleFloatController"
int kerbalExpressionSystem.idlePlayChance = 10
int kerbalExpressionSystem.idleRandomNumberLimitHelmet = 11
int kerbalExpressionSystem.idleRandomNumberLimitNoHelmet = 6
float kerbalExpressionSystem.idleThreshold = 0.2f
float kerbalExpressionSystem.idleTimer = 0f
float kerbalExpressionSystem.idleUpdateInterval = 10
bool kerbalExpressionSystem.isBadass
protected
bool kerbalExpressionSystem.isIdle
protected
bool kerbalExpressionSystem.isIVAController
bool kerbalExpressionSystem.isJetpackOn
protected

Use this for initialization.

Kerbal kerbalExpressionSystem.kerbal
KerbalEVA kerbalExpressionSystem.kerbalEVA
float kerbalExpressionSystem.newIdleFearFactor
float kerbalExpressionSystem.newIdleWheeLevel
float kerbalExpressionSystem.normalizedExpression
protected
float kerbalExpressionSystem.panicLevel
ProtoCrewMember kerbalExpressionSystem.protoCrewMember
bool kerbalExpressionSystem.running
protected
float kerbalExpressionSystem.secondaryVariance = 0f
protected
int kerbalExpressionSystem.secondaryVarianceHash
protected
float kerbalExpressionSystem.secondaryVarianceLerpRate = 1f
string kerbalExpressionSystem.secondaryVarianceParameterName = "SecondaryVariance"
float kerbalExpressionSystem.secondaryVarianceTimer = 0f
float kerbalExpressionSystem.secondaryVarianceUpdateInterval = 1f
bool kerbalExpressionSystem.showInactive = true
static
float kerbalExpressionSystem.startExpressionTime
float kerbalExpressionSystem.stupidity
protected
float kerbalExpressionSystem.targetExpression
protected
float kerbalExpressionSystem.targetSecondaryVariance
protected
float kerbalExpressionSystem.targetVariance
protected
bool kerbalExpressionSystem.useNewIdleExpressions = false
float kerbalExpressionSystem.variance = 0f
protected
int kerbalExpressionSystem.varianceHash
protected
float kerbalExpressionSystem.varianceLerpRate = 1f
string kerbalExpressionSystem.varianceParameterName = "Variance"
float kerbalExpressionSystem.varianceTimer = 0f
float kerbalExpressionSystem.varianceUpdateInterval = 1f
float kerbalExpressionSystem.wheeLevel

The documentation for this class was generated from the following file: