Skip to content

Commit

Permalink
Merge pull request CleverRaven#71387 from Venera3/limb_mod_1
Browse files Browse the repository at this point in the history
[Limb Mod] Limbify Insect Eyes, begin adding limb change EoCs
  • Loading branch information
Maleclypse authored Feb 5, 2024
2 parents ea08bf0 + b530ef8 commit a8c6408
Show file tree
Hide file tree
Showing 11 changed files with 610 additions and 47 deletions.
8 changes: 4 additions & 4 deletions data/mods/Limb_WIP/armor/arm_prosthetics.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"armor": [ { "encumbrance": 0, "coverage": 100, "covers": [ "arm_stub_l", "arm_neuroprosthetic_l", "hand_neuroprosthetic_l" ] } ]
},
{
"id": "right_arm_prosthetic_wood",
"id": "right_arm_prosthetic_wood_old",
"type": "ARMOR",
"name": { "str": "wooden prosthetic right arm" },
"description": "A prosthetic arm, used as a replacement limb for those missing one. Dating back to antiquity, this wooden arm was often used by many individuals as a simple way to hide the loss of one of their limbs. Outside of that, its rigidity and lack of flexibility make it nearly useless for practical purposes, though it can help with very basic tasks, like lifting objects. This one is for the right arm.",
Expand All @@ -100,7 +100,7 @@
"armor": [ { "encumbrance": 0, "coverage": 100, "covers": [ "arm_stub_r", "arm_prosthetic_cosmetic_r", "hand_prosthetic_r" ] } ]
},
{
"id": "left_arm_prosthetic_wood",
"id": "left_arm_prosthetic_wood_old",
"type": "ARMOR",
"name": { "str": "wooden prosthetic left arm" },
"description": "A prosthetic arm, used as a replacement limb for those missing one. Dating back to antiquity, this wooden arm was often used by many individuals as a simple way to hide the loss of one of their limbs. Outside of that, its rigidity and lack of flexibility make it nearly useless for practical purposes, though it can help with very basic tasks, like lifting objects. This one is for the left arm.",
Expand All @@ -120,7 +120,7 @@
"armor": [ { "encumbrance": 0, "coverage": 100, "covers": [ "arm_stub_l", "arm_prosthetic_cosmetic_l", "hand_prosthetic_l" ] } ]
},
{
"id": "right_arm_prosthetic_steel",
"id": "right_arm_prosthetic_steel_old",
"type": "ARMOR",
"name": { "str": "steel prosthetic right arm" },
"description": "A prosthetic arm, used as a replacement limb for those missing one. Dating back to the Middle Ages and Rennaisance, this metallic arm was the cutting edge replacement of its day. Hinges within the fingers and a simple locking system allow basic function of this prosthetic, such as holding a sword. Often given to knights and nobility, this arm is quite heavy, but extremely durable. This one is for the right arm.",
Expand All @@ -140,7 +140,7 @@
"armor": [ { "encumbrance": 0, "coverage": 100, "covers": [ "arm_stub_r", "arm_prosthetic_r", "hand_prosthetic_r" ] } ]
},
{
"id": "left_arm_prosthetic_steel",
"id": "left_arm_prosthetic_steel_old",
"type": "ARMOR",
"name": { "str": "steel prosthetic left arm" },
"description": "A prosthetic arm, used as a replacement limb for those missing one. Dating back to the Middle Ages and Rennaisance, this metallic arm was the cutting edge replacement of its day. Hinges within the fingers and a simple locking system allow basic function of this prosthetic, such as holding a sword. Often given to knights and nobility, this arm is quite heavy, but extremely durable. This one is for the left arm.",
Expand Down
8 changes: 4 additions & 4 deletions data/mods/Limb_WIP/armor/legs_prosthetics.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"armor": [ { "encumbrance": 0, "coverage": 100, "covers": [ "leg_stub_l", "leg_prosthetic_l", "foot_prosthetic_l" ] } ]
},
{
"id": "right_peg_leg",
"id": "right_peg_leg_old",
"type": "ARMOR",
"name": { "str": "right peg leg" },
"description": "A prosthetic leg, used as a replacement limb for those missing one. A primitive peg leg, often remembered for pirate movies and such, this was a go-to replacement for decades for those who couldn't afford an iron or steel one. This comes up above the knee and is fastened on with straps or rope, with the interior cushioned by stuffing. This one is for the right leg.",
Expand All @@ -60,7 +60,7 @@
"armor": [ { "encumbrance": 0, "coverage": 100, "covers": [ "leg_stub_r", "leg_peg_r" ] } ]
},
{
"id": "left_peg_leg",
"id": "left_peg_leg_old",
"type": "ARMOR",
"name": { "str": "left peg leg" },
"description": "A prosthetic leg, used as a replacement limb for those missing one. A primitive peg leg, often remembered for pirate movies and such, this was a go-to replacement for decades for those who couldn't afford an iron or steel one. This comes up above the knee and is fastened on with straps or rope, with the interior cushioned by stuffing. This one is for the left leg.",
Expand All @@ -80,7 +80,7 @@
"armor": [ { "encumbrance": 0, "coverage": 100, "covers": [ "leg_stub_l", "leg_peg_l" ] } ]
},
{
"id": "right_leg_prosthetic_steel",
"id": "right_leg_prosthetic_steel_old",
"type": "ARMOR",
"name": { "str": "steel prosthetic right leg" },
"description": "A prosthetic leg, used as a replacement limb for those missing one. Dating back to the Middle Ages and the Renaissance, this prosthetic is made of iron placed over a framework, and is attached with leather straps to the leg, padding placed inside for comfort. Made in a better fashion than more common prosthetics at the time, this limb is incredibly durable, with many noble warriors wearing these into battle. However, they were incredibly expensive, time-consuming to make, and quite heavy, leaving them out of the hands of poorer individuals. This one is for the right leg.",
Expand All @@ -100,7 +100,7 @@
"armor": [ { "encumbrance": 0, "coverage": 100, "covers": [ "leg_stub_r", "leg_prosthetic_r", "foot_prosthetic_r" ] } ]
},
{
"id": "left_leg_prosthetic_steel",
"id": "left_leg_prosthetic_steel_old",
"type": "ARMOR",
"name": { "str": "steel prosthetic left leg" },
"description": "A prosthetic leg, used as a replacement limb for those missing one. Dating back to the Middle Ages and the Renaissance, this prosthetic is made of iron placed over a framework, and is attached with leather straps to the leg, padding placed inside for comfort. Made in a better fashion than more common prosthetics at the time, this limb is incredibly durable, with many noble warriors wearing these into battle. However, they were incredibly expensive, time-consuming to make, and quite heavy, leaving them out of the hands of poorer individuals. This one is for the left leg.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,47 @@
"repairs_like": "scarf",
"type": "ARMOR",
"name": { "str": "debug tail belt" },
"description": "This is a template for judo belts. If found in a game, it is a bug.",
"description": "An example armor for testing custom limb/armor interactions. 100 coverage on the first sublimb of your debug tail with little encumbrance",
"weight": "200 g",
"volume": "250 ml",
"price": 1000,
"price_postapoc": 25,
"to_hit": -1,
"material": [ "cotton" ],
"material": [ "steel" ],
"symbol": "[",
"material_thickness": 2,
"material_thickness": 2000,
"flags": [ "BELTED", "OVERSIZE", "WATER_FRIENDLY" ],
"armor": [ { "encumbrance": 2, "coverage": 50, "covers": [ "debug_tail" ], "specifically_covers": [ "sub_limb_debug_tail" ] } ]
"armor": [
{ "encumbrance": 2, "coverage": 100, "covers": [ "debug_tail" ], "specifically_covers": [ "sub_limb_debug_tail_1" ] }
]
},
{
"id": "debug_belt_tail_weighted",
"type": "ARMOR",
"copy-from": "debug_belt_tail",
"name": { "str": "weighted debug tail belt" },
"name": { "str": "first weighted debug tail belt" },
"description": "An example armor for testing custom limb/armor interactions. 100 coverage on the first sublimb of your debug tail with extreme encumbrance",
"armor": [
{
"encumbrance": 120,
"coverage": 50,
"coverage": 100,
"covers": [ "torso", "debug_tail" ],
"specifically_covers": [ "sub_limb_debug_tail" ]
"specifically_covers": [ "sub_limb_debug_tail_1" ]
}
]
},
{
"type": "ARMOR",
"id": "debug_helmet_dragonfly",
"name": { "str": "debug dragonfly helmet" },
"description": "An example helmet to test on custom heads. Should blind you.",
"copy-from": "helmet_scrap",
"armor": [
{
"encumbrance": 300,
"coverage": 100,
"covers": [ "eyes_insect_2" ],
"specifically_covers": [ "eyes_compound_mono", "head_nape" ]
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions data/mods/Limb_WIP/enchantments.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"type": "enchantment",
"id": "ENCH_DEBUG_TORSO",
"condition": "ALWAYS",
"modified_bodyparts": [ { "lose": "torso" }, { "gain": "debug_torso" } ]
},
{
"type": "enchantment",
"id": "ENCH_GASTROPOD_FOOT",
Expand Down
24 changes: 12 additions & 12 deletions data/mods/Limb_WIP/item_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"copy-from": "museum_primitive",
"extend": {
"items": [
{ "item": "left_peg_leg", "prob": 10, "damage": [ 2, 4 ] },
{ "item": "right_peg_leg", "prob": 10, "damage": [ 2, 4 ] },
{ "item": "left_arm_prosthetic_wood", "prob": 10, "damage": [ 2, 4 ] },
{ "item": "right_arm_prosthetic_wood", "prob": 10, "damage": [ 2, 4 ] }
{ "item": "left_peg_leg_old", "prob": 10, "damage": [ 2, 4 ] },
{ "item": "right_peg_leg_old", "prob": 10, "damage": [ 2, 4 ] },
{ "item": "left_arm_prosthetic_wood_old", "prob": 10, "damage": [ 2, 4 ] },
{ "item": "right_arm_prosthetic_wood_old", "prob": 10, "damage": [ 2, 4 ] }
]
}
},
Expand All @@ -18,14 +18,14 @@
"copy-from": "museum_misc",
"extend": {
"items": [
{ "item": "left_peg_leg", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "right_peg_leg", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "right_leg_prosthetic_steel", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "left_leg_prosthetic_steel", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "left_arm_prosthetic_wood", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "right_arm_prosthetic_wood", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "left_arm_prosthetic_steel", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "right_arm_prosthetic_steel", "prob": 15, "damage": [ 2, 4 ] }
{ "item": "left_peg_leg_old", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "right_peg_leg_old", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "right_leg_prosthetic_steel_old", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "left_leg_prosthetic_steel_old", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "left_arm_prosthetic_wood_old", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "right_arm_prosthetic_wood_old", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "left_arm_prosthetic_steel_old", "prob": 15, "damage": [ 2, 4 ] },
{ "item": "right_arm_prosthetic_steel_old", "prob": 15, "damage": [ 2, 4 ] }
]
}
},
Expand Down
140 changes: 140 additions & 0 deletions data/mods/Limb_WIP/mutation_eocs/limb_changing_eocs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
[
{
"type": "effect_on_condition",
"id": "EOC_CHANGING_LIMB_SETUP",
"//": "Get the timer started, it should be added to all first-level changing traits",
"condition": { "math": [ "u_limb_progress_timer", "==", "0" ] },
"effect": [ { "math": [ "u_limb_progress_timer", "=", "time('now')" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_EYES_GLARE",
"condition": "u_can_see",
"effect": [
{ "u_message": "<eyes_glare>", "snippet": true, "type": "bad" },
{ "u_add_effect": "glare", "duration": [ "1 m", "5 m" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_EYES_BLIND",
"condition": { "and": [ { "one_in_chance": 5 }, "u_can_see" ] },
"effect": [
{ "u_message": "<eyes_blind>", "snippet": true, "type": "bad" },
{ "u_add_effect": "blind", "duration": [ "2 s", "5 s" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_EYES_STUN",
"condition": "u_can_see",
"effect": [
{ "u_message": "<eyes_stun>", "snippet": true, "type": "bad", "popup": true },
{ "u_add_effect": "stunned", "duration": [ "5 s", "30 s" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_PRE_EYES_INSECT",
"//": "IF we're asleep, had three progress dreams and have enough juice -> grow eyes, ELSE IF we're asleep and one day since the last limb-related dream -> print dream and progress own var ELSE print failure. Three dreams to progress",
"//LIMB-TODO": "Move arthropod/exoskeletal mutation trees over to use molting to progress",
"condition": {
"and": [
{ "math": [ "u_vitamin('mutagen_insect')", ">=", "300" ] },
{ "math": [ "u_vitamin('mutagen')", ">=", "300" ] },
{ "math": [ "u_progress_pre_eyes_insect", ">=", "3" ] },
{ "u_has_effect": "sleep" }
]
},
"effect": [
{ "u_mutate_towards": "EYES_INSECT", "category": "INSECT", "use_vitamins": true },
{
"if": { "u_has_trait": "EYES_INSECT" },
"then": [
{ "u_message": "<insect_eye_success>", "popup": true },
{ "math": [ "u_progress_pre_eyes_insect", "=", "0" ] },
{ "u_lose_effect": "sleep" }
],
"else": { "u_message": "<insect_failure>", "type": "bad", "snippet": true }
}
],
"false_effect": [
{
"if": {
"and": [
{ "u_has_effect": "sleep" },
{
"x_in_y_chance": { "x": { "math": [ "u_vitamin('mutagen_insect') + u_vitamin('mutagen')" ] }, "y": 1000 }
},
{ "math": [ "time_since('limb_progress_timer', 'unit':'days') >= 1" ] }
]
},
"then": [
{ "u_message": "<insect_eye_dream>", "snippet": true },
{ "u_lose_effect": "sleep" },
{ "math": [ "u_progress_pre_eyes_insect", "++" ] },
{ "math": [ "u_limb_progress_timer", "=", "time('now')" ] }
],
"else": [
{ "if": { "one_in_chance": 5 }, "then": { "u_message": "<insect_failure>", "type": "bad", "snippet": true } },
{
"if": { "one_in_chance": 10 },
"then": { "weighted_list_eocs": [ [ "EOC_EYES_BLIND", 1 ], [ "EOC_EYES_GLARE", 5 ], [ "EOC_EYES_STUN", 2 ] ] }
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_EYES_INSECT",
"//": "Five progression dream steps steps",
"condition": {
"and": [
{ "math": [ "u_vitamin('mutagen_insect')", ">=", "500" ] },
{ "math": [ "u_vitamin('mutagen')", ">=", "500" ] },
{ "math": [ "u_progress_eyes_insect", ">=", "5" ] },
{ "u_has_effect": "sleep" }
]
},
"effect": [
{ "u_mutate_towards": "EYES_INSECT_2", "category": "INSECT", "use_vitamins": true },
{
"if": { "u_has_trait": "EYES_INSECT_2" },
"then": [
{ "u_message": "<insect_eye_2_success>", "popup": true },
{ "math": [ "u_progress_eyes_insect", "=", "0" ] },
{ "u_set_field": "fd_blood_insect", "radius": 0 },
{ "u_lose_effect": "sleep" }
],
"else": { "u_message": "<insect_failure>", "type": "bad", "snippet": true }
}
],
"false_effect": [
{
"if": {
"and": [
{ "u_has_effect": "sleep" },
{
"x_in_y_chance": { "x": { "math": [ "u_vitamin('mutagen_insect') + u_vitamin('mutagen')" ] }, "y": 1200 }
},
{ "math": [ "time_since('limb_progress_timer', 'unit':'days') >= 1" ] }
]
},
"then": [
{ "u_message": "<insect_eye_dream>", "snippet": true },
{ "u_lose_effect": "sleep" },
{ "math": [ "u_progress_eyes_insect", "++" ] },
{ "math": [ "u_limb_progress_timer", "=", "time('now')" ] }
],
"else": [
{ "if": { "one_in_chance": 8 }, "then": { "u_message": "<insect_failure>", "type": "bad", "snippet": true } },
{
"if": { "one_in_chance": 15 },
"then": { "weighted_list_eocs": [ [ "EOC_EYES_BLIND", 1 ], [ "EOC_EYES_GLARE", 5 ], [ "EOC_EYES_STUN", 2 ] ] }
}
]
}
]
}
]
20 changes: 10 additions & 10 deletions data/mods/Limb_WIP/mutation_eocs/prosthetics_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@
},
{
"u_run_inv_eocs": "random",
"search_data": [ { "id": "left_peg_leg", "worn_only": true } ],
"true_eocs": [ "EOC_left_peg_leg_hp_set" ]
"search_data": [ { "id": "left_peg_leg_old", "worn_only": true } ],
"true_eocs": [ "EOC_left_peg_leg_old_hp_set" ]
},
{
"u_run_inv_eocs": "random",
"search_data": [ { "id": "right_peg_leg", "worn_only": true } ],
"true_eocs": [ "EOC_right_peg_leg_hp_set" ]
"search_data": [ { "id": "right_peg_leg_old", "worn_only": true } ],
"true_eocs": [ "EOC_right_peg_leg_old_hp_set" ]
},
{
"u_run_inv_eocs": "random",
Expand All @@ -255,12 +255,12 @@
},
{
"u_run_inv_eocs": "random",
"search_data": [ { "id": "left_arm_prosthetic_steel", "worn_only": true } ],
"search_data": [ { "id": "left_arm_prosthetic_steel_old", "worn_only": true } ],
"true_eocs": [ "EOC_left_arm_hp_set" ]
},
{
"u_run_inv_eocs": "random",
"search_data": [ { "id": "right_arm_prosthetic_steel", "worn_only": true } ],
"search_data": [ { "id": "right_arm_prosthetic_steel_old", "worn_only": true } ],
"true_eocs": [ "EOC_right_arm_hp_set" ]
},
{
Expand All @@ -275,12 +275,12 @@
},
{
"u_run_inv_eocs": "random",
"search_data": [ { "id": "left_arm_prosthetic_wood", "worn_only": true } ],
"search_data": [ { "id": "left_arm_prosthetic_wood_old", "worn_only": true } ],
"true_eocs": [ "EOC_left_cosmetic_arm_hp_set" ]
},
{
"u_run_inv_eocs": "random",
"search_data": [ { "id": "right_arm_prosthetic_wood", "worn_only": true } ],
"search_data": [ { "id": "right_arm_prosthetic_wood_old", "worn_only": true } ],
"true_eocs": [ "EOC_right_cosmetic_arm_hp_set" ]
}
]
Expand All @@ -297,12 +297,12 @@
},
{
"type": "effect_on_condition",
"id": "EOC_left_peg_leg_hp_set",
"id": "EOC_left_peg_leg_old_hp_set",
"effect": [ { "math": [ "n_hp('ALL')", "=", "u_hp('leg_peg_l') * n_hp_max('bp_null') / u_hp_max('leg_peg_l')" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_right_peg_leg_hp_set",
"id": "EOC_right_peg_leg_old_hp_set",
"effect": [ { "math": [ "n_hp('ALL')", "=", "u_hp('leg_peg_r') * n_hp_max('bp_null') / u_hp_max('leg_peg_r')" ] } ]
},
{
Expand Down
Loading

0 comments on commit a8c6408

Please sign in to comment.