Difference between revisions of "AI War:Do Shots Miss"

From Arcen Wiki
Jump to navigation Jump to search
m (clean up, replaced: AI_War_-_ → AI War:)
 
(6 intermediate revisions by 5 users not shown)
Line 3: Line 3:
 
'''Q:''' I notice that a lot of the time, a shot will hit a ship, but no damage will be dealt. This seems to happen a significant amount of the time, and is frustrating because I can see the shot hit the ship, it makes the little green wave animation.  
 
'''Q:''' I notice that a lot of the time, a shot will hit a ship, but no damage will be dealt. This seems to happen a significant amount of the time, and is frustrating because I can see the shot hit the ship, it makes the little green wave animation.  
  
'''A:''' Yes, shots can miss -- the sign of a shot missing is that little green wave animation, which is the target's shields absorbing the shot. Even ships with zero shields have a minor chance of this occurring, depending on the attack range of the ship that fired the shot and the distance between the shooter and the target. Depending on these factors and how high the shields of the target are, ships can miss a LOT. When you have ships selected and you hover over an enemy ship, it shows you the percent chance likelihood of your hitting that enemy, along with how much damage will be dealt. If you have multiple ships selected it shows you the range of damage, and the worst hit percent chance.
+
'''A:''' The above question refers only to '''pre-4.0''' versions, in which shields and range were put through a complex math equation with a random element in order to determine if the shot would miss.  In version 4.0 and later of the game, shots never miss -- the green wave animation is only shown when a shot hits a forcefield, but damage is still dealt to the forcefield.
  
Here's the basics of how all this is calculated. All shots have a certain amount of energy, which is dependent on the attack range of the ship firing them. So, sniper shots have practically unlimited energy, while tank shots have almost none. Depending on the distance between the shooter and the target at the time the shot is fired, the shot will have a certain amount of energy remaining when it reaches the target (regardless of whether the target moves). If that remaining energy is higher than the shield level of the target, then the shot will hit. If it is lower, then it will miss. There is also a random component to whether shots hit or not -- you can think of this as shield "frequencies" as in popular sci-fi shows. If the frequency happens to match just right, then even low powered-shots can penetrate high shields.
+
In short: ships either have a 100% chance of hitting an enemy target, or a 0% chance. If it's inside the range circle, there's a 100% chance. Outside, 0%. There is no dice-roll-style random component at all (which we think makes more sense for a strategy game).
  
Shots don't actually do their damage until they hit the target, and if the target moves faster than the shot (or teleports, or changes planets), it is possible that the shot may wind up out of range of its target.  When that happens, the shot will simply disappear.
+
'''Radar Jamming'''
  
Lastly, if the range between the shooter and the target is very low, there is a minimum of a 5% chance of the shot hitting its target (this doesn't apply for shots which are countered by the target, or which the target is immune to -- there is always a 0% chance of those hitting). So, if your shots are being blocked too much by an enemy's shields, the solution is simple: move closer. Note that if you manually tell ships to attack a target, they will automatically close distance to the target until they have a good shot at it.
+
Radar jamming shrinks the circle of effectiveness, but inside that circle it's still 100% effective.
  
'''IMPORTANT:''' Based on the above, note that this means that shields on ships can drastically reduce the effective range of ships.  So when you are looking at the range of ships such as turrets (by holding Z), you should note that is the maximum effective range assuming the target has no shields.  The hit chance at the edge of that range may be quite low, and it might actually have a 0% chance of hitting some ships at the outer ranges, depending on their shield levels.  The ranges are not shown differently because their effectiveness varies by target.  If you want to see what their chance of hitting a given target is, just select the attacker and then hover over the target -- the hover tooltip will show not only how much damage will be dealt, but what the percent chance of a hit is.
+
'''Armor Rating'''
  
 +
Armor does not affect the ability of one ship to hit another ship.  Rather, it linearly reduces the amount of incoming damage, but not below a floor of 20% of the total amount of damage that would have been dealt.  This makes highly-armored ships take longer to kill, but it doesn't make them any harder to hit.  Armor is simply subtracted from the incoming damage (so 5000 damage against 1000 armor does a 4000 loss in hit points) down to a minimum to 20% of the base value (5000 damage against 5000 armor does a 1000 loss in hit points).  Damage multipliers increase the base damage ''before'' armor is applied.
  
'''For Those Interested In The Actual Math'''
 
  
This is the general algorithm that the game runs through to determine a hit chance for any given shot against any given target. This is run at the time the shot is fired.  The result is an integer between 0 and 100, with 100 being a definite-hit, and zero being a definite-miss, and anything in between being subject to a random check (Rand(0,100) < hitchance).  So here's the pseudo code logic (with "firing" referring to the attacking ship that is firing the shot, and "target" referring to the ship being hit or missed):
+
'''See the new [[AI War:Combat_System|combat system page]] for more information.'''
  
* If firing has attack power zero, return 0.
 
* If target is immune to firing shot type, return 0.
 
* Declare baseRange = dist between center of target and firing.
 
* If attack range of firing <= 0 (melee ship), then return the following:
 
** If firing and target overlap their positions return 100, otherwise 0.
 
* If baseRange > attack range of firing, return 0.
 
* Declare adjustedRange = baseRange + ( firing.FiresThroughShields ? 0 : target.ShieldRating ) - firing.AttackRange
 
* If adjustedRange <= 0, return 100
 
* Declare percent = 100 - ( adjustedRange / 10 )
 
* If percent < 0, do the following:
 
** Declare radii = size radius of firing + size radius of target
 
** If baseRange < 500 + radii, do the following:
 
*** if target.ShieldRating > 100000 && !firing.PenetrateHighShields, return 0 (shields are too high, cannot hit)
 
*** else return 5 (if are very close, then always a 5% chance to hit if shields are not too high)
 
** Else If baseRange < radii + attacking.AttackRange, then:
 
*** percent = ( attacking.PenetrateHighShields ? 5 : 0 )
 
** Else percent = 0
 
* If firing.MinHitPercent > 0 && percent >= 5 && percent < firing.MinHitPercent, percent = firing.MinHitPercent
 
* return percent
 
  
 
+
[[AI War:AI War]]
A few notes about the above:
 
* IMPORTANT:  For purposes of the above, the attack range of ships is reduced by 1000 from what is shown in the interface stats for ships.
 
* PenetrateHighShields is a reference to a special ability that some ships have, which lets them go through shields that are incredibly high (over 100000) that cause a miss for all other ships.  This is how shield bearers used to work, but no ships currently use that logic.
 
* MinHitPercent is a modifier that some ships have, and it basically just means that if it has any chance at all of hitting the target, it will have at least that minimum chance.  So if, for instance, a missile frigate would normally have a 5% chance of hitting a target, it will instead have a 50% chance of hitting its target because of its MinHitPercent value.  This is useful for ships with long ranges or slow reload times (or both), and is pretty much unused except in those cases.  Otherwise the relevant ships just miss far too much to be effective at any reasonable range, which is after all the point of giving them a higher range in the fist place.
 
 
 
 
 
[[AI_War:Fleet_Command]]
 

Latest revision as of 19:48, 1 February 2015

Do Shots Miss Sometimes?

Q: I notice that a lot of the time, a shot will hit a ship, but no damage will be dealt. This seems to happen a significant amount of the time, and is frustrating because I can see the shot hit the ship, it makes the little green wave animation.

A: The above question refers only to pre-4.0 versions, in which shields and range were put through a complex math equation with a random element in order to determine if the shot would miss. In version 4.0 and later of the game, shots never miss -- the green wave animation is only shown when a shot hits a forcefield, but damage is still dealt to the forcefield.

In short: ships either have a 100% chance of hitting an enemy target, or a 0% chance. If it's inside the range circle, there's a 100% chance. Outside, 0%. There is no dice-roll-style random component at all (which we think makes more sense for a strategy game).

Radar Jamming

Radar jamming shrinks the circle of effectiveness, but inside that circle it's still 100% effective.

Armor Rating

Armor does not affect the ability of one ship to hit another ship. Rather, it linearly reduces the amount of incoming damage, but not below a floor of 20% of the total amount of damage that would have been dealt. This makes highly-armored ships take longer to kill, but it doesn't make them any harder to hit. Armor is simply subtracted from the incoming damage (so 5000 damage against 1000 armor does a 4000 loss in hit points) down to a minimum to 20% of the base value (5000 damage against 5000 armor does a 1000 loss in hit points). Damage multipliers increase the base damage before armor is applied.


See the new combat system page for more information.


AI War:AI War