XCOM Squadsight Aim Penalty Details

From Nexus Mods Wiki
Revision as of 08:12, 11 May 2013 by Dubiousintent (talk | contribs) (References)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

This page provides detailed information about the in-game effects of the Squadsight Aim Penalty Mod.

Mod Gameplay Effects

The mod applies a range penalty based upon the following formula:

Penalty = Max(-25 + 5*Max(numXCOM, 5) - 1.1*(range - visualRange), 5)

  1. Max( ..., 5) means that there is always at least a 5% penalty for shooting at a target beyond visual range
  2. -25 is a fixed penalty for shooting beyond visual range
  3. +5 aim is recovered per number of XCOM units that can see the target.
    1. This includes Battlescanners and units viewing the target via Squadsight (including the current shooter)
    2. A maximum of 5 units can contribute in this manner (leading to a maximum of +25 aim recovered)
  4. For every "full tile" beyond visual range, an additional 1.1% penalty is applied
  5. numXCOM is computed using GetPrimaryTarget().m_arrEnemiesSeenBy.Length
  6. range is computed using VSize(m_kUnit.GetLocation() - GetPrimaryTarget().GetLocation())/ float(64)
  7. visualRange is computed using m_kUnit.m_aCurrentStats[10]

This formula is in the code in two separate locations

  1. In XGTargeted.GetShotSummary
    This is used to determine the Squadsight Range Penalty displayed in the Shot Summary window
  2. In XGTargeted.AdjustToHit
    This is used to adjust the actual to-hit roll, as well as to adjust the overall to-hit percentages shown in the UI

Example Screenshots

The following examples use the following situation

Squadsight Aim Mod Overview Screenshot.jpg

Only the Battlescanner and the Sniper can see the alien. The other units are outside the closed door.

This shows the Tactical HUD (bottom center, just above the ability icons. Near the top of the screen, by the target reticale is another to-hit display. Squadsight Aim Mod TacticalHUD.jpg

This hows the Shot Summary screen, when the "Info" button is pressed on the Tactical HUD. Squadsight aim penalty example.jpg

The total aim penalty in this case is 29%.

  • -25 for shooting out of visual range
  • +10 for two XCOM units spotting target (Battlescanner and Sniper)
  • -14 for being 13 tiles beyond visual range (distance to target is ~40 tiles)
    • 13 * 1.1% = 14.3, which is truncated to 14

References

Referred to by this article:


That refer to this article: