Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Time Capsule (How-to Library) » "How does it work?" Part 1: Bullet Impact
"How does it work?" Part 1: Bullet Impact[message #195232] Fri, 29 August 2008 18:34 Go to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
There are many of us who want to know how the insides of the game works, but for most people reading the code itself is not an option. It can be confusing, it can be difficult to learn, and it's sometimes so complicated it can make your head explode.

Having some familiarity with the program, and being extremely curious about how certain things in the game really work, I decided to try and analyze the code and put it into simpler words. Even if I don't understand anything, I'll get the general feel of how things get calculated together. And, of course, if I can figure it out, I can share it with everybody else, so it's twice the fun.

This article will hopefully be the first in a series of articles about how some of the most important parts of the game really work. What factors into the calculations? What surprises are not obvious without reading the code? What can I do to increase my chances? Many of the myths and mysteries will hopefully be dispelled.


The first article I want to write is about Bullet Damage. This has mystified me for a long time, and now comes the moment to figure it all out.

This article will cover the function called "BulletImpact()". It runs whenever a bullet or thrown knife hits the target. This function does NOT cover explosives, nor does it cover Melee Combat with or without weapons. It is only applicable for guns and throwing knives.

PLEASE NOTE: The code written below is _NOT_ copied from the game. I did my best to try and explain the formula in simple words and in simple format, using what is called "Pseudo-code". Meaning, I tried to stay within the realm of the English language Smile . Also, some things may have been ommitted because they were too complex or not very relevant. Other things may have been shifted around so that they are less confusing. But for the most part, this is a pretty solid representation of the code in a form much simpler to understand.

Have fun reading!

-------------------------------------------------

BULLET IMPACT

We start with several values which the program feeds into the calculation:

Potential_Damage - The amount of damage the bullet has at the time it hits the target. The bullet starts with a damage value equal to the "Damage" value of the gun that fired it. During flight, the bullet loses some of its power, so the range to target affects this value. Also, if the bullet has stuck on object or another target along the way, its remaining power is reduced.
As the formula proceeds, "Potential_Damage" will either increase or decrease.

HitLocation - Where the target was hit. I.E., the head, torso, or legs. Each hit location is handled differently, especially in regards to critical damage.

HitBy - This is the difference between the Chance-to-Hit and the random number rolled by the program to determine whether the shot hit the target. Naturally, if the rolled number was larger than the chance-to-hit, the bullet doesn't hit the target... But if the random number is equal to or smaller than the chance-to-hit, then the difference is recorded here.

Armed with these values, we can start working our way through this complex formula. Let's start with some casual checks.

If the weapon used is a throwing knife then 
   Use Knife-Type Ammo Properties


The program starts by checking whether the attack was done with a thrown knife or other thrown weapon. If so, then the program reads data from the "Knife" ammotype. This is important because knives don't have ammo, so the program needs to be told where to read all the special ammo properties it needs. Other guns just read their own ammo's properties.
With the current XMLs, knives IGNORES ARMOR. I'll explain that property later.

If (Target is a TANK) and (Ammo isn't AntiTank) then
   0 damage!


Naturally, only ammo that has the AntiTank property can hurt tanks. The program makes sure the current ammo can hurt tanks. If it can't, the damage returned is 0.

Potential_Damage = Potential_Damage + anywhere between -25% and 25%


This is a completely random modifier (called a "FLUKE" modifier) that gives anywhere between -25% and +25% to the potential damage. This gives a nice variation of damage between shots, regardless of anything else.

Potential_Damage = Potential_Damage + (HitBy / 2)%


Remember the "HitBy" value I spoke of before? It's the difference between how likely the shot was to hit, and the random number the program rolled to check whether the target was hit at all.

So if our shot was 99% accurate ("perfect" chance-to-hit) and the rolled number was 15, then the difference is 84. We'd then get +42% increase to our potential damage!

So while this is a random factor, it's obvious that if a shot was fired with better accuracy, there's a greater chance for it to do much more damage. Shots fired at 10% accuracy are not only unlikely to hit, but also unlikely to cause more than a few percent more damage than usual.

If Potential_Damage < 1 then
   Potential_Damage = 1


A bullet can sometimes strike the target with 0 or less damage left, especially if it had to pass through an obstacle first. The program simply makes sure that it never has to work with values less than 1...

If Ammo_Type is a High Explosive then
   Potential_Damage is multiplied by the "BeforeArmourImpact" value of the ammo


High explosive ammunition explodes right before hitting the target. This is done with MiniRockets HE and HEAP, but as yet isn't used with other items in 1.13. The value "BeforeArmorImpact" is read from the XML data of the bullet. This multiplication increases the potential damage of the bullet greatly, usually ensuring armor penetration and massive damage to the target.

If Target is a Tank then
   Potential_Damage is divided by 2


Tanks suffer only half of the bullet's damage potential, if it can hurt tanks at all...

----------------------

At this point, the calculation moves into another set of functions in the code, which calculates how armor interacts with the bullet.

Firstly, it finds the armor item that's been hit, depending on the bullet's HitLocation. It then reads all data about the armor's properties and status.

If the armor has any attachments, like ceramic plates, things get a bit more complicated, and I'll explain that later. For now let's assume we're hitting an unmodified piece of armor.

The program reads three pieces of data from the armor:

A) Armor_Status - the current status of the armor between 100% and 1%
cool Armor_Protection - how strong the armor is in its current state
C) Armor_Coverage - how much of the target's body this piece of armor covers.

