Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upRebalance aiming and skill training #18020
Conversation
mugling
added
Game: Balance
Aiming
labels
Aug 13, 2016
mugling
force-pushed the
mugling:arc4
branch
2 times, most recently
Aug 13, 2016
This comment has been minimized.
This comment has been minimized.
|
This now brings us to the issue of how to split If we propose that ¾ of the effect is from GUN then dispersion for
For the above examples which all use base iron sighs (120) there an untrained survivor doesn't gain much benefit from the
Cx4 is now much better than MP5 (at least in terms of range) but remains worse than the similarly sized M4A1 due to the higher dispersion of 9mm. A pistol scope on the glock makes little difference. This still leaves us with the question of how to balance
With iron sights
From this we can determine both that
|
This comment has been minimized.
This comment has been minimized.
|
Data is great and I like the approach, but a few things off the top of my head.
|
This comment has been minimized.
This comment has been minimized.
|
@mightyagrippa I did a quick edit of your post to keep those points together as otherwise some would otherwise disappear as I push further commits.
A combination of
Probably based on nett
Both would be subject to a similar limit and there are of course further tactics for use against either.
This is very much |
mugling
force-pushed the
mugling:arc4
branch
Aug 13, 2016
mugling
referenced this pull request
Aug 13, 2016
Closed
Early gun skill gains have been drastically lowered in recent builds #18012
mugling
force-pushed the
mugling:arc4
branch
Aug 13, 2016
This comment has been minimized.
This comment has been minimized.
Damage-based experience would be a significant nerf to .22; plinking for practice is about the only reason I'm ever happy to find it. The current model where gun skills are trained alongside marksmanship skill seems alright.
Of course, but I'd like to keep sniping in the plausible player toolbox against them. That won't happen if getting a shot at them requires exposing the player to a round of .50 cal or 40mm grenade. Just to make sure, when you say
I disagree strongly on guns being previously useless. The dispersion issues you've noted did make them bad outside of close range, but within 3 or 4 tiles they were useful and even vital to survival. Close range pistol work gave an out to heavily fatigued survivors. SMG or rifle bursts at distance 3 were the simplest safeish way to dispatch the toughest zombies. Even sniping had uses, but since that took like 20 shots to kill a turret you're probably in the right on that one. Looking forward to trying out the new systems. I'd also suggest retaining gun skill contribution to dispersion. It makes sense that part of accuracy is general firearms skill and part is familiarity with a specific type of weapon. Otherwise it's possible to train to 10 marksmanship on a .22 rifle and thus be a grandmaster shotgunner. But your rebalancing to make marksmanship the primary factor seems right, previous state of 75% gun skill and 25% marksmanship felt too slanted toward gun skill. |
This comment has been minimized.
This comment has been minimized.
Yes, that could be a problem
Turrets aren't especially accurate. If you have sufficient skill to snipe them you will already outclass them.
which is also the only range at which they were useful (first table from #17643)
The preamble included a worked example as to why gun skill is irrelevant to accuracy for most skills. Start at σ=600 on the above graph (an inaccurate weapon), move left 200 units (equivalent to gaining 20 levels of That curve is a result of the mathematical laws concerning trigonometry and short of replacing the entire aiming code with a new model we are subject to it's limitations. The worked examples I gave show how to implement suitable values using the curve.
The question was what benefit should increasing |
This comment has been minimized.
This comment has been minimized.
Fair point, just tested vs an antimateriel turret and took 1 leg hit out of 100 shots. Tank drones will still be an issue, their special attack ranges out to 50.
Useless outside short range isn't de facto useless.
Not disputing your math or your working model, I'm saying that instead of P scaling from 100 to 0 solely with marksmanship it could scale with 80% marksmanship and 20% gun skill. Or some other weighting.
Why not some range? |
This comment has been minimized.
This comment has been minimized.
Nonetheless I'm going to repeat this as it answers your question:
Any reply that doesn't refer to that curve is a complete rewrite of ranged weapons. |
This comment has been minimized.
This comment has been minimized.
|
Yes. I read that. I'll quote the initial PR:
I'm asking why change P to be dependent only upon marksmanship. If P = (100 - 8 * marks - 2 * gun) instead of (100 - 10 * marks) you get the same [0-100] bounds. |
This comment has been minimized.
This comment has been minimized.
Because it would only be relevant for a
If you do the maths for that the effect of going from
Put your finger on the curve and move 20 units left. See what changes in range are actually possible? This is the inherent trap of balancing without top-down design. The temptation to add a little bit of this plus a little of that doesn't result in a balanced design - just a reduction to the lowest common denominator. In our original implementation this resulted in the only effective range being 2-3 tiles. |
mugling
force-pushed the
mugling:arc4
branch
Aug 13, 2016
This comment has been minimized.
This comment has been minimized.
PogoMarimo
commented
Aug 14, 2016
|
If we are rebalancing skill gain, it depends entirely on what factors are easy to integrate--For instance, I would integrate the "Grazing, Solid, Headshot" feedback into skill gain to simulate the varying degrees of positive feedback and success--This in place of "damage dealt". I would also integrate the difficulty of the firearm (From an aim_speed and recoil perspective) to simulate a more difficult practice circumstances allowing greater skill gain (You learn more from successfully firing a large caliber handgun than a tiny .22). This means .22 are still useful for practice (Especially in bulk practice) but a .45 will still be more insightful in skills. Lastly, especially for marksmanship, I would make skill gain a function of the distance of a successful shot--For a skilled marksman a 50 yard shot is child's play and trivial, but 400 yard practice can still reap large benefits. And just to reiterate, Marksmanship should primarily impact longer range shots through dispersion, and Gun Skills should primarily effect recoil and aim_speed (Though some bleed over between the two is also acceptable--An 80/20 split for primary and secondary skill). |
This comment has been minimized.
This comment has been minimized.
|
If I'm reading this right, you've put a hard cap on the maximum range of a weapon at 30? Why? There are guns in the game that shoot well beyond 30 tiles. They're rare, but they exist, and one of them is even craftable. Even if only high-skill mutants would be able to actually hit anything at that range, you should still be allowed to attempt the shot. |
This comment has been minimized.
This comment has been minimized.
Are there? I'd be very surprised in the old implementation if it was possible for total dispersion (σ) to be sufficiently low for that.
See the above curve - it's impossible to balance above that that value as very small changes in dispersion result in disproportionately huge changes in range. Any weapons acting at such range require special casing and if we chose to go down that route it will definitely be a separate PR after all other issues are resolved. |
mugling
force-pushed the
mugling:arc4
branch
to
b77958b
Aug 18, 2016
This comment has been minimized.
This comment has been minimized.
|
Aiming speed is now significantly affected by relevant weapon skill. The below shows the effect of going from level 0 ( Although both are useful more accurate weapons will benefit more from Clothing encumbrance also is now more significant with With sufficient skill a heavily armored player could still make use of a pistol or SMG but aiming an accurate rifle whilst wearing plate armor is going to be far less effective. |
mugling
force-pushed the
mugling:arc4
branch
to
db7c5b1
Aug 18, 2016
This comment has been minimized.
This comment has been minimized.
|
Latest commits also support gunmods replacing (or otherwise obscuring) base gun sights via the |
mugling
added some commits
Aug 18, 2016
This comment has been minimized.
This comment has been minimized.
How so? |
This comment has been minimized.
This comment has been minimized.
|
Latest commit fixes the issue of installing weapon mods. You can now specify |
This comment has been minimized.
This comment has been minimized.
|
Backed out of damage xp scaling. Playtesting identified no problems. Launchers are kludged to train even on misses. Ready |
mugling
added some commits
Sep 11, 2016
This comment has been minimized.
This comment has been minimized.
mugling
added
the
(P2 - High)
label
Sep 12, 2016
mugling
referenced this pull request
Sep 12, 2016
Merged
Graceful migration of legacy savegames #18272
This comment has been minimized.
This comment has been minimized.
|
Get it merged (c'mon), get it merged (yeah), get it merged! |
Coolthulhu
self-assigned this
Sep 12, 2016
Coolthulhu
reviewed
Sep 12, 2016
| // Use different amounts of time depending on the type of gun and our skill | ||
| moves -= time_to_fire( *this, *gun.type ); | ||
|
|
||
| practice( skill_gun, xp * ( get_skill_level( skill_gun ) + 1 ) ); | ||
| if( !xp && one_in( 10 ) ) { | ||
| add_msg_if_player( m_info, _( "You'll need to aim at more distant targets to further improve your marksmanship." ) ); |
This comment has been minimized.
This comment has been minimized.
Coolthulhu
Sep 12, 2016
Contributor
This prints even if the player aims at the edge of the bubble and fails to hit the targets.
This comment has been minimized.
This comment has been minimized.
Coolthulhu
reviewed
Sep 12, 2016
| // First check stats | ||
| std::string fail_stat; | ||
| int min_stat; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Aim bars need fixing. Fixing them well would require redesigning them (for example, making them understand normal distribution), but a simple fix to make them feel correct would be to change the hardcoded 250 value to |
This comment has been minimized.
This comment has been minimized.
|
Will look into that simple fix. Can you open an issue against the |
This comment has been minimized.
This comment has been minimized.
|
Fixed |
This comment has been minimized.
This comment has been minimized.
|
I'm going to experimentally merge this one. But expect trouble, since it's a big change. Normal distribution of shots is almost certainly good. May need small adjustments, but it looks far more sensible than linear. |
Coolthulhu
merged commit bc7dd31
into
CleverRaven:master
Sep 12, 2016
This comment has been minimized.
This comment has been minimized.
You can generally avoid the need to aim if you are already within the effective range. Where you do need to aim it's generally preferred to stay put once you've done this so to be able to make follow-up shots. The important parameters for adjustment are sight Hand guns should take much less time than long guns to aim but have severely limited range. Play-testing is likely required to balance this further.
It does seem to work a lot better. |
This comment has been minimized.
This comment has been minimized.
|
To fix:
|


mugling commentedAug 13, 2016
•
edited
Our current aiming formula uses total dispersion σ (arc minutes) to calculate the tangent of an isoceles triangle formed by the player, intended target and actual target. The relationship is expontential:
Effective range is defined as the length of either equal side for triangle with vertex angle θ = σ and with a tangent of 0.25 (derived from 50% chance of
accuracy_goodhit).Total dispersion is calculated as
σ = W + P + Rwhere:Wis the constant sum of the weapon and ammo valuesPis determined from player skillRis current effective recoilIf we intend for
MAX_RANGEof 30 the usable values for constantWfall within the range [100,600]:Aiming reduces
Rso the distance betweenMIN_RECOILand effectivesight_dispersioncontrols how much range improves with aiming (how far left you move on the above graph).The current range of
Pis [0-250] dependent both uponmarksmanshipand relevant weapon skill. ReducingPalso results in moving left on the graph with the effects dependent upon σ from other sources: lowPhas much more effect ifWis also low.In other words player skill (P) is only relevant for already accurate weapons and should be balanced around these:
If we change
Pto be dependent only uponmarksmanship(in linear proportion) we can decide on the range [P0,P10] based uponRminandW.Currently
Rminis zero when using the therifle_scopeafter maximum aiming atPER 10and there is no reason to change this. We can also presume P10 (maximummarksmanship) is zero.Knowing this we define an accurate rifle as
W=120which atP10andRmingives an effective range of 29. If we remove the scope and use iron sights we might expect a reduction in range of at least 50% - this would beσ=240based on an increase fromRmin=0toR=120.If we then define a typical rifle as
W=180the following applies:These values are reasonable - adding a better sight to a typical rifle helps but the combination cannot be used as an alternative to the pairing of an accurate rifle with good sights.
We need to ensure that the above relationship holds true for all values of P. If we propose a linear range for P of [0,100] then the following apply:
We now arrive at the following definitions:
marksmanshipis the ability to use accurate weapons and sightsRmin=120