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

Rational called shots (WIP, comments welome) #37532

Closed
I-am-Erk opened this issue Jan 30, 2020 · 8 comments
Closed

Rational called shots (WIP, comments welome) #37532

I-am-Erk opened this issue Jan 30, 2020 · 8 comments
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing Mods: Dark Days of the Dead Anything related to the DDotD mod (classic style zombies) Monsters Monsters both friendly and unfriendly. (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing
Projects

Comments

@I-am-Erk
Copy link
Member

Is your feature request related to a problem? Please describe.

We get a lot of requests for called shots in game. While these aren't a great idea, and center of mass shots are usually the way to go, there are a few good reasons for called shots:

  • you suspect your target is wearing body armour or has a weakpoint somewhere
  • you have a reason to try to shoot the target's legs out
  • you are a gung-ho kid who thinks they can actually pull off a headshot in a real combat situation
  • you are misled and think zombies require headshots to die
  • you are playing Dark Days of the Dead, and zombies really do require headshots

The last reason is why I'm pushing for this to be added as a feature.

Describe the solution you'd like

Actual called shots to head/arm/eyes/groin are pretty ridiculous. However, it would be reasonable in the aim interface to be able to choose to "aim high” or “aim low”, on humanoid targets. Another option would be to “aim for a weak point”, or “aim for a disabling shot”. On humanoid targets these would mostly be synonymous, except that a zombie with full head armour might have a weak point somewhere other than their head.

"weak_points": {
  "target_area": {
    "bodypart": "head", //serves the role of ‘id’ or ‘name’
    "region": "high", //Do you hit this area when aiming high, or low?
    "effect": "zombie_headshot",
    "armor_factor": 0, //how much of zombie's armour should apply to a shot here?
    "size": 10, //what percent of the body does this area take up?
    "center_of_mass_ratio": 0.1 //What portion of misses to this area should just hit center of mass?
  },
  "target_area": {
    "bodypart": "pelvis", 
    "region": "low",
    "effect": "zombie_legshot",
    "armor_factor": 0.2, 
    "size": 10, 
    "center_of_mass_ratio": 0.5 
  },
  "target_area": {
    "bodypart": "leg", 
    "region": "low", 
    "effect": "zombie_legshot",
    "armor_factor": 0.2, 
    "size": 20, 
    "center_of_mass_ratio": 0.2 
  }
}

In this example, a shot aiming low would first determine if it hits pelvis or leg. They have a combined size of 30, so a low shot has 30% of the usual hit chance. The chance of hitting the center of mass becomes 0.2(0.2)+0.1(0.5), ie. leg size times leg COM ratio + pelvis size* pelvis COM ratio when you have two possible weak points like this. We assume the movement of the target and the heat of combat mean the player can't really choose to target a leg or a pelvis, they just take whatever shot they can get.

(These numbers are dirty quick numbers based on burn area calculation, and not meant to be final values)

With this general aiming schema, the player would just select to aim high or aim low. We might offer a cue for areas with less armour, like in this case because Aim High has a chance of bypassing armour completely, the interface might say:

> Target center of mass (default)
  Aim high, -81% acc. (vulnerable!)
  Aim low, -25% acc.

WIP:
In CDDA, to calculate hit, the target is modeled as concentric circles, we calculate an offset angle from aim point and then translate it to a lateral offset based on the distance, the offset tells us which circle it hits. I will attempt to do an algorithm for how to calculate the called shot hit success chance based on this system. Suggestions welcome in comments in the meantime.

Describe alternatives you've considered

For mainline this system is not strictly needed. There are only a few situations where aiming for a specific target is valuable, and even fewer when you're dealing with mindless undead.

However, I would like C:DDotD to require headshots, and that will in turn require a system that allows headshots. Therefore I do not consider this optional anymore! Plus, for mainline, it will allow for interesting things like weak points on a skeletal juggernaut, or shooting the legs out to give you the opportunity to capture a "live" zombie.

Additional context

Part of my reason for clinging to the "aim high/aim low" concept is that I would like elevation to eventually have some influence here, so if you're shooting down on some zombies, you get an elevated chance of hitting their upper body, probably using pythagorean calculations to see how high you're shooting from.

@I-am-Erk I-am-Erk added <Enhancement / Feature> New features, or enhancements on existing <Suggestion / Discussion> Talk it out before implementing [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. Mods: Dark Days of the Dead Anything related to the DDotD mod (classic style zombies) labels Jan 30, 2020
@codemime
Copy link
Contributor

Manually performed called shots sound rather tedious. Imagine fighting swarms of enemies on a regular basis. If I use regular shots, knowing that called shots are generally better, I don't take full advantage of my weapon (because it's tedious otherwise). If I, on the other hand, use called shots, I soon inevitably get bored.

The only way I see this feature fit is "automatically delivered" called shots. An algorithm chooses the weakest spot, taking the odds of hitting it into account, and shoots: kinda an attempt of delivering a critical hit without bothering the player.

@I-am-Erk
Copy link
Member Author

I don't think there's any reason for it to cost any more keystrokes than a shot currently takes. Currently the pattern is f->f, c or p. There are many unbound keys in the Fire dialogue, and h and l could be used for high or low shot hotkeys. There could even be second keys for different levels of aim for high and low shots potentially.

@Brian-Otten
Copy link
Contributor

I would tend to prefer a toggle to switch between trying to aim for critical shots and normal shots.

We should also think about how/if this system will interact with the pieces of fragmentation from explosives.

@I-am-Erk
Copy link
Member Author

Any CoM shot will still have a chance for a random headshot. We'd just treat fragments and other untargeted attacks as CoM shots.

@stale
Copy link

stale bot commented Feb 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Feb 29, 2020
@stale
Copy link

stale bot commented Mar 30, 2020

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

@stale stale bot closed this as completed Mar 30, 2020
@kevingranade kevingranade removed the stale Closed for lack of activity, but still valid. label Mar 31, 2020
@kevingranade kevingranade reopened this Mar 31, 2020
@stale
Copy link

stale bot commented Apr 30, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Apr 30, 2020
@kevingranade kevingranade added the (P5 - Long-term) Long-term WIP, may stay on the list for a while. label May 2, 2020
@stale stale bot removed the stale Closed for lack of activity, but still valid. label May 2, 2020
@Joshua-Chin Joshua-Chin added this to Discussion in Weakpoints Sep 7, 2021
@Night-Pryanik
Copy link
Contributor

No discussion in more than a year, closing.

Weakpoints automation moved this from Discussion to Done Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing Mods: Dark Days of the Dead Anything related to the DDotD mod (classic style zombies) Monsters Monsters both friendly and unfriendly. (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing
Projects
Development

No branches or pull requests

5 participants