FOnline: Ashes of Phoenix

General section => Game Tips & Guides => Topic started by: 3.14 on September 11, 2014, 09:52:27 AM

Title: Range Calculator
Post by: 3.14 on September 11, 2014, 09:52:27 AM
The whole 'effective range' thing isn't all that clear to me, and I don't think I'm the only one with this problem. So I cooked up a tiny program to make the math for you. Can't say if it's all correct - it's based on the info in the wiki alone.

Python source (will need Python 2.x, not sure it it's 3.x compatible):
http://pastebay.net/1494622
Windows binary (py2exe):
https://www.sendspace.com/file/vqbh5y
Screen (Warning! Ugly Tkinter!):
(http://s28.postimg.org/twhruv1bh/range.png)

If You like it/use it donate a bottle cap to any random, new player.

EDIT:
Links replaced, there was a small error and the displayed values where off by one.

EDIT2:
Now the accurate perk gives +30%, new links above.
Title: Re: Range Calculator
Post by: paragon on September 11, 2014, 11:20:54 AM
Yay! Great. Gonna use your work for character planner, may I?
Title: Re: Range Calculator
Post by: baskila on September 11, 2014, 11:35:00 AM
Interesting how much skill affects accuracy but i.e. 2 special point difference in PE effect is minor...
Title: Re: Range Calculator
Post by: Fox on September 11, 2014, 11:37:08 AM
Good job, pal, very useful thing. Thanks a lot.
Now it's time for charity.
Title: Re: Range Calculator
Post by: 3.14 on September 11, 2014, 12:15:07 PM
Yay! Great. Gonna use your work for character planner, may I?
Use it as you will. It's MIT license.
Interesting how much skill affects accuracy but i.e. 2 special point difference in PE effect is minor...
If the wiki is true then PE only affects aimed shots, or if you have less then 5 of it (perception not wiki - silly English).
Title: Re: Range Calculator
Post by: 3.14 on September 11, 2014, 01:42:27 PM
There was a small error, the value shown for range of 1 was really calculated for range=0. Links to a updated version are now in the first post.
Title: Re: Range Calculator
Post by: Prosector on September 12, 2014, 11:26:17 PM
Good job, this is very useful program if its reliable.
but the 'accurate' weapon trait aint modify anything for me at all. it may be a bug?
although PE, sharpshooter and scope only affects aimed shots. is it true? i'd be be glad if a dev have confirmed this! if true, i wont waste point on 'sharpshooter' perk or 'gain PE' (i have 8) cause its very marginal.
btw its funny that scope helps almost nothing for those who have very good eyes (Pe 10 + sharpshooter) + 250 skill, even for aimed shots
Title: Re: Range Calculator
Post by: 3.14 on September 13, 2014, 03:58:59 AM
the 'accurate' weapon trait aint modify anything for me at all. it may be a bug?
My bad. It is a bug. Fixed it in a new version (links in the first post).

I'm not sure how the scoped perk works wit scoped x2. x3 and so on. Should it give +2 PE, +3PE... and so on?

Also if the Devs would be willing to share the burst mechanics formula I'd add that as well.
Title: Re: Range Calculator
Post by: Lidae on September 13, 2014, 05:21:08 PM
Scoped weapon perk only affects sight range, not hit chance. Also, weapon minimum strength affects hit chance as well.
Title: Re: Range Calculator
Post by: paragon on September 15, 2014, 09:09:06 AM
Quote
Skill below 150:

baseHitChance = 0.95*(skill-50) + rangeModifier

Skill above 150:

baseHitChance = 95 + (skill-150)*4 + rangeModifier


The range modifier is given by:

Distance to target less than effectiveRange:

rangeModifier = 95*(effectiveRange - distanceToTarget)/effectiveRange

Distance to target greater than effectiveRange:

rangeModifier = 1000*(effectiveRange - distanceToTarget)/effectiveRange

And in your code you have:
        if distanceToTarget<effectiveRange:
            rangeModifier=95.0*(effectiveRange - distanceToTarget)/effectiveRange
        else:
            rangeModifier = 1000.0*(effectiveRange - distanceToTarget)/effectiveRange

if skill<150:
            baseHitChance = 0.95*(skill-50) + rangeModifier
            if perc<5:
                baseHitChance-=10
        else:

Are you sure about not strict comparisons in first cases?
Title: Re: Range Calculator
Post by: 3.14 on September 15, 2014, 11:05:17 AM
No, not sure at all :]
Title: Re: Range Calculator
Post by: paragon on September 15, 2014, 11:28:37 AM
I'm gonna do it opposite way xD
Title: Re: Range Calculator
Post by: 3.14 on September 15, 2014, 11:32:20 AM
In the face of ambiguity, refuse the temptation to guess.
Title: Re: Range Calculator
Post by: paragon on September 15, 2014, 12:37:53 PM
With weapon range 90 and skill 150 you have 95% at 61 hexes. I guess it's 1 hex away from right.
Title: Re: Range Calculator
Post by: Prosector on September 16, 2014, 12:01:50 AM
Isn't something wrong with sharpshooter? if i test with 3 PE+sharpshooter, it gives worse result than 5 PE without sharpshooter.
Isn't sharpshooter supposed to count as 2 PE?
Title: Re: Range Calculator
Post by: 3.14 on September 16, 2014, 05:33:42 AM
My bad. Here's a fixed version, but the fix was made on a phone, so it may be wrong.
pastebay.net/1494622
I'll post a exe when I'll make one (when/if I get home).

I'm starting to regret not putting it all on github.
Title: Re: Range Calculator
Post by: PusiteGA on September 18, 2014, 12:18:52 PM
My bad. Here's a fixed version, but the fix was made on a phone, so it may be wrong.
pastebay.net/1494622
I'll post a exe when I'll make one (when/if I get home).

I'm starting to regret not putting it all on github.
so is the version at first post working or what ?
Title: Re: Range Calculator
Post by: 3.14 on September 18, 2014, 12:27:00 PM
Sorry, updated the post.
exe here: https://www.sendspace.com/file/vqbh5y
py here: http://pastebay.net/1494622
Title: Re: Range Calculator
Post by: PusiteGA on September 18, 2014, 01:18:52 PM
Sorry, updated the post.
exe here: https://www.sendspace.com/file/vqbh5y
py here: http://pastebay.net/1494622

ty