Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

zentai torso_neck "gap" in bodypart_graphs/full_body_iteminfo

Open trentbuck opened this issue 1 year ago • 3 comments

Describe the bug

This is a very minor visual issue.

Logically the zentai covers the entire body. But in the item view, the coverage bodygraph shows a gap at the neck (see screenshot). This is because while zentai covers torso and head, but torso_neck (the gap) is a special case. I constructed a test item which adds torso_neck coverage, and the "problem" goes away.

There's no gameplay impact to this minor issue. It's not even noticeable for most items, because most items don't cover both the torso and head.

Dusters seem to handle legs_draped_[lr] OK, but I don't understand how.

Attach save file

N/A

Steps to reproduce

  1. Start new game.
  2. Spawn in a zentai.
  3. Inspect it.

Expected behavior

I think bodypart_graphs/full_body_iteminfo should "color in" the neckline if either 1) there is BELTED torso_neck coverage (e.g. lanyard), or if it's a non-BELTED whole-torso item (e.g. zentai, tshirt). I don't see an obvious/elegant way to actually do this, though.

How is draped working currently? If that is special-cased somewhere (that I haven't found), I guess extend that to handle torso_neck?

Screenshots

image

Versions and configuration

  • OS: Linux
    • OS Version: Distributor ID: Debian; Description: Debian GNU/Linux 12 (bookworm); Release: 12; Codename: bookworm;
  • Game Version: cdda-experimental-2024-09-12-1816 2473620e [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth], SpeedyDex [speedydex], Bionic Professions [package_bionic_professions], Trent's Cheating Background [twb], Bombastic Perks [bombastic_perks] ]

Additional context

Here's a quick-and-dirty zentai variant that "covers the gap", shown in screenshot on right-hand-side. This is definitely not an acceptable fix, because it will then encumbrance conflict with other items on torso_neck, which it logically should not.

[
  {
    "id": "zentai_with_neck",
    "type": "ARMOR",
    "name": {
      "str": "zentai with neck"
    },
    "copy-from": "zentai",
    "armor": [
      {
        "coverage": 100,
        "covers": [
          "arm_l",
          "arm_r",
          "eyes",
          "foot_l",
          "foot_r",
          "hand_l",
          "hand_r",
          "head",
          "leg_l",
          "leg_r",
          "mouth",
          "torso"
        ],
        "specifically_covers": [
          "arm_elbow_l",
          "arm_elbow_r",
          "arm_lower_l",
          "arm_lower_r",
          "arm_shoulder_l",
          "arm_shoulder_r",
          "arm_upper_l",
          "arm_upper_r",
          "eyes_left",
          "eyes_right",
          "foot_ankle_l",
          "foot_ankle_r",
          "foot_arch_l",
          "foot_arch_r",
          "foot_heel_l",
          "foot_heel_r",
          "foot_sole_l",
          "foot_sole_r",
          "foot_toes_l",
          "foot_toes_r",
          "hand_back_l",
          "hand_back_r",
          "hand_fingers_l",
          "hand_fingers_r",
          "hand_palm_l",
          "hand_palm_r",
          "hand_wrist_l",
          "hand_wrist_r",
          "head_crown",
          "head_ear_l",
          "head_ear_r",
          "head_forehead",
          "head_nape",
          "head_throat",
          "leg_hip_l",
          "leg_hip_r",
          "leg_knee_l",
          "leg_knee_r",
          "leg_lower_l",
          "leg_lower_r",
          "leg_upper_l",
          "leg_upper_r",
          "mouth_cheeks",
          "mouth_chin",
          "mouth_lips",
          "mouth_nose",
          "torso_lower",
          "torso_upper"
        ]
      },
      {
        "coverage": 100,
        "layers": [
          "BELTED"
        ],
        "covers": [
          "leg_l",
          "leg_r",
          "torso"
        ],
        "specifically_covers": [
          "leg_draped_l",
          "leg_draped_r",
          "torso_hanging_back",
          "torso_hanging_front",
          "torso_neck",
          "torso_waist"
        ]
      }
    ]
  }
]

trentbuck avatar Oct 18 '24 10:10 trentbuck

Correction: draped duster isn't working better than zentai neckline. I had confused duster (draped legs, not shown on graph) with trenchcoat (thighs, shown on graph).

trentbuck avatar Oct 18 '24 11:10 trentbuck

The neck in the game is not the neck in the usual sense, i.e. it is not a part of the body. It's more of a designation for the area occupied by something hanging from the neck. Like a piece of jewelry on a chain or a whistle. Or something like that.

https://github.com/CleverRaven/Cataclysm-DDA/blob/0764d844500edc7efe96bd940e23b1a586830757/data/json/body_parts.json#L923-L933

Pay attention to locations_under. Here is another example: https://github.com/CleverRaven/Cataclysm-DDA/blob/0764d844500edc7efe96bd940e23b1a586830757/data/json/body_parts.json#L969-L978

IdleSol avatar Oct 18 '24 11:10 IdleSol

I can't be 100% sure. I haven't seen the mechanics of how it works anywhere. So I'm relying on my own testing and assumptions. It can most likely be considered an extra layer of upper body armor. Which is triggered by a certain chance.

Presumably a 10 in 100 chance. Presumably the check goes before the upper body hit check. (Damage reduction, also before the upper body armor check).

1

IdleSol avatar Oct 18 '24 12:10 IdleSol