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,83 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_weapon_cover_tilt_title">
<text>Weapon Cover Tilt</text>
</string>
<string id="ui_mcm_menu_weapon_cover_tilt">
<text>Weapon Cover Tilt</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_enabled">
<text>Enable</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_animation_speed">
<text>Animation inertia</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_animation_speed_desc">
<text>Less value is faster animation</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_animation_weight_coeff">
<text>Weight Factor</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_animation_weight_coeff_desc">
<text>The higher the number, the greater is effect of the weight of the weapon on the speed of the animation</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_trigger_radius">
<text>Trigger radius in meters</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_trigger_radius_magnitude">
<text>Weapon Length Modifier</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_trigger_radius_magnitude_desc">
<text>This will change trigger radius dependency on weapon length, with more value, there will be more difference between short and long weapons</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_consider_silencer">
<text>Consider attached silencers for trigger radius</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_consider_silencer_desc">
<text>Weapons with attachable silencers when they are attached will have increased trigger radius by about 0.1 meters</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_tilt_rattle">
<text>Rattle sound on tilting</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_x">
<text>Weapon position offset by X</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_x_desc">
<text>&lt; 0 - left. &gt; 0 - right</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_y">
<text>Weapon position offset by Y</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_y_desc">
<text>&lt; 0 - down. &gt; 0 - up.</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_z">
<text>Weapon position offset by Z</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_z_desc">
<text>&lt; 0 - backward. &gt; 0 - forward</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_yaw_variation">
<text>Weapon yaw variation.</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_yaw_variation_desc">
<text>When a weapon is raised, it will be randomly yawed by +- a given degree for more animation variation</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_roll_variation">
<text>Weapon roll variation</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_roll_variation_desc">
<text>When a weapon is raised, it will be randomly rolled by +- a given degree for more animation variation</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_enable_manual_tilt">
<text>Enable Manual Tilt</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_manual_tilt_key_bind">
<text>Manual Tilt Keybind</text>
</string>
</string_table>
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="windows-1251"?>
<string_table>
<string id="ui_mcm_weapon_cover_tilt_title">
<text>Ïîäúåì îðóæèÿ</text>
</string>
<string id="ui_mcm_menu_weapon_cover_tilt">
<text>Ïîäúåì îðóæèÿ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_enabled">
<text>Âêëþ÷èòü</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_animation_speed">
<text>Èíåðöèÿ àíèìàöèè</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_animation_speed_desc">
<text>×åì ìåíüøå - òåì áûñòðåå àíèìàöèÿ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_animation_weight_coeff">
<text>Êîýôôèöèåíò âåñà îðóæèÿ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_animation_weight_coeff_desc">
<text>×åì áîëüøå ÷èñëî, òåì áîëüøå âëèÿíèå âåñà îðóæèÿ íà ñêîðîñòü àíèìàöèè</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_trigger_radius">
<text>Äèñòàíöèÿ ñðàáàòûâàíèÿ â ìåòðàõ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_trigger_radius_magnitude">
<text>Êîýôôèöèåíò äëèíû îðóæèÿ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_trigger_radius_magnitude_desc">
<text>Çíà÷åíèå óñòàíàâëèâàåò, êàê ñèëüíî áóäåò âëèÿòü äëèíà îðóæèÿ íà ðàäèóñ ñðàáàòûâàíèÿ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_consider_silencer">
<text>Ó÷èòûâàòü ñúåìíûå ãëóøèòåëè äëÿ äèñòàíöèè ñðàáàòûâàíèÿ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_consider_silencer_desc">
<text>Îðóæèå ñî ñúåìíûìè ãëóøèòåëÿìè, êîãäà îíè ïðèêðåïëåíû, áóäåò èìåòü óâåëè÷åííûé ðàäèóñ ñðàáàòûâàíèÿ ïðèìåðíî íà 0,1 ìåòðà</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_tilt_rattle">
<text>Çâóê îðóæèÿ ïðè ïîäúåìå</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_x">
<text>Ñìåùåíèå ïîçèöèè îðóæèÿ ïî X</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_x_desc">
<text>&lt; 0 - âëåâî. &gt; 0 - âïðàâî</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_y">
<text>Ñìåùåíèå ïîçèöèè îðóæèÿ ïî Y</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_y_desc">
<text>&lt; 0 - âíèç. &gt; 0 - ââåðõ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_z">
<text>Ñìåùåíèå ïîçèöèè îðóæèÿ ïî Z</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_offset_z_desc">
<text>&lt; 0 - íàçàä. &gt; 0 - âïåðåä</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_yaw_variation">
<text>Âàðèàòèâíîñòü ïîâîðîòà îðóæèÿ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_yaw_variation_desc">
<text>Ïðè ïîäúåìå îðóæèÿ, îíî áóäåò ñëó÷àéíî ïîâåðíóòî íà +- çàäàííûé ãðàäóñ äëÿ áîëüøåé âàðèàòèâíîñòè àíèìàöèé</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_roll_variation">
<text>Âàðèàòèâíîñòü êðåíà îðóæèÿ</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_roll_variation_desc">
<text>Ïðè ïîäúåìå îðóæèÿ, îíî áóäåò ñëó÷àéíî êðåíèòüñÿ íà +- çàäàííûé ãðàäóñ äëÿ áîëüøåé âàðèàòèâíîñòè àíèìàöèé</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_enable_manual_tilt">
<text>Âêëþ÷èòü ðó÷íîé ïîäúåì</text>
</string>
<string id="ui_mcm_weapon_cover_tilt_manual_tilt_key_bind">
<text>Êëàâèøà ïîäúåìà îðóæèÿ</text>
</string>
</string_table>
@@ -0,0 +1,315 @@
-- Library for picking random values between two numbers in various ways
-- Contains easing functions based on https://github.com/bbor/stingray-easing-functions/blob/master/engine/easing.c
-- Rewritten in Lua by demonized
-- Usage
--[[
local random_funcs = demonized_randomizing_functions
local a = random_funcs.get_random_value(10, 30, 2)
local b = random_funcs.get_random_value(30, 52.69, random_funcs.QuadraticEaseInOut)
--]]
local sin = math.sin
local cos = math.cos
local sqrt = math.sqrt
local random = math.random
local M_PI = math.pi
local M_PI_2 = M_PI / 2
-- Pick a random float between min_cond and max_cond
-- If magnitude is number and > 1, then random values will be closer to min_cond
-- If magnitude is number and < 1, then random values will be closer to max_cond
-- If magnitude is easing function, then random value will be picked according to function graph
-- For more info on easing function, google easing or cubic-bezier functions or look here: https://github.com/bbor/stingray-easing-functions
function get_random_value(min_cond, max_cond, magnitude)
local min_cond = min_cond or 0
local max_cond = max_cond or 1
local magnitude = magnitude or 1
local rand = 1
if type(magnitude) == "function" then
rand = magnitude(random())
else
rand = random() ^ magnitude
end
if min_cond > max_cond then
max_cond, min_cond = min_cond, max_cond
end
local a = max_cond - min_cond
local b = a * rand
local c = min_cond + b
return c
end
-- Easing functions, you can use them for third argument in get_random_value or directlyin your script
-- Modeled after the line y = x
function LinearInterpolation(p)
return p
end
-- Modeled after the parabola y = x^2
function QuadraticEaseIn(p)
return p * p
end
-- Modeled after the parabola y = -x^2 + 2x
function QuadraticEaseOut(p)
return -(p * (p - 2))
end
-- Modeled after the piecewise quadratic
-- y = (1/2)((2x)^2) [0, 0.5)
-- y = -(1/2)((2x-1)*(2x-3) - 1) [0.5, 1]
function QuadraticEaseInOut(p)
if(p < 0.5) then
return 2 * p * p
else
return (-2 * p * p) + (4 * p) - 1
end
end
-- Modeled after the cubic y = x^3
function CubicEaseIn(p)
return p * p * p
end
-- Modeled after the cubic y = (x - 1)^3 + 1
function CubicEaseOut(p)
local f = (p - 1)
return f * f * f + 1
end
-- Modeled after the piecewise cubic
-- y = (1/2)((2x)^3) [0, 0.5)
-- y = (1/2)((2x-2)^3 + 2) [0.5, 1]
function CubicEaseInOut(p)
if(p < 0.5) then
return 4 * p * p * p
else
local f = ((2 * p) - 2)
return 0.5 * f * f * f + 1
end
end
-- Modeled after the quartic x^4
function QuarticEaseIn(p)
return p * p * p * p
end
-- Modeled after the quartic y = 1 - (x - 1)^4
function QuarticEaseOut(p)
local f = (p - 1)
return f * f * f * (1 - p) + 1
end
-- Modeled after the piecewise quartic
-- y = (1/2)((2x)^4) [0, 0.5)
-- y = -(1/2)((2x-2)^4 - 2) [0.5, 1]
function QuarticEaseInOut(p)
if(p < 0.5) then
return 8 * p * p * p * p
else
local f = (p - 1)
return -8 * f * f * f * f + 1
end
end
-- Modeled after the quintic y = x^5
function QuinticEaseIn(p)
return p * p * p * p * p
end
-- Modeled after the quintic y = (x - 1)^5 + 1
function QuinticEaseOut(p)
local f = (p - 1)
return f * f * f * f * f + 1
end
-- Modeled after the piecewise quintic
-- y = (1/2)((2x)^5) [0, 0.5)
-- y = (1/2)((2x-2)^5 + 2) [0.5, 1]
function QuinticEaseInOut(p)
if(p < 0.5) then
return 16 * p * p * p * p * p
else
local f = ((2 * p) - 2)
return 0.5 * f * f * f * f * f + 1
end
end
-- Modeled after quarter-cycle of sine wave
function SineEaseIn(p)
return sin((p - 1) * M_PI_2) + 1
end
-- Modeled after quarter-cycle of sine wave (different phase)
function SineEaseOut(p)
return sin(p * M_PI_2)
end
-- Modeled after half sine wave
function SineEaseInOut(p)
return 0.5 * (1 - cos(p * M_PI))
end
-- Modeled after shifted quadrant IV of unit circle
function CircularEaseIn(p)
return 1 - sqrt(1 - (p * p))
end
-- Modeled after shifted quadrant II of unit circle
function CircularEaseOut(p)
return sqrt((2 - p) * p)
end
-- CircularEaseOut with adjustable power
function CircularEaseOutPowered(p, power)
local power = power or 0.5
return ((2 - p) * p) ^ power
end
-- Modeled after the piecewise circular function
-- y = (1/2)(1 - sqrt(1 - 4x^2)) [0, 0.5)
-- y = (1/2)(sqrt(-(2x - 3)*(2x - 1)) + 1) [0.5, 1]
function CircularEaseInOut(p)
if(p < 0.5) then
return 0.5 * (1 - sqrt(1 - 4 * (p * p)))
else
return 0.5 * (sqrt(-((2 * p) - 3) * ((2 * p) - 1)) + 1)
end
end
-- Modeled after the exponential function y = 2^(10(x - 1))
function ExponentialEaseIn(p)
return (p == 0.0) and p or 2 ^ (10 * (p - 1))
end
-- Modeled after the exponential function y = -2^(-10x) + 1
function ExponentialEaseOut(p)
return (p == 1.0) and p or 1 - 2 ^ (-10 * p)
end
-- Modeled after the piecewise exponential
-- y = (1/2)2^(10(2x - 1)) [0,0.5)
-- y = -(1/2)*2^(-10(2x - 1))) + 1 [0.5,1]
function ExponentialEaseInOut(p)
if(p == 0.0 or p == 1.0) then
return p
end
if(p < 0.5) then
return 0.5 * 2^( (20 * p) - 10)
else
return -0.5 * 2^( (-20 * p) + 10) + 1
end
end
-- Modeled after the damped sine wave y = sin(13pi/2*x)*pow(2, 10 * (x - 1))
function ElasticEaseIn(p)
return sin(13 * M_PI_2 * p) * 2^( 10 * (p - 1))
end
-- Modeled after the damped sine wave y = sin(-13pi/2*(x + 1))*pow(2, -10x) + 1
function ElasticEaseOut(p)
return sin(-13 * M_PI_2 * (p + 1)) * 2^( -10 * p) + 1
end
-- Modeled after the piecewise exponentially-damped sine wave:
-- y = (1/2)*sin(13pi/2*(2*x))*pow(2, 10 * ((2*x) - 1)) [0,0.5)
-- y = (1/2)*(sin(-13pi/2*((2x-1)+1))*pow(2,-10(2*x-1)) + 2) [0.5, 1]
function ElasticEaseInOut(p)
if(p < 0.5) then
return 0.5 * sin(13 * M_PI_2 * (2 * p)) * 2^(10 * ((2 * p) - 1))
else
return 0.5 * (sin(-13 * M_PI_2 * ((2 * p - 1) + 1)) * 2^(-10 * (2 * p - 1)) + 2)
end
end
-- Modeled after the overshooting cubic y = x^3-x*sin(x*pi)
function BackEaseIn(p)
return p * p * p - p * sin(p * M_PI)
end
-- Modeled after overshooting cubic y = 1-((1-x)^3-(1-x)*sin((1-x)*pi))
function BackEaseOut(p)
local f = (1 - p)
return 1 - (f * f * f - f * sin(f * M_PI))
end
function BackEaseOutQuadratic(p)
local f = (1 - p)
return 1 - (f * f - f * sin(f * M_PI))
end
-- Modeled after the piecewise overshooting cubic function:
-- y = (1/2)*((2x)^3-(2x)*sin(2*x*pi)) [0, 0.5)
-- y = (1/2)*(1-((1-x)^3-(1-x)*sin((1-x)*pi))+1) [0.5, 1]
function BackEaseInOut(p)
if(p < 0.5) then
local f = 2 * p
return 0.5 * (f * f * f - f * sin(f * M_PI))
else
local f = (1 - (2*p - 1))
return 0.5 * (1 - (f * f * f - f * sin(f * M_PI))) + 0.5
end
end
function BounceEaseIn(p)
return 1 - BounceEaseOut(1 - p)
end
function BounceEaseOut(p)
if(p < 4/11.0) then
return (121 * p * p)/16.0
elseif(p < 8/11.0) then
return (363/40.0 * p * p) - (99/10.0 * p) + 17/5.0
elseif(p < 9/10.0) then
return (4356/361.0 * p * p) - (35442/1805.0 * p) + 16061/1805.0
else
return (54/5.0 * p * p) - (513/25.0 * p) + 268/25.0
end
end
function BounceEaseInOut(p)
if(p < 0.5) then
return 0.5 * BounceEaseIn(p*2)
else
return 0.5 * BounceEaseOut(p * 2 - 1) + 0.5
end
end
@@ -0,0 +1,259 @@
-- Optimized time events, using sorted arrays to peek only closest event to come
-- Designed to fully reimplement existing timed events with all its quirks
-- Unlike vanilla time events, doesn't require any checks
-- Written by demonized
local ev_queue = {}
local computed_ev_queue = {}
local math_floor = math.floor
local math_huge = math.huge
local table_insert = table.insert
local table_remove = table.remove
local has_alife_info = has_alife_info
local time_global = time_global
local pairs = pairs
local unpack = unpack
local tg = 0
local function print_table(table, subs)
local sub
if subs ~= nil then
sub = subs
else
sub = ""
end
for k,v in pairs(table) do
if type(v) == "table" then
print_table(v, sub.."["..k.."]----->")
elseif type(v) == "function" then
printf(sub.."%s = function",k)
elseif type(v) == "userdata" then
if (v.x) then
printf(sub.."%s = %s",k,utils_data.vector_to_string(v))
else
printf(sub.."%s = userdata", k)
end
elseif type(v) == "boolean" then
if v == true then
if(type(k)~="userdata") then
printf(sub.."%s = true",k)
else
printf(sub.."userdata = true")
end
else
if(type(k)~="userdata") then
printf(sub.."%s = false", k)
else
printf(sub.."userdata = false")
end
end
else
if v ~= nil then
printf(sub.."%s = %s", k,v)
else
printf(sub.."%s = nil", k,v)
end
end
end
end
local function queue_timer_compare(a, b)
return a.timer > b.timer
end
-- http://lua-users.org/wiki/BinaryInsert
local function binary_insert(t, value, fcomp)
-- Initialise compare function
local fcomp = fcomp or function(a, b) return a < b end
-- print_table(value)
-- Initialise numbers
local iStart, iEnd, iMid, iState = 1, #t, 1, 0
if iEnd == 0 then
t[1] = value
-- printf("adding in beginning table empty")
return 1
end
if fcomp(value, t[1]) then
-- printf("adding in beginning %s of %s", 1, iEnd)
table_insert(t, 1, value)
return 1
end
if not fcomp(value, t[iEnd]) then
-- printf("adding in end %s of %s", iEnd + 1, iEnd)
local pos = iEnd + 1
t[pos] = value
return pos
end
-- Get insert position
while iStart <= iEnd do
-- calculate middle
iMid = math_floor((iStart + iEnd) / 2)
-- compare
if fcomp(value, t[iMid]) then
iEnd, iState = iMid - 1, 0
else
iStart, iState = iMid + 1, 1
end
end
local pos = iMid + iState
-- printf("adding in middle %s of %s", pos, iEnd)
table_insert(t, pos, value)
return pos
end
local function refresh_ev_queue()
printf("refreshing time events")
empty_table(computed_ev_queue)
-- tg = time_global()
local t = computed_ev_queue
for ev_id,actions in pairs(ev_queue) do
for act_id,act in pairs(actions) do
if (act_id ~= "__size") then
local d = {
ev_id = ev_id,
act_id = act_id,
timer = act.timer,
f = act.f,
p = act.p
}
binary_insert(t, d, queue_timer_compare)
end
end
end
end
local function find_ev_queue(ev_id, act_id)
for i = 1, #computed_ev_queue do
local t = computed_ev_queue[i]
if t.ev_id == ev_id and t.act_id == act_id then
return i
end
end
end
local function remove_ev_queue(ev_id, act_id)
local pos = find_ev_queue(ev_id, act_id)
if pos then
return table_remove(computed_ev_queue, pos)
end
end
function CreateTimeEvent(ev_id,act_id,timer,f,...)
if not (ev_queue[ev_id]) then
ev_queue[ev_id] = {}
ev_queue[ev_id].__size = 0
end
if not (ev_queue[ev_id][act_id]) then
local new_timer = time_global() + timer*1000
ev_queue[ev_id][act_id] = {}
ev_queue[ev_id][act_id].timer = new_timer
ev_queue[ev_id][act_id].f = f
ev_queue[ev_id][act_id].p = {...}
ev_queue[ev_id].__size = ev_queue[ev_id].__size + 1
local d = {
ev_id = ev_id,
act_id = act_id,
timer = new_timer,
f = f,
p = {...}
}
binary_insert(computed_ev_queue, d, queue_timer_compare)
end
end
function RemoveTimeEvent(ev_id,act_id)
if (ev_queue[ev_id] and ev_queue[ev_id][act_id]) then
ev_queue[ev_id][act_id] = nil
ev_queue[ev_id].__size = ev_queue[ev_id].__size - 1
remove_ev_queue(ev_id, act_id)
end
end
function ResetTimeEvent(ev_id,act_id,timer)
if (ev_queue[ev_id] and ev_queue[ev_id][act_id]) then
local new_timer = time_global() + timer*1000
ev_queue[ev_id][act_id].timer = new_timer
local el = remove_ev_queue(ev_id, act_id)
el.timer = new_timer
binary_insert(computed_ev_queue, el, queue_timer_compare)
end
end
local tg_past = 0
local to_remove = {}
function ProcessEventQueue(force)
tg = time_global()
-- if tg > tg_past then
-- printf("tg %s", tg)
-- printf("computed")
-- print_table(computed_ev_queue)
-- tg_past = tg + 100
-- end
local force_refresh
for i = #computed_ev_queue, 1, -1 do
local t = computed_ev_queue[i] or (function()
force_refresh = true
return { timer = math_huge }
end)() -- Failsafe if event does not exist, refresh queue and postpone to next tick
if tg < t.timer then
break
end
if t.f(unpack(t.p)) == true then
local t1 = ev_queue[t.ev_id]
t1[t.act_id] = nil
t1.__size = t1.__size - 1
if t1.__size == 0 then
ev_queue[t.ev_id] = nil
end
to_remove[#to_remove + 1] = {
ev_id = t.ev_id,
act_id = t.act_id
}
end
end
if force_refresh then
refresh_ev_queue()
empty_table(to_remove)
elseif to_remove[1] then
for i = 1, #to_remove do
local t = to_remove[i]
remove_ev_queue(t.ev_id, t.act_id)
to_remove[i] = nil
end
empty_table(to_remove)
end
return false
end
local function process_queue()
ProcessEventQueue()
end
function on_game_start()
AddUniqueCall(process_queue)
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,123 @@
-- Table of weapons that have adjusted trigger radius for animation
-- Having value > 0 will increase the trigger radius
-- Having value < 0 will decrease the trigger radius
weapon_trigger_radii = {
["pri_a17_gauss_rifle"] = 0.2,
["wpn_9a91"] = -0.15,
["wpn_ace21"] = -0.1,
["wpn_ak102"] = -0.1,
["wpn_ak104"] = -0.1,
["wpn_ak105"] = -0.1,
["wpn_ak74u"] = -0.1,
["wpn_ak74u_camo"] = -0.1,
["wpn_ak74u_custom"] = -0.1,
["wpn_ak74u_old"] = -0.1,
["wpn_ak74u_snag"] = -0.1,
["wpn_ak74m_beard"] = 0.1,
["wpn_arisaka"] = 0.1,
["wpn_aug"] = -0.1,
["wpn_aug_custom"] = -0.1,
["wpn_aug_freedom"] = -0.1,
["wpn_aug_merc"] = -0.1,
["wpn_aug_modern"] = -0.1,
["wpn_aug_a1_bas"] = -0.1,
["wpn_aug_a1_custom_bas"] = -0.1,
["wpn_aug_a3_bas"] = -0.1,
["wpn_aug_a3_custom_bas"] = -0.1,
["wpn_bm16"] = -0.2,
["wpn_bm16_alt"] = -0.2,
["wpn_bm16_full"] = 0.2,
["wpn_bm16_full_alt"] = 0.2,
["wpn_dvl10"] = 0.2,
["wpn_dvl10_m1"] = 0.1,
["wpn_ddmv"] = 0.1,
["wpn_fal_aus"] = 0.1,
["wpn_fal_sa58_osw"] = 0,
["wpn_famas3"] = -0.1,
["wpn_fn2000"] = -0.1,
["wpn_fn2000_camo"] = -0.1,
["wpn_fn2000_custom"] = -0.1,
["wpn_fn2000_nimble"] = -0.1,
["wpn_fort500"] = -0.1,
["wpn_g43"] = 0.1,
["wpn_gauss"] = 0.2,
["wpn_groza"] = -0.1,
["wpn_groza_nimble"] = -0.1,
["wpn_hk417"] = 0.1,
["wpn_k98"] = 0.1,
["wpn_ks23_kaban"] = -0.1,
["wpn_kiparis"] = -0.2,
["wpn_l85"] = -0.1,
["wpn_l85_alt"] = -0.1,
["wpn_l85_custom"] = -0.1,
["wpn_l85_modern"] = -0.1,
["wpn_l85a2"] = -0.1,
["wpn_l85a2_alt"] = -0.1,
["wpn_l85a2_custom"] = -0.1,
["wpn_l85a2_modern"] = -0.1,
["wpn_l96a1"] = 0.2,
["wpn_l96a1m"] = 0.2,
["wpn_m4"] = -0.1,
["wpn_m4a1"] = -0.1,
["wpn_m4a1_camo"] = -0.1,
["wpn_m4a1_custom"] = -0.1,
["wpn_m4a1_freedom"] = -0.1,
["wpn_m60"] = 0.1,
["wpn_m79"] = -0.1,
["wpn_m82"] = 0.25,
["wpn_m98b"] = 0.25,
["wpn_mosin"] = 0.2,
["wpn_mp153"] = 0.2,
["wpn_mp5"] = -0.1,
["wpn_mp5_alt"] = -0.1,
["wpn_mp5_custom"] = -0.1,
["wpn_mp5_nimble"] = -0.1,
["wpn_mp7"] = -0.2,
["wpn_p90"] = -0.2,
["wpn_pkm"] = 0.2,
["wpn_pkm_zulus"] = 0.2,
["wpn_pkp"] = 0.2,
["wpn_pp2000"] = -0.2,
["wpn_protecta"] = -0.15,
["wpn_protecta_aim"] = -0.15,
["wpn_protecta_camo"] = -0.15,
["wpn_protecta_custom"] = -0.15,
["wpn_protecta_nimble"] = -0.15,
["wpn_rg-6"] = -0.1,
["wpn_rpg7"] = 0.4,
["wpn_rpk"] = 0.1,
["wpn_rpk74"] = 0.1,
["wpn_sig550_sniper"] = 0.1,
["wpn_sig552"] = -0.1,
["wpn_sr25"] = 0.1,
["wpn_sr2_m1"] = -0.15,
["wpn_sr2_veresk"] = -0.15,
["wpn_sv98"] = 0.2,
["wpn_sv98_custom"] = 0.2,
["wpn_svd"] = 0.2,
["wpn_svd_custom"] = 0.2,
["wpn_svd_nimble"] = 0.2,
["wpn_svt40"] = 0.2,
["wpn_svt40_modern"] = 0.2,
["wpn_toz34"] = 0.2,
["wpn_toz34_bull"] = 0.2,
["wpn_toz34_custom"] = 0.2,
["wpn_toz34_decor"] = 0.2,
["wpn_toz34_mark4"] = 0.2,
["wpn_toz34_obrez"] = -0.2,
["wpn_toz34_obrez_custom"] = -0.2,
["wpn_toz34_obrez_decor"] = -0.2,
["wpn_toz106"] = -0.2,
["wpn_trg"] = 0.2,
["wpn_ump45"] = -0.1,
["wpn_ump45_custom"] = -0.1,
["wpn_vihr"] = -0.1,
["wpn_vssk"] = 0.1,
["wpn_vz61"] = -0.22,
["wpn_vz61_alt"] = -0.22,
["wpn_vz61_camo"] = -0.22,
["wpn_vz61_freedom"] = -0.22,
["wpn_wincheaster1300"] = -0.1,
["wpn_wincheaster1300_trapper"] = -0.1,
}
@@ -0,0 +1,27 @@
op = {
id = "weapon_cover_tilt", sh = true, gr = {
{id = "banner", type = "slide", text = "ui_mcm_weapon_cover_tilt_title", size = {512, 50}, spacing = 20},
{id = "enabled", type = "check", val = 1, def = true},
{id = "animation_speed", type = "track", val = 2, min = 9, max = 20, step = 0.1, def = 11.5},
{id = "animation_weight_coeff", type = "track", val = 2, min = 0, max = 2, step = 0.1, def = 1},
{id = "trigger_radius", type = "track", val = 2, min = 0.5, max = 1.5, step = 0.01, def = 0.61},
{id = "trigger_radius_magnitude", type = "track", val = 2, min = 0, max = 5, step = 0.1, def = 1},
{id = "consider_silencer", type = "check", val = 1, def = true},
{id = "tilt_rattle", type = "check", val = 1, def = true},
{id = "offset_x", type = "track", val = 2, min = -0.2, max = 0.2, step = 0.002, def = 0},
{id = "offset_y", type = "track", val = 2, min = -0.5, max = 0.5, step = 0.005, def = 0},
{id = "offset_z", type = "track", val = 2, min = -0.5, max = 0.5, step = 0.005, def = 0},
{id = "yaw_variation", type = "track", val = 2, min = 0, max = 30, step = 1, def = 10},
{id = "roll_variation", type = "track", val = 2, min = 0, max = 30, step = 1, def = 10},
-- Keybinds
{id = "divider", type = "line" },
{id = "enable_manual_tilt", type = "check", val = 1, def = false},
{id = "manual_tilt_key_bind", type = "key_bind", val = 2, def = DIK_keys.DIK_COMMA},
}
}
function on_mcm_load()
return op
end
@@ -0,0 +1,278 @@
-- Table of weapon positions where a weapon will be tilted upon approaching cover
-- How it works
-- 1. If weapon position is specified, use that, check exact section, weapon will be tilted there. Use if the gun is completely miss the mark during calculations and to speed up the process. Takes top priority
-- 2. If not 1, and If weapon offset is specified, use that, check exact section. Calculated position will be offseted by amount in the fields, useful if you need very small adjustments
-- Offsets work this way:
-- x = 0.1 - will move the gun right, -0.1 left
-- y = 0.1 - will move the gun up, -0.1 down
-- z = 0.1 - will move the gun front, -0.1 back
-- You can extend those tables in separate scripts, look at how its done in patches for Blindsides and Firebreath weapons
weapon_positions = {
-- Example positions, uncomment to make them work
-- ["wpn_vityaz"] = {
-- x = 0.10692,
-- y = -0.299683,
-- z = 0.330375,
-- },
}
weapon_offsets = {
["wpn_hk416"] = {
y = 0.2,
},
["wpn_hk417"] = {
y = 0.01,
z = 0.05,
},
["wpn_m60"] = {
y = 0.08,
z = 0.03,
},
["wpn_m24"] = {
z = 0.02,
},
["wpn_m82"] = {
z = -0.01,
},
["wpn_m82a2"] = {
z = -0.03,
y = 0.2,
},
["wpn_m98b"] = {
z = 0.02,
},
["wpn_m95"] = {
y = -0.05,
z = -0.03,
},
["wpn_ace21"] = {
y = 0.25,
},
["wpn_9a91"] = {
y = 0.03,
z = 0.06,
},
["wpn_vsk94"] = {
y = 0.03,
},
["wpn_vintorez_nimble"] = {
y = 0.12,
z = 0.07,
},
["wpn_svd"] = {
y = 0.15,
},
["wpn_svd_custom"] = {
y = 0.15,
},
["wpn_svd_nimble"] = {
y = 0.15,
},
["wpn_sv98"] = {
z = 0.02,
},
["wpn_sv98_custom"] = {
z = 0.02,
},
["wpn_svu"] = {
y = 0.15,
z = 0.07,
},
["wpn_svu_alt"] = {
y = 0.15,
z = 0.07,
},
["wpn_svu_nimble"] = {
y = 0.15,
z = 0.07,
},
["wpn_svu_sniper"] = {
y = 0.15,
z = 0.07,
},
["wpn_fnc"] = {
x = 0.02,
y = 0.075,
z = 0.055,
},
["wpn_k98"] = {
y = 0.075,
z = 0.03,
},
["wpn_g43"] = {
y = 0.175,
z = -0.03,
},
["wpn_mp5"] = {
y = 0.2,
},
["wpn_mp5_alt"] = {
y = 0.2,
},
["wpn_mp5_custom"] = {
y = 0.2,
},
["wpn_mp5_nimble"] = {
y = 0.2,
},
["wpn_mp5sd"] = {
y = 0.05,
z = 0.07,
},
["wpn_mp5sd_custom"] = {
y = 0.05,
z = 0.07,
},
["wpn_mp5sd_new"] = {
y = 0.05,
z = 0.07,
},
["wpn_mp7"] = {
y = 0.15,
z = 0.05,
},
["wpn_aug"] = {
z = 0.06,
},
["wpn_aug_custom"] = {
z = 0.06,
},
["wpn_aug_freedom"] = {
z = 0.06,
},
["wpn_aug_modern"] = {
z = 0.06,
},
["wpn_aug_merc"] = {
z = 0.06,
},
["wpn_l85"] = {
z = 0.06,
},
["wpn_l85_alt"] = {
z = 0.06,
},
["wpn_l85_custom"] = {
z = 0.06,
},
["wpn_l85_modern"] = {
z = 0.06,
},
["wpn_l85a2"] = {
z = 0.06,
},
["wpn_l85a2_alt"] = {
z = 0.06,
},
["wpn_l85a2_custom"] = {
z = 0.06,
},
["wpn_l85a2_modern"] = {
z = 0.06,
},
["wpn_remington870"] = {
y = 0.2,
},
["wpn_vssk"] = {
z = 0.125,
y = 0.125,
},
["wpn_ash12"] = {
z = 0.125,
y = 0.125,
},
["wpn_svt40"] = {
y = 0.15,
},
["wpn_svt40_modern"] = {
y = 0.15,
},
["wpn_ak105"] = {
y = 0.25,
},
["wpn_p90"] = {
y = 0.15,
z = 0.02,
},
["wpn_sig552"] = {
z = 0.02,
},
["wpn_pp2000"] = {
x = -0.02,
y = 0.11,
z = 0.02,
},
["wpn_kriss"] = {
y = 0.15,
z = 0.07,
},
["wpn_kriss_custom"] = {
z = 0.12,
},
["wpn_grease"] = {
y = 0.2,
},
["wpn_cbj"] = {
y = 0.1,
z = -0.18,
},
["wpn_borz"] = {
y = 0.1,
z = 0.02,
},
["wpn_ksvk"] = {
y = 0.15,
},
["wpn_sig552_tactical"] = {
y = 0.25,
z = -0.03,
},
["wpn_aek919k"] = {
y = 0.14,
z = -0.03,
},
["wpn_mp9"] = {
y = 0.1,
z = -0.01,
},
["wpn_m4_kac"] = {
x = 0.07,
y = 0.025,
z = 0.07,
},
["wpn_m249"] = {
y = 0.05,
z = 0.03,
},
["wpn_mk48"] = {
z = 0.07,
},
["wpn_arisaka"] = {
y = 0.275,
},
}
@@ -0,0 +1,97 @@
-- Weapon cover tilt rattle script
-- Utilizing callbacks from weapon_cover_tilt.script
-- Written by demonized
local wct = weapon_cover_tilt
local tilting_state = false
local sounds = {}
local sound_dirs = {
"wct\\rattle\\raise\\",
"wct\\rattle\\lower\\",
}
local sound
local get_safe_sound_object = xr_sound.get_safe_sound_object
local function play_sound_on_actor(snd, volume, frequency)
if not snd then
printf("snd is nil")
return
end
local actor = db.actor
local snd = get_safe_sound_object(snd)
if snd then
snd:play(actor, 0, sound_object.s2d)
snd.volume = volume or 1
snd.frequency = frequency or 1
return snd
end
end
function get_sounds(dir)
if sounds[dir] then return end
sounds[dir] = {}
local f = getFS()
local list = f:file_list_open("$game_sounds$", dir, bit_or(FS.FS_ListFiles, FS.FS_RootOnly))
local count = list:Size()
for i = 0, count - 1 do
local file_name = list:GetAt(i)
file_name = file_name:sub(1, -5)
table.insert(sounds[dir], file_name)
end
end
function play_sound(dir, wpn, coeff)
if not wct.get_setting("tilt_rattle") then return end
get_sounds(dir)
if sound and sound:playing() then
sound:stop()
end
local normal_weight = 4
local weight = wct.get_weapon_weight(wpn)
local frequency = 1
if weight < normal_weight then
frequency = 1.5 - 0.125 * weight
else
frequency = math.max(0.5, 1.25 - 0.0625 * weight)
end
local sounds = sounds[dir]
-- Choose one of two below functions
-- The one with sound = ... will restrict sounds to only one instance playing
play_sound_on_actor(dir .. sounds[math.random(#sounds)], 1, frequency)
-- sound = play_sound_on_actor(dir .. sounds[math.random(#sounds)], 1, frequency)
end
function actor_on_weapon_tilting(wpn, coeff)
if not tilting_state then
tilting_state = true
-- Play sound
play_sound("wct\\rattle\\raise\\", wpn, coeff)
end
end
function actor_on_weapon_tilting_back(wpn, coeff)
if tilting_state then
tilting_state = false
-- Play sound
play_sound("wct\\rattle\\lower\\", wpn, coeff)
end
end
function on_game_start()
if not (
wct
and wct.add_callback
and wct.callback
) then return end
for k, v in pairs(sound_dirs) do
get_sounds(v)
end
wct.add_callback("actor_on_weapon_tilting", actor_on_weapon_tilting)
wct.add_callback("actor_on_weapon_tilting_back", actor_on_weapon_tilting_back)
end
+31
View File
@@ -0,0 +1,31 @@
[General]
gameName=stalkeranomaly
modid=0
version=d2024.11.23.0
newestVersion=
category="-1,"
nexusFileStatus=1
installationFile=Weapon_Cover_Tilt.20.zip
repository=Nexus
ignoredVersion=
comments=
notes=
nexusDescription=
url=
hasCustomURL=false
lastNexusQuery=
lastNexusUpdate=
nexusLastModified=2024-11-23T10:07:54Z
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
size=1
1\fileid=0
[Plugins]
BAIN%20Installer\option0=Weapon_Cover_Tilt_MAIN