-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Adjust grenade values #37585
Adjust grenade values #37585
Conversation
At advice of kevin.
It looks like adjusting the grenade to match its real life values is making it fail the explosion test, going to try seeing if it passes if we assume it fragmenting less evenly and produce less/larger fragments. If that doesn't pass this PR can probably be closed/stalled until someone reworks the explosion tests. |
Kevin helped me figure out that grenade is using the default shrapnel size of 0.005 grams, which gives the frag grenade 42400 pieces of shrapnel, which is probably too much. |
Makes the grenade splinter into 1446 fragments
New value seems to give very sensible results, passing the 5m test, and i believe would pass the 15m test if we count the wounded as casualties. It does seem to be failing the vehicle test now though, i think because the shrapnel now does enough damage to harm the vehicle, which it could not before. |
Uses the code kevin wrote in CleverRaven#37605 so the grenade change is packed with the new test, so we can see if it passes.
Added the modified explosions test kevin wrote to this PR. |
Attempt to fix an error in CleverRaven#37605
To see if this makes it pass the test.
Going to tweak fragment damage to vehicles till i've walked it to the target of narrowly passing the vehicletest again. |
Default fragment mass is now the same as the new frag grenade fragment mass.
Explosion test is now passing lethality/casualty tests, but failing the vehicle test. The frag grenade is slightly harming the wheels and the alternator. It only passes if it does not damage the vehicle. Not sure what the best approach to fix it would be. |
... i fat fingered the close PR button. Working on a fix for the vehicle test with suggestions from kevin, once that is narrowed down to pass the test this should be ready. |
I'm starting to suspect that the code for reducing damage to vehicles is working oddly. |
} | ||
|
||
TEST_CASE( "grenade_vs_vehicle", "[grenade],[explosion],[balance]" ) | ||
{ | ||
check_vehicle_damage( "grenade_act", "car", 5 ); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
Thanks for the review and teamwork on this one kevin. Would not have been possible without your help on the explosives test. |
Summary
SUMMARY: Balance "Adjust grenade values "
Purpose of change
Normal military frag grenades now use the same format as other explosives so the code is less confusing. Adjusted values to match the m67 frag grenade.
Describe the solution
https://en.wikipedia.org/wiki/M67_grenade
Explosives power is TNT equivalence, m67 frag has 180 grams of compound B which is 240 grams tnt.
Casing mass used is weight of the grenade minus weight of the explosive filler.
Fragment size was estimated with some help from dev-general at 0.15 grams. This is subject to change if someone has better data / a better way of estimating shrapnel size.
Describe alternatives you've considered
Testing
Spawn grenades ingame, they function as expected of military grenades without errors.
Additional context
Estimations by tenmillimaster
"my hairy inverted golfball has 726 points, by my count
tiny bit of error on the left hand side, but eh
good enough
so if it fragmented perfectly, less fuze elements and whatnot, it'd split into ~1452 pieces?"
The grenade is currently set to fragment in 1466 pieces.