--[[ Jabbers 05APR2023 Jabbers' Soulslike Anomaly Mod --]] function on_mcm_load() local op = { id = "soulslike", gr = { } } local general = { id = "general", text = "ui_mcm_soulslike_general", sh = true, gr = { { id = "title", type = "slide", link = "ui_options_slider_gameplay_diff", text = "ui_mcm_soulslike_general_title", size = {512,50}, spacing = 20 }, { id = "desc_mcm", type = "desc", text = "ui_mcm_soulslike_general_description", clr = {255, 255 ,255 ,255}, }, { id = "desc_mcm", type = "desc", text = "ui_mcm_soulslike_general_disclaimer", clr = {255, 255 ,255 ,0}, }, }, } table.insert(op.gr, general) local character = { id = "character", text = "ui_mcm_soulslike_character", sh = true, gr = { { id = "title", type = "slide", link = "ui_options_slider_gameplay_diff", text = "ui_mcm_soulslike_character_title", size = {512,50}, spacing = 20 }, { id = "health_loss_on_respawn", type = "track", val = 2, min = 0.0, max = 0.75, step = 0.01, def = 0.75 }, { id = "rank_loss_percent", type = "track", val = 2, min = 0, max = 0.75, step = 0.01, def = 0.02 }, { id = "rep_loss_percent", type = "track", val = 2, min = 0, max = 0.75, step = 0.01, def = 0.05 } }, } table.insert(op.gr, character) local items = { id = "items", text = "ui_mcm_soulslike_items", sh = true, gr = { { id = "title", type = "slide", link = "ui_options_slider_gameplay_diff", text = "ui_mcm_soulslike_items_title", size = {512,50}, spacing = 20 }, { id = "keep_equipped_items_on_death", type = "check", val = 1, def = false }, { id = "desc_mcm", type = "desc", text = "ui_mcm_soulslike_items_scalar_description", clr = {255, 255 ,255 ,255}, }, { id = "item_loss_scalar", type = "track", val = 2, min = 0, max = 0.75, step = 0.01, def = 0.20 }, { id = "item_condition_loss_scalar", type = "track", val = 2, min = 0, max = 0.25, step = 0.01, def = 0.05 }, { id = "desc_mcm", type = "desc", text = "ui_mcm_soulslike_items_allow_desc", clr = {255, 255 ,255 ,255}, }, { id = "allow_weapon_loss", type = "check", val = 1, def = true }, { id = "allow_outfit_loss", type = "check", val = 1, def = true }, { id = "allow_headgear_loss", type = "check", val = 1, def = true }, { id = "allow_artifact_loss", type = "check", val = 1, def = true }, { id = "allow_tool_loss", type = "check", val = 1, def = true }, }, } table.insert(op.gr, items) local scenarios = { id = "scenarios", text = "ui_mcm_soulslike_scenarios", sh = true, gr = { { id = "title", type = "slide", link = "ui_options_slider_gameplay_diff", text = "ui_mcm_soulslike_scenarios_title", size = {512,50}, spacing = 20 }, { id = "desc_mcm", type = "desc", text = "ui_mcm_soulslike_scenarios_description", clr = {255, 255 ,255 ,255}, }, { id = "rf_detector_scenario_weight", type = "track", val = 2, min = 0.0, max = 1.0, step = 0.01, def = 0.10 }, { id = "hidden_stash_scenario_weight", type = "track", val = 2, min = 0.0, max = 1.0, step = 0.01, def = 0.10 }, { id = "looter_npcs_marked", type = "check", val = 1, def = false } }, } table.insert(op.gr, scenarios) local ambush = { id = "ambush", text = "ui_mcm_soulslike_ambush", sh = true, gr = { { id = "title", type = "slide", link = "ui_options_slider_gameplay_diff", text = "ui_mcm_soulslike_ambush_title", size = {512,50}, spacing = 20 }, { id = "desc_mcm", type = "desc", text = "ui_mcm_soulslike_ambush_description", clr = {255, 255 ,255 ,255}, }, { id = "mutant_ambush_chance", type = "track", val = 2, min = 0.0, max = 1.0, step = 0.01, def = 0.25 }, { id = "allow_boar_ambush", type = "check", val = 1, def = true }, { id = "allow_flesh_ambush", type = "check", val = 1, def = true }, { id = "allow_dogs_ambush", type = "check", val = 1, def = true }, { id = "allow_cats_ambush", type = "check", val = 1, def = true }, { id = "allow_snorks_ambush", type = "check", val = 1, def = true }, { id = "allow_bloodsucker_ambush", type = "check", val = 1, def = true }, { id = "allow_burer_ambush", type = "check", val = 1, def = true }, { id = "allow_chimera_ambush", type = "check", val = 1, def = true }, { id = "allow_controller_ambush", type = "check", val = 1, def = true }, { id = "stalker_ambush_chance", type = "track", val = 2, min = 0.0, max = 1.0, step = 0.01, def = 0.25 }, { id = "allow_stalker_novice_ambush", type = "check", val = 1, def = true }, { id = "allow_stalker_advanced_ambush", type = "check", val = 1, def = true }, { id = "allow_stalker_veteran_ambush", type = "check", val = 1, def = true }, { id = "allow_stalker_sniper_ambush", type = "check", val = 1, def = true } }, } table.insert(op.gr, ambush) local hardcore = { id = "hardcore", text = "ui_mcm_soulslike_hardcore", sh = true, gr = { { id = "title", type = "slide", link = "ui_options_slider_gameplay_diff", text = "ui_mcm_soulslike_hardcore_title", size = {512,50}, spacing = 20 }, { id = "desc_mcm", type = "desc", text = "ui_mcm_soulslike_hardcore_save_description", clr = {255, 255 ,255 ,0}, }, { id = "is_enabled", type = "check", val = 1, def = false }, { id = "override_campfire_hardcore_saves", type = "check", val = 1, def = false } }, } table.insert(op.gr, hardcore) local debug = { id = "debug", text = "ui_mcm_soulslike_debug", sh = true, gr = { { id = "title", type = "slide", link = "ui_options_slider_gameplay_diff", text = "ui_mcm_soulslike_debug_title", size = {512,50}, spacing = 20 }, { id = "is_enabled", type = "check", val = 1, def = false }, { id = "enable_tips", type = "check", val = 1, def = false }, { id = "debug_hidden_stashes", type = "check", val = 1, def = false }, { id = "debug_squad_spawns", type = "check", val = 1, def = false }, { id = "debug_item_loss", type = "check", val = 1, def = false }, { id = "debug_the_tarkov_looter", type = "check", val = 1, def = false }, { id = "debug_the_noloss_scenario", type = "check", val = 1, def = false }, { id = "debug_the_default_scenario", type = "check", val = 1, def = false }, { id = "debug_the_rf_scenario", type = "check", val = 1, def = false }, { id = "debug_the_hidden_stash_scenario", type = "check", val = 1, def = false }, { id = "debug_always_spawn_ambush", type = "check", val = 1, def = false } }, } table.insert(op.gr, debug) return op end local function get_config(key, default_when_nil) local opt = ui_mcm and ui_mcm.get("soulslike/"..key) if opt == nil then opt = default_when_nil end return opt end -- Hardcore function is_hardcore_save_enabled() return get_config("hardcore/is_enabled", false) end function override_campfire_hardcore_saves() return get_config("hardcore/override_campfire_hardcore_saves", false) end -- Scenarios function are_looter_npcs_marked() return get_config("scenarios/looter_npcs_marked", false) end function rf_detector_scenario_weight() return get_config("scenarios/rf_detector_scenario_weight", 0.10) end function hidden_stash_scenario_weight() return get_config("scenarios/hidden_stash_scenario_weight", 0.10) end function scattered_stash_scenario_weight() return get_config("scenarios/scattered_stash_scenario_weight", 0.02) end function nearby_dead_stalker_scenario_weight() return get_config("scenarios/nearby_dead_stalker_scenario_weight", 0.10) end -- Items function get_item_loss_scalar() return get_config("items/item_loss_scalar", 0.2) end function get_item_condition_loss_percent() return get_config("items/item_condition_loss_scalar", 0.05) end function allow_toolkit_loss() return get_config("items/allow_tool_loss", true) end function allow_artifact_loss() return get_config("items/allow_artifact_loss", true) end function allow_headgear_loss() return get_config("items/allow_headgear_loss", true) end function allow_outfit_loss() return get_config("items/allow_outfit_loss", true) end function allow_weapon_loss() return get_config("items/allow_weapon_loss", true) end function get_keep_equipped_items_on_death() return get_config("items/keep_equipped_items_on_death", false) end -- Ambush function mutant_ambush_chance() return get_config("ambush/mutant_ambush_chance", 0.5) end function stalker_ambush_chance() return get_config("ambush/stalker_ambush_chance", 0.5) end function allow_boar_ambush() return get_config("ambush/allow_boar_ambush", true) end function allow_flesh_ambush() return get_config("ambush/allow_flesh_ambush", true) end function allow_dogs_ambush() return get_config("ambush/allow_dogs_ambush", true) end function allow_cats_ambush() return get_config("ambush/allow_cats_ambush", true) end function allow_snorks_ambush() return get_config("ambush/allow_snorks_ambush", true) end function allow_bloodsucker_ambush() return get_config("ambush/allow_bloodsucker_ambush", true) end function allow_burer_ambush() return get_config("ambush/allow_burer_ambush", true) end function allow_chimera_ambush() return get_config("ambush/allow_chimera_ambush", true) end function allow_controller_ambush() return get_config("ambush/allow_controller_ambush", true) end function allow_stalker_novice_ambush() return get_config("ambush/allow_stalker_novice_ambush", true) end function allow_stalker_advanced_ambush() return get_config("ambush/allow_stalker_advanced_ambush", true) end function allow_stalker_veteran_ambush() return get_config("ambush/allow_stalker_veteran_ambush", true) end function allow_stalker_sniper_ambush() return get_config("ambush/allow_stalker_sniper_ambush", true) end -- Character function get_health_loss_percent() return get_config("character/health_loss_on_respawn", 0.75) end function rank_loss_percent() return get_config("character/rank_loss_percent", 0.05) end function rep_loss_percent() return get_config("character/rep_loss_percent", 0.02) end -- Debug function is_debug_enabled() return get_config("debug/is_enabled", false) end function show_debug_tips() return get_config("debug/enable_tips", false) end function debug_hidden_stashes() return is_debug_enabled() and get_config("debug/debug_hidden_stashes", false) end function debug_squad_spawns() return is_debug_enabled() and get_config("debug/debug_squad_spawns", false) end function debug_item_loss() return is_debug_enabled() and get_config("debug/debug_item_loss", false) end function debug_remove_default_scenario() return is_debug_enabled() and get_config("debug/debug_remove_default_scenario", false) end function debug_the_tarkov_looter() return is_debug_enabled() and get_config("debug/debug_the_tarkov_looter", false) end function debug_the_noloss_scenario() return is_debug_enabled() and get_config("debug/debug_the_noloss_scenario", false) end function debug_the_default_scenario() return is_debug_enabled() and get_config("debug/debug_the_default_scenario", false) end function debug_the_rf_scenario() return is_debug_enabled() and get_config("debug/debug_the_rf_scenario", false) end function debug_the_hidden_stash_scenario() return is_debug_enabled() and get_config("debug/debug_the_hidden_stash_scenario", false) end function debug_always_spawn_ambush() return is_debug_enabled() and get_config("debug/debug_always_spawn_ambush", false) end