Also we add a fourth variable called Total_Protection which will track the changes in the armor's effectiveness.

Then, we begin the formula. Firstly, the program rolls a random chance to see whether the bullet hit the body areas that the armor doesn't cover:

Pull a random number between 1 and 100.
   If Random Number > Armor_Coverage then
      If armor is a vest and the bullet can't "ignore armor" then
         Bypassed armor, but hit non-vital area. Total_Protection = half the bullet's strength.
      Else
         Total_Protection = 0. Armor completely fails to stop the bullet!


So essentially, armor with a lower "coverage" value is less likely to stop bullets at all. Also you can see that if the target's torso is hit in uncovered areas, the armor manages to stop only half the bullet's damage. We consider this to be a hit on the arms or other non-vital areas, usually protected by less armor or none at all.

Next up, the program checks to see whether the bullet hit a "weak-spot" in the armor. It does this by checking armor status. After all, if the armor's been shot in the past, it will have lower status, and hence more weak spots:

Pull a random number between 1 and 100.
   If Random Number > Armor_Status then
      Total_Protection is reduced by the difference
      and also:
         If Total_protection has just dropped below 0 then
            Armor completely fails to stop the bullet!


This means that if status is lower, the bullet is more likely to hit a weak spot. If a weak spot is hit, the armor becomes less effective (how much less depends on the difference between Random Number and Armor_Status). Naturally, if the shot was very powerful and very lucky, the bullet goes right through the weak spot, uninterrupted!

Next up, the bullet's armor-piercing properties (or lack thereof) take effect:

Total_Protection is multiplied by the Bullet's Impact_Multiplier, and divided by Bullet's Impact_Divisor


The two values above are drawn from the bullet's XML data. With common Armor-piercing bullets, the modifier is 0.75, meaning that armor_protection is 75% of its original value (or, in other words, 25% less effective). With common HP bullets, it's the other way around - armor becomes STRONGER against them. With regular ammo ("Ball" or grey-colored ammo), the value is 1.00 - it doesn't change the effectiveness of the armor.

Immediately after this, acidic properties take effect, reducing armor status. Acidic ammo, like bug spit, degrades armor very quickly. To do this, the program reads the armor's "Degrade percentage", a value that determines how easily this armor is destroyed compared to other armors

