Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explosive Trap is calculated inaccurately. #6909

Closed
3 tasks done
caner-cetin opened this issue Dec 5, 2023 · 6 comments · Fixed by #7384
Closed
3 tasks done

Explosive Trap is calculated inaccurately. #6909

caner-cetin opened this issue Dec 5, 2023 · 6 comments · Fixed by #7384
Labels
bug: calculation Numerical differences

Comments

@caner-cetin
Copy link

caner-cetin commented Dec 5, 2023

Check version

  • I'm running the latest version of Path of Building and I've verified this by checking the changelog

Check for duplicates

  • I've checked for duplicate issues by using the search function of the issue tracker

Check for support

  • I've checked that the calculation is supposed to be supported. If it isn't please open a feature request instead (Red text is a feature request).

What is the value from the calculation in-game?

We dont know, and we didnt calculate but according to latest addition to RAQ:

Why did you add the line ''Smaller explosions have between 30% reduced and 30% increased base radius at random'' to Explosive Trap?

Explosive Trap has always worked this way. This is purely an update to the description.

What is the value from the calculation in Path of Building?

image

Either:
-> Formula does not calculate the -30 to +30 random base radius
-> Calculation text shown to users is wrong.

Asides from the calculation bug (or text inaccuracy), maybe just a little bug, Explosive Trap is registered as ShrapnelTrap in skills. https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/dev/src/Data/Skills/act_dex.lua#L4091

How to reproduce the issue

No response

Character build code

[https://pobb.in/nEl5FG8KIKB3

https://pastebin.com/9HRBVLij](https://pobb.in/nEl5FG8KIKB3)

Screenshots

No response

@caner-cetin caner-cetin added the bug: calculation Numerical differences label Dec 5, 2023
@Lilylicious
Copy link
Contributor

Lilylicious commented Dec 5, 2023

Sharpnel Trap is the internal name from GGG for Explosive trap, so this is not a bug.

Regarding the radius modifications, I believe that since it's symmetrically random, it shouldn't have an impact on the final result. Unsure if any changes need to be made here. We could just call it average radius, which would make it fully accurate.

@caner-cetin caner-cetin changed the title Explosive Trap is labelled and calculated inaccurately. Explosive Trap is calculated inaccurately. Dec 5, 2023
@caner-cetin
Copy link
Author

Thanks for the heads up, fixed the title.

@ychen428
Copy link

ychen428 commented Dec 6, 2023

@Lilylicious I actually do think it has an impact, since although the radii are symmetric, the overlaps are not since overlaps are capped at 100% and you can hit that on the +30% end

I previously wrote a script to optimize aoe breakpoints, I modified it to include the -30% to 30%
explosive.py.txt - can't upload .py
image

There's a slight difference between the current method and averaging over the range, this is simulating 12% increased aoe and 30% less from conc effect.

@Lilylicious
Copy link
Contributor

Yep, we've come to the same conclusion. In addition, PoB's current secondary explosion hit rate calculation, even without the -30% to 30%, is overestimating the hit rate consistently at various radii. I've gotten a simplified formula for the hit rate that's far more accurate, next step is just to take into account the -30% to 30% radius modifier in some intelligent way that isn't doing the same calculation for every option.

@ychen428
Copy link

ychen428 commented Dec 6, 2023

Could you share the updated formula for the hit rate? I can see if I can come up with something, but my gut instinct is it might be difficult without repeating the calculation several times because we have to round the radius first before calculating the overlaps, which means we can't get an analytic form.

@Lilylicious
Copy link
Contributor

Lilylicious commented Dec 6, 2023

Sure! The new formula is math.min(1/(1+math.exp(-(3.6/areaSpreadRadius)*((areaDamageRadius+enemyRadius-0.1)- areaSpreadRadius*0.9 ))), 1).

I'm testing it against a content creator's recent leaguestarter PoB for it, and I'm getting around 50% hitrate for secondary explosions compared to the previous 75% for that PoB.

Edit: The new formula assumes a random placement of the enemy within the large trap radius. The old formula assumes perfectly centered placement on the enemy. We'll likely go for some middle ground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: calculation Numerical differences
Projects
None yet
3 participants