Added New Mods and Profiles Folders

This is a complete rebuild of the modpack, with all new mods and updates for 1.5.3 of Anomaly.
This commit is contained in:
2025-01-14 05:07:53 -05:00
parent 85c665b107
commit 376b4b9689
21217 changed files with 546254 additions and 0 deletions
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_menu_liz_npc_wound_tweak">
<text>NPC Wound Tweak</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_autoheal">
<text>NPC autoheal</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_autoheal_desc">
<text>This option, in theory, allows NPCs to use a first aid kit when they are in a wounded state. \nDisabling this feature should prevent situations where a wounded NPC suddenly gets up and enters the fight. \nIn the original Anomaly, this feature is enabled by default.</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_enable_weapon_drop">
<text>Enable weapon drop</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_enable_weapon_drop_desc">
<text>If hit in the palm of the right hand, the enemy will drop the weapon.</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_enable_bleeding">
<text>Enable bleeding</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_enable_bleeding_desc">
<text>By default in Anomaly, a wounded stalker can have varying degrees of bleeding, which can lead to a situation where the wounded enemy dies almost immediately after going into a wounded state. This option allows you to disable this vanilla feature.</text>
</string>
</string_table>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_menu_liz_npc_wound_tweak">
<text>NPC Wound Tweak</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_autoheal">
<text>Автолечение NPC</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_autoheal_desc">
<text>Данная опция, теоритически, позволяет NPC использовать аптечку когда они находятся в раненом состоянии. \nОтключение данной функции должно предотвратить ситуации, когда раненый NPC неожиданно поднимается и вступает в бой. \nВ оригинальной Anomaly данная функция включена по умолчанию.</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_enable_weapon_drop">
<text>Включить потерю оружия при ранении</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_enable_weapon_drop_desc">
<text>При попадании в ладонь правой руки, противник выронит оружие.</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_enable_bleeding">
<text>Включить кровотечение</text>
</string>
<string id="ui_mcm_liz_npc_wound_tweak_enable_bleeding_desc">
<text>По умолчанию в Anomaly, раненый сталкер может иметь различные степени кровотечения, что может привести к ситуации когда раненый противник почти сразу умирает. Данная опция позволяет отключить данную функцию оригинала</text>
</string>
</string_table>
@@ -0,0 +1,206 @@
-- took from dismemberment mod
local creatures_cls = {
[clsid.script_stalker] = { "human", "stalker_damage" },
-- [clsid.dog_s] = { "dog", "m_dog_damage" },
-- [clsid.pseudodog_s] = { "pseudo_dog", "m_pseudodog_damage" },
-- [clsid.psy_dog_s] = { "pseudo_dog", "m_pseudodog_damage" },
-- [clsid.boar_s] = { "boar", "m_boar_damage" },
-- [clsid.flesh_s] = { "flesh", "m_flesh_damage" },
-- [clsid.cat_s] = { "cat", "cat_damage" },
-- [clsid.zombie_s] = { "zombie", "m_zombie_damage" },
-- [clsid.tushkano_s] = { "tushkano", "m_tushkano_damage" },
-- [clsid.snork_s] = { "snork", "m_snork_damage" },
-- [clsid.controller_s] = { "controller", "m_controller_damage" },
-- [clsid.bloodsucker_s] = { "bloodsucker", "m_bloodsucker_damage" },
-- [clsid.chimera_s] = { "chimera" },
-- [clsid.burer_s] = { "burer", "m_burer_damage" },
-- [clsid.fracture_s] = { "fracture", "fracture_normal_damage" },
-- [clsid.gigant_s] = { "giant", "m_giant_damage" },
}
--damage to bones in this list make npc go into wounded state instead of dying
local non_lethal_bones = {
["bip01_l_upperarm"] = true,
["bip01_l_forearm"] = true,
["bip01_l_hand"] = true,
["bip01_l_finger0"] = true,
["bip01_l_finger01"] = true,
["bip01_l_finger02"] = true,
["bip01_l_finger1"] = true,
["bip01_l_finger11"] = true,
["bip01_l_finger12"] = true,
["bip01_l_finger2"] = true,
["bip01_l_finger21"] = true,
["bip01_l_finger22"] = true,
["bip01_r_upperarm"] = true,
["bip01_r_forearm"] = true,
["bip01_r_hand"] = true,
["bip01_r_finger0"] = true,
["bip01_r_finger01"] = true,
["bip01_r_finger02"] = true,
["bip01_r_finger1"] = true,
["bip01_r_finger11"] = true,
["bip01_r_finger12"] = true,
["bip01_r_finger2"] = true,
["bip01_r_finger21"] = true,
["bip01_r_finger22"] = true,
["bip01_l_thigh"] = true,
["bip01_l_calf"] = true,
["bip01_l_foot"] = true,
["bip01_l_toe0"] = true,
["bip01_r_thigh"] = true,
["bip01_r_calf"] = true,
["bip01_r_foot"] = true,
["bip01_r_toe0"] = true,
}
--damage to bones in this list will make npc drop his weapon
local hand_bones = {
-- ["bip01_l_forearm"] = true,
-- ["bip01_l_hand"] = true,
-- ["bip01_l_finger0"] = true,
-- ["bip01_l_finger01"] = true,
-- ["bip01_l_finger02"] = true,
-- ["bip01_l_finger1"] = true,
-- ["bip01_l_finger11"] = true,
-- ["bip01_l_finger12"] = true,
-- ["bip01_l_finger2"] = true,
-- ["bip01_l_finger21"] = true,
-- ["bip01_l_finger22"] = true,
-- ["bip01_r_forearm"] = true,
["bip01_r_hand"] = true,
["bip01_r_finger0"] = true,
["bip01_r_finger01"] = true,
["bip01_r_finger02"] = true,
["bip01_r_finger1"] = true,
["bip01_r_finger11"] = true,
["bip01_r_finger12"] = true,
["bip01_r_finger2"] = true,
["bip01_r_finger21"] = true,
["bip01_r_finger22"] = true,
}
local wounded_states = {
[0] = "wounded",
[1] = "wounded_heavy",
[2] = "wounded_heavy_2",
[3] = "wounded_heavy_3"
}
local allowed_hit_types = {
[hit.wound] = true,
[hit.fire_wound] = true,
}
local enable_weapon_drop = liz_wounded_redone_mcm.get_config("enable_weapon_drop")
local enable_bleeding = liz_wounded_redone_mcm.get_config("enable_bleeding")
local is_autoheal_enabled = liz_wounded_redone_mcm.get_config("autoheal")
function on_game_start()
RegisterScriptCallback("npc_on_before_hit", npc_on_before_hit)
RegisterScriptCallback("on_option_change", on_option_change)
end
function on_option_change()
enable_weapon_drop = liz_wounded_redone_mcm.get_config("enable_weapon_drop")
enable_bleeding = liz_wounded_redone_mcm.get_config("enable_bleeding")
is_autoheal_enabled = liz_wounded_redone_mcm.get_config("autoheal")
end
function npc_on_before_hit(npc, shit, bone_id, flags)
if not (npc:alive()) then return end
if npc:has_info("npcx_is_companion") then return end
-- local community = character_community(npc)
-- local npc_kind = ini_sys:r_string_ex(npc:section(), "kind")
-- local npc_damage_section = (creatures_cls[npc:clsid()] and creatures_cls[npc:clsid()][2]) or (npc_kind and creatures_kind[npc_kind] and creatures_kind[npc_kind][2]) or (npc:section())
local npc_damage_section = (creatures_cls[npc:clsid()] and creatures_cls[npc:clsid()][2]) or (npc:section()) -- took from dismemberment code
if npc_damage_section then
local bone_name = npc:bone_name(bone_id)
local str = bone_name and ini_sys:r_string_ex(npc_damage_section, bone_name)
local p = str and str_explode(str, ",")
if p and p[1] then
local hit_power_mult = tonumber(p[1]) or 1 -- if not found then 1
local predicted_health = npc.health - (shit.power * hit_power_mult)
if predicted_health <= 0 and non_lethal_bones[bone_name] and allowed_hit_types[shit.type] then --handle wounded state
flags.ret_value = false
local state = state_mgr.get_state(npc)
if state ~= "wounded_heavy" and state ~= "wounded_heavy_2" and state ~= "wounded_heavy_3" then
local new_state = wounded_states[math.random(0, #wounded_states)]
npc.health = 0.1
if not enable_bleeding then npc.bleeding = 0 end
save_var(npc, "wounded_state", new_state)
save_var(npc, "wounded_fight", "false")
-- save_var(npc, "wounded_victim", "nil")
save_var(npc, "victim_surrender", true)
state_mgr.set_state(npc, new_state, nil, nil, nil, { fast_set = true })
end
elseif enable_weapon_drop and hand_bones[bone_name] then -- handle drop weapon feature
if character_community(npc) == "zombied" then return end --ignore zombies. they don't know waht to do if they loose weapon
-- flags.ret_value = false
local item = npc:active_item()
local slot = npc:active_slot()
if (item) and ((slot == 2) or (slot == 3)) and (npc:dont_has_info("npcx_is_companion")) then
death_manager.set_weapon_drop_condition(npc, item)
npc:drop_item(item)
end
end
end
end
end
----------------------------------------------------
-- xr_wounded patches
----------------------------------------------------
xr_wounded.evaluator_wound.evaluate = function (self)
local o = self.object
if not (IsStalker(o) and o:alive()) then
return false
end
-- same as the original code but removed this bit for a testing purposes
-- if (o:critically_wounded() or o:in_smart_cover()) then
-- return false
-- end
if self.a.wounded_set ~= true then return false end
self.a.wound_manager:update()
if o:best_enemy() and load_var(o, "wounded_fight") == "true" then
return false
end
local state = tostring(load_var(o, "wounded_state"))
if (state == "nil") then
return false
end
return true
end
local originalIW = xr_wounded.init_wounded
xr_wounded.init_wounded = function(npc, ini, section, st, scheme)
originalIW(npc, ini, section, st, scheme)
if is_autoheal_enabled then return end
if tostring(section) then
st.autoheal = false
else
st.autoheal = ini:r_bool_ex(section, "autoheal", false)
end
end
@@ -0,0 +1,49 @@
local defaults = {
["autoheal"] = true,
["enable_weapon_drop"] = true,
["enable_bleeding"] = true
}
function on_mcm_load()
local options = {
id = "liz_npc_wound_tweak",
sh = true,
gr = {
{
id = "liz_npc_wound_tweak",
type = "slide",
link = "ui_options_slider_player",
text = "ui_mcm_menu_liz_npc_wound_tweak",
size = { 512, 50 },
spacing = 20
},
{
id = "autoheal",
type = "check",
val = 1,
def = true
},
{
id = "enable_weapon_drop",
type = "check",
val = 1,
def = true
},
{
id = "enable_bleeding",
type = "check",
val = 1,
def = true
}
}
}
return options
end
function get_config(key)
if ui_mcm and ui_mcm.key_hold then
return ui_mcm.get("liz_npc_wound_tweak/" .. key)
else
return defaults[key]
end
end
@@ -0,0 +1,15 @@
--made to prevent Tosox's fix drop weapon from zombies
orig_action_wounded_initialize = xr_wounded.action_wounded.initialize
xr_wounded.action_wounded.initialize = function(self)
orig_action_wounded_initialize(self)
local npc = self.object
local community = character_community(npc)
if community == "zombied" then
local item = npc:active_item()
local slot = npc:active_slot()
if (item) and ((slot == 2) or (slot == 3)) and (npc:dont_has_info("npcx_is_companion")) then
npc:transfer_item(item, npc)
return
end
end
end