If Ammo is Acidic then
   Armor status degrades by (3 * armor_protection * armor_degrade) / 100
   And also:
      Total_Protection is reduced by half!


Basically this means that the higher the armor's Degrade Rate, the more damage it received from spit. Surprisingly, the stronger the armor, the more damage it receives! That's just weird. And acidic ammo can easily penetrate armor, as youc an see above, the armor's effectiveness in stopping the attack is reduced by 50%! Much better than Armor-piercing bullets!!

Bullets may also have an "Ignore Armor" property, which is calculated next:

If Ammo can Ignore Armor then
   If we hit the vest or leggings then
      Total_Protection = 0. Armor completely fails to stop the attack!


At the moment, only knives and darts can ignore armor this way. And as you can see, it's apparently impossible to ignore helmets. Odd, but that's the way it is. Also note that ceramic plates and other attachments CAN stop these attacks - only vest and legging armours are avoided by Ingore_armor bullets.

Finally, much like the "Acidic" bit above, the armor's status now degrades due to the bullet's impact:

Armor status degrades by (armor_protection * armor_degrade) / 100


This is the same as above with "acidic" ammo, except this time it's not multiplied by 3. This is used for all ammo types of course - any attack will reduce the status of the armor it hits.

Finally, the program returns the Total_Protection value, or what's left of it after all the above calculations. We'll see how that total_protection is handled later. First let's see what happens if the armor item had attachments.

---------------------------------

If the piece of armor we hit has attachments, then things behave slightly differently than above. Each armor attachment has a certain chance to stop the bullet before it hits the armor itself. Note that when I say "armor attachments" I mean stuff like Ceramic Plates or Leg Protectors which have their own protection values. Stuff like sun goggles, while it can be attached to some helmets, can't help in stopping bullets.

The program goes through the attachments one-by-one. It performs much the same as it did above for each attachment. The results (the "Total_Protection") are added up later.

There's one thing to know about attachments though. If the coverage of the attachment was sufficient, and the bullet didn't bypass it completely, then ALL SUBSEQUENT ATTACHMENTS are assumed to have 100% coverage, as well as the armor itself! Meaning, the bullet can't hit an attachment and then bypass the armor itself. If it hits one, it hits them all.

---------------------------------

Right. Now that we have all the Total_Protection values of all the armor pieces hit, we can move on with the damage calculations - namely, figuring out how much damage the bullet has left after hitting the armor.

First of all, the program actually destroys any armor piece that has gone below 10% condition.

Now, we sutract the combined Total_Protection values we got from the armor checks, from the bullet's original power:

Potential_Damage reduced by Total_Protection


At this point, if the remaining power is greater than 0, that damage will eventually get transferred to the target's body and cause actual pain. However, the program first needs to make sure the bullet's remaining power doesn't go below a certain minimum:

First, we check the bullet to see if it has the "0 minimum damage" property.

If Bullet is "Zero_Minimum_Damage" then
   If Potential_Damage < 0 then
      Potential_Damage = 0


Bullets that have this property can cause 0 damage to the target if they've encountered sufficient armor. HP and Glaser ammo have this - the bullet is so weak that armor can actually completely prevent it from doing damage to the body.

But this bit goes on, for bullets that don't have "Zero_minimum_damage". This bit is a bit more complicated, and I don't understand the reasons behind most of this, but here it is anyway:

If the bullet is NOT "Zero_Minimum_Damage" then
   If Potential_Damage < ( Original_Bullet_Power + 5 / 10 ) then
      Potential_Damage = ( Original_Bullet_Power + 5 / 10 )


Odd stuff. Again, I'm not sure what the heck this is all about. I guess the bullet's strength can only be reduced by a certain amount of what the bullet originally had (including the "fluke" bonus and the "accuracy" bonus, which are explained much earlier in this formula).

There's a bit here that checks something called "gfNextShitKills". I think it has something to do with cheat codes, so I won't explain it here. But basically, if the flag is true, the shot gets 100 potential damage, which is probably enough to kill anyone. I have no idea what triggers this.

Right, back to the code. At this point, if the bullet has 0 potential damage, we're done. The bullet causes no damage at all except whatever it did to the armor. If the bullet does have some potential damage left, now is the time to check how severe it really is.

First, we handle dart ammunition:

If ammo is a dart, then
   If HitBy is over 20 points then
      Put target to sleep :)
   Then, regardless of HitBy
   	Hit the target with whatever damage is left


Darts don't always perform their special function - they require a good hit with high accuracy to have an effect. The "HitBy" value is explained near the top of this post. At this point, darts always deliver their full damage - they do not go on to check for critical hits and such. For them, the formula ends here.

For other bullets besides darts, we now apply the ammo's inherent "AfterArmorImpact" modifier, which is drawn from the ammo's XML data:

Potential Damage is multiplied by Bullet's After_Armor_Impact_Multiplier, then divided by Bullet's After_Armor_Impact_Divisor


HP and Glaser ammo have high numbers here - the bullet's potential damage is multiplied by almost 2 with Glaser ammo, causing MASSIVE damage. Of course, that's assuming the bullet hasn't encountered too much armor resistance, especially because HP and Glaser are terrible at armor piercing, and may end up with 0 potential damage at this point in the formula... 0 * 2 is still 0.

Now, we apply a multiplier based on the hit location:

If HitLocation = Torso then
   Critical_Potential_Damage = Potential_Damage
   Potential_Damage unchanged
If HitLocation = Head then
   Critical_Potential_Damage = Potential_Damage * 1.5
   Potential_Damage = Critial_Potential_Damage
If HitLocation = Legs then
   Critical_Potential_Damage = Potential_Damage / 2
   Potential_Damage = Potential_Damage / 4


This new value called "Critical_Potential_Damage" is used later for calculating whether a critical hit occured. The actual damage of the bullet doesn't increase in case of critical hits, but it can cause special effects and/or stat loss.

Hits to the head deliver 1.5 times more damage, also when determining whether critical damage occured.
Hits to the legs 25% as painful as other hits, but for the purpose of critical hit calculations, it's only half the potential damage.

You can easily see why headshots are so powerful, especially later when we determine whether the hit was critical. Also, you can see that leg damage is usually pretty light. Of course, leg damage will usually knock the target down too...

-----------------------------------------

At this point the program goes into a "Special Criticals" check. This check will tell us whether the target has suffered a special effect due to the damage inflicted. In the case of head shots, it can cause the head to explode. In the case of chest-shots, it can cause the chest to explode. If the legs were hit, it can cause the target to fall over.

The actual formula for this is a bit complicated, and I don't completely understand it. It would be a rough guess on my part to try to explain how it works here, so I won't. Most importantly, you need to remember that the shot has to cause a certain minimum amount of damage to cause these effects. To blow a head off, you need at LEAST 55 points of damage left after all previous reductions. For chest explosions, it's about 85 minimum. To make the person fall over, you need to hit the legs with at least 20 damage, after armor.

There are also lots of other factors in this calculation, which is why it is so complex. Distance to target, bodytype, and other factors all affect whether the critical effect takes place or not. Again, to explain all this would be too complicated, so I'll skip it, at least for now.

-----------------------------------------

The rest of the formula handles damage done by lucky critical hits. Please note that during Auto-Resolve battles, critical hits are impossible. If the battle is auto-resolve, the formula stops here and returns the current Damage_Potential. Otherwise, it goes on.

First, we check to see whether this was a stealthy knife attack. Stealthy attacks with knives (meaning, the enemy hasn't spotted you) are likely to cause critical damage.

If Ammo Type = Knife then
   If the target can't currently see you then
      If the HitLocation is either the Head or Torso then
         Roll a random number between 1 and 100
            If Random Number is less than (HitBy, plus 10 for each THROWING skill level)
               Potential_Damage = Target's Health + 10
               Critical_Potential_Damage = Potential_Damage


Remember "hitby"? That's the number that tell us how successful our attack was, compared to our Chance-to-Hit. So the more accurate your attack was, the more likely it is to kill the target instantly!

Right, after determining that, we can move on to see how other bullet types behave in regards to critical damage. This bit is somewhat complex, so let's make a calculation first:

Chance_for_Critical_Hit = (Critical_Potential_Damage / 2) + (AimingTime * 5)


The higher the damage done to the target, the better chance for a critical hit. Additionally, the more time you spent aiming at the target, the higher chance for criticals!
Also, because head-shots have a higher Critical_Potential_Damage value (1.5 times the actual damage of the bullet), they are more likely to cause a critical hit.

Roll a random number between 1 and Chance_For_Critical_Hit
   If Random Number is larger than 30 then
      Critical Hit!


By now this should look familiar. If "Chance_For_Critical" was less than 30 to begin with, we're not going to see a critical hit. The higher it goes, the more chance we have to do some stat damage to our target.

If criticals have failed, the formula is done - it returns the current Potential_Damage, and the game continues.

Else, we move on to see exactly what kind of damage, and how much, is inflicted on the poor bastard.

Roll a random number between 1 and (Critical_Potential_Damage / 2)
   Stat_Change = Random Number


Here the program determines the effect this hit has on the target's skills. You know, when your characters get hit in the head and lose some wisdom? This is where it's decided. You can see that the power of the bullet determines how many skill points can be lost, but the result is random within that range.

After that, there's a lot of lines of code, but what they simply do is to reduce the target's skills based on the area hit:

If the head is hit, reduce wisdom by Stat_Change.
If the torso is hit, reduce either Strength or Dexterity by Stat_Change. There's a 50/50 chance for either skill to be damaged, but not both.
If the legs are hit, reduce Agility by Stat_Change.

-----------------------------------------

And that's pretty much it. At the very end of the function it simply returns the Potential_Damage value, and that is applied to the character's health.

Please note one more thing - any hit, regardless of how powerful it was, will reduce the target's stamina by a certain amount. That is _NOT_ covered in this post, and I may cover it later.

Thank you for reading!


[Updated on: Mon, 27 April 2015 23:43] by Moderator

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #195290] Sat, 30 August 2008 06:06 Go to previous messageGo to next message
SaintSinner is currently offline SaintSinner

 
Messages:26
Registered:September 2006
Location: Austin, TX
Damn...

Good stuff, head. Thanks!

Report message to a moderator

Private 1st Class
Re: Understanding it All. Part 1: Bullet Impact[message #195293] Sat, 30 August 2008 06:26 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
"PDF this, b****!" :placard:

Hehehehe, just kidding. Nice PDF, btw. Except the white background, but that's understandable Wink

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #195294] Sat, 30 August 2008 06:27 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
I'm still debating on what I want to write next. Maybe about Chance-To-Hit. That one is a SERIOUS mofo... might drive me crazy in the process.

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #195318] Sat, 30 August 2008 13:06 Go to previous messageGo to next message
Blue_Fox is currently offline Blue_Fox

 
Messages:539
Registered:September 2006
Location: Netherlands
Maybe the bonus of skills mercs gets.
Reducing AP's, accuracy, more range?
Throwing...
Knifing...
Autoweapons...

And what if an electronic/lockpicker only throw grenades all the time and he reach a high Experience level.
Does his throwing improve? Or only his Markmanship & Dex.


Report message to a moderator

First Sergeant
Re: Understanding it All. Part 1: Bullet Impact[message #195336] Sat, 30 August 2008 17:07 Go to previous messageGo to next message
Arquebus is currently offline Arquebus

 
Messages:68
Registered:June 2008
Location: Oslo Norway
you have to much sparetime headrock... but we love you

Report message to a moderator

Corporal
Re: Understanding it All. Part 1: Bullet Impact[message #195340] Sat, 30 August 2008 18:44 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
Quote:
Maybe the bonus of skills mercs gets.
Reducing AP's, accuracy, more range?
Throwing...
Knifing...
Autoweapons...


That's a very interesting one. I think I'll do that.

Quote:
And what if an electronic/lockpicker only throw grenades all the time and he reach a high Experience level.
Does his throwing improve? Or only his Markmanship & Dex.


Skills never improve. What you have is what you have. But I'll give a list of the effects of each skill. If I can.

Quote:
you have to much sparetime headrock...


Yeah, no shit Smile
As Confucious said:
"Find a job you love, and you'll never have to work another day in your life"

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #195381] Sat, 30 August 2008 21:23 Go to previous messageGo to next message
SaintSinner is currently offline SaintSinner

 
Messages:26
Registered:September 2006
Location: Austin, TX
Headrock
"PDF this, b****!" :placard:

Hehehehe, just kidding. Nice PDF, btw. Except the white background, but that's understandable Wink


lol.. yeah. I like the original back backgrounds better, too. Feel free to put them up on your page for everyone else to DL if they want. And no, I don't need recognition. Very Happy

Report message to a moderator

Private 1st Class
Re: Understanding it All. Part 1: Bullet Impact[message #195385] Sat, 30 August 2008 21:44 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
Oh right, that would be a good idea.

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #195626] Mon, 01 September 2008 19:51 Go to previous messageGo to next message
Wounded Ronin is currently offline Wounded Ronin

 
Messages:75
Registered:August 2006
Wow, good reading. Thanks for the research!

Report message to a moderator

Corporal
Re: Understanding it All. Part 1: Bullet Impact[message #196995] Tue, 23 September 2008 08:36 Go to previous messageGo to next message
Hitcher is currently offline Hitcher

 
Messages:12
Registered:January 2000
Location: Vienna, Austria
Knife Throwing increases the chance for a critical. To which does this apply exactly, knifing or throwing (or both)?

Stamina loss would indeed be another very helpful topic. I've always had some questions about it. Does absorbed damage cause more stamina loss than damage that penetrates? Do leg shots cause more stamina loss?

From what I understand, targeting the legs is only ever useful to knock a standing/running enemy down. But I assume, this makes him harder to hit with followup shots, correct? IIRC, the legs of crouching enemies can also be targeted, does this make sense in any situations? I think once they're crouching, they can no longer fall, the most you can achieve is that they go prone.

Report message to a moderator

Private
Re: Understanding it All. Part 1: Bullet Impact[message #196999] Tue, 23 September 2008 09:03 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
@ Wounded Ronin:

Thanks mate! My pleasure!

@ Hitcher:

Quote:
Knife Throwing increases the chance for a critical. To which does this apply exactly, knifing or throwing (or both)?


This formula is for Ranged Weapons only (actually, for "BULLETS" only, as the name of the article states Wink ). Thus, where knives are concerned, it's damage with throwing knives.

Quote:
Stamina loss would indeed be another very helpful topic. I've always had some questions about it. Does absorbed damage cause more stamina loss than damage that penetrates? Do leg shots cause more stamina loss?


The stamina calculation is also kind of complex. I'd have to get back to you on that.

Quote:
But I assume, this makes him harder to hit with followup shots, correct?


Well, he goes prone, and so becomes harder to shoot. However, he also stops moving, and so becomes easier to shoot. Plus he has to waste APs to get back up (they never go from "fallen" to "prone" when it's their turn, they have to crouch first, I think). In any case, it really depends on the situation. Go for the legs when you're up close, or when you don't want the enemy to close the distance too quickly.

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #197059] Tue, 23 September 2008 18:14 Go to previous messageGo to next message
Hitcher is currently offline Hitcher

 
Messages:12
Registered:January 2000
Location: Vienna, Austria
Headrock
Well, he goes prone, and so becomes harder to shoot. However, he also stops moving, and so becomes easier to shoot.


Just so I don't missunderstand you: They only become easier to hit in the sense that you don't get as high a target_movement_penalty in followup rounds. Knocking someone over doesn't mean the target_movement_penalty is eliminated for the current turn, or does it?

Quote:
Roll a random number between 1 and 100
If Random Number > (HitBy + 10 for each "Knife-Throwing" skill level)
Potential_Damage = Target's Health + 10
Critical_Potential_Damage = Potential_Damage


This is what I was referring to earlier. In the skill section, you wrote that Knifing gives a bonus to throwing knife crits, while Throwing does not, but this here says 'Knife-Throwing' skill. Come to think of it, even if this applys to Knifing, since Throwing skill increases the CTH, that means the HitBy value is also greater, right?
Is that a straight addition, i. e. Throwing increases crit rate by 12 while knifing increases it by 10, or is the Throwing CTH-HitBy bonus reduced because it goes through some calculations beforehand? Even so, I assume when your CTH is already very high, i. e. 90+, Knifing would give a bit more of an edge.

Report message to a moderator

Private
Re: Understanding it All. Part 1: Bullet Impact[message #197066] Tue, 23 September 2008 19:31 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
Quote:
Knocking someone over doesn't mean the target_movement_penalty is eliminated for the current turn, or does it?


Hmmmmm interesting question. As far as I know, Tiles_Moved is only reset at the beginning of a combatant's next round, so you would be correct that making them fall doesn't reset their CTH movement penalty... I'll have to look at this more closely.

Quote:
This is what I was referring to earlier. In the skill section, you wrote that Knifing gives a bonus to throwing knife crits, while Throwing does not, but this here says 'Knife-Throwing' skill. Come to think of it, even if this applys to Knifing, since Throwing skill increases the CTH, that means the HitBy value is also greater, right?


Actually, you're correct on both counts. The code refers to the THROWING skill in both instances. KNIFING only affects CTH (and probably damage) in knife melee combat. I guess I shouldn't write these things in late hours of the night Very Happy

btw couldn't understand the rest of your sentences... could you repeat?

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #197079] Tue, 23 September 2008 20:11 Go to previous messageGo to next message
Hitcher is currently offline Hitcher

 
Messages:12
Registered:January 2000
Location: Vienna, Austria
Well, my followup musings would only have been relevant if Knifing gave the bonus to crit chance, not Throwing.

Here's what I was saying: Throwing skill increases chance to hit. Higher CTH means higher HitBy value. Higher HitBy value means higher chance for an instant kill.

So even if that line in the code about Knife-Throwing didn't refer to the Throwing skill, mercs with Throwing would still have a higher chance for an instant kill than mercs without.

What i'm asking is how exactly the CTH bonus from the skill gets added into the final throwing accuracy calculation. If it's a straight addition, a merc who would have a 50% chance to hit without the skill would have 62% CTH with it. If it's a *1.12 multiplicator, he would have 56% CTH.

This is relevant to determine by how much the HitBy value increases from the CTH bonus.

I hope this is more understandable.

Quote:
KNIFING only affects CTH (and probably damage) in knife melee combat.


AFAIK, Knifing doesn't increase damage at all. I believe I once read somewhere that knifing an unaware enemy also has an instant kill chance, however. Do you know if that's true? I've never been in a situation where i could sneak up to an enemy that close undetected, and had enough AP left to stab him, so I don't know.

Report message to a moderator

Private
Re: Understanding it All. Part 1: Bullet Impact[message #197082] Tue, 23 September 2008 20:20 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
Quote:
I believe I once read somewhere that knifing an unaware enemy also has an instant kill chance, however. Do you know if that's true?


I haven't looked at the HTH damage calculation yet, but I will tonight. Seems like it warrants an article.

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #197122] Wed, 24 September 2008 02:06 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
Ok, I've checked the HTH combat formulae. The instant kill you're referring to isn't really an instant kill, and it isn't calculated within the damage formula. In fact, it DOES exist, in a way, and is calculated in the formula that checks the results of blade use.

Basically, if the enemy has not seen or heard you, has collapsed to the floor, or is below 15 life, you get a "surprise attack". Firstly, this surprise attack has a 100% chance to hit. Furthermore, this hit will provide 1.5 times more damage than a normal hit. Therefore, it is quite likely to kill the target, provided all the variables fall into place nicely.

This has nothing to do with any skill, by the way.

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #197125] Wed, 24 September 2008 02:36 Go to previous messageGo to next message
Hitcher is currently offline Hitcher

 
Messages:12
Registered:January 2000
Location: Vienna, Austria
Headrock
This has nothing to do with any skill, by the way.


Well, Stealth helps to get that close undetected. It's certainly good to know, thanks for looking it up.

Report message to a moderator

Private
Re: Understanding it All. Part 1: Bullet Impact[message #197168] Wed, 24 September 2008 15:05 Go to previous messageGo to next message
DNA from the Lowlands is currently offline DNA from the Lowlands

 
Messages:337
Registered:July 2003
Aye nice read sofar, less than halfway now.
I never thought I'd want to add aimpoints for the damage, thanks for this revelation.

Just teasing, 'if any-leg was hit' ... causes both legs to explode.

Report message to a moderator

Master Sergeant
Re: Understanding it All. Part 1: Bullet Impact[message #197321] Thu, 25 September 2008 23:52 Go to previous messageGo to next message
Action is currently offline Action

 
Messages:11
Registered:February 2001
Correct me if I'm wrong but it seems like this formula indicates that the armor percentage box in the inventory screen doesn't mean much. It's all about the actual armor piece you have in that slot.

So if you have a spectra vest and a spectra helmet and no leg armor at all, you're going to be well protected as long as you don't get hit in the legs. Even though your armor percentage will be a lot lower due to the lack of leg armor.

If true, it seems to me that I'll be wearing a lot less in the way of leg armor, because it lowers your AP and I rarely get shot in the legs.

Might come back to haunt me if I get grenaded though.

Report message to a moderator

Private
Re: Understanding it All. Part 1: Bullet Impact[message #197328] Fri, 26 September 2008 00:29 Go to previous messageGo to next message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
You're right, the armor percentage box doesn't mean much. It hasn't meant much for a long time now, actually. Its only purpose is to show you how close you are to maximum protection (Complete Spectra suit with Queen's Jelly coating). Of course, today the armor coverage value is also important and doesn't figure into that percentage box either. Plus, EOD gear easily outperforms spectra anyway, so it isn't really the maximum, either.

Report message to a moderator

Sergeant Major

Re: Understanding it All. Part 1: Bullet Impact[message #201550] Thu, 13 November 2008 11:12 Go to previous messageGo to next message
lynxlynxlynx is currently offline lynxlynxlynx

 
Messages:109
Registered:September 2005
Location: Slovenija
Headrock
If Random Number > (HitBy + 10 for each THROWING skill level)

Shouldn't this be in reverse? Now the higher your HitBy and skill, less likely the condition will be true and less likely you will score a deadly hit.

Report message to a moderator

Sergeant
Re: Understanding it All. Part 1: Bullet Impact[message #201558] Thu, 13 November 2008 16:52 Go to previous message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
Yeah, it's "less than". I'll fix that.

Report message to a moderator

Sergeant Major

Previous Topic: "How does it work?" Part 6: Auto-Resolve
Next Topic: "How does it work?" Part 8: Skill Checks
Goto Forum:
  


Current Time: Tue Apr 16 21:05:26 GMT+3 2024

Total time taken to generate the page: 0.02263 seconds