-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jsonify Limb Scores & Character Modifiers (#53069)
* Use generic text function for displaying limb encumbrance effects * Partial jsonification of limb scores * astyle and json style corrections * Generate modifier descriptions + Scroll info box * Partial jsonification of character modifiers * Style corrections + Add character_mod to translation * Remove unnecessary static string_id's (clang-tidy) * Documentation - limb scores and character modifiers * Switch over to new string extraction system * Add unit tests for limb scores and character modifiers * Clang-tidy: use proper string_id name * Post-merge fix: L comes before Q * Post-rebase cleanup: new fields / new scores / changed modifiers - New fields for `character_mod`: "override_encumb" & "override_wounds" - Migrated new "footing" limb score - Modified "melee_stamina_cost_mod" to force lift score to be affected by encumbrance - Updated documentation * Unhardcode body parts whose encumbrance affects dodge * Fix reference to non-reference
- Loading branch information
Showing
32 changed files
with
1,147 additions
and
573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
[ | ||
{ | ||
"type": "character_mod", | ||
"id": "aim_speed_skill_mod", | ||
"description": "Aim speed skill modifier", | ||
"mod_type": "+", | ||
"value": { "builtin": "aim_speed_skill_modifier" } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "aim_speed_dex_mod", | ||
"description": "Aim speed dexterity modifier", | ||
"mod_type": "+", | ||
"value": { "builtin": "aim_speed_dex_modifier" } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "aim_speed_mod", | ||
"description": "Gun aim speed modifier", | ||
"mod_type": "x", | ||
"value": { "limb_score": "manip" } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "melee_thrown_move_manip_mod", | ||
"description": "Melee and thrown attack movement point modifier", | ||
"mod_type": "x", | ||
"value": { "limb_score": "manip", "max": "max_move_cost", "nominator": 1.0 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "melee_thrown_move_balance_mod", | ||
"description": "Melee and thrown attack movement point modifier", | ||
"mod_type": "x", | ||
"value": { "limb_score": "balance", "max": "max_move_cost", "nominator": 1.0 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "melee_stamina_cost_mod", | ||
"description": "Melee stamina cost", | ||
"mod_type": "x", | ||
"value": { "limb_score": "lift", "limb_type": "arm", "override_encumb": true, "max": "max_move_cost", "nominator": 1.0 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "reloading_move_mod", | ||
"description": "Reloading movement point cost", | ||
"mod_type": "x", | ||
"value": { "limb_score": "manip", "max": "max_move_cost", "nominator": 1.0 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "thrown_dex_mod", | ||
"description": "Dexterity when throwing items", | ||
"mod_type": "x", | ||
"value": { "limb_score": "manip" } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "ranged_dispersion_manip_mod", | ||
"description": "Hand dispersion when using ranged attacks", | ||
"mod_type": "+", | ||
"value": { "limb_score": "manip", "max": 1000.0, "nominator": 22.8, "subtract": 22.8 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "ranged_dispersion_vision_mod", | ||
"description": "Sight dispersion when using ranged attacks", | ||
"mod_type": "+", | ||
"value": { "limb_score": "vision", "max": 10000.0, "nominator": 30.0, "subtract": 30.0 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "stamina_move_cost_mod", | ||
"description": "Stamina move cost modifier", | ||
"mod_type": "x", | ||
"value": { "builtin": "stamina_move_cost_modifier" } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "stamina_recovery_breathing_mod", | ||
"description": "Stamina Regeneration", | ||
"mod_type": "x", | ||
"value": { "limb_score": "breathing" } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "limb_speed_movecost_mod", | ||
"description": "Limb speed movecost modifier", | ||
"mod_type": "x", | ||
"value": { "limb_score": "move_speed", "max": "max_move_cost", "nominator": 1.0 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "limb_footing_movecost_mod", | ||
"description": "Footing movecost modifier", | ||
"mod_type": "x", | ||
"value": { "limb_score": "footing", "max": "max_move_cost", "nominator": 1.0 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "limb_run_cost_mod", | ||
"description": "Limb run cost modifier", | ||
"mod_type": "x", | ||
"value": { "builtin": "limb_run_cost_modifier" } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "swim_mod", | ||
"description": "Swimming movement point cost", | ||
"mod_type": "x", | ||
"value": { "limb_score": "swim", "max": "max_move_cost", "nominator": 1.0 } | ||
}, | ||
{ | ||
"type": "character_mod", | ||
"id": "melee_attack_roll_mod", | ||
"description": "Melee attack rolls", | ||
"mod_type": "x", | ||
"value": { "limb_score": "balance", "min": 0.2 } | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
[ | ||
{ | ||
"type": "limb_score", | ||
"id": "manip", | ||
"name": "Manipulation", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "lift", | ||
"name": "Lifting", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": false | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "block", | ||
"name": "Blocking", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "breathing", | ||
"name": "Breathing", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "vision", | ||
"name": "Vision", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "night_vis", | ||
"name": "Night vision", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "reaction", | ||
"name": "Reaction", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "move_speed", | ||
"name": "Movement speed", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "balance", | ||
"name": "Balance", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "footing", | ||
"name": "Footing", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"type": "limb_score", | ||
"id": "swim", | ||
"name": "Swimming", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[ | ||
{ | ||
"type": "limb_score", | ||
"id": "test", | ||
"name": "Testing", | ||
"affected_by_wounds": true, | ||
"affected_by_encumb": true | ||
}, | ||
{ | ||
"id": "test_tail", | ||
"type": "body_part", | ||
"name": "test tail", | ||
"name_multiple": "test tails", | ||
"heading": "TST Tail", | ||
"heading_multiple": "Tails", | ||
"encumbrance_text": "Your testing tail feels heavy", | ||
"hit_size": 1, | ||
"hit_size_relative": [ 0, 0, 0 ], | ||
"drench_capacity": 4, | ||
"main_part": "test_tail", | ||
"hit_difficulty": 0.8, | ||
"limb_type": "tail", | ||
"opposite_part": "test_tail", | ||
"connected_to": "torso", | ||
"side": "both", | ||
"accusative": { "ctxt": "bodypart_accusative", "str": "test tail" }, | ||
"hp_bar_ui_text": "TST TAIL", | ||
"base_hp": 20, | ||
"limb_scores": [ [ "test", 0.8 ] ] | ||
}, | ||
{ | ||
"type": "enchantment", | ||
"id": "ENCH_TEST_TAIL", | ||
"condition": "ALWAYS", | ||
"modified_bodyparts": [ { "gain": "test_tail" } ] | ||
} | ||
] |
Oops, something went wrong.