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,27 @@
; Sights
![ekp8_02]
ms_count = 4
![ekp8_18]
ms_count = 4
![kp_sr2]
ms_count = 4
![okp]
ms_count = 2
![0kp2]
ms_count = 2
![okep77]
ms_count = 2
; Integrated
![wpn_sr2_veresk_sr2_upkit]
ms_count = 4
![wpn_ppsh_bas_uptacppsh]
ms_count = 4
@@ -0,0 +1,18 @@
; Sights
![ac10632]
ms_count = 4
![kobra]
ms_count = 4
; Integrated
![wpn_toz34_bull]
ms_count = 4
![wpn_ak74u_snag]
ms_count = 4
![wpn_pkm_zulus]
ms_count = 4
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_menu_mark_switch">
<text>Mark Switch</text>
</string>
<string id="ui_mcm_mark_switch_title">
<text>Mark switch</text>
</string>
<string id="ui_mcm_mark_switch_keybind">
<text>Reflex sight mark switch</text>
</string>
</string_table>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_menu_mark_switch">
<text>Mark Switch</text>
</string>
<string id="ui_mcm_mark_switch_title">
<text>Ïåðåêëþ÷åíèå ìàðêè</text>
</string>
<string id="ui_mcm_mark_switch_keybind">
<text>Ïåðåêëþ÷åíèå ìàðêè êîëëèìàòîðíîãî ïðèöåëà</text>
</string>
</string_table>
@@ -0,0 +1,198 @@
--[[
=====================================================================
Addon : Mark Switch
Link : https://www.moddb.com/mods/stalker-anomaly/addons/mark-switch
Author : party_50
Date : 10.02.2024
Last Edit : 16.09.2024
=====================================================================
--]]
local KEYBIND
local SOUND
local ALL_PARAMETERS = {
ms_count = "float",
ms_colors = "ms_color"
}
local current_marks = {}
local last_weapon_id
local inventory_upgrade_base = ui_inventory.UIInventory.RMode_UpgradeYes
local workshop_upgrade_base = ui_workshop.UIWorkshopUpgrade.Upgrade
function ui_inventory.UIInventory:RMode_UpgradeYes()
inventory_upgrade_base(self)
last_weapon_id = nil
end
function ui_workshop.UIWorkshopUpgrade:Upgrade()
workshop_upgrade_base(self)
last_weapon_id = nil
end
function init()
SOUND = sound_object('interface\\mark_adjust')
end
function on_option_change()
KEYBIND = z_mark_switch_mcm.get_config("keybind")
end
function get_mark_count(section)
return ini_sys:r_float_ex(section, "ms_count")
end
function get_mark_color(section, i)
local colors = parse_list(ini_sys, section, "ms_colors")
if not colors or #colors == 0 then
return nil
end
if i >= #colors then
i = #colors - 1
end
local color = ini_sys:r_string_ex("markswitch_colors", colors[i + 1])
if not color then
error("Unable to find color " .. colors[i + 1] .. " in markswitch_colors")
end
return color
end
function get_sight_section(wpn_section)
local parent = ini_sys:r_string_ex(wpn_section, "parent_section") or wpn_section
if #parent == #wpn_section then
return wpn_section
end
return wpn_section:sub(#parent + 2)
end
function parse_key(section, key, type, current_mark)
if key == "ms_count" then
return get_mark_count(section)
elseif key == "ms_colors" then
return get_mark_color(section, current_mark)
end
end
function parse_parameters(wpn)
local values = {}
local current_mark = current_marks[wpn:id()] or 0
values["ms_current"] = current_mark
wpn:iterate_installed_upgrades(
function(upgr_sec)
for key, type in pairs(ALL_PARAMETERS) do
values[key] = parse_key(upgr_sec, key, type, current_mark)
end
end
)
local wpn_section = wpn:section()
local sight_section = get_sight_section(wpn_section)
for key, type in pairs(ALL_PARAMETERS) do
if not values[key] then
values[key] = parse_key(wpn_section, key, type, current_mark)
end
if not values[key] then
values[key] = parse_key(sight_section, key, type, current_mark)
end
end
return values
end
function get(info, key, default)
if info[key] then
return info[key]
end
return default
end
function update_shader(wpn, info)
get_console():execute("markswitch_current " .. get(info, "ms_current", 0))
get_console():execute("markswitch_count " .. get(info, "ms_count", 1))
get_console():execute("markswitch_color " .. get(info, "ms_colors", "0, 0, 0, 0"))
end
function apply_next_mark(wpn, info)
SOUND:play(db.actor, 0, sound_object.s2d)
game.play_hud_anm("script\\mark_adjust.anm", 2, 2, 1, false, false)
local mark = get(info, "ms_current", 0)
mark = (mark + 1) % get(info, "ms_count", 1)
current_marks[wpn:id()] = mark
info = parse_parameters(wpn)
update_shader(wpn, info)
end
function on_key_release(key)
if key == KEYBIND then
if not (db.actor and db.actor:alive()) then
return
end
local wpn = db.actor:active_item()
if not wpn then
return
end
local info = parse_parameters(wpn)
if get(info, "ms_count", 1) < 2 then
return
end
apply_next_mark(wpn, info)
end
end
function actor_on_update()
if not (db.actor and db.actor:alive()) then
return
end
local wpn = db.actor:active_item()
if not wpn then
last_weapon_id = nil
return
end
if not last_weapon_id or last_weapon_id ~= wpn:id() then
last_weapon_id = wpn:id()
local info = parse_parameters(wpn)
update_shader(wpn, info)
end
end
function server_entity_on_unregister(obj)
if current_marks[obj.id] then
current_marks[obj.id] = nil
end
end
function save_state(m_data)
m_data.mark_switch_current_marks = current_marks
end
function load_state(m_data)
current_marks = type(m_data.mark_switch_current_marks) == "table" and m_data.mark_switch_current_marks or {}
end
function on_game_start()
init()
on_option_change()
RegisterScriptCallback("on_option_change", on_option_change)
RegisterScriptCallback("on_key_release", on_key_release)
RegisterScriptCallback("actor_on_update", actor_on_update)
RegisterScriptCallback("server_entity_on_unregister", server_entity_on_unregister)
RegisterScriptCallback("save_state", save_state)
RegisterScriptCallback("load_state", load_state)
end
@@ -0,0 +1,24 @@
-- If you don't use MCM, change your defaults from here
local defaults = {
["keybind"] = DIK_keys.DIK_EQUALS
}
function get_config(key)
if ui_mcm then
return ui_mcm.get("mark_switch/" .. key)
else
return defaults[key]
end
end
function on_mcm_load()
op = {
id = "mark_switch",
sh = true,
gr = {
{id = "title", type = "slide", link = "ui_options_slider_player", text = "ui_mcm_mark_switch_title", size = {512, 50}, spacing = 20},
{id = "keybind", type = "key_bind", val = 2, def = DIK_keys.DIK_EQUALS},
}
}
return op
end
@@ -0,0 +1,28 @@
#define MARK_ADJUST 1
uniform float4 markswitch_current;
uniform float4 markswitch_count;
int mark_sides()
{
int sides = 1;
while (sides * sides < int(markswitch_count.x))
{
sides += 1;
}
return sides;
}
float2 mark_adjust(float2 pos)
{
int sides = mark_sides();
float d_x = int(markswitch_current.x) % sides;
float d_y = int(markswitch_current.x) / sides;
float p_x = clamp(d_x + pos.x, d_x, d_x + 1) / sides;
float p_y = clamp(d_y + pos.y, d_y, d_y + 1) / sides;
return float2(p_x, p_y);
}
@@ -0,0 +1,29 @@
#include "common.h"
#include "mark_adjust.h"
uniform float4 m_hud_params;
float resize(float input, float factor, float offset)
{
return (input - 0.5 + offset) / factor + 0.5 - offset;
}
float4 main (p_flat I, float4 pos2d: SV_Position, float2 tc0: TEXCOORD0): SV_Target
{
float factor = screen_res.y / 2160.0;
factor = factor * (1.0 / (m_hud_params.z / 0.45)) * 0.75;
float size = 512.0 * factor;
pos2d.x = pos2d.x - (screen_res.x - size) / 2.0;
pos2d.y = pos2d.y - (screen_res.y - size) / 2.0;
pos2d.x = resize(pos2d.x, factor, 0);
pos2d.y = resize(pos2d.y, factor, 0);
#ifdef MARK_ADJUST
pos2d.xy = mark_adjust(pos2d.xy / 512.0) * 512.0 * mark_sides();
#endif
float4 color = s_base.Load(pos2d.xyz, 0) * m_hud_params.x;
return color;
}
@@ -0,0 +1,11 @@
function normal (shader, t_base, t_second, t_detail)
shader:begin ("model_def_lplanes","models_lfo_light_dot_weapons")
: fog (true)
: zb (true,false)
: blend (true,blend.srcalpha,blend.one)
: aref (true,0)
: sorting (2,true)
: distort (true)
shader:dx10texture ("s_base", t_base)
shader:dx10texture ("s_tonemap", "$user$tonemap")
end
Binary file not shown.
+28
View File
@@ -0,0 +1,28 @@
[General]
gameName=stalkeranomaly
modid=0
version=d2024.12.3.0
newestVersion=
category="-1,"
nexusFileStatus=1
installationFile=mark-switch.13.zip
repository=Nexus
ignoredVersion=
comments=
notes=
nexusDescription=
url=
hasCustomURL=false
lastNexusQuery=
lastNexusUpdate=
nexusLastModified=2024-12-03T23:38:18Z
nexusCategory=0
converted=false
validated=false
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
tracked=0
[installedFiles]
1\modid=0
1\fileid=0
size=1