AccuracyCurves.json

From Halfway
Jump to: navigation, search

Overview

In the accuracy json, you can define curves for weapons on how good they hit over distance.

There are always two curves:

  1. The main curve when you use only 1AP
  2. The second curve if you use 2AP (In most cases this should be better)

So how does they work:

Each weapon has a base accuracy value that defines the base hit chance together with the skill from the character. This curve then callculates the real hit chance over the distance. (One unit is one tile)

So the formula for calculating the hit chance goes like this:

Note: Not 100% if every information is 100% correct here:

hitChance = characterAiming+baseAccuracy(distInTiles)-defenseBonus+aimingModifier

  • hitChance: The final hit chance the player sees when selecting a target
  • characterAiming: The aiming skill (<5 -> negativ impact, =5 no impact, >5 bonus)
  • baseAccuracy(distInTiles): The base value from the weapon over the distance using this curves here
  • defenseBonus: The halfCover or FullCover bonus + the Character agility bonus.
  • aimingModifier: The additional AP for aiming.

Tip: Use Excel or similar to visualize the curves as it helps immensely to get a feeling for them.

Example

{
 "curves" : [
   {
     "id" : "shortRange01Curve",
     "curvePairs" : [
       {
         "range" : 1,
         "value" : 1
       },
       {
         "range" : 2,
         "value" : 0.9
       },
       {
         "range" : 3,
         "value" : 0.6
       },
       {
         "range" : 4,
         "value" : 0.1
       },
       {
         "range" : 5,
         "value" : 0
       }
     ]
   },
   {
     "id" : "shortRange01CurveModifier",
     "curvePairs" : [
       {
         "range" : 1,
         "value" : 1
       },
       {
         "range" : 2,
         "value" : 1
       },
       {
         "range" : 3,
         "value" : 0.95
       },
       {
         "range" : 4,
         "value" : 0.6
       },
       {
         "range" : 5,
         "value" : 0.3
       },
       {
         "range" : 6,
         "value" : 0.1
       },
      {
         "range" : 7,
         "value" : 0
       }
     ]
   },
]
},

Description

  • Each curves are actually two: the range (in tiles) and the multiplayer for the baseAccuracy you get when the target is on that tile (0-1)
  • Each of this double curves need a second one: "shortRange01Curve" and "shortRange01CurveModifier"
    • shortRange01Curve: Is the one used when only 1AP is used for aiming
    • shortRange01CurveModifier: Is the bonus you get when Aiming with 2AP.


Notes

  • Make sure that the last value is 0 or else the weapon will hit targets in infinity.
  • No "values" over 1 or below 0
  • Be sure you use the same name for both curve pairs but add the "Modifier" to the second one.
    • Make sure the names are unique
    • They are later used in the weapons json to define the curves for each weapon.