Skip to content

Commit

Permalink
[Xedra] Inventor: (Re)Add Dimensional Research (#75916)
Browse files Browse the repository at this point in the history
* Return of the Vancian Bill

* Add back dimension research

* Add ERN Recorder as a non-Hub method for getting an NRE recorder

* Add netherium warp grenade and code to allow dropped items to cast spells

* Add dimensional smoothing device.  Unfortunately portal storms don't really work: #74774

* add teleporter crafting recipe

* Remove ERN Recorder and just let inventors make NRE recorder.  No need to copy dozens of EOCs now

* Why's a lint?

* Remove left over debug print

* Clean up code

* Fix field chance

* Nerf vancian bill a bit

* Add teleporter to warp grenade recipe

* another random thing I missed

* spelling

* Obey rules on how to write null

* Learn more about c++ references

* Make double space

* rerun tests pt.1

* rerun tests pt.2
  • Loading branch information
b3brodie authored Aug 28, 2024
1 parent 4696f0d commit 72a0ea0
Show file tree
Hide file tree
Showing 12 changed files with 482 additions and 8 deletions.
41 changes: 40 additions & 1 deletion data/mods/Xedra_Evolved/eocs/inventor.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@
"inventor_lasmod_recuperator",
"inventor_lasmod_mega_everything",
"inventor_lasmod_more_capacitors",
"inventor_research_ai_1"
"inventor_research_ai_1",
"inventor_research_dimension_1",
"nre_recorder_inventor"
],
"type": "recipe",
"true_eocs": [ "EOC_INVENTOR_MESSAGE_GOOD" ],
Expand Down Expand Up @@ -295,6 +297,43 @@
{ "math": [ "AI_sparks", "+=", "4" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_INVENTOR_RESEARCH_DIMENSION_1",
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_3" ] },
{ "math": [ "dimension_sparks", ">=", "dimension_difficulty_1" ] }
]
},
"effect": [
{ "math": [ "u_vitamin('creative_spark_research')", "-=", "base_difficulty_3" ] },
{ "math": [ "dimension_sparks", "+=", "dimension_difficulty_1" ] },
{ "math": [ "base_difficulty_3", "+=", "5" ] },
{ "math": [ "dimension_difficulty_1", "+=", "5" ] },
{ "run_eocs": "EOC_INVENTOR_PROCESS_SPARKS" },
{
"u_roll_remainder": [ "rip_ticket", "inventor_warp_grenade", "inventor_portal_closer", "teleporter_inventor" ],
"type": "recipe",
"true_eocs": [ "EOC_INVENTOR_MESSAGE_GOOD" ],
"false_eocs": {
"id": "EOC_REMOVE_RESEARCH_DIMENSION_1",
"effect": [
{ "u_forget_recipe": "inventor_research_dimension_1" },
{
"u_message": "You reach the limit of what can be done at this level. It is time to move forward.",
"type": "info"
}
]
}
}
],
"false_effect": [
{ "u_message": "inventor_fail", "snippet": true, "type": "bad" },
{ "math": [ "u_vitamin('creative_spark_research')", "+=", "5" ] },
{ "math": [ "dimension_sparks", "+=", "4" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_INVENTOR_PROCESS_SPARKS",
Expand Down
8 changes: 8 additions & 0 deletions data/mods/Xedra_Evolved/eocs/item_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,13 @@
}
],
"false_effect": [ { "u_message": "You don't have enough stamina to throw your Wolf Sledge.", "type": "bad" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_RIP_TICKET_REMOVE",
"eoc_type": "EVENT",
"required_event": "character_casts_spell",
"condition": { "or": [ { "compare_string": [ "rip_ticket", { "context_val": "spell" } ] } ] },
"effect": [ { "u_consume_item": "rip_ticket" } ]
}
]
61 changes: 61 additions & 0 deletions data/mods/Xedra_Evolved/items/inventor/consumables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[
{
"id": "rip_ticket",
"name": { "str": "vancian bill" },
"description": "A small bill covered in odd symbols. Tearing it will in turn cause a small dimensional tear located within a nearby entity. Despite only lasting a few milliseconds, an internal tear in reality should be enough to kill anything. Hopefully.",
"type": "TOOL",
"weight": "1 g",
"volume": "1 ml",
"material": [ "paper" ],
"symbol": "|",
"color": "brown",
"flags": [ "NONCONDUCTIVE", "TRADER_AVOID", "INVENTOR_CRAFTED" ],
"use_action": { "type": "cast_spell", "spell_id": "rip_ticket", "no_fail": true, "level": 0, "need_wielding": true }
},
{
"id": "inventor_warp_grenade",
"type": "TOOL",
"category": "weapons",
"looks_like": "grenade",
"name": { "str": "netherium warp grenade" },
"description": "A homemade general purpose reality implosion device. Use this item to pull the pin and start the fuse. After 5 seconds, everything nearby will be violently sliced, warped, aged, and partially teleported straight into many different sections of the nether. After a short moment of instant death, the dimensional gap will probably heal. Probably.",
"weight": "397 g",
"volume": "540 ml",
"price": "10000 USD",
"price_postapoc": "200 USD",
"to_hit": -1,
"material": [ "steel", "plastic" ],
"symbol": "*",
"color": "green",
"use_action": {
"need_wielding": true,
"target": "inventor_warp_grenade_act",
"msg": "You pull the pin on the grenade.",
"target_timer": "5 seconds",
"menu_text": "Pull pin",
"type": "transform"
},
"flags": [ "RADIO_MODABLE", "RADIO_INVOKE_PROC", "BOMB", "GRENADE", "INVENTOR_CRAFTED" ],
"melee_damage": { "bash": 6 }
},
{
"id": "inventor_warp_grenade_act",
"type": "TOOL",
"category": "weapons",
"name": { "str": "active netherium warp grenade" },
"description": "This netherium warp grenade is active, and will explode any second now. Continue holding it to die in the messiest and most violent of ways imaginable",
"weight": "397 g",
"volume": "270 ml",
"price": "0 cent",
"price_postapoc": "0 cent",
"to_hit": -1,
"material": [ "steel", "plastic" ],
"symbol": "*",
"color": "green",
"use_action": { "type": "message", "message": "You've already pulled the %s's pin, try throwing it instead.", "name": "Pull pin" },
"countdown_action": { "type": "cast_spell", "spell_id": "netherium_warp_grenade_detonation", "no_fail": true, "level": 0 },
"countdown_interval": "5 seconds",
"flags": [ "BOMB", "TRADER_AVOID", "DANGEROUS" ],
"melee_damage": { "bash": 6 }
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,40 @@
"description": "A USB thumb drive with a simple intelligent agent to provide support in parsing big layers of information.",
"extend": { "flags": [ "INVENTOR_CRAFTED" ] },
"qualities": [ [ "AI_TOOL", 1 ] ]
},
{
"id": "inventor_portal_closer",
"type": "TOOL",
"name": { "str": "Netherium-Reality Smoothing Device" },
"looks_like": "box_large_metal",
"description": "An enormous industrial press shaped device, covered in sensors, circuits, and other doodads. Two inverted teleporters are located on each side of the hammers, poised to perfectly align at the end of a strike. Doing so will smoothen the overall local barrier between Earth and other realities, filling in any holes at the expense of weakening it in a much wider area. This is an overall positive effect, allowing you to heal tears that would never naturally close, but expect large temporary side-effects.",
"longest_side": "1495 mm",
"material": [ "steel" ],
"symbol": "#",
"volume": "601475 ml",
"weight": "226 kg",
"price": "100000 USD",
"price_postapoc": "1000 USD",
"charges_per_use": 3125,
"ammo": "battery",
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"rigid": true,
"flag_restriction": [ "BATTERY_HEAVY", "BATTERY_MEDIUM" ],
"max_contains_volume": "10 L",
"max_contains_weight": "20 kg",
"default_magazine": "inventor_heavy_cell"
},
{
"type": "link_up",
"menu_text": "Plug in / Unplug",
"ammo_scale": 0,
"cable_length": 10,
"charge_rate": "500 W"
}
],
"use_action": [ { "type": "cast_spell", "spell_id": "inventor_portal_closer_spell", "no_fail": true, "level": 0 } ],
"flags": [ "ELECTRONIC", "INVENTOR_CRAFTED", "ELECTROKINETIC_CHARGEABLE" ]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,5 @@
"id": "book_inventor",
"type": "MIGRATION",
"replace": "artifact_cable_whip"
},
{
"id": "rip_ticket",
"type": "MIGRATION",
"replace": "bio_warhead"
}
]
66 changes: 66 additions & 0 deletions data/mods/Xedra_Evolved/recipes/inventor/consumables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[
{
"type": "recipe",
"activity_level": "LIGHT_EXERCISE",
"result": "rip_ticket",
"tools": [
[
[ "pen", 25 ],
[ "black_pen", 25 ],
[ "blue_pen", 25 ],
[ "red_pen", 25 ],
[ "green_pen", 25 ],
[ "pencil", 25 ],
[ "permanent_marker", 25 ],
[ "survival_marker", 25 ]
]
],
"components": [
[
[ "money_one", 1 ],
[ "money_two", 1 ],
[ "money_five", 1 ],
[ "money_ten", 1 ],
[ "money_twenty", 1 ],
[ "money_fifty", 1 ],
[ "money_hundred", 1 ]
]
],
"time": "2 h",
"skill_used": "deduction",
"difficulty": 5,
"flags": [ "SECRET" ],
"category": "CC_XEDRA",
"subcategory": "CSC_XEDRA_WEAPONS"
},
{
"result": "inventor_warp_grenade",
"type": "recipe",
"activity_level": "NO_EXERCISE",
"time": "8 h",
"qualities": [ { "id": "SCREW", "level": 1 }, { "id": "SAW_M", "level": 1 } ],
"proficiencies": [
{ "proficiency": "prof_metalworking", "time_multiplier": 2, "skill_penalty": 0 },
{ "proficiency": "prof_welding_basic", "time_multiplier": 3, "skill_penalty": 0 },
{ "proficiency": "prof_welding", "time_multiplier": 2, "skill_penalty": 0 }
],
"using": [ [ "soldering_standard", 60 ], [ "welding_standard", 30 ] ],
"components": [
[ [ "power_supply", 2 ] ],
[ [ "teleporter", 1 ] ],
[ [ "scrap", 5 ] ],
[ [ "scrap_aluminum", 5 ] ],
[ [ "sheet_metal_small", 10 ] ],
[ [ "cable", 100 ] ],
[ [ "grenade", 1 ] ],
[ [ "lens_small", 1 ] ],
[ [ "amplifier", 1 ] ]
],
"skill_used": "deduction",
"difficulty": 8,
"skills_required": [ "electronics", 6 ],
"flags": [ "SECRET" ],
"category": "CC_XEDRA",
"subcategory": "CSC_XEDRA_WEAPONS"
}
]
90 changes: 90 additions & 0 deletions data/mods/Xedra_Evolved/recipes/inventor/misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,95 @@
"flags": [ "BLIND_EASY", "SECRET" ],
"category": "CC_XEDRA",
"subcategory": "CSC_XEDRA_TOOLS"
},
{
"result": "nre_recorder",
"id_suffix": "inventor",
"type": "recipe",
"activity_level": "NO_EXERCISE",
"time": "4 h",
"tools": [ [ [ "laptop", 30 ] ] ],
"qualities": [ { "id": "SCREW", "level": 1 }, { "id": "SAW_M", "level": 1 } ],
"proficiencies": [
{ "proficiency": "prof_welding_basic", "time_multiplier": 3, "skill_penalty": 0 },
{ "proficiency": "prof_welding", "time_multiplier": 2, "skill_penalty": 0 }
],
"using": [ [ "soldering_standard", 60 ], [ "welding_standard", 30 ] ],
"components": [
[ [ "power_supply", 2 ] ],
[ [ "scrap", 20 ] ],
[ [ "scrap_aluminum", 10 ] ],
[ [ "cable", 80 ] ],
[ [ "plastic_chunk", 5 ] ],
[ [ "magnetron", 2 ] ],
[ [ "processor", 1 ] ],
[ [ "lens_small", 1 ] ],
[ [ "amplifier", 1 ] ]
],
"skill_used": "deduction",
"difficulty": 6,
"skills_required": [ [ "electronics", 6 ], [ "computer", 2 ] ],
"flags": [ "SECRET" ],
"category": "CC_XEDRA",
"subcategory": "CSC_XEDRA_TOOLS"
},
{
"result": "inventor_portal_closer",
"type": "recipe",
"activity_level": "MODERATE_EXERCISE",
"time": "16 h",
"tools": [ [ [ "laptop", 100 ] ] ],
"qualities": [ { "id": "SCREW", "level": 1 }, { "id": "SAW_M", "level": 1 }, { "id": "AI_TOOL", "level": 1 } ],
"proficiencies": [
{ "proficiency": "prof_welding_basic", "time_multiplier": 3, "skill_penalty": 0 },
{ "proficiency": "prof_welding", "time_multiplier": 2, "skill_penalty": 0 }
],
"using": [ [ "soldering_standard", 100 ], [ "welding_standard", 50 ] ],
"components": [
[ [ "anvil", 2 ] ],
[ [ "teleporter", 2 ] ],
[ [ "pipe", 32 ] ],
[ [ "power_supply", 10 ] ],
[ [ "motor_micro", 10 ] ],
[ [ "scrap", 100 ] ],
[ [ "cable", 400 ] ],
[ [ "magnetron", 2 ] ],
[ [ "processor", 2 ] ]
],
"skill_used": "deduction",
"difficulty": 10,
"skills_required": [ [ "electronics", 6 ], [ "fabrication", 6 ], [ "computer", 4 ] ],
"flags": [ "SECRET" ],
"category": "CC_XEDRA",
"subcategory": "CSC_XEDRA_TOOLS"
},
{
"result": "teleporter",
"id_suffix": "inventor",
"type": "recipe",
"activity_level": "NO_EXERCISE",
"time": "8 h",
"tools": [ [ [ "laptop", 50 ] ] ],
"qualities": [ { "id": "SCREW", "level": 1 }, { "id": "SAW_M", "level": 1 }, { "id": "AI_TOOL", "level": 1 } ],
"proficiencies": [
{ "proficiency": "prof_welding_basic", "time_multiplier": 3, "skill_penalty": 0 },
{ "proficiency": "prof_welding", "time_multiplier": 2, "skill_penalty": 0 }
],
"using": [ [ "soldering_standard", 50 ], [ "welding_standard", 25 ] ],
"components": [
[ [ "power_supply", 1 ] ],
[ [ "diamond", 1 ] ],
[ [ "scrap", 5 ] ],
[ [ "cable", 10 ] ],
[ [ "lens_small", 1 ] ],
[ [ "processor", 1 ] ],
[ [ "inventor_medium_cell", 1 ] ]
],
"skill_used": "deduction",
"difficulty": 8,
"skills_required": [ [ "electronics", 4 ], [ "computer", 4 ] ],
"flags": [ "SECRET" ],
"category": "CC_XEDRA",
"subcategory": "CSC_XEDRA_TOOLS"
}
]
18 changes: 17 additions & 1 deletion data/mods/Xedra_Evolved/recipes/inventor/researches.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
},
{
"id": "inventor_research_ai_1",
"name": "intelligent agent researches",
"name": "intelligent agent research",
"description": "Research a practical approaches to use different intelligent agents as a tool or weapon.",
"type": "recipe",
"activity_level": "NO_EXERCISE",
Expand All @@ -106,5 +106,21 @@
"flags": [ "BLIND_EASY", "SECRET" ],
"category": "CC_XEDRA",
"subcategory": "CSC_XEDRA_RESEARCH"
},
{
"id": "inventor_research_dimension_1",
"name": "dimensionalism research",
"description": "Research practical methods of using netherium based physics.",
"type": "recipe",
"activity_level": "NO_EXERCISE",
"result_eocs": [ "EOC_INVENTOR_RESEARCH_DIMENSION_1" ],
"tools": [ [ [ "laptop", 100 ] ] ],
"components": [ [ [ "medium_printout_portal_storm_data", 1 ], [ "small_printout_portal_storm_data", 3 ] ] ],
"time": "10 h",
"skill_used": "deduction",
"difficulty": 10,
"flags": [ "BLIND_EASY", "SECRET" ],
"category": "CC_XEDRA",
"subcategory": "CSC_XEDRA_RESEARCH"
}
]
Loading

0 comments on commit 72a0ea0

Please sign in to comment.