Formulas for OOS chance to hit

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

Post Reply
Falcrack
Posts: 5003
Joined: Wed, 29. Jul 09, 00:46
x4

Formulas for OOS chance to hit

Post by Falcrack » Sun, 5. Dec 21, 23:11

I may be alone in my wish, but I would really love to see what are the exact mathematical formulas the game uses to calculate whether a weapon hits another ship in OOS combat. I'd like to look under the hood and see what exactly are the parameters being taken into consideration, what are the weighting factors, and so forth. To my mind, there ought to be several relevant factors that influence the odds that the target is hit:

Factors intrinsic to the target:
1. Size of the target (larger = higher chance to hit)
2. Speed of the target (slower = higher chance to hit)
3. Maneuverability of the target (less maneuverable = higher chance to hit)
4. Pilot skill (lower skill = higher chance to hit)

Factors intrinsic to the firing ship:
1. Ship maneuverability for calculating main guns (more maneuverable = higher chance to hit)
2. Turret rotational speed (higher rotational speed = higher chance to hit)
3. Projectile speed (higher speed = higher chance to hit)
4. Distance to target (lower distance = higher chance to hit)
5. Pilot skill (higher skill = higher chance to hit)

Am I missing any other important factors which should influence the chance to hit? I don't know how many of these factors the game uses for calculating chance to hit, but to my mind, all of them are relevant factors and ought to be used in some sort of calculation.

Another thing that would be good for the game to check is if the target ship is actually within the theoretical firing arc for each turret. Turrets on one side of the ship should not be firing at and hitting ships on the opposite side.

User avatar
Stoats not Goats
Posts: 146
Joined: Wed, 6. Dec 17, 09:49
x4

Re: Formulas for OOS chance to hit

Post by Stoats not Goats » Mon, 6. Dec 21, 00:40

You've actually pretty much just listed many of the factors that are used which is pretty impressive no joke, if you'd like to check out the full range of factors have a look at parameters.xml. I don't have the 4.2 beta set of parameters and their values on hand but here are the 4.1 values which also gives you an impression of the factors taken into consideration:

Code: Select all

<lowattentioncombat>
    <attack hitchance="0.8" missmultiplier="0.3" firingarea="36000000" laserweaponfactor="1.0" missileweaponfactor="0.52" turretfactor="0.8" dronebulletfactor="0.2275" dronemissilefactor="0.182" minspeed="100" surfaceelementchance="0.6" surfaceelementfactor="0.7" shieldgeneratorchance="0.2" missilehitfactor="0.3" guidedmissilehitfactor="0.8" bullethitfactor="0.4" beamhitfactor="0.9" />
    <defence maneouverfactor="0.7" minspeed="190" maxsize="300.0" sizefactor="0.7" capshipfactor="0.85" countermeasurefactor="0.8" dronedistractionfactor="0.003" dronedamageamount="200000"/>
  </lowattentioncombat>
It is important to note that while these are the factors that govern low attention combat, the way the game interprets the factors is not exposed to modders, this is why there aren't any mods that touch OOS (at least to my knowledge).
Taking a bath in Kingdom End :boron:

My X4:F guides, maps and summaries|My highway mods|Get involved with the X4 wiki :)

Post Reply

Return to “X4: Foundations”