Firing Accuracy Testing

From UFOpaedia
Revision as of 10:05, 12 November 2006 by MikeTheRed (talk | contribs)
Jump to navigation Jump to search

This page is a scratch page re: testing how Firing Accuracy works. Results will be summarized back to relevant pages when done. Page initiated by User:MikeTheRed, but anyone is welcome to jump in. This is an informal page.

Notes & Nomenclature:

  • FFA is Final Firing Accuracy - the quoted percent seen when about to fire a weapon. Otherwise, there is soldier FA and weapon FA, plus other factors as seen in Accuracy formula and Firing Accuracy. For this work, only soldier and weapon accuracy have been hacked/tested, unless otherwise noted.
  • All testing used Autofire, unless otherwise noted.


Background

There's been a lot of conjecture about Firing Accuracy on the wiki and in X-COM forums. I couldn't recall much actual testing, so here we go.

  • Soldiers can have FA from 40 to 125.
  • Common weapons have the following FA:
Weapon         Auto  Snap Aimed
Heavy Plasma    50    75   110
Std. Rifle      35    60   110
Laser Rifle     46    65   100
Std. Pistol     --    60    78
Laser Pistol    28    40    68

Relevant bytes (also see BombBloke's Map Editor). "Max" means a large number; "z" (122) is the largest single-keystroke value:

UNITREF.DAT, record length 124:

Offset   Description
  23     Firing Accuracy. Decreased by injury, so heal all your soldiers.
  12     Current TUs - 250 for soldiers, 0 for aliens
  25     Base TUs - 99 for soldiers, 0 for aliens
  35     Energy Recharge - Max all
  15     Current Energy - Max all
  27     Base Energy - Max all
  45     Energy Usage - Max all
 18-22   Current Armour, F/L/R/B/U - Max all so nobody gets hurt.
 29-33   Base Armor - Max for all
 63-68   Fatal Wounds - Heal everybody
  81     FA (hits) counter - Make sure it's zero
  57     Psi strength - Aliens to 0, soldiers maxxed
  37     Psi skill - Same thing
  13     Current health - Set to Base Health. (You are injured if Current Health < Base Health.)
  26     Base health
  17     Strength - If you want to carry a lot, eat yer spinach.
 
OBPOS.DAT, reclen 16:        
 
   0     Object type (ref. To OBDATA Row # id) - Edit ammo quantity for all weapons you're using.
         It's a lot easier to just e.g. set all Pistol clips (Object Type 1) to 250 than to try to figure out
         who's holding what.
   8     Ammo quantity - Set to 250

\GEODATA\OBDATA.DAT, reclen 54:

  Row  0    Pistol
  Row  1    Pistol clip
  Row 34    Heavy Plasma
  Row 35    Heavy Plasma clip
    22      Average weapon strength - Set to 1 (no damage since armor is so high)
    31      Ammo damage type. 0=AP, 3=Laser, 4=Plasma. FYI (shouldn't matter)
   32-34    FA, Auto/Snap/Aimed. Here's what counts
   35-37    Percent TUs, for the same. Set to 1. This compares against soldiers' Base TUs and is rounded down.
            1 Percent of 99 rounded down would happen to be 0 TUs :)
    38      Clip size - Set to 250. Might be irrelevant after setting OBPOS, shrug.
    49      Ammo boolean - Keep it set for clips

Note that because OBDATA is in \GEODATA, you have to seperately put it in any pkzip savegame backups you might be using. Also note that it's reloaded each time you start a combat for DOS X-COM, but it might not be for WinCE (GEOSCAPE and TACTICAL are one .EXE for WinCE). Be that as it may... if you e.g. set Weapon Accuracy to 100 and leave it there, then soldier FA decides your FFA.

For most testing (unless trying to watch each shot), set your Fire Speed to 6. And if you're using DosBox with DOS X-COM: Crank your CPU cycles way up, 30k or higher (Control-F12). Bullets hit practically instantaneously. (Does the WinCE version have a similar thing?)

A savegame that incorporates most everything above is Media:FAccTest1.zip. All desert dunes have been levelled so you've got clear shooting with the four soldiers in upper right.


Test 1: Benchmark

I chose a middling FFA:

Soldier Accuracy 90%
Weapon Accuracy  50%
Final FA         45%

Bleh, it's getting late. More to come - MikeTheRed 02:05, 12 November 2006 (PST)