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,8 @@
![zone_mine_gravitational_strong]
ignore_small = false
![zone_mine_gravitational_average]
ignore_small = false
![zone_mine_gravitational_weak]
ignore_small = false
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_menu_tmmr">
<text>Tosox Mini Mods Repo</text>
</string>
<string id="ui_mcm_menu_npc_wounded_anim_fix">
<text>NPC Wounded Anim Fix</text>
</string>
<string id="ui_mcm_tmmr_npc_wounded_anim_fix_title">
<text>NPC Wounded Animation Fix</text>
</string>
<string id="ui_mcm_tmmr_npc_wounded_anim_fix_handle_weapon">
<text>Handle NPC's weapon</text>
</string>
<string id="ui_mcm_tmmr_npc_wounded_anim_fix_handle_weapon_desc">
<text>Inventory - Transfer to NPC's inventory \nDrop - Drop on the ground \nAdapt - Transfer to NPC's inventory if "Weapons Drop on Bodies" is installed</text>
</string>
<string id="ui_mcm_lst_tmmr_inv_weapon">
<text>Inventory</text>
</string>
<string id="ui_mcm_lst_tmmr_drop_weapon">
<text>Drop</text>
</string>
<string id="ui_mcm_lst_tmmr_adapt_weapon">
<text>Adapt</text>
</string>
</string_table>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_menu_tmmr">
<text>Tosox Mini Mods Repo</text>
</string>
<string id="ui_mcm_menu_outfits_gives_patches">
<text>Disassmbling Outfits gives Patches</text>
</string>
<string id="ui_mcm_tmmr_outfits_gives_patches_title">
<text>Disassmbling Outfits gives Patches</text>
</string>
<string id="ui_mcm_tmmr_outfits_gives_patches_patch_chance">
<text>Chance to get a patch</text>
</string>
</string_table>
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_menu_tmmr">
<text>Tosox Mini Mods Repo</text>
</string>
<string id="ui_mcm_menu_npc_wounded_anim_fix">
<text>NPC Wounded Anim Fix</text>
</string>
<string id="ui_mcm_tmmr_npc_wounded_anim_fix_title">
<text>NPC Wounded Animation Fix</text>
</string>
<string id="ui_mcm_tmmr_npc_wounded_anim_fix_handle_weapon">
<text>Óïðàâëåíèå îðóæèåì ÍÏÑ</text>
</string>
<string id="ui_mcm_tmmr_npc_wounded_anim_fix_handle_weapon_desc">
<text>Èíâåíòàðü - Ïåðåäàòü â èíâåíòàðü ÍÏÑ \nÁðîñèòü - Áðîñèòü íà çåìëþ \nÀäàïòèðîâàòü - Ïåðåäàòü â èíâåíòàðü ÍÏÑ, åñëè óñòàíîâëåíî "Weapons Drop on Bodies"</text>
</string>
<string id="ui_mcm_lst_tmmr_inv_weapon">
<text>Èíâåíòàðü</text>
</string>
<string id="ui_mcm_lst_tmmr_drop_weapon">
<text>Áðîñèòü</text>
</string>
<string id="ui_mcm_lst_tmmr_adapt_weapon">
<text>Àäàïòèðîâàòü</text>
</string>
</string_table>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_menu_tmmr">
<text>Tosox Mini Mods Repo</text>
</string>
<string id="ui_mcm_menu_outfits_gives_patches">
<text>Disassmbling Outfits gives Patches</text>
</string>
<string id="ui_mcm_tmmr_outfits_gives_patches_title">
<text>Disassmbling Outfits gives Patches</text>
</string>
<string id="ui_mcm_tmmr_outfits_gives_patches_patch_chance">
<text>Øàíñ ïîëó÷èòü ïàò÷</text>
</string>
</string_table>
@@ -0,0 +1,3 @@
[axr_companions]
_current_states ; Needed for correct text on hover
cw_commands
@@ -0,0 +1,5 @@
[gameplay_disguise]
npc_on_update
npcs_memory
is_enabled
default_comm
@@ -0,0 +1,8 @@
[item_backpack]
keep_items
[actor_stash_patch]
keep_items
[zzz_rax_sortingplus_mcm]
favorite_itms
@@ -0,0 +1,2 @@
[gameplay_disguise]
possible_factions
@@ -0,0 +1,5 @@
[xrs_facer]
enable_drop_item
[actor_effects]
opt
@@ -0,0 +1,2 @@
[level_input]
flags
@@ -0,0 +1,2 @@
[item_parts]
timer_disassembly_outfit
@@ -0,0 +1,5 @@
@[materials\bush]
vis_transparency_factor = 0.2
@[materials\bush_sux]
vis_transparency_factor = 0.1
@@ -0,0 +1,117 @@
--Tweaki_Breeki's
----_____-------------------_-_--------------------------------------------------_____-_-----_--------------------------------
---/-____|-----------------|-(_)-----------------/\-----------------------------/-____|-|---(_)-------------------------------
--|-|--__-_-__-_____------_|-|_-_-__---__-_-----/--\---_-__---__-_-_-__-_---_--|-|----|-|__--_-_-__-___---___-_-__-__-_-___---
--|-|-|_-|-'__/-_-\-\-/\-/-/-|-|-'_-\-/-_`-|---/-/\-\-|-'_-\-/-_`-|-'__|-|-|-|-|-|----|-'_-\|-|-'_-`-_-\-/-_-\-'__/-_`-/-__|--
--|-|__|-|-|-|-(_)-\-V--V-/|-|-|-|-|-|-(_|-|--/-____-\|-|-|-|-(_|-|-|--|-|_|-|-|-|____|-|-|-|-|-|-|-|-|-|--__/-|-|-(_|-\__-\--
---\_____|_|--\___/-\_/\_/-|_|_|_|-|_|\__,-|-/_/----\_\_|-|_|\__,-|_|---\__,-|--\_____|_|-|_|_|_|-|_|-|_|\___|_|--\__,_|___/--
---------------------------------------__/-|------------------__/-|------__/-|------------------------------------------------
--------------------------------------|___/------------------|___/------|___/-------------------------------------------------
--Version 1.1
--05/08/2021
--This file should be in gamedata\scripts\
--Checks the level for Chimeras, adds them to a table, randomly iterates through them every 2.5 - 5.0 seconds, if they are alive and angry at something then play a random growl sound at their position!
--Rechecks level for any newly spawned Chimeras every 60 seconds.
--All growl sounds made me using the existing Chimera sound files.
-- Edited by Tosox (31.01.2024)
MIN_GROWL_TIMEOUT = 2500
MAX_GROWL_TIMEOUT = 5000
tbl_mutants = {}
-- Needs to be a global variable in the script
-- The sound would otherwise stop instantly after playing
local growl_sound = nil
function get_random_elem(t)
local keys = {}
for k in pairs(t) do
table.insert(keys, k)
end
return t[keys[math.random(#keys)]]
end
function get_growl_sound(mutant)
-- Default (chimera growl)
local growl_type = "growl"
-- Lurker growl
if string.find(mutant:section(), "lurker") then
growl_type = "lurk"
end
return sound_object("tb_growls\\tb_" .. growl_type .. "_" .. tostring(math.random(1, 8)))
end
function play_mutant_growls()
-- Skip if there are no mutants
if is_empty(tbl_mutants) then
return
end
-- Get a random mutant
local rand_mutant = get_random_elem(tbl_mutants)
-- Little safety check because get_enemy still throws errors for some reason
if (not IsMonster(rand_mutant)) or (not rand_mutant:alive()) then
return
end
-- Skip if mutant isn't aggroed
if not rand_mutant:get_enemy() then
return
end
-- Determine the growl sound
growl_sound = get_growl_sound(rand_mutant)
if not growl_sound then
return
end
-- Stop if sound is already playing
if growl_sound:playing() then
growl_sound:stop()
end
-- Play growl sound
growl_sound:play_at_pos(rand_mutant, rand_mutant:position(), 0, sound_object.s3d)
end
function is_valid_mutant(obj)
return (obj) and ((string.find(obj:section(), "chimera")) or (string.find(obj:section(), "lurker")))
end
function monster_on_net_spawn(obj, se_obj)
if is_valid_mutant(obj) then
tbl_mutants[obj:id()] = obj
end
end
function monster_on_net_destroy(obj)
if is_valid_mutant(obj) then
tbl_mutants[obj:id()] = nil
end
end
function monster_on_death_callback(obj, who)
if is_valid_mutant(obj) then
tbl_mutants[obj:id()] = nil
end
end
function actor_on_first_update()
CreateTimeEvent("tbs_angry_chimera_growls", "growl", 0, function()
play_mutant_growls()
ResetTimeEvent("tbs_angry_chimera_growls", "growl", math.random(MIN_GROWL_TIMEOUT, MAX_GROWL_TIMEOUT) / 1000)
return false
end)
end
function on_game_start()
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
RegisterScriptCallback("monster_on_net_spawn", monster_on_net_spawn)
RegisterScriptCallback("monster_on_net_destroy", monster_on_net_destroy)
RegisterScriptCallback("monster_on_death_callback", monster_on_death_callback)
end
@@ -0,0 +1 @@
-- Empty to overwrite the original script since it's logic is moved to TB_Angry_Chimera_Growls.script
@@ -0,0 +1,79 @@
--[[
Adds another state to companion quick command for combat
(attack_only_actor_combat_enemy_state)
Author: Singustromo <singustromo at disroot.org>
--]]
local parent = axr_companions
combat_states = {
"set_companion_to_attack_state",
"set_companion_to_attack_only_actor_combat_enemy_state",
"set_companion_to_ignore_combat_state"
}
CycleCompanionsCombatMode = parent.cycle_companions_combat_mode
function parent.cycle_companions_combat_mode(force_mode, no_msg)
parent.cycle_state(combat_states, "combat", true, force_mode, no_msg )
end
SetCompanionSquadCombatMode = parent.set_companion_squad_combat_mode
function parent.set_companion_squad_combat_mode(mode,npc,squad)
local f = this[combat_states[mode]]
if (not f) then return end
squad = squad or get_object_squad(npc)
if not (squad and squad.commander_id) then return end
if (axr_task_manager.hostages_by_id[squad:commander_id()]) then return end
for k in squad:squad_members() do
local member = db.storage[k.id] and db.storage[k.id].object
if (member and member:alive()) then
f(member)
end
end
end
-- We circumvent the on_str and off_str for combat command as we cycle through more than one command
originalUIWheelCompanionUpdate = parent.UIWheelCompanion.Update
function parent.UIWheelCompanion:Update()
CUIScriptWnd.Update(self)
-- Needs unlocalizer
local cw_commands = parent.cw_commands
for cmd,element in pairs(self.cmd_btn) do
if element:IsCursorOverWindow() then
local str
if cmd == 'combat' then -- This is our cycle patch
local state = get_next_combat_state()
str = state and string.format("st_%s", state)
else
str = (self.states[cmd])
and cw_commands[cmd].off_str
or cw_commands[cmd].on_str
end
self.hint:SetText(str and game.translate_string(str) or "")
return
end
end
self.hint:SetText("")
end
-- Needs unlocalizer (_current_states)
function get_next_combat_state()
local current_states = parent._current_states
if (hg_companion) then
local group = hg_companion.return_group()
current_states = current_states and current_states["squad_" .. group]
end
if not current_states then return end
return (current_states.combat +1 > #combat_states)
and combat_states[1]
or combat_states[current_states.combat +1]
end
@@ -0,0 +1,109 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Darkscape Vehicle Spawner
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Source : https://github.com/Grokitach/Stalker_GAMMA/blob/main/G.A.M.M.A/modpack_addons/G.A.M.M.A.%20Vehicles%20in%20Darkscape/gamedata/scripts/grok_vehicles_spawner.script
Date : 02.10.2023
Last Edit : 08.02.2024
=====================================================================
--]]
-- Do not spawn 'veh_zaz_968' since the mesh path for the destroyed object is invalid
vehicle_spawn_table = {
veh0 = {
type = "veh_tr13",
location = vector():set(-541.1818, -1.7894, -454.6665),
level_id = 12964,
game_vertex_id = 1396
},
veh1 = {
type = "veh_zaz",
location = vector():set(-298.5625, -54998, -504.7299),
level_id = 94992,
game_vertex_id = 1127
},
veh2 = {
type = "veh_niva",
location = vector():set(418.9117, 7.1031, -363.6832),
level_id = 900374,
game_vertex_id = 1190
},
veh3 = {
type = "veh_uaz_01",
location = vector():set(413.6206, -0.2639, -353.2987),
level_id = 890855,
game_vertex_id = 1190
},
veh4 = {
type = "veh_uaz_02",
location = vector():set(384.9842, -0.7985, -449.0479),
level_id = 840565,
game_vertex_id = 1190
},
veh5 = {
type = "veh_niva",
location = vector():set(423.7749, -0.7194, 192.2425),
level_id = 909672,
game_vertex_id = 1190
},
veh6 = {
type = "veh_tr13",
location = vector():set(-363.2407, 2.7025, 574.1415),
level_id = 65611,
game_vertex_id = 1190
},
veh7 = {
type = "veh_kamaz",
location = vector():set(-348.1494, 3.0001, 584.8413),
level_id = 72678,
game_vertex_id = 1190
},
veh8 = {
type = "veh_zaz",
location = vector():set(-499.8231, 0.8414, -458.8291),
level_id = 23361,
game_vertex_id = 1190
},
veh9 = {
type = "veh_niva",
location = vector():set(291.0005, 1.5107, -195.3195),
level_id = 717159,
game_vertex_id = 1190
},
veh10 = {
type = "veh_zaz",
location = vector():set(-173.8721, 2.1128, -165.7107),
level_id = 189139,
game_vertex_id = 1190
}
}
local did_spawn_darkscape_vehicles = false
function actor_on_first_update()
if did_spawn_darkscape_vehicles then
return
end
did_spawn_darkscape_vehicles = true
for _, veh in pairs(vehicle_spawn_table) do
alife():create(veh.type, veh.location, veh.level_id, veh.game_vertex_id)
end
end
function save_state(m_data)
m_data.dvs_did_spawn_darkscape_vehicles = did_spawn_darkscape_vehicles
end
function load_state(m_data)
did_spawn_darkscape_vehicles = m_data.dvs_did_spawn_darkscape_vehicles
end
function on_game_start()
RegisterScriptCallback("save_state", save_state)
RegisterScriptCallback("load_state", load_state)
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
end
@@ -0,0 +1,21 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Mysteries of the Zone Unlocker
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Credits : Hisalute
Date : 19.01.2024
Last Edit : 19.01.2024
=====================================================================
--]]
function on_xml_read()
RegisterScriptCallback("on_xml_read", function(xml_file_name, xml_obj)
if xml_file_name == [[gameplay\character_desc_marsh.xml]] then
local res = xml_obj:query("specific_character[id=mar_smart_terrain_doc_doctor]")
if is_not_empty(res) then
xml_obj:insertFromXMLString([[<actor_dialog>cit_doctor_main_dialog</actor_dialog>]], res[1], #res[1].kids)
end
end
end)
end
@@ -0,0 +1,19 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: ShoC Poltergeists
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 02.12.2024
Last Edit : 02.12.2024
=====================================================================
--]]
bind_monster_generic_object_binder_death_callback = bind_monster.generic_object_binder.death_callback
bind_monster.generic_object_binder.death_callback = function(self, victim, who)
local safe_release_manager_release = safe_release_manager.release
safe_release_manager.release = function(se_obj) end
bind_monster_generic_object_binder_death_callback(self, victim, who)
safe_release_manager.release = safe_release_manager_release
end
@@ -0,0 +1,75 @@
--[[
ADJACENT STASH REWARDS (Tosox Mini Mods Repo)
[https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo]
This mod spawns rewarded stashes in the levels connected to
your current level. So say bye to stash rewards in
Pripyat while you are still exploring Cordon.
Author: Singustromo <singustromo at disroot.org>
--]]
-- Superseded functions
GetRandomStash = treasure_manager.get_random_stash
BoxInSameMap = treasure_manager.box_in_same_map
--------------------------
-- Monkey Patches --
--------------------------
-- We always force local stashes
function treasure_manager.get_random_stash(no_spot, hint, spawn_local, inv_box)
-- Exception, so stash contents are created on first init
-- It's called like this on first init in on_game_load():
-- get_random_stash(true, "stash")
local first_init = no_spot and (hint == "stash") and not (spawn_local and inv_box)
spawn_local = not first_init -- Kinda scuffed but not compute intensive
return GetRandomStash(no_spot, hint, spawn_local, inv_box)
end
-- Here we change the logic to find out which stashes are considered local
function treasure_manager.box_in_same_map(id)
if (not id) then return end
local obj1, obj2 = alife():actor(), alife_object(id)
return is_on_nearby_level(obj1, obj2)
end
-----------------------------
-- Utility Functions --
-----------------------------
function is_on_nearby_level(se_obj_1, se_obj_2)
local obj1_level, obj2_level = get_obj_level(se_obj_1), get_obj_level(se_obj_2)
if not (obj1_level and obj2_level) then return end
return (obj1_level == obj2_level)
or level_directly_connected(obj1_level, obj2_level)
end
function get_obj_level(se_obj)
if (not se_obj) then return end
local sim, gg = alife(), game_graph()
return sim:level_name(gg:vertex(se_obj.m_game_vertex_id):level_id())
end
-- output of next() is nil when table is empty
function is_table_empty(tbl)
return not (tbl and next(tbl))
end
-- Uses txr_routes.routes to determine if those levels are adjacent
-- Does not account for additional transitions made by e.g. Extra level Transitions
-- as that addon circumvents this vanilla system completely.
function level_directly_connected(section_1, section_2)
local routes = txr_routes.routes
local map1, map2 = txr_routes.get_map(section_1), txr_routes.get_map(section_2)
if not (map1 and map2) then return end
local route = (routes[map1]) and routes[map1][map2]
or (routes[map2] and routes[map2][map1])
return not is_table_empty(route)
end
@@ -0,0 +1,32 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Arena Loadout contains Knife
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Credits : Jhon_Doe
Date : 26.01.2024
Last Edit : 26.01.2024
=====================================================================
--]]
KNIFE = "wpn_knife"
orig_xr_effects_bar_arena_teleport = xr_effects.bar_arena_teleport
xr_effects.bar_arena_teleport = function(...)
orig_xr_effects_bar_arena_teleport(...)
CreateTimeEvent("arena_loadout_contains_knife", "check_if_already_has_knife", 0.25, function()
local has_knife = false
db.actor:iterate_inventory(function(actor, itm)
if (not has_knife) and (IsMelee(itm)) then
has_knife = true
end
end, db.actor)
if not has_knife then
alife_create_item(KNIFE, db.actor)
end
return true
end)
end
@@ -0,0 +1,51 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Companions dont blow Disguises Enhanced
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Credits : Vintar0
Date : 31.01.2024
Last Edit : 10.03.2024
=====================================================================
--]]
-- Enable companions to not blow the disguise
orig_gameplay_disguise_npc_on_update = gameplay_disguise.npc_on_update
gameplay_disguise.npc_on_update = function(npc)
if (not gameplay_disguise.is_enabled) or (not gameplay_disguise.default_comm) or (not db.actor) then
return
end
local id = npc:id()
if (npc:see(db.actor)) and (npc:dont_has_info("npcx_is_companion")) then
orig_gameplay_disguise_npc_on_update(npc)
-- Copied from gameplay_disguise.script
elseif gameplay_disguise.npcs_memory[id] then
gameplay_disguise.npcs_memory[id].first_seen = nil
local last_seen = utils_data.CTime_from_table(gameplay_disguise.npcs_memory[id].last_seen)
local time_passes = game.get_game_time():diffSec(last_seen)
if (time_passes > gameplay_disguise.npcs_memory[id].memo) then
gameplay_disguise.npcs_memory[id] = nil
end
end
end
-- Allow changing outfits with companions around
orig_gameplay_disguise_anybody_see = gameplay_disguise.anybody_see
gameplay_disguise.anybody_see = function(t)
local actor = db.actor
for i=1, #db.OnlineStalkers do
local st = db.storage[db.OnlineStalkers[i]]
local npc = st and st.object or level.object_by_id(db.OnlineStalkers[i])
if (npc and IsStalker(npc,npc:clsid()) and npc:alive()) then
if t then
if t[npc:community()] and (npc:see(actor)) and (npc:dont_has_info("npcx_is_companion")) then
return true
end
elseif (npc:see(actor)) and (npc:dont_has_info("npcx_is_companion")) then
return true
end
end
end
return false
end
@@ -0,0 +1,67 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Disassembling Outfits gives Patches
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 26.01.2024
Last Edit : 27.02.2024
=====================================================================
--]]
local patch_to_give = nil
orig_item_parts_disassembly_outfit = item_parts.disassembly_outfit
item_parts.disassembly_outfit = function(obj, obj_d)
if math.random() < get_mcm_config("patch_chance") then
local outfit_comm = ini_sys:r_string_ex(obj:section(), "community")
if (outfit_comm) and (outfit_comm ~= "") then
local patch_section = gameplay_disguise.get_patch(outfit_comm, true)
local is_unpatched = se_load_var(obj:id(), obj:name(), "unpatched")
if (not is_unpatched) and (patch_section) then
patch_to_give = patch_section
end
end
end
orig_item_parts_disassembly_outfit(obj, obj_d)
end
orig_item_parts_timer_disassembly_outfit = item_parts.timer_disassembly_outfit
item_parts.timer_disassembly_outfit = function(npc_id, result_details, result_conditions, name)
-- Insert the patch into the disassembly parts list
if patch_to_give then
table.insert(result_details, patch_to_give)
patch_to_give = nil
end
return orig_item_parts_timer_disassembly_outfit(npc_id, result_details, result_conditions, name)
end
--===========================================================================
--
-- MCM
--
--===========================================================================
local cc = table.concat
local MCM_ROOT_ID = "tmmr"
local MCM_MODULE_ID = "outfits_gives_patches"
defaults = {
["patch_chance"] = 0.15
}
function get_mcm_config(key)
local path = cc({ MCM_ROOT_ID, MCM_MODULE_ID, key }, "/")
if ui_mcm then return ui_mcm.get(path) else return defaults[key] end
end
function on_mcm_load()
return {
id = MCM_MODULE_ID, sh = true, gr = {
{ id = "title", type = "slide", link = "ui_options_slider_night", text = cc({ "ui_mcm", MCM_ROOT_ID, MCM_MODULE_ID, "title" }, "_"), size = { 512, 50 }, spacing = 20 },
{ id = "patch_chance", type = "track", val = 2, min = 0.0, max = 1.0, step = 0.01, def = defaults["patch_chance"] }
}
}, MCM_ROOT_ID
end
@@ -0,0 +1,29 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Dynamic News Heard Melee Fix
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 07.01.2024
Last Edit : 31.01.2024
=====================================================================
--]]
orig_dnm_gossip_death_by_stalker = dynamic_news_manager.DynamicNewsManager.GossipDeathByStalker
dynamic_news_manager.DynamicNewsManager.GossipDeathByStalker = function(self, victim, who, comm)
local cls = dynamic_news_helper.GetWeaponClass(who)
if cls == 6 then
return false
end
return orig_dnm_gossip_death_by_stalker(self, victim, who, comm)
end
orig_dnm_gossip_death_of_mutant = dynamic_news_manager.DynamicNewsManager.GossipDeathOfMutant
dynamic_news_manager.DynamicNewsManager.GossipDeathOfMutant = function(self, victim, who, comm)
local cls = dynamic_news_helper.GetWeaponClass(who)
if cls == 6 then
return false
end
return orig_dnm_gossip_death_of_mutant(self, victim, who, comm)
end
@@ -0,0 +1,38 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Dynamic News Task Gossip Fix
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 07.01.2024
Last Edit : 19.01.2024
=====================================================================
--]]
orig_dnm_gossip_task_repeat_timeout = dynamic_news_manager.DynamicNewsManager.GossipTaskRepeatTimeout
dynamic_news_manager.DynamicNewsManager.GossipTaskRepeatTimeout = function(self, task_id)
--printf(">>> Dyn News: GossipTaskRepeatTimeout - call")
local story_id = task_id:sub(1,-8)
local obj = get_story_object(story_id)
if not (obj) then
return false
end
local sender = self:FindSpeakerNoVictim(nil,nil,true)
if (not sender) then
return false
end
-- Note: used the wrong translations for some reason
-- local tbl = utils_data.collect_translations("st_dyn_news_gossip_hostage_",true)
local tbl = utils_data.collect_translations("st_dyn_news_gossip_task_",true)
if (not tbl) then
return false
end
local Se = strformat("%s, %s",sender:character_name(),dynamic_news_helper.GetCommunityDescription(sender,6))
local msg = strformat(tbl[math.random(#tbl)],obj:character_name())
self:PushToChannel(sender:character_community(),{Mg=msg,Ic=sender:character_icon(),Snd="news",Se=Se,It="npc"})
return true
end
@@ -0,0 +1,76 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Keep Task Items on Move All
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Credits : Utjan
Date : 07.01.2024
Last Edit : 19.01.2024
=====================================================================
--]]
local do_move_all = false
orig_ui_inventory_put_all = ui_inventory.UIInventory.LMode_PutAll
ui_inventory.UIInventory.LMode_PutAll = function(self)
do_move_all = true
orig_ui_inventory_put_all(self)
do_move_all = false
end
function is_task_item(obj)
if not db.actor then
return false
end
if not obj then
return false
end
local sec = obj:section()
local task_info = task_manager.get_task_manager().task_info
local _multifetch_data = nil
for tid, _ in pairs(task_info) do
local status = task_info[tid].last_check_task
if (status ~= "complete") and (status ~= "fail") then
-- Fetch
local fetch_sec = load_var(db.actor, tid .. "_fetch")
if (fetch_sec) and (fetch_sec == sec) then
return true
end
-- Delivery
local delivery_table = load_var(db.actor, tid)
if (delivery_table) and (type(delivery_table) == "table") and (delivery_table.item_1_sec) and (delivery_table.item_1_sec == sec) then
return true
end
-- Multi fetch
_multifetch_data = _multifetch_data or alife_storage_manager.get_state().multifetch_data
local required_items = _multifetch_data and _multifetch_data[tid] and _multifetch_data[tid].required_items
if required_items then
for k, _ in pairs(required_items) do
if required_items[k].sec == sec then
return true
end
end
end
local optional_items = _multifetch_data and _multifetch_data[tid] and _multifetch_data[tid].optional_items
if optional_items then
for k, _ in pairs(optional_items) do
if optional_items[k].sec == sec then
return true
end
end
end
end
end
end
function ActorMenu_on_item_before_move(flags, npc_id, obj, mode, bag)
flags.ret_value = flags.ret_value and not (do_move_all and is_task_item(obj))
end
function on_game_start()
RegisterScriptCallback("ActorMenu_on_item_before_move", ActorMenu_on_item_before_move)
end
@@ -0,0 +1,24 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Keep Torn Patches
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 19.11.2023
Last Edit : 26.01.2024
=====================================================================
--]]
orig_menu_patch_action = gameplay_disguise.menu_patch_action
gameplay_disguise.menu_patch_action = function(obj)
orig_menu_patch_action(obj)
-- Determine the patch item and give it back if it was torn
local outfit_comm = ini_sys:r_string_ex(obj:section(), "community")
if (outfit_comm) and (outfit_comm ~= "") and (gameplay_disguise.possible_factions[outfit_comm]) then
local patch_section = gameplay_disguise.get_patch(outfit_comm, true)
local is_unpatched = se_load_var(obj:id(), obj:name(), "unpatched")
if (is_unpatched) and (patch_section) then
alife_create_item(patch_section, db.actor)
end
end
end
@@ -0,0 +1,38 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: No Weapon Drop from Damage
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Singustromo, Tosox
Credits : Great_Day
Date : 31.01.2024
Last Edit : 31.01.2024
=====================================================================
--]]
-- Disable item drop from NPC punches
xrs_facer.enable_drop_item = false
-- Disable neutral NPCs punching you
orig_xr_meet_meet_manager_update = xr_meet.Cmeet_manager.update
xr_meet.Cmeet_manager.update = function(self)
local abuse = xr_logic.pick_section_from_condlist(db.actor, self.npc, self.a.abuse)
if self.abuse_mode ~= abuse then
xr_abuse.disable_abuse(self.npc)
self.abuse_mode = abuse
end
orig_xr_meet_meet_manager_update(self)
end
-- Disable weapon drop on heavy hits
orig_actor_effects_update_impact = actor_effects.Update_Impact
actor_effects.Update_Impact = function(actor)
local active_item = actor:active_item()
local item_section = active_item and active_item:section()
if (active_item) and (not actor_effects.opt.health.no_drop_wnp[item_section]) then
actor_effects.opt.health.no_drop_wnp[item_section] = true
end
orig_actor_effects_update_impact(actor)
end
@@ -0,0 +1,66 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: NPC Wounded Animation Fix
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 11.01.2024
Last Edit : 27.02.2024
=====================================================================
--]]
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 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
local transfer_to_inv = (get_mcm_config("handle_weapon") == 0)
if (get_mcm_config("handle_weapon") == 2) then
transfer_to_inv = (keep_guns_on_bodies ~= nil)
end
if transfer_to_inv then
npc:transfer_item(item, npc)
else
death_manager.set_weapon_drop_condition(npc, item)
npc:drop_item(item)
end
end
end
--===========================================================================
--
-- MCM
--
--===========================================================================
local cc = table.concat
local MCM_ROOT_ID = "tmmr"
local MCM_MODULE_ID = "npc_wounded_anim_fix"
defaults = {
["handle_weapon"] = 0
}
function get_mcm_config(key)
local path = cc({ MCM_ROOT_ID, MCM_MODULE_ID, key }, "/")
if ui_mcm then return ui_mcm.get(path) else return defaults[key] end
end
function on_mcm_load()
return {
id = MCM_MODULE_ID, sh = true, gr = {
{ id = "title", type = "slide", link = "ui_options_slider_player", text = cc({ "ui_mcm", MCM_ROOT_ID, MCM_MODULE_ID, "title" }, "_"), size = { 512, 50 }, spacing = 20 },
{ id = "handle_weapon", type = ui_mcm.kb_mod_radio, val = 2, def = defaults["handle_weapon"],
content = {
{ 0, "tmmr_inv_weapon" },
{ 1, "tmmr_drop_weapon" },
{ 2, "tmmr_adapt_weapon" }
}
}
}
}, MCM_ROOT_ID
end
@@ -0,0 +1,43 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Keep Favorites on Quick Release
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 17.11.2023
Last Edit : 27.01.2024
=====================================================================
--]]
orig_keep_items = nil
keep_items_script = nil
if actor_stash_patch then
keep_items_script = actor_stash_patch
else
keep_items_script = item_backpack
end
orig_item_backpack_actor_on_item_use = item_backpack.actor_on_item_use
item_backpack.actor_on_item_use = function(obj)
-- Check if we should keep favs
if (not obj) or (obj:section() ~= "itm_actor_backpack") or (not zzz_rax_sortingplus_mcm) then
orig_item_backpack_actor_on_item_use(obj)
return
end
-- Insert original keep items once
if not orig_keep_items then
orig_keep_items = {}
copy_table(orig_keep_items, keep_items_script.keep_items)
end
-- Assign original keep items
keep_items_script.keep_items = dup_table(orig_keep_items)
-- Add current favorites
for k, _ in pairs(zzz_rax_sortingplus_mcm.favorite_itms) do
keep_items_script.keep_items[k] = true
end
orig_item_backpack_actor_on_item_use(obj)
end
@@ -0,0 +1,49 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Quick Load loads Last Save
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 19.12.2023
Last Edit : 19.01.2024
=====================================================================
--]]
orig_action_quick_load = level_input.action_quick_load
level_input.action_quick_load = function(dik, bind)
-- You must check in your callback, and set flags.ret = true if an action took place
level_input.flags.ret = false
SendScriptCallback("on_before_load_input", dik, bind, level_input.flags)
if (level_input.flags.ret == true) then
return true
end
if not (device():is_paused()) then
device():pause(true)
end
local flist = getFS():file_list_open_ex("$game_saves$", bit_or(FS.FS_ListFiles, FS.FS_RootOnly), "*" .. ui_load_dialog.saved_game_extension)
local f_cnt = flist and flist:Size() or 0
if (f_cnt > 0) then
flist:Sort(FS.FS_sort_by_modif_down)
-- Modified code
local file_name = flist:GetAt(0):NameFull():sub(0, -6):lower()
exec_console_cmd("load " .. file_name)
--[[
-- Original code
for it=0, f_cnt-1 do
local file_name = flist:GetAt(it):NameFull():sub(0,-6):lower()
-- grab last modified quicksave
if (string.match(file_name,".* %- quicksave_(%d+)")) then
exec_console_cmd("load " .. file_name)
return true
end
end
]]
end
return true
end
@@ -0,0 +1,28 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Repaired Starter Gear
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 17.11.2023
Last Edit : 19.01.2024
=====================================================================
--]]
orig_new_game_equipment = itms_manager.new_game_equippment
itms_manager.new_game_equippment = function(...)
orig_new_game_equipment(...)
-- Repair equipment
local function repair_items(actor, itm)
local sec = itm:section()
if (IsWeapon(itm) and (sec ~= "wpn_binoc_inv")) or IsOutfit(itm) or IsHeadgear(itm) or IsItem("device", sec) then
itm:set_condition(1)
end
end
db.actor:iterate_inventory(repair_items, db.actor)
-- Override autosave again
exec_console_cmd("save " .. user_name() .. " - autosave")
return true
end
@@ -0,0 +1,54 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Surge Crow Killer Fix
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 12.04.2024
Last Edit : 22.04.2024
=====================================================================
--]]
surge_manager_CSurgeManager_kill_crows_at_pos = surge_manager.CSurgeManager.kill_crows_at_pos
surge_manager.CSurgeManager.kill_crows_at_pos = function(self, pos, delay)
local h = hit()
h.type = hit.fire_wound
h.power = 0.9
h.impulse = 0.0
h.direction = VEC_Z
h.draftsman = db.actor
h:bone("bip01_pelvis") -- Tosox: add a bone so Entity::HitSignal in the engine is executed
for k, id in pairs(bind_crow.crow_storage) do
if delay then
CreateTimeEvent("delay_kill_crow", id, math.random(1, 3), surge_manager.make_dead_crow, id, h)
else
local crow = level.object_by_id(id)
if (crow and crow:alive() and pos < crow:position().z) then
crow:hit(h)
end
end
end
end
psi_storm_manager_CPsiStormManager_kill_crows_at_pos = psi_storm_manager.CPsiStormManager.kill_crows_at_pos
psi_storm_manager.CPsiStormManager.kill_crows_at_pos = function(self, pos)
-- self.crowParticles={}
local h = hit()
h.type = hit.fire_wound
h.power = 1.0
h.impulse = 0
h.direction = VEC_Z
h.draftsman = db.actor
h:bone("bip01_pelvis") -- Tosox: add a bone so Entity::HitSignal in the engine is executed
for k, v in pairs(bind_crow.crow_storage) do
local obj = alife_object(v)
if obj then
local crow = level.object_by_id(obj.id)
if (crow and crow:alive() and distance_2d(pos, crow:position()) < 25) then
-- crow:start_particles("crommcruac\\electrocute_crow","bip01_pelvis")
-- self.crowParticles[k]=particles_object("crommcruac\\electrocute_crow")
-- self.crowParticles[k]:play_at_pos(crow:position())
crow:hit(h)
end
end
end
end
@@ -0,0 +1,42 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Talk to Everyone
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Credits : Great_Day
Date : 31.01.2024
Last Edit : 31.01.2024
=====================================================================
--]]
orig_xr_meet_process_npc_usability = xr_meet.process_npc_usability
xr_meet.process_npc_usability = function(npc)
if (character_community(npc) == "zombied") then
npc:disable_talk()
return
end
if (IsWounded(npc)) then
local st = db.storage[npc:id()]
if (npc:relation(db.actor) >= game_object.enemy and st and st.victim_surrender ~= AC_ID) then
npc:disable_talk()
else
local wounded = db.storage[npc:id()].wounded
if wounded.enable_talk then
npc:enable_talk()
else
npc:disable_talk()
end
end
return
end
-- Special case for doc to force him to talk
if (npc:section() == "mar_smart_terrain_doc_doctor") then
npc:enable_talk()
return
end
-- Override
npc:enable_talk()
end
@@ -0,0 +1,239 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Auto Equip Gear
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 11.01.2024
Last Edit : 02.12.2024
=====================================================================
--]]
function IsBinoc(o, c)
if not (c) then
c = o and o:clsid()
end
return c and (c == clsid.wpn_binocular_s or c == clsid.wpn_binocular)
end
function IsTorch(o, c)
if not (c) then
c = o and o:clsid()
end
return c and (c == clsid.device_torch_s or c == clsid.device_torch)
end
function IsPDA(o, c)
if not (c) then
c = o and o:clsid()
end
return c and (c == clsid.obj_pda_s or c == clsid.device_pda)
end
--=====================================================================
-- Flag to pause animations
pause_animations = false
-- General function to patch methods
function patch_function(target_table, function_name)
if target_table and target_table[function_name] then
local original_function = target_table[function_name]
target_table[function_name] = function(...)
if pause_animations then
return
end
return original_function(...)
end
end
end
-- Patch specific functions
patch_function(actor_effects, "play_item_fx")
patch_function(outfit_animations, "on_item_to_slot")
patch_function(outfit_animations, "on_item_to_ruck")
patch_function(headgear_animations, "on_item_to_slot")
patch_function(headgear_animations, "on_item_to_ruck")
patch_function(headgear_animations, "on_item_drop")
--=====================================================================
function equip_gear()
local function gather_gear(actor, itm)
local sec = itm:section()
if IsMelee(itm) then
db.actor:move_to_slot(itm, 1)
elseif IsGrenade(itm) then
db.actor:move_to_slot(itm, 4)
elseif IsBinoc(itm) then
db.actor:move_to_slot(itm, 5)
elseif IsBolt(itm) then
db.actor:move_to_slot(itm, 6)
elseif IsOutfit(itm) then
db.actor:move_to_slot(itm, 7)
elseif IsPDA(itm) then
db.actor:move_to_slot(itm, 8)
elseif IsTorch(itm) then
db.actor:move_to_slot(itm, 10)
elseif IsItem("device", sec) then
db.actor:move_to_slot(itm, 9)
elseif IsHeadgear(itm) then
db.actor:move_to_slot(itm, 12)
elseif IsItem("backpack", sec) then
db.actor:move_to_slot(itm, 13)
end
end
db.actor:iterate_inventory(gather_gear, db.actor)
end
function empty_slots()
for i = 1, 13 do
local itm = db.actor:item_in_slot(i)
if itm then
db.actor:move_to_ruck(itm)
end
end
end
--=====================================================================
equipped_slots = {}
equipped_belt = {}
function save_equipped_slots()
-- Save all items in the slots
for i = 1, 13 do
local itm = db.actor:item_in_slot(i)
if itm then
equipped_slots[i] = itm:id()
end
end
-- Save all items in the belt
db.actor:iterate_belt(function(actor, itm)
table.insert(equipped_belt, itm:id())
end)
end
function restore_equipped_slots()
-- Restore all items from the slots
for i = 1, 13 do
if equipped_slots[i] then
local itm = level.object_by_id(equipped_slots[i])
if itm then
db.actor:move_to_slot(itm, i)
end
end
end
equipped_slots = {}
-- Wait until we equipped our outfit
CreateTimeEvent("tsx_auto_equip_gear", "equip_belt", 0.25, function()
-- Restore all items from the belt
for _, v in pairs(equipped_belt) do
local itm = level.object_by_id(v)
if itm then
db.actor:move_to_belt(itm)
end
end
equipped_belt = {}
return true
end)
end
--=====================================================================
orig_new_game_equipment = itms_manager.new_game_equippment
itms_manager.new_game_equippment = function(...)
orig_new_game_equipment(...)
-- Disable item animations
pause_animations = true
equip_gear()
-- Wait until we equipped our outfit
CreateTimeEvent("tsx_auto_equip_gear", "equip_gear", 0.25, function()
-- Override autosave again
exec_console_cmd("save " .. user_name() .. " - autosave")
-- Restore item animations
pause_animations = false
return true
end)
return true
end
orig_xr_effects_bar_arena_teleport = xr_effects.bar_arena_teleport
xr_effects.bar_arena_teleport = function(...)
-- Save the slots before entering the arena
save_equipped_slots()
-- Disable item animations
pause_animations = true
orig_xr_effects_bar_arena_teleport(...)
-- Wait until we received all arena items
CreateTimeEvent("tsx_auto_equip_gear", "equip_arena_enter", 0.25, function()
equip_gear()
return true
end)
end
orig_xr_effects_bar_arena_teleport_2 = xr_effects.bar_arena_teleport_2
xr_effects.bar_arena_teleport_2 = function(...)
orig_xr_effects_bar_arena_teleport_2(...)
-- MBo - Arena rebalance patch
if mbo_arena_monkeypatch then
-- give actor back his items that were taken
local box = get_story_object("bar_arena_inventory_box")
if (box) then
local function transfer_object_item(box, item)
box:transfer_item(item, db.actor)
end
box:iterate_inventory_box(transfer_object_item, box)
end
end
-- Wait until we received our items back
CreateTimeEvent("tsx_auto_equip_gear", "equip_arena_exit", 0.25, function()
-- Move the items that were equipped by default back into the backpack
empty_slots()
-- Wait until all items are back in the backpack
CreateTimeEvent("tsx_auto_equip_gear", "restore_equipped_slots", 0.25, function()
restore_equipped_slots()
-- Restore item animations
pause_animations = false
return true
end)
return true
end)
end
function save_state(m_data)
m_data.tsx_auto_equip_gear = {
["pause_animations"] = pause_animations,
["equipped_slots"] = equipped_slots,
["equipped_belt"] = equipped_belt
}
end
function load_state(m_data)
if m_data.tsx_auto_equip_gear then
pause_animations = m_data.tsx_auto_equip_gear.pause_animations
equipped_slots = m_data.tsx_auto_equip_gear.equipped_slots
equipped_belt = m_data.tsx_auto_equip_gear.equipped_belt
m_data.tsx_auto_equip_gear = nil
end
end
function on_game_start()
RegisterScriptCallback("save_state", save_state)
RegisterScriptCallback("load_state", load_state)
end
@@ -0,0 +1,34 @@
--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Stop Addon Log Spam
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 12.01.2024
Last Edit : 19.01.2024
=====================================================================
--]]
-- Zatura Autostack
if zatura_autostack then
zatura_autostack.printf = function(...) end
end
-- Custom Functor Autoinject
if custom_functor_autoinject then
custom_functor_autoinject.printf = function(...) end
end
-- Food, Drug and Drink Animations
if ea_prefetcher then
ea_prefetcher.printf = function(...) end
end
-- G.A.M.M.A. Close Quarter Combat
if grok_bo then
grok_bo.printf = function(...) end
end
-- DLTX Minimodpack: More drop from drugs
if zz_itms_manager_more_drops_from_drugs then
zz_itms_manager_more_drops_from_drugs.printf = function(...) end
end