Skip to content

Commit

Permalink
Update Armor doc with new coverage fields (CleverRaven#52309)
Browse files Browse the repository at this point in the history
  • Loading branch information
dseguin authored Oct 17, 2021
1 parent 5c41748 commit bbedf1d
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions doc/JSON_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2461,20 +2461,23 @@ See `GAME_BALANCE.md`'s `MELEE_WEAPONS` section for the criteria for selecting e
Armor can be defined like this:

```C++
"type" : "ARMOR", // Defines this as armor
... // same entries as above for the generic item.
// additional some armor specific entries:
"type" : "ARMOR", // Defines this as armor
... // same entries as above for the generic item.
// additional some armor specific entries:
"covers" : [ "foot_l", "foot_r" ], // Where it covers. Use bodypart_id defined in body_parts.json Also note that LEG_EITHER ARM_EITHER HAND_EITHER and FOOT_EITHER are allowed.
"warmth" : 10, // (Optional, default = 0) How much warmth clothing provides
"environmental_protection" : 0, // (Optional, default = 0) How much environmental protection it affords
"encumbrance" : 0, // Base encumbrance (unfitted value)
"max_encumbrance" : 0, // When a character is completely full of volume, the encumbrance of a non-rigid storage container will be set to this. Otherwise it'll be between the encumbrance and max_encumbrance following the equation: encumbrance + (max_encumbrance - encumbrance) * non-rigid volume / non-rigid capacity. By default, max_encumbrance is encumbrance + (non-rigid volume / 250ml).
"weight_capacity_bonus": "20 kg", // (Optional, default = 0) Bonus to weight carrying capacity, can be negative. Strings must be used - "5000 g" or "5 kg"
"weight_capacity_modifier": 1.5, // (Optional, default = 1) Factor modifying base weight carrying capacity.
"coverage" : 80, // What percentage of body part
"material_thickness" : 1, // Thickness of material, in millimeter units (approximately). Ordinary clothes range from 0.1 to 0.5. Particularly rugged cloth may reach as high as 1-2mm, and armor or protective equipment can range as high as 10 or rarely more.
"power_armor" : false, // If this is a power armor item (those are special).
"valid_mods" : ["steel_padded"], // List of valid clothing mods. Note that if the clothing mod doesn't have "restricted" listed, this isn't needed.
"warmth" : 10, // (Optional, default = 0) How much warmth clothing provides
"environmental_protection" : 0, // (Optional, default = 0) How much environmental protection it affords
"encumbrance" : 0, // Base encumbrance (unfitted value)
"max_encumbrance" : 0, // When a character is completely full of volume, the encumbrance of a non-rigid storage container will be set to this. Otherwise it'll be between the encumbrance and max_encumbrance following the equation: encumbrance + (max_encumbrance - encumbrance) * non-rigid volume / non-rigid capacity. By default, max_encumbrance is encumbrance + (non-rigid volume / 250ml).
"weight_capacity_bonus": "20 kg", // (Optional, default = 0) Bonus to weight carrying capacity, can be negative. Strings must be used - "5000 g" or "5 kg"
"weight_capacity_modifier": 1.5, // (Optional, default = 1) Factor modifying base weight carrying capacity.
"coverage": 80, // What percentage of body part is covered (in general)
"cover_melee": 60, // What percentage of body part is covered (against melee)
"cover_ranged": 45, // What percentage of body part is covered (against ranged)
"cover_vitals": 10, // What percentage of critical hit damage is mitigated
"material_thickness" : 1, // Thickness of material, in millimeter units (approximately). Ordinary clothes range from 0.1 to 0.5. Particularly rugged cloth may reach as high as 1-2mm, and armor or protective equipment can range as high as 10 or rarely more.
"power_armor" : false, // If this is a power armor item (those are special).
"valid_mods" : ["steel_padded"], // List of valid clothing mods. Note that if the clothing mod doesn't have "restricted" listed, this isn't needed.
"armor": [ ... ]
```

Expand All @@ -2486,11 +2489,17 @@ Encumbrance and coverage can be defined on a piece of armor as such:
{
"encumbrance": [ 2, 8 ],
"coverage": 95,
"cover_melee": 95,
"cover_ranged": 50,
"cover_vitals": 5,
"covers": [ "torso" ]
},
{
"encumbrance": 2,
"coverage": 80,
"cover_melee": 80,
"cover_ranged": 70,
"cover_vitals": 5,
"covers": [ "arm_r", "arm_l" ]
}
]
Expand All @@ -2505,6 +2514,10 @@ When specified as an array, the second value is the max encumbrance - when the p
(integer)
What percentage of time this piece of armor will be hit (and thus used as armor) when an attack hits the body parts in `covers`.

`cover_melee` and `cover_ranged` represent the percentage of time this piece of armor will be hit by melee and ranged attacks respectively. Usually these would be the same as `coverage`.

`cover_vitals` represents the percentage of critical hit damage is absorbed. Only the excess damage on top of normal damage is mitigated, so a vital coverage value of 100 means that critical hits would do the same amount as normal hits.

##### Covers
(array of strings)
What body parts this section of the armor covers. See the bodypart_ids defined in body_parts.json for valid values.
Expand Down

0 comments on commit bbedf1d

Please sign in to comment.