fodev.net
15.08.2009 - 23.06.2013
"Wasteland is harsh"
Home Forum Help Login Register
  • November 23, 2024, 06:45:29 pm
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Play WikiBoy BugTracker Developer's blog
Pages: [1]

Author Topic: Ranged hit chance....  (Read 3482 times)

Ranged hit chance....
« on: January 19, 2010, 10:58:22 pm »

This is i belive equation for Fallout 1&2 for ranged hit chance :

hit% = Skill + ((PE - 2) * X) - (HEX * 4) - (AC of Target) [- night modifier]

where
X = 16 for rifles of range mroe then 25 and 8 for less
Hex - distance to target in hexes (weapon range is said in hex)
AC of target - in Fonline 2238 max ac i think is 40 with perk and 33 for most toons
night modifier - from patch lately its from -10 to -40% i belive

its said that accurate rifles like hunting rifle recivie +4% hit bonus for first 10 hexes instead of penalty

******1)IS this =- accurate or the mechanic was changed ?

ah and ofc we need to add panalty if you do aimed.

******2) And how much crit bonus one recives for picking aimed hit ? (lets say for eyes)
Logged

Gunduz

  • [MDK]skankin
  • Offline
Re: Ranged hit chance....
« Reply #1 on: January 20, 2010, 01:08:41 am »

Yeah look at this thread http://fodev.net/forum/index.php?topic=309.msg1682#msg1682. Bob found all that info which I believe is from F1&2 but from what I've experienced is still fairly accurate.
Logged

Atom

  • Rotator
  • Offline
Re: Ranged hit chance....
« Reply #2 on: January 20, 2010, 05:48:47 pm »

Quote from: Atom in some ancient document
First, check
http://fonlinedocs.netii.net/tohit2.c

This is precise BTH algorithm from Fallout2. The same algorithm is implemented in fonline, but three things are not implemented:

1. Influence of multixes critters blocking the way (they are treated as normal critters, and occupy only one, central hex instead of 7 hex circle).
2. Light levels (engine does not provide functionality for that).
3. Difficulty setting, but this is not needed nor desired, all works like in Normal combat difficulty.

One day this could go to our wiki, after some edition.
Logged
Re: Ranged hit chance....
« Reply #3 on: January 20, 2010, 07:53:20 pm »

To hit
if you ahve Single hander perk -40% for using 2h weapon and +20% for using 1h weapon .........0
if weapon is considered accurate  +20% (hunting rifle , sniper rifle dunno what more)..............+20
-AC modifier (40AC is i belive max ) what we can have..........................................................-40
+AC_bullet_modifier .............................................................................................0 (or +20 for .233)
+15% for large creatures...................................................................................................0
-Light penalty (from -10 to -40%).....................................................................................-40
-25% if you have damaged eyes.........................................................................................0
+40% for targets lying ............................ ....................... ......................... ......................0
-range penalty that is calculated :
dist => x
(PER-2)*5 => y (5 for scoped rifle)
x-y-> this value cant be lower then PER*-2 - actually this make no sense as if its negative then due to multiplication by -4 late the penalty value becomes positive and it doesnt get applied at all
if you have sharpshoter then substract 2 from the above?? ***** (should be 4 ....)
now the result multiply by -4
and the result is added (result is negative) to the tohit but noting is added if the result is positive (your perception is so good you dont get range penalty.


to have 95% to hit
155% ....... is min for highest armored target without considering perception-distance influence . substract AC_bullet modifier from it (highest is 20% i belive)
you need to add ....Weapon_Range - (PER-2)*x        (x = 5 for scoped 4 for other long range)
add penalty for aimed on whatever you want if you wanna aim at max distance
add 20% if your weapon is inaccurate

result is your required weapon skill to have 95% hit at max range in darkest night on super armored target ;]

**** interesting there is that sharpshooter is calculated after perception meaning that even with 10 per you can benefrit from it!! (Strange is however as sharpshooter is +2 PER for range purposes , that would mean player_sharpshooter_level need to be of value 2 for those with sharpshooter but normaly such values are stored in 0-1 numbers....
« Last Edit: January 20, 2010, 08:16:46 pm by Attero »
Logged

Atom

  • Rotator
  • Offline
Re: Ranged hit chance....
« Reply #4 on: January 20, 2010, 08:09:11 pm »

player_sharpshooter_level is equal to the number of ranks of the sharpshooter perk, and is applied after the weapon perception modifier, so the perk works like giving a flat +8% bonus (except for the case of a crippled eye, where it works almost like that).
Logged
Re: Ranged hit chance....
« Reply #5 on: January 20, 2010, 08:31:52 pm »

player_sharpshooter_level is equal to the number of ranks of the sharpshooter perk, and is applied after the weapon perception modifier, so the perk works like giving a flat +8% bonus (except for the case of a crippled eye, where it works almost like that).
there is only one rank of sharpshooter afaik .
(attacker_is_player) dist-=(perception-2)*distmod1; here is perception calculated
it translates into this (x = distance)

x - (PER-2)*5 = x+10-50 = x+10-PER*5 (10 PER , scoped rifle)
at top of that sharpshooter is applied => x+10-PER*5-2*SS  (SS stands for sharpshooter here)
now for every hex left 4% penalty is applied -> 4*X +40 - 20*PER - 8*SS
it makes SS idd lower the penalty by 8% however every point of perception lowers it by 20!! (16% in case of non scoped rifles)
where sharpshooter should be a +2 PER as in info . The only case when sharpshotoer equls to 2 PER bonus is for short range weapons where instead of 5 in the first PER*5 value of 2 is used making it -> 4*x+40 - 8*PER - 8*SS

someone failed in coding sharpshooter.. and all it would need is chaning where perception value is taken from globals to make it ..
perception = attacker_perception +2*player_sharpshooter_level
if (perception > 10) perception = 10;


Logged

Atom

  • Rotator
  • Offline
Re: Ranged hit chance....
« Reply #6 on: January 21, 2010, 05:47:26 pm »

The pseudocode version is practically one-to-one translation from the machine code (FO2 1.02d US under offset 0x0042436C and onwards) to something more readable, and can be considerably simplified under the assumption of "attacker is a player and his or her eye is not damaged". In the machine code, the rank of the sharpshooter perk is checked - it doesn't matter if it's max value that can be set during a normal game is only 1. In theory one could edit FO2 save file, set the rank to 100 and enjoy +800 p% bonus.

Also, even for short range weapons the bonus is only 1 PE, because clearly 4*x+40 - 8*PER - 8*SS = 4*x+40 - 8*(PER+1). A (weak) offset for this is that it extends the viewing radius by 6 hexes (like +2 PE), and it works even with PE=10.
Logged
Re: Ranged hit chance....
« Reply #7 on: January 21, 2010, 07:21:05 pm »

ah yea fool me cant read properly what i wrote myself ...

basicly Sharpshooter is 8% hit chance icnrease ragardless if you ahve 10 PER or not and has nothing to do with the 2 PER bonus mentioned description (well actually maybe it says smth elese in Fonline - im using wiki as source here).

if one would wonder how much PER is worht in hit chance - one point - 8% for short range (and weapons that werent present in F1) , 16% for stable long range rifles (all with range >25 and present in F1 should apply) and 20% for scoped rifles
Logged

Jack_Fr

  • Ex Orphans & TTTLA member
  • Offline
Re: Ranged hit chance....
« Reply #8 on: March 24, 2010, 12:54:40 pm »

Hi,
I have just a little question about hit chance.
Is there a malus for number of rounds in burst mode ?
It would be logical but I have no proof on it and the to-hit algorithm doesn't seem to mention it. Should I consider that there is no decrease in to-hit chance from burst mode ?
Some people told me 2% a bullet, I read somewhere else 1% a bullet. There is no clear informations about that.

Atom, you seem to be the best expert of these questions, I would be happy to have your answer.
But if some users have an idea about it, it's with pleasure. ;)
Logged
You get a nice view of your body as your head sails through the air.
Critical Hit Table - Head - Roll>100
Re: Ranged hit chance....
« Reply #9 on: March 25, 2010, 02:27:33 pm »

you can find yoru answer here http://fodev.net/forum/index.php?topic=1129.0

basicly hit chance dont decay for burst but :
1/6 of bullets hit on their own each rolling individual hit
and all rest use subsequent rolls if first bullet hits there is roll for second if second hit it rolls for 3rd , if 3rd missed whole rest missed too (more complicated then that read the link)
Logged

Jack_Fr

  • Ex Orphans & TTTLA member
  • Offline
Re: Ranged hit chance....
« Reply #10 on: March 26, 2010, 06:23:05 am »

Ok, thank you for your answer, Attero.
In fact, I noticed that I knew the answer but I made mistake in reading an Atom post on nma.
So, just for information, the answer from Atom :
Quote from: Atom
it looks like check_ranged_miss checks only ONE of those 1/6 bullets that missed their target
Logged
You get a nice view of your body as your head sails through the air.
Critical Hit Table - Head - Roll>100

Jack_Fr

  • Ex Orphans & TTTLA member
  • Offline
Re: Ranged hit chance....
« Reply #11 on: March 27, 2010, 04:36:11 am »

IMPORTANT
To-hit chance has been modified since wipe. It seems that night modifier has been implemented.
Logged
You get a nice view of your body as your head sails through the air.
Critical Hit Table - Head - Roll>100
Pages: [1]
 

Page created in 0.079 seconds with 21 queries.