Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » bAccuracy to nAccuracy conversion formula? (Trying to translate old stuff)
icon5.gif  bAccuracy to nAccuracy conversion formula?[message #361834] Fri, 13 November 2020 22:25 Go to next message
Kurt

 
Messages:411
Registered:March 2004
How does the new <nAccuracy> relate to the old <bAccuracy>?
Yes, I know, one is OCTH, the other NCTH. That's not my question.

My question is, if I have a weapon which in OCTH had a <bAccuracy> of (let's say) 4, how do I calculate the corresponding NCTH <nAccuracy>?

I guess here must be a conversion formula of sorts.
Re: bAccuracy to nAccuracy conversion formula?[message #361867 is a reply to message #361834] Mon, 16 November 2020 17:48 Go to previous messageGo to next message
Kurt

 
Messages:411
Registered:March 2004
Somebody please?
Re: bAccuracy to nAccuracy conversion formula?[message #361868 is a reply to message #361867] Mon, 16 November 2020 18:09 Go to previous messageGo to next message
sevenfm

 
Messages:2355
Registered:December 2012
Location: Russian Federation
There is no conversion formula, but since bAccuracy in stock is like -2..12 and nAccuracy is like 0..100 and also nAccuracy is non-linear, you can use something like
nAccuracy = (bAccuracy + 2) * (bAccuracy + 2) / 2
but since values were probably assigned manually based on guessing and personal preferences, you will not have exact match with any formula.
All you can is make a table using default 1.13 weapons like:
bAccuracy 0 -> nAccuracy 0..10
...
bAccuracy 7 -> nAccuracy 60..70
..
bAccuracy 12 -> nAccuracy 88



7609+AI (r1792) | Experimental project | Unofficial Modpack | Youtube | Trunk (r8916) | 1.13 Starter Docs | 1.13 How to get

Кто в Москве не бывал, красоты не видал.


Re: bAccuracy to nAccuracy conversion formula?[message #361881 is a reply to message #361868] Wed, 18 November 2020 16:31 Go to previous messageGo to next message
Kurt

 
Messages:411
Registered:March 2004
sevenfm wrote on Mon, 16 November 2020 17:09
There is no conversion formula, but since bAccuracy in stock is like -2..12 and nAccuracy is like 0..100 and also nAccuracy is non-linear, you can use something like
nAccuracy = (bAccuracy + 2) * (bAccuracy + 2) / 2
Thanks, that was what I needed to know. thumbs up


sevenfm wrote on Mon, 16 November 2020 17:09
but since values were probably assigned manually based on guessing and personal preferences
Indeed, that's why I asked. I tried to guess the ratio from the existing weapons, but quickly noticed it was kind of random...

I'll fix them in my own game, much like I'm fixing the damages by caliber (the same bullet should do similar if not identical damage, with some leeway for ballistic idiosyncrasies).

Re: bAccuracy to nAccuracy conversion formula?[message #361885 is a reply to message #361881] Thu, 19 November 2020 00:33 Go to previous messageGo to next message
Kurt

 
Messages:411
Registered:March 2004
Yikes, spent half an hour going through the weapons - The current "nAccuracy" values are really random. Some weapons have astonishingly high values (unwarranted sniper rifle precision for in reality fairly inaccurate weapons), but I also found two which had actually lower "nAccuracy" than "bAccuracy"...

What I'm trying to say is (general) you should look into it. It seems somebody maintains the "GameDir" files, since there are frequent updates, isn't it?
Why should (s)he?
One could indeed debate if the XYZ-123 should have an accuracy of this or that, but the values should at least be consistent: The game apparently shows the bAccuracy values in the information windows, so if the player uses that (now totally inaccurate) information to chose his weapons, he will be in for a big surprise.

I used the following quick & dirty conversion list, calculated from sevenfm's formula above, with a small bonus for the inaccurate weapons (it's boring spending turns shooting at each other without anybody hitting anyone).
Weapons with no "bAccuracy" setting are supposed to have a "bAccuracy" of 0.
Grenade launchers had neither "bAccuracy" nor "nAccuracy", and got an arbitrary "bAccuracy=4"/"nAccuracy=20" setting, following a couple grenade launchers which did have a "bAccuracy=4" setting. So they now have all the same setting (although I'm considering lowering the short-barreled ones' one).

That's the values I used. The whole search & replace took me about 15-20 minutes.

(bAccuracy=nAccuracy)
-2=1
-1=3
0=5
1=7
2=8
3=15
4=20
5=25
6=32
7=41
8=50
9=61
10=72
11=85
12=98


Thanks to sevenfm for his data and his formula!
Re: bAccuracy to nAccuracy conversion formula?[message #361888 is a reply to message #361885] Thu, 19 November 2020 16:45 Go to previous messageGo to next message
edmortimer

 
Messages:1364
Registered:January 2015
Location: Home Free
Quote:
Yikes, spent half an hour going through the weapons - The current "nAccuracy" values are really random. Some weapons have astonishingly high values (unwarranted sniper rifle precision for in reality fairly inaccurate weapons), but I also found two which had actually lower "nAccuracy" than "bAccuracy"...

Wait until you find the phony bonuses (& descriptions) given to HK weapons . . .





Re: bAccuracy to nAccuracy conversion formula?[message #361892 is a reply to message #361888] Fri, 20 November 2020 18:00 Go to previous message
Kurt

 
Messages:411
Registered:March 2004
edmortimer wrote on Thu, 19 November 2020 15:45
Wait until you find the phony bonuses (& descriptions) given to HK weapons . . .
What do you mean?
Previous Topic: What does <sBackpackWeightModifier> do?
Next Topic: Breath cost of shooting? Which setting?
Goto Forum:
  


Current Time: Sat Dec 05 08:04:51 EET 2020

Total time taken to generate the page: 0.01216 seconds