Skip to content

Commit

Permalink
Doneish
Browse files Browse the repository at this point in the history
  • Loading branch information
Venera3 committed Jan 31, 2024
1 parent ea8dbab commit 9704b60
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 31 deletions.
18 changes: 17 additions & 1 deletion data/mods/Limb_WIP/armor/limb_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"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,
Expand All @@ -23,6 +23,7 @@
"type": "ARMOR",
"copy-from": "debug_belt_tail",
"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,
Expand All @@ -31,5 +32,20 @@
"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" ]
}
]
}
]
138 changes: 131 additions & 7 deletions data/mods/Limb_WIP/mutation_eocs/limb_changing_eocs.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,63 @@
[
{
"type": "effect_on_condition",
"id": "EOC_CHANGING_LIMB_SETUP",
"//": "Get the timer started, it should be added to all first-level changing traits",
"condition": { "not": { "u_has_var": "limb_setup", "type": "timer", "context": "limbs", "value": "yes" } },
"effect": [
{ "u_add_var": "limb_progress_timer", "type": "timer", "context": "limbs", "time": true },
{ "u_add_var": "limb_setup", "type": "timer", "context": "limbs", "value": "yes" }
]
},
{
"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 and have enough juice grow eyes, ELSE IF we're asleep print dream ELSE print failure",
"//": "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, one hour between dreams",
"//LIMB-TODO": "Move arthropod/exoskeletal mutation trees over to use molting to progress",
"condition": {
"and": [
{ "math": [ "u_vitamin('mutagen_insect')", ">=", "500" ] },
{ "math": [ "u_vitamin('mutagen')", ">=", "500" ] },
{ "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": false },
{ "u_mutate_towards": "EYES_INSECT", "category": "INSECT", "use_vitamins": true },
{
"if": { "u_has_trait": "EYES_INSECT" },
"then": { "u_message": "<insect_eye_success>", "popup": true },
"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 }
}
],
Expand All @@ -24,13 +67,94 @@
"and": [
{ "u_has_effect": "sleep" },
{
"x_in_y_chance": { "x": { "math": [ "u_vitamin('mutagen_insect') + u_vitamin('mutagen')" ] }, "y": 100 }
"x_in_y_chance": { "x": { "math": [ "u_vitamin('mutagen_insect') + u_vitamin('mutagen')" ] }, "y": 1000 }
},
{
"u_compare_time_since_var": "limb_progress_timer",
"type": "timer",
"context": "limbs",
"op": ">=",
"time": "1 d"
}
]
},
"then": [ { "u_message": "<insect_eye_dream>", "snippet": true, "popup": true }, { "u_lose_effect": "sleep" } ],
"then": [
{ "u_message": "<insect_eye_dream>", "snippet": true },
{ "u_lose_effect": "sleep" },
{ "math": [ "u_progress_pre_eyes_insect", "++" ] },
{ "u_add_var": "limb_progress_timer", "type": "timer", "context": "limbs", "time": true }
],
"else": [
{ "u_message": "!!<u_val:timer_limbs_limb_progress_timer>!!" },
{
"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_message": "<u_val:progress_eyes_insect>" },
{ "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 }
},
{
"u_compare_time_since_var": "limb_progress_timer",
"type": "timer",
"context": "limbs",
"op": ">=",
"time": "1 d"
}
]
},
"then": [
{ "u_message": "<insect_eye_dream>", "snippet": true },
{ "u_lose_effect": "sleep" },
{ "math": [ "u_progress_eyes_insect", "++" ] },
{ "u_add_var": "limb_progress_timer", "type": "timer", "context": "limbs", "time": true }
],
"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 ] ] }
}
]
}
]
}
]
33 changes: 31 additions & 2 deletions data/mods/Limb_WIP/mutation_snippets.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
[
{
"type": "snippet",
"category": "<eyes_blind>",
"text": [
"Something snaps behind your eyes, and the world turns black.",
"A sudden sharp pain in your eyes, then you are lost in the darkness.",
"Your eyes fail you, and everything turns dark."
]
},
{
"type": "snippet",
"category": "<eyes_glare>",
"text": [ "The lights grow uncomfortably bright." ]
},
{
"type": "snippet",
"category": "<eyes_stun>",
"text": [ "The world starts turning wildly, and you stumble." ]
},
{
"type": "snippet",
"category": "<insect_failure>",
Expand All @@ -19,7 +38,7 @@
"You and your sisters have worked diligently, made your home safe and prosperous. You felt so proud. But lately Mother has been growing slower, and more cells are empty than with brood. You see hesitation on your sisters as well…does the hive need you to step up? Would they follow? Could you defeat Her?",
"You dream of a dark, damp place permeated by the smell of sawdust. You feel like this is all you've ever known, each bend in the walls and scratch on the floor your handiwork. It feels like home, but deep down you know that you'll have to change and emerge into the dangerous, light-battered outside.",
"You have stuffed yourself to bursting for the fourth time today, but your hunger doesn't abate. You would need to escape your too-small skin to be able to eat enough, you're sure of it. Take the knife to one of the stretch marks on your back, and part the skin - it springs to the side readily and with no pain. You work your way down your sides, changing the knife between hands as needed and free your <color_light_green>new skin</color> from its fleshy prison.",
"Getting the bodybag was harder than you would have thought, and ordinary garbage bags would just not do. You eat your fill for the last time with this mouth, undress (you won't need clothes after the <bold>change</bold>), and climb in the bag. Closing the zipper from the inside is a challenge, but you need complete darkness for what comes now. You wait.\nAnd wait.\nAnd wait.\n\nCould you have been wrong? You were so sure the time was right.\nYou need to get out of here, but you can't move your…anything. Do you even have anything to move?"
"Getting the bodybag was harder than you would have thought, and ordinary garbage bags would just not do. You eat your fill for the last time with this mouth, undress (you won't need clothes after the change), and climb in the bag. Closing the zipper from the inside is a challenge, but you need complete darkness for what comes now. You wait.\nAnd wait.\nAnd wait.\n\nCould you have been wrong? You were so sure the time was right.\nYou need to get out of here, but you can't move your…anything. Do you even have anything to move?"
]
},
{
Expand All @@ -33,6 +52,16 @@
{
"type": "snippet",
"category": "<insect_eye_success>",
"text": [ "WOOOOO HOOOOO INSECT EYES BAYBY" ]
"text": [
"After another day of dazed mundaneity you make your way back home to your dingy cellar apartment, but miss a step and fall down the stairs, landing on your face with a wet thud. Consciousness fades, but the pain stays. The pain, and the feeling of myriad cockroach legs running on your skin, coating your wounds in a skittering, biting cloak.\n\nYou wake, shedding the weird apey memories, and you are stunned by a dizzying cavalcade of colors you could never have imagined before. This is a step in the right direction, you decide, regarding your newly-expanded perspective with appreciation before the vertigo takes you."
]
},
{
"type": "snippet",
"category": "<insect_eye_2_success>",
"text": [
"<insect_eye_success>",
"You dream of a throbbing headache, and the feeling of an imminent molt. You find a suitable recess, freeze in place and **push**, trying to rip your old exoskeleton up with you pressure of your new armor but nothing happens. All the pressure seems to well up into your head, and finally you feel a wet snap and a shower of too-warm mammal ichor on your feelers.\n\nYou wake up in a puddle of your own blood under your head, a puddle you can see despite looking straight up. It will be some time before your eyes' crystals harden properly, but already the colors are even richer than they were before, and the world seems somehow sluggish."
]
}
]
13 changes: 6 additions & 7 deletions data/mods/Limb_WIP/mutations/mutation_limbs.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,16 @@
"//": "Even larger. Vision score lower, removed hardcoded per bonus. Slightly less likely to blind on hit + cut armor.",
"name": "compound eyes",
"accusative": { "ctxt": "bodypart_accusative", "str": "compound eyes" },
"hp_bar_ui_text": "COOLER HEAD",
"hp_bar_ui_text": "CMP EYES",
"heading": "Comp. Eyes",
"heading_multiple": "Comp. Eyes",
"connected_to": "eyes_insect_1",
"copy-from": "head",
"limb_types": [ [ "head", 1.0 ], [ "sensor", 1.0 ] ],
"copy-from": "eyes_bulging",
"limb_type": "sensor",
"encumbrance_text": "Your vision is impaired!",
"main_part": "eyes_insect_1",
"main_part": "head",
"opposite_part": "eyes_insect_1",
"hit_size": 1.2,
"limb_scores": [ [ "vision", 0.65 ], [ "night_vis", 1.0 ], [ "reaction", 0.8 ] ],
"limb_scores": [ [ "vision", 0.65 ], [ "night_vis", 0.8 ], [ "reaction", 0.8 ] ],
"armor": { "cut": 3 },
"sub_parts": [ "eyes_compound_left", "eyes_compound_right" ],
"effects_on_hit": [
Expand Down Expand Up @@ -138,7 +137,7 @@
"opposite_part": "eyes_insect_2",
"limb_scores": [ [ "vision", 0.9 ], [ "night_vis", 1.0 ], [ "reaction", 1.8 ] ],
"armor": { "cut": 3 },
"sub_parts": [ "eyes_compound_mono" ],
"sub_parts": [ "eyes_compound_mono", "head_nape", "head_throat", "head_ear_r", "head_ear_l" ],
"effects_on_hit": [
{
"id": "bleed",
Expand Down
44 changes: 30 additions & 14 deletions data/mods/Limb_WIP/mutations/mutations.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
[
{
"type": "mutation",
"id": "COMPOUND_EYES",
"name": { "str": "Compound Eyes" },
"points": 2,
"visibility": 9,
"ugliness": 5,
"description": "Your eyes are compound, like those of an insect. This increases your Perception by 2 whenever you aren't wearing eyewear.",
"types": [ "EYES" ],
"prereqs": [ "EYEBULGE" ],
"valid": false
},
{
"type": "mutation_type",
"id": "CHANGING_LIMB"
"id": "CHANGING_LIMB_EYES",
"//": "One changing limb per changed area"
},
{
"type": "mutation_type",
"id": "CHANGING_LIMB_HEAD"
},
{
"type": "mutation_type",
Expand Down Expand Up @@ -35,43 +52,42 @@
"type": "mutation",
"id": "PRE_EYES_INSECT",
"name": { "str": "Changing Eyes" },
"types": [ "CHANGING_LIMB" ],
"types": [ "CHANGING_LIMB_EYES" ],
"prereqs": [ "EYEBULGE" ],
"//": "Common player-facing name?, limb type restricting to one in-progress limb at the same time?",
"description": "Something is shifting painfully behind your eyeballs. <color_red>This change will be reversible. The next one will not be, should you continue.</color>",
"prereqs2": [ "CHITIN2", "CHITIN2_MOLTED" ],
"description": "Something is shifting painfully behind your eyeballs. <color_red>This change will be reversible. The next one might not be, should you continue.</color>",
"points": 0,
"time": "5 s",
"processed_eocs": [ "EOC_PRE_EYES_INSECT" ],
"time": "2 h",
"processed_eocs": [ "EOC_CHANGING_LIMB_SETUP", "EOC_PRE_EYES_INSECT" ],
"category": [ "INSECT" ]
},
{
"type": "mutation",
"id": "EYES_INSECT",
"name": { "str": "Compound Eyes" },
"types": [ "EYES" ],
"types": [ "EYES", "CHANGING_LIMB_EYES", "CHANGING_LIMB_HEAD" ],
"prereqs": [ "EYEBULGE", "PRE_EYES_INSECT" ],
"prereqs2": [ "CHITIN", "CHITIN2" ],
"prereqs2": [ "CHITIN2", "CHITIN2_MOLTED" ],
"points": -2,
"description": "Your eyes have turned into iridiscent spheres bulging out of their original sockets. Your detail vision suffered terribly, and the expanded field of view is dizzying. <color_red>You can still go back to how you used to be. If you continue changing in this direction you will be permanently changed.</color>",
"description": "Your eyes have turned into iridiscent spheres bulging out of their original sockets. Your detail vision suffered terribly, and the expanded field of view is dizzying. <color_red>You can still go back to how you used to be. If you continue changing in this direction you will be permanently changed. Progress from this state will need the matching threshold.</color>",
"category": [ "INSECT" ],
"cancels": [ "PRE_EYES_INSECT" ],
"changes_to": [ "EYES_INSECT_2" ],
"time": "2 h",
"processed_eocs": [ "EOC_EYES_INSECT" ],
"valid": false,
"vitamin_cost": 300,
"enchantments": [
{ "condition": "ALWAYS", "modified_bodyparts": [ { "lose": "eyes" }, { "lose": "head" }, { "gain": "eyes_insect_1" } ] }
]
"enchantments": [ { "condition": "ALWAYS", "modified_bodyparts": [ { "lose": "eyes" }, { "gain": "eyes_insect_1" } ] } ]
},
{
"type": "mutation",
"id": "EYES_INSECT_2",
"name": { "str": "Dragonfly Eyes" },
"types": [ "EYES", "HEAD" ],
"prereqs": [ "EYES_INSECT" ],
"prereqs2": [ "CHITIN2" ],
"prereqs2": [ "CHITIN2", "CHITIN2_MOLTED" ],
"points": 2,
"description": "You remember having tiny eyes condemned into cramped slits in your head. No more. Since your last molt your eyes take up most of your head, giving you unparalelled reactions at the cost of fine vision. You wouldn't want to cover up too much of the view, however. <color_red>This change is permanent.</color>",
"description": "You remember having tiny, unassuming eyes condemned into cramped slits in your face. No more. Since your last molt your eyes take up most of your head, giving you unparalelled reactions at the cost of fine vision. You wouldn't want to cover up too much of the view, however. <color_red>This change is permanent.</color>",
"category": [ "INSECT" ],
"threshreq": [ "THRESH_INSECT" ],
"valid": false,
Expand Down

0 comments on commit 9704b60

Please sign in to comment.