Success Chance - KonradHeinser/EBSGFramework GitHub Wiki

Multiple things in this use a special successChance node which handles the chance based aspect of that thing. For the purpose of making things easier for everyone, all of these successChance nodes have the same options within them. The comps that have successChance available point to this page to minimize the risk that I forget to update one of the many pages if anything is added to or changed in successChance.

These are the basic options:

  • baseSuccessChance : Default (1) : Chance of the ability to succeed, with 1 being 100%
  • successMessage : Optional. Message given if this comp succeeds and the caster is a player pawn. Messages can use {0} for the caster's name, and {1} for the target's name
  • failureMessage : Optional. Message given if this comp fails and the caster is a player pawn. Messages can use {0} for the caster's name, and {1} for the target's name

These are the "caster" options, with caster referencing the ability user, the hediff haver, the gene carrier, etc:

  • casterStatChance : StatDef of the caster that is checked to determine success chance. Normally the higher above 0 this is, the higher the chance of success
  • casterStatEffect : Default (Multiply) : Dictates what the stat does to the chance. The options are Multiply, Divide, OneMinusMultiply, and OneMinusDivide. The OneMinus options mean 1 - Stat Value

These are the target options for when there is another thing affecting chance, usually the ability target:

  • targetStatChance : StatDef of the target that is checked to determine success chance. Normally the higher above 0 this is, the lower the chance of success
  • targetStatEffect : Default (Divide) : Dictates what the stat does to the chance. The options are Multiply, Divide, OneMinusMultiply, and OneMinusDivide. The OneMinus options mean 1 - Stat Value

Important Note : If multiple comps with successChance are used, the success for each individual one is handled separately. This can result in abilities that only partially fail, but also means that each success can use entirely different parameters if so desired.