Author Topic: (Brutal AI) Accuracy tweak via submod or by changing game files  (Read 179 times)

Offline Istvaan 3

  • Squaddie
  • *
  • Posts: 1
    • View Profile
(Brutal AI) Accuracy tweak via submod or by changing game files
« on: November 15, 2024, 02:29:24 pm »
Hello everyone! I'm new to BOXCE modding.
Recently I found this (github.) /Xilmi/OpenXcom/blob/oxce-plus/src/Battlescape/Projectile.cpp, this file (along with OpenXcom/src/Battlescape/Projectile.h) contains variables (From line 38 in projectile.cpp) used to configure accuracy for RA. Is it possible to modify them in some way? I have already tried to change them by creating scripts but have failed (Mostly copied existing scripts and tried to implement changes in this variables).
Can anyone help me and point out how to change accuracy in the game (If it's possible)?

Code from github (Projectile.cpp), lines 36 to 53
namespace OpenXcom
{
AccuracyModConfig AccuracyMod = {
   1,      // MinCap         Minimum accuracy value
   300,   // MaxCap         Maximum accuracy value
   3,      // AimBonus         For aimed shot if total accuracy is 5% or less
   2,      // KneelBonus      For kneeling if total accuracy is 5% or less
   4,      // aimedDivider
   3,      // snapDivider
   3,      // autoDivider      Dividers are used for adding roll-based deviation
   1,      // twoHandsBonus   Less shots dispersion for one weapon in both hands
   3,      // distanceDivider   Additional 1 voxel of deviation per this number of distance tiles
   1.35,   // SizeMultiplier   Accuracy multiplier when targeting big units
   50,      // suicideProtectionDistance   // Minimal distance missing shot should fly, in voxels
   10,      // bonusDistanceMax   Improved accuracy distance - top threshold
   6,      // bonusDistanceMin   Improved accuracy distance - bottom threshold
   {0, 30, 50, 70, 100} // coverEfficiency Percentage of accuracy affected by target exposure
};

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9081
    • View Profile
Re: (Brutal AI) Accuracy tweak via submod or by changing game files
« Reply #1 on: November 15, 2024, 03:03:34 pm »
Moved to Brutal AI board.