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,623 @@
--[[
Tronex
set enable_debug to true, for debugging and map markers
----------------------------------------------------------
- Dynamic Anomalies
2019/6/14
used ini:
plugins\dynamic_anomalies.ltx
1. Script will read the list of anomalies and their position/types from the config (you can recorded custom pos for your anomalies)
2. Then spawn all anomalies on new game, then disable a random number of them.
3. When an enmission happen, anomalies will shuffle between off/on state (the dynamic factor)
----------------------------------------------------------
- The Pulse
A concept of electro-psy anomaly that forms in the sky and discharge into the ground like a thunderbolt, killing any stalkers nearby
--]]
local enable_debug = false
function print_debug(...)
if enable_debug then
printf(...)
end
end
-------------------------------
-- Dynamic anomalies
-------------------------------
local ini_ano
local dyn_ano_init = false
local current_level
local dyn_ano_chance = 35 -- [0 - 100] chance of activating a dynamic anomaly
local dyn_ano_safe_dist = 15 -- [m] don't activate anomalies within the safe distance to player
local dyn_ano_type = {} -- [type] = {}
local dyn_ano_info = {} -- [level][name] = info
local dyn_anomalies_dbg = {} -- [id] = name
dyn_anomalies = {} -- [level][id] = name
-- Prepare
function ini_settings()
if (dyn_ano_init) then return end
dyn_ano_init = true
ini_ano = ini_file("plugins\\dynamic_anomalies.ltx")
local n,m = 0,0
local result, id, value = "","",""
local name, info = "","",""
-- Gather anomaly types
n = ini_ano:line_count("categories") or 0
for i=0,n-1 do
result, id, value = ini_ano:r_line_ex("categories",i,"","")
dyn_ano_type[id] = {}
m = ini_ano:line_count(id) or 0
for ii=0,m-1 do
result, name, info = ini_ano:r_line_ex(id,ii,"","")
if name and info then
for j=1,tonumber(info) do
local size = #dyn_ano_type[id] + 1
dyn_ano_type[id][size] = name
print_debug("- Dynamic Anomalies | dyn_ano_type[%s][%s] = %s", id, size, name)
end
end
end
end
-- Gather anomaly coordinates in all levels
n = ini_ano:line_count("levels") or 0
for i=0,n-1 do
result, id, value = ini_ano:r_line_ex("levels",i,"","")
m = ini_ano:line_count(id) or 0
dyn_ano_info[id] = {}
for ii=0,m-1 do
result, name, info = ini_ano:r_line_ex(id,ii,"","")
if name and info then
local t = str_explode(info,",")
if (#t == 6) and (t[1] ~= "NA") then
dyn_ano_info[id][name] = {
typ = t[1],
x = tonumber(t[2]),
y = tonumber(t[3]),
z = tonumber(t[4]),
lvl_id = tonumber(t[5]),
gm_id = tonumber(t[6]),
}
end
end
end
end
end
local marker_by_type = {
["electric"] = "anomaly_electric",
["chemical"] = "anomaly_chemical",
["thermal"] = "anomaly_thermal",
["gravitational"] = "anomaly_gravitational",
["radioactive"] = "anomaly_radioactive",
["disabled"] = "anomaly_disabled",
}
function add_marker(lvl, section, id, state)
if enable_debug then
ini_settings()
if lvl and dyn_ano_info[lvl] then
local name = dyn_anomalies_dbg[id]
if name then
local info = dyn_ano_info[lvl][name]
if info then
for k,v in pairs(marker_by_type) do
if (level.map_has_object_spot(id, v) ~= 0) then
level.map_remove_object_spot(id, v)
end
end
local typ = info.typ
local spot = marker_by_type[typ] or marker_by_type["gravitational"]
if (state == false) then
spot = marker_by_type["disabled"]
end
level.map_add_object_spot_ser(id, spot, "Name: " .. name .. " \\nType: " .. typ .. " \\nSection: " .. section)
else
print_debug("! Dynamic Anomalies | Marker - no info is found for name {%s}", name)
end
else
print_debug("! Dynamic Anomalies | Marker - no name is found for id (%s)", id)
end
else
print_debug("! Dynamic Anomalies | Marker - level %s is not stored in dyn_ano_info table", lvl)
end
end
end
-- Operation
function dyn_anomalies_spawn()
-- Iterate through all anomalies info for all levels
for lvl,v in pairs(dyn_ano_info) do
dyn_anomalies[lvl] = {}
for name,info in pairs(v) do
-- Get random anomaly section
local anom_type = dyn_ano_type[info.typ]
local section = anom_type and anom_type[math.random(#anom_type)]
if (not section) then
print_debug("! Dynamic Anomalies | Anomaly section not found for type: %s", info.typ)
return
end
-- Info check
if not (info.x and info.y and info.z and info.lvl_id and info.gm_id and true) then
print_debug("! Dynamic Anomalies | Anomaly {%s} has wrong or incomplete info", name)
return
end
-- Spawn
local se_obj = alife_create( section, vector():set(info.x , info.y , info.z), info.lvl_id, info.gm_id )
if ( not se_obj ) then
print_debug("! Dynamic Anomalies | Unable to spawn dynamic anomaly")
return
end
-- Set anomaly properties:
local data = utils_stpk.get_anom_zone_data( se_obj )
if ( not data ) then
print_debug("! Dynamic Anomalies | Unable to set dynamic anomaly properties" )
return
end
data.shapes[1] = {}
data.shapes[1].shtype = 0
data.shapes[1].offset = vector():set( 0, 0, 0 ) -- Leave for compatibility with CoC 1.4.22, delete later
data.shapes[1].center = vector():set( 0, 0, 0 )
data.shapes[1].radius = 3
utils_stpk.set_anom_zone_data( data, se_obj )
-- Save data
dyn_anomalies[lvl][se_obj.id] = true
if enable_debug then
dyn_anomalies_dbg[se_obj.id] = name
end
print_debug("- Dynamic Anomalies | %s | Spawned anomaly [%s](%s){%s}", lvl, section, se_obj.id, name)
end
end
end
function dyn_anomalies_suffle()
for lvl,v in pairs(dyn_anomalies) do
for id, state in pairs(v) do
if (math.random(100) < dyn_ano_chance) then
dyn_anomalies[lvl][id] = true
print_debug("/ Dynamic Anomalies | Shuffle - dyn_anomalies[%s][%s] = %s", lvl, id, true)
else
dyn_anomalies[lvl][id] = false
print_debug("/ Dynamic Anomalies | Shuffle - dyn_anomalies[%s][%s] = %s", lvl, id, false)
end
end
end
end
function dyn_anomalies_update()
if (not dyn_anomalies[current_level]) then
print_debug("! Dynamic Anomalies | Can't update anomalies because current level (%s) has no anomalies recorded", current_level)
return true
end
local actor_pos = db.actor:position()
for id,state in pairs(dyn_anomalies[current_level]) do
local obj = level.object_by_id(id)
if obj then
if (actor_pos:distance_to(obj:position()) > dyn_ano_safe_dist) then
obj:enable_anomaly()
if (state == false) then
obj:disable_anomaly()
end
add_marker(current_level, obj:section(), id, state)
print_debug("- Dynamic Anomalies | %s | Anomaly (%s) is set to state: %s", current_level, id, state)
else
print_debug("! Dynamic Anomalies | %s | Anomaly (%s) is close to player, no process", current_level, id)
end
else
print_debug("! Dynamic Anomalies | %s | Couldn't get online object for id (%s)", current_level, id)
end
end
return true
end
function dyn_anomalies_refresh(force)
-- Prepare anomalies for the first time
if (not has_alife_info("dynamic_anomalies_spawned")) and is_empty(dyn_anomalies) then
give_info("dynamic_anomalies_spawned")
ini_settings()
dyn_anomalies_spawn()
dyn_anomalies_suffle()
-- shuffle state of all anomalies after emission
elseif force then
dyn_anomalies_suffle()
end
-- enable/disable online anomalies
-- NOTE: it's important to use timer because online objects don't register instantly after creating the server objects, so we need to wait for a bit.
-- Guess there's a delay in engine to set things up completely
local n = has_alife_info("dynamic_anomalies_spawned") and 1 or 10
CreateTimeEvent(0, "update_dynamic_anomalies", n, dyn_anomalies_update)
end
-------------------------------
-- Pulse anomalies
-------------------------------
local pAno_first = true
local pAno_tg = time_global()
local pAno_light = nil
local pAno_pfx = particles_object("generator\\generator_accum_thunderbolt")
local pAno_snd_close = sound_object("anomaly\\emi_blowout")
local pAno_snd_far = sound_object("anomaly\\emi_blowout_01")
local pAno_snd_distance = 150 -- [m] (max distance between player and anomaly where close sound effect can be heard)
local pAno_snd_delay = 5.5 -- [sec] (time delay between anomaly's spawn and sound effect)
local pAno_p_hit_distance = 10 -- [m] (max distance between player and anomaly to recieve psy damage)
local pAno_e_hit_distance = 20 -- [m] (max distance between player and anomaly to recieve shock damage)
local pAno_hit_delay = 11.5 -- [sec] (time delay between anomaly's spawn and player hit)
local pAno_article_distance = 50 -- [m] (max distance between player and anomaly to trigger related article )
local pAno_max_distance = 150 -- [m] (max distance between player and anomaly's spawn)
local pAno_delay = 2 * 60 * 1000 -- [millie sec] (smallest time delay between pulse anomalies to spawn)
local pAno_chance = {
["clear"] = 0,
["partly"] = 0,
["cloudy"] = 10,
["rain"] = 15,
["storm"] = 25,
["foggy"] = 0,
}
local pAno_maps = {
["k00_marsh"] = 0.5,
["k01_darkscape"] = 1,
["k02_trucks_cemetery"] = 1,
["l01_escape"] = 0.2,
["l02_garbage"] = 0.7,
["l03_agroprom"] = 0.5,
["l04_darkvalley"] = 0.5,
["l06_rostok"] = 1,
["l07_military"] = 0.5,
["l08_yantar"] = 0.7,
["l09_deadcity"] = 0.5,
["l10_red_forest"] = 1,
["jupiter"] = 1,
["pripyat"] = 1,
["zaton"] = 1,
["l13_generators"] = 1.5,
["l12_stancia_2"] = 1.5,
["l12_stancia"] = 1.5,
["l11_pripyat"] = 0.2,
["l10_radar"] = 1,
["y04_pole"] = 0.7,
}
local function pulse_anomaly_sound(sound_pos)
local distance = distance_2d(db.actor:position(), sound_pos)
local pAno_snd = (distance > pAno_snd_distance) and pAno_snd_far or pAno_snd_close
if pAno_snd and pAno_snd:playing() then
pAno_snd:stop()
end
if pAno_snd ~= nil then
pAno_snd:play_at_pos(db.actor, sound_pos)
pAno_snd.volume = 1
end
pAno_light:set_position(sound_pos)
pAno_light.enabled = true
pAno_light:update()
return true
end
local function pulse_anomaly_hit(particle_pos)
pAno_light.lanim_brightness = 0.015--0.2
pAno_light.volumetric_distance = 1
pAno_light.volumetric_intensity = 0.1
if GetEvent("current_safe_cover") then
return true
end
local hit_power = 0
local distance = distance_2d(db.actor:position(), particle_pos)
-- Article
if distance < pAno_article_distance then
SendScriptCallback("actor_on_interaction", "anomalies", nil, "pulse")
end
-- Psi hit
if distance < pAno_p_hit_distance then
hit_power = math.cos(distance * math.pi / pAno_p_hit_distance) + 1
local h = hit()
h.type = hit.telepatic
if (level_environment.is_actor_immune() or dialogs_yantar.actor_has_psi_helmet()) then
h.power = 0
else
h.power = surge_manager.SurgeManager:hit_power(hit_power, h.type)
end
h.impulse = 0
h.direction = VEC_Z
h.draftsman = db.actor
db.actor:hit(h)
level.remove_pp_effector(666)
level.add_pp_effector("psi_fade.ppe", 666, false)
level.set_pp_effector_factor(666,h.power)
end
-- Electric hit
if distance < pAno_e_hit_distance then
hit_power = math.cos(distance * math.pi / pAno_e_hit_distance) + 1
local h = hit()
h.type = hit.shock
if (level_environment.is_actor_immune()) then
h.power = 0
else
h.power = surge_manager.SurgeManager:hit_power(hit_power, h.type)
end
h.impulse = 0
h.direction = VEC_Z
h.draftsman = db.actor
db.actor:hit(h)
level.remove_pp_effector(667)
level.add_pp_effector("electro_fade.ppe", 667, false)
level.set_pp_effector_factor(667,h.power)
end
return true
end
local function pulse_anomaly_light()
pAno_light.lanim_brightness = 0.005--0.025
pAno_light.volumetric_distance = 0.25
pAno_light.volumetric_intensity = 0.05
pAno_light.enabled = false
return true
end
function pulse_anomaly_update()
local tg = time_global()
if pAno_first then
pAno_tg = tg + pAno_delay
pAno_first = false
return
end
if (pAno_light and pAno_light.enabled) then
pAno_light:update()
end
if bLevelUnderground or (tg < pAno_tg) then
return
end
pAno_tg = tg + pAno_delay
local lvl_factor = pAno_maps[level.name()] or 0
local wthr = level_weathers.get_weather_manager():get_curr_weather()
local weather_chance = pAno_chance[wthr] or 1
if (math.random(100) > (weather_chance * lvl_factor)) then
return
end
local pos = db.actor:position()
local angle_dec = math.random(0,359)
local angle_rad = math.rad(angle_dec)
local ano_distance = math.random(0,pAno_max_distance)
local pos_x = math.cos(angle_rad)*ano_distance
local pos_z = math.sin(angle_rad)*ano_distance
local particle_pos = vector():set(pos.x+pos_x, pos.y+60, pos.z+pos_z)
pAno_pfx:play_at_pos(particle_pos)
if (not pAno_light) then
--local color = fcolor()
--color:set(0,0,100,50)
pAno_light = script_light()
pAno_light.range = 80--100
--pAno_light.type = 0 --light_type.Direct)
--pAno_light:set_direction(vector():set(0,-1.5,0))
--pAno_light.shadow = true
pAno_light.lanim = "koster_01_electra"
pAno_light.lanim_brightness = 0.005--0.025
pAno_light.volumetric = true
pAno_light.volumetric_quality = 1
pAno_light.volumetric_distance = 0.25
pAno_light.volumetric_intensity = 0.05
--pAno_light.color = color
end
CreateTimeEvent(0, "pulse_anomaly_sound", pAno_snd_delay, pulse_anomaly_sound, particle_pos)
CreateTimeEvent(0, "pulse_anomaly_hit", pAno_hit_delay, pulse_anomaly_hit, particle_pos)
CreateTimeEvent(0, "pulse_anomaly_light", pAno_hit_delay + 0.5, pulse_anomaly_light)
end
-------------------------------
-- Callbacks
-------------------------------
local function actor_on_first_update()
current_level = level.name()
local enabled = ui_options.get("alife/general/dynamic_anomalies")
if enabled and (not IsTestMode()) then
dyn_anomalies_refresh()
end
end
local function actor_on_update()
pulse_anomaly_update()
end
local function actor_on_interaction(typ, obj, name)
if (typ == "anomalies") and (name == "emission_end") and ui_options.get("alife/general/dynamic_anomalies") then
dyn_anomalies_refresh(true)
end
end
local function save_state(m_data)
m_data.dyn_anomalies = dyn_anomalies
if enable_debug then
m_data.dyn_anomalies_dbg = dyn_anomalies_dbg
end
end
local function load_state(m_data)
dyn_anomalies = m_data.dyn_anomalies or {}
if enable_debug then
dyn_anomalies_dbg = m_data.dyn_anomalies_dbg or {}
end
end
local function anomaly_on_before_activate(zone, obj, flags)
if (not obj or not zone) then
return
end
if (IsStalker(obj) or IsMonster(obj)) then
if (not obj:alive()) then
flags.ret_value = false
end
return
end
if not (obj:clsid() == clsid.obj_bolt) then
flags.ret_value = false
end
end
function on_game_start()
RegisterScriptCallback("actor_on_first_update",actor_on_first_update)
RegisterScriptCallback("actor_on_update",actor_on_update)
RegisterScriptCallback("actor_on_interaction",actor_on_interaction)
RegisterScriptCallback("anomaly_on_before_activate",anomaly_on_before_activate)
RegisterScriptCallback("save_state",save_state)
RegisterScriptCallback("load_state",load_state)
end
-------------------------------
-- Anomaly field binder
-------------------------------
fields_by_names = {}
function bind(obj)
obj:bind_object(anomaly_field_binder(obj))
end
class "anomaly_field_binder" (object_binder)
function anomaly_field_binder:__init(obj) super(obj)
end
function anomaly_field_binder:reload(section)
object_binder.reload(self, section)
end
function anomaly_field_binder:reinit()
object_binder.reinit(self)
db.storage[self.object:id()] = {}
self.st = db.storage[self.object:id()]
end
function anomaly_field_binder:net_spawn(se_abstract)
if not object_binder.net_spawn(self, se_abstract) then
return false
end
db.add_zone(self.object)
db.add_obj(self.object)
fields_by_names[self.object:name()] = self
--[[
eDefaultRestrictorTypeNone = u8(0),
eDefaultRestrictorTypeOut = u8(1),
eDefaultRestrictorTypeIn = u8(2),
eRestrictorTypeNone = u8(3),
eRestrictorTypeIn = u8(4),
eRestrictorTypeOut = u8(5),
--]]
-- don't enable unless you realize that engine AI schemes to deal with anomalies is stupid and will not be supported
-- MAY CAUSE HUGE FPS DROP ON COP MAPS
--[[
if (get_console_cmd(1,"ai_die_in_anomaly") == true) then
-- It causes HUGE fps drop on COP maps which is why it was probably cut
local ignore = {
["zaton"] = true,
["jupiter"] = true,
["pripyat"] = true
}
if not (ignore[level.name()]) then
self.object:set_restrictor_type(3)
end
end
--]]
return true
end
function anomaly_field_binder:net_destroy()
db.del_zone( self.object )
db.del_obj(self.object)
db.storage[self.object:id()] = nil
fields_by_names[self.object:name()] = nil
object_binder.net_destroy(self)
end
function anomaly_field_binder:set_enable(bEnable)
if(bEnable) then
self.object:enable_anomaly()
else
self.object:disable_anomaly()
end
end
function anomaly_field_binder:update(delta)
object_binder.update(self, delta)
--[[ testing
local itr = function(id)
local obj = id and alife_object(id)
printf("%s touch_feel id=%s obj=%s",self.object:name(),id,obj and obj:name())
end
self.object:iterate_feel_touch(itr)
--]]
end
-- Standart function for save
function anomaly_field_binder:net_save_relevant()
return true
end
@@ -0,0 +1,58 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 18
-- @ Description: SSS Main script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "general", sh=true, text="ui_mcm_ssfx_module_general", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_general_title",size= {512,50},spacing= 20 },
{id = "shaderscope_patch_mcm", type = "check", val = 1, def=false},
}
}
return op, "ssfx_module"
end
function on_option_change()
if ssfx_module_installed(ssfx_wetness) then
get_console():execute("ssfx_gloss_method 1" )
else
get_console():execute("ssfx_gloss_method 0" )
get_console():execute("r3_dynamic_wet_surfaces_sm_res 2048" )
get_console():execute("r3_dynamic_wet_surfaces_far 100" )
end
-- Apply general settings
if ssfx_get_setting("general", "shaderscope_patch", ssfx_001_settings) then
get_console():execute("r__fakescope 1")
else
get_console():execute("r__fakescope 0")
end
end
function ssfx_get_setting(module_name, var_name, default_script)
-- Get MCM setting
if ui_mcm then
return ui_mcm.get("ssfx_module/" .. module_name .. "/" .. var_name .. "_mcm")
end
-- Get Default
return default_script.ssfx_default_settings[var_name]
end
function ssfx_module_installed(script)
if script then
return script.module_installed or nil
else
return false
end
end
function on_game_start()
RegisterScriptCallback("on_option_change", on_option_change)
on_option_change()
end
@@ -0,0 +1,10 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 12
-- @ Description: SSS Main script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings = {
["shaderscope_patch"] = false -- Enable/Disable SHADER BASED 2D SCOPES support
}
@@ -0,0 +1,64 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: AO script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Settings
local ssfx_ao_quality = 0
local ssfx_ao_res = 0
local ssfx_ao_distance = 0
local ssfx_ao_blur = 0
local ssfx_ao_radius = 0
local ssfx_ao_max_occ = 0
local ssfx_ao_global_int = 0
local ssfx_ao_hud_int = 0
local ssfx_ao_flora_int = 0
-- Internal vars
module_installed = true
local function apply_ao_settings()
-- Apply commands
get_console():execute("ssfx_ao_quality " .. ssfx_ao_quality)
get_console():execute("ssfx_ao (" .. ssfx_ao_res .. "," .. ssfx_ao_global_int .. "," .. ssfx_ao_blur .. "," .. ssfx_ao_radius .. ")")
get_console():execute("ssfx_ao_setup1 (" .. ssfx_ao_distance .. "," .. ssfx_ao_hud_int .. ", " .. ssfx_ao_flora_int .. "," .. ssfx_ao_max_occ .. ")")
end
local function update_settings()
-- Get settings
module_id = "ao"
ssfx_ao_quality = ssfx_001_mcm.ssfx_get_setting(module_id, "quality", ssfx_ao_settings)
ssfx_ao_res = ssfx_001_mcm.ssfx_get_setting(module_id, "res", ssfx_ao_settings)
ssfx_ao_distance = ssfx_001_mcm.ssfx_get_setting(module_id, "distance", ssfx_ao_settings)
ssfx_ao_blur = ssfx_001_mcm.ssfx_get_setting(module_id, "blur", ssfx_ao_settings)
ssfx_ao_radius = ssfx_001_mcm.ssfx_get_setting(module_id, "radius", ssfx_ao_settings)
ssfx_ao_max_occ = ssfx_001_mcm.ssfx_get_setting(module_id, "max_occ", ssfx_ao_settings)
ssfx_ao_global_int = ssfx_001_mcm.ssfx_get_setting(module_id, "global_int", ssfx_ao_settings) * 5
ssfx_ao_hud_int = ssfx_001_mcm.ssfx_get_setting(module_id, "hud_int", ssfx_ao_settings)
ssfx_ao_flora_int = ssfx_001_mcm.ssfx_get_setting(module_id, "flora_int", ssfx_ao_settings)
ssfx_ao_res = 1.0 / ssfx_ao_res
-- Apply settings
apply_ao_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", update_settings)
-- Read and apply settigns
update_settings()
end
@@ -0,0 +1,37 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: AO - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "ao", sh=true, text="ui_mcm_ssfx_module_ao", gr = {
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_ao_title",size= {512,50},spacing= 20 },
{id = "quality_mcm", type = "list", val = 2, content={ {2.0,"ssfx_quality_low"}, {4.0,"ssfx_quality_medium"}, {8.0,"ssfx_quality_high"} }, def=4.0, restart=true},
{id = "res_mcm", type = "track", val = 2, min=0.25,max=1.0,step=0.05, def = 1.0},
{id = "distance_mcm", type = "track", val = 2, min=20.0, max=300.0, step=1.0, def = 150.0},
{id = "line", type = "line"},
{id = "blur_mcm", type = "track", val = 2, min=0.0, max=1.0, step=0.1, def = 1.0},
{id = "line", type = "line"},
{id = "radius_mcm", type = "track", val = 2, min=1.0, max=5.0, step=0.1, def = 2.5},
{id = "line", type = "line"},
{id = "max_occ_mcm", type = "track", val = 2, min=0.0, max=1.0, step=0.1, def = 0.0},
{id = "global_int_mcm", type = "track", val = 2, min=0.0, max=2.0, step=0.1, def = 1.0},
{id = "hud_int_mcm", type = "track", val = 2, min=0.0, max=1.0, step=0.1, def = 1.0},
{id = "flora_int_mcm", type = "track", val = 2, min=0.0, max=1.0, step=0.1, def = 1.0},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,23 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: AO script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["quality"] = 4.0,
["res"] = 1.0,
["distance"] = 150.0,
["blur"] = 1.0,
["radius"] = 2.5,
["max_occ"] = 0.0,
["global_int"] = 1.0,
["hud_int"] = 1.0,
["flora_int"] = 1.0,
}
----------------------------------------------------
@@ -0,0 +1,48 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 18
-- @ Description: Flora Fixes script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Flora settings
local ssfx_sss_int = 0
local ssfx_sss_color = 0
local ssfx_grass_spec = 0
local ssfx_grass_spec_wet = 0
local ssfx_trees_spec = 0
local ssfx_trees_spec_wet = 0
function apply_florafixes_settings()
get_console():execute("ssfx_florafixes_1 (" .. ssfx_grass_spec .. "," .. ssfx_grass_spec_wet .. "," .. ssfx_trees_spec .. "," .. ssfx_trees_spec_wet .. ")")
get_console():execute("ssfx_florafixes_2 (" .. ssfx_sss_int .. "," .. ssfx_sss_color .. ",0,0)")
end
function on_option_change()
-- Get settings
local module_id = "florafixes"
ssfx_sss_int = ssfx_001_mcm.ssfx_get_setting(module_id, "sss_int", ssfx_florafixes_settings)
ssfx_sss_color = ssfx_001_mcm.ssfx_get_setting(module_id, "sss_color", ssfx_florafixes_settings)
ssfx_grass_spec = ssfx_001_mcm.ssfx_get_setting(module_id, "grass_specular", ssfx_florafixes_settings)
ssfx_grass_spec_wet = ssfx_001_mcm.ssfx_get_setting(module_id, "grass_specular_wet", ssfx_florafixes_settings)
ssfx_trees_spec = ssfx_001_mcm.ssfx_get_setting(module_id, "trees_specular", ssfx_florafixes_settings)
ssfx_trees_spec_wet = ssfx_001_mcm.ssfx_get_setting(module_id, "trees_specular_wet", ssfx_florafixes_settings)
-- Apply settings
apply_florafixes_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,29 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 18
-- @ Description: Flora Fixes - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "florafixes", sh=true, text="ui_mcm_ssfx_module_florafixes", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_florafixes_title",size= {512,50},spacing= 20 },
{id = "sss_int_mcm", type = "track", val = 2, min=0.0,max=10.0,step=0.1, def = 2.0},
{id = "sss_color_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 1.0},
{id = "line", type = "line"},
{id = "grass_specular_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.3},
{id = "grass_specular_wet_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.21},
{id = "trees_specular_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.3},
{id = "trees_specular_wet_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.21},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,19 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 18
-- @ Description: Flora Fixes script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["sss_int"] = 2.0, -- Intensity of the flora SubSurface Scattering.
["sss_color"] = 1.0, -- How much sun color is added to the flora SubSurface Scattering. 1.0 is 100% sun color.
["grass_specular"] = 0.3, -- Specular value when the grass is dry.
["grass_specular_wet"] = 0.21, -- Specular value when the grass is wet.
["trees_specular"] = 0.3, -- Specular when trees and bushes are dry.
["trees_specular_wet"] = 0.21 -- Specular when trees and bushes are wet.
}
----------------------------------------------------
@@ -0,0 +1,60 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: IL script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Settings
local ssfx_il_quality = 0
local ssfx_il_res = 0
local ssfx_il_blur = 0
local ssfx_il_distance = 0
local ssfx_il_vibrance = 0
local ssfx_il_global_int = 0
local ssfx_il_hud_int = 0
local ssfx_il_flora_int = 0
-- Internal vars
module_installed = true
local function apply_il_settings()
-- Apply commands
get_console():execute("ssfx_il_quality " .. ssfx_il_quality)
get_console():execute("ssfx_il (" .. ssfx_il_res .. "," .. ssfx_il_global_int .. "," .. ssfx_il_vibrance .. "," .. ssfx_il_blur .. ")")
get_console():execute("ssfx_il_setup1 (" .. ssfx_il_distance .. "," .. ssfx_il_hud_int .. ", " .. ssfx_il_flora_int .. ",0)")
end
local function update_settings()
-- Get settings
module_id = "il"
ssfx_il_quality = ssfx_001_mcm.ssfx_get_setting(module_id, "quality", ssfx_ao_settings)
ssfx_il_res = ssfx_001_mcm.ssfx_get_setting(module_id, "res", ssfx_il_settings)
ssfx_il_blur = ssfx_001_mcm.ssfx_get_setting(module_id, "blur", ssfx_il_settings) * 5
ssfx_il_vibrance = ssfx_001_mcm.ssfx_get_setting(module_id, "vibrance", ssfx_il_settings)
ssfx_il_distance = ssfx_001_mcm.ssfx_get_setting(module_id, "distance", ssfx_il_settings)
ssfx_il_global_int = ssfx_001_mcm.ssfx_get_setting(module_id, "global_int", ssfx_il_settings)
ssfx_il_hud_int = ssfx_001_mcm.ssfx_get_setting(module_id, "hud_int", ssfx_il_settings)
ssfx_il_flora_int = ssfx_001_mcm.ssfx_get_setting(module_id, "flora_int", ssfx_il_settings)
ssfx_il_res = 1.0 / ssfx_il_res
-- Apply settings
apply_il_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", update_settings)
-- Read and apply settigns
update_settings()
end
@@ -0,0 +1,32 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: IL - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "il", sh=true, text="ui_mcm_ssfx_module_il", gr = {
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_il_title",size= {512,50},spacing= 20 },
{id = "quality_mcm", type = "list", val = 2, content={ {16.0,"ssfx_quality_very_low"} , {24.0,"ssfx_quality_low"}, {32.0,"ssfx_quality_medium"}, {48.0,"ssfx_quality_high"}, {64.0,"ssfx_quality_veryhigh"}}, def=32.0, restart=true},
{id = "res_mcm", type = "track", val = 2, min=0.15,max=1.0,step=0.05, def = 0.15},
{id = "distance_mcm", type = "track", val = 2, min=20.0, max=300.0, step=1.0, def = 150.0},
{id = "line", type = "line"},
{id = "blur_mcm", type = "track", val = 2, min=0.0, max=1.0, step=0.1, def = 1.0}, -- * 5
{id = "vibrance_mcm", type = "track", val = 2, min=0.0, max=2.0, step=0.1, def = 1.0},
{id = "line", type = "line"},
{id = "global_int_mcm", type = "track", val = 2, min=0.0, max=4.0, step=0.1, def = 1.0},
{id = "hud_int_mcm", type = "track", val = 2, min=0.0, max=1.0, step=0.1, def = 1.0},
{id = "flora_int_mcm", type = "track", val = 2, min=0.0, max=1.0, step=0.1, def = 0.5},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,22 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: IL script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["quality"] = 32,
["res"] = 0.15,
["blur"] = 1.0,
["vibrance"] = 1.0,
["distance"] = 150.0,
["global_int"] = 1.0,
["hud_int"] = 1.0,
["flora_int"] = 0.5,
}
----------------------------------------------------
@@ -0,0 +1,78 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 16
-- @ Description: Interactive grass script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
local ssfx_inter_grass_player = 0
local ssfx_inter_grass_max_entities = 0
local ssfx_inter_grass_maxdistance = 0
local ssfx_inter_grass_radius = 0
local ssfx_inter_grass_x_str = 0
local ssfx_inter_grass_y_str = 0
local ssfx_inter_explosions_str = 0
local ssfx_inter_explosions_speed = 0
local ssfx_inter_shooting_str = 0
local ssfx_inter_shooting_range = 0
local ssfx_inter_mutants = 0
local ssfx_inter_anomalies = 0
local function apply_interactive_grass_settings()
get_console():execute("ssfx_grass_interactive (" .. (ssfx_inter_grass_player and 1 or 0) .. "," .. ssfx_inter_grass_max_entities .. "," .. ssfx_inter_grass_maxdistance .. "," .. (ssfx_inter_mutants and 1 or 0) .. ")")
get_console():execute("ssfx_int_grass_params_1 (" .. ssfx_inter_grass_radius .. "," .. ssfx_inter_grass_x_str .. "," .. ssfx_inter_grass_y_str .. "," .. ssfx_inter_anomalies .. ")")
get_console():execute("ssfx_int_grass_params_2 (" .. ssfx_inter_explosions_str .. "," .. ssfx_inter_explosions_speed .. "," .. ssfx_inter_shooting_str .."," .. ssfx_inter_shooting_range .. ")")
end
local function update_settings()
-- Get settings
ssfx_inter_grass_player = ssfx_001_mcm.ssfx_get_setting("inter_grass", "enable_player", ssfx_interactive_grass_settings)
ssfx_inter_grass_max_entities = ssfx_001_mcm.ssfx_get_setting("inter_grass", "max_entities", ssfx_interactive_grass_settings)
ssfx_inter_grass_maxdistance = ssfx_001_mcm.ssfx_get_setting("inter_grass", "max_distance", ssfx_interactive_grass_settings)
ssfx_inter_grass_radius = ssfx_001_mcm.ssfx_get_setting("inter_grass", "radius", ssfx_interactive_grass_settings)
ssfx_inter_grass_x_str = ssfx_001_mcm.ssfx_get_setting("inter_grass", "horizontal_str", ssfx_interactive_grass_settings)
ssfx_inter_grass_y_str = ssfx_001_mcm.ssfx_get_setting("inter_grass", "vertical_str", ssfx_interactive_grass_settings)
ssfx_inter_explosions_str = ssfx_001_mcm.ssfx_get_setting("inter_grass", "explosions_str", ssfx_interactive_grass_settings)
ssfx_inter_explosions_speed = ssfx_001_mcm.ssfx_get_setting("inter_grass", "explosions_speed", ssfx_interactive_grass_settings)
ssfx_inter_shooting_str = ssfx_001_mcm.ssfx_get_setting("inter_grass", "shooting_str", ssfx_interactive_grass_settings)
ssfx_inter_shooting_range = ssfx_001_mcm.ssfx_get_setting("inter_grass", "shooting_range", ssfx_interactive_grass_settings)
ssfx_inter_mutants = ssfx_001_mcm.ssfx_get_setting("inter_grass", "enable_mutants", ssfx_interactive_grass_settings)
ssfx_inter_anomalies = ssfx_001_mcm.ssfx_get_setting("inter_grass", "anomalies_distance", ssfx_interactive_grass_settings)
-- Enable/Disable All Effects
local effect_enabled = ssfx_001_mcm.ssfx_get_setting("inter_grass", "enable", ssfx_interactive_grass_settings)
if (not effect_enabled) then
ssfx_inter_grass_max_entities = 0
ssfx_inter_grass_player = 0
end
-- Enable/Disable Anomalies
local anomalies_enabled = ssfx_001_mcm.ssfx_get_setting("inter_grass", "enable_anomalies", ssfx_interactive_grass_settings)
if (not anomalies_enabled) then
ssfx_inter_anomalies = 0
end
-- Apply settings
apply_interactive_grass_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", update_settings)
-- Read and apply settigns
update_settings()
end
@@ -0,0 +1,43 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 16
-- @ Description: Shadow Cascades script - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "inter_grass", sh=true, text="ui_mcm_ssfx_module_inter_grass", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_inter_grass_title",size= {512,50},spacing= 20 },
{id = "enable_mcm", type = "check", val = 1, def=true, restart=true},
{id = "max_entities_mcm", type = "track", val = 2, min=1.0,max=15,step=1.0, def = 8, restart=true},
{id = "max_distance_mcm", type = "track", val = 2, min=10.0,max=5000,step=10.0, def = 2000},
{id = "enable_player_mcm", type = "check", val = 1, def=true},
{id = "enable_mutants_mcm", type = "check", val = 1, def=true},
{id = "line", type = "line"},
{id = "enable_anomalies_mcm", type = "check", val = 1, def=true},
{id = "anomalies_distance_mcm", type = "track", val = 2, min=10.0,max=60,step=1.0, def = 25},
{id = "line", type = "line"},
{id = "radius_mcm", type = "track", val = 2, min=0.5,max=2.5,step=0.1, def = 1.0},
{id = "horizontal_str_mcm", type = "track", val = 2, min=0.5,max=2.5,step=0.1, def = 1.0},
{id = "vertical_str_mcm", type = "track", val = 2, min=0.5,max=2.5,step=0.1, def = 1.0},
{id = "line", type = "line"},
{id = "explosions_str_mcm", type = "track", val = 2, min=0.0,max=2.0,step=0.05, def = 1.0},
{id = "explosions_speed_mcm", type = "track", val = 2, min=1.0,max=20.0,step=1, def = 5.0},
{id = "line", type = "line"},
{id = "shooting_str_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.05, def = 0.3},
{id = "shooting_range_mcm", type = "track", val = 2, min=0.5,max=5.0,step=0.1, def = 2.0},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,30 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 16
-- @ Description: Interactive grass script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["enable"] = 1, -- Enable/Disable interactive grass
["enable_player"] = 1, -- Enable/Disable Player interaction
["enable_mutants"] = 1, -- Enable/Disable Mutants shockwaves
["max_entities"] = 8, -- Max quantity of characters/monsters in range and view that interact with grass
["max_distance"] = 2000, -- Maximum distance to render grass interactions
["radius"] = 1, -- Radius of effect
["horizontal_str"] = 1, -- Strength of the horizontal displacement
["vertical_str"] = 1, -- Strength of the vertical displacement
["explosions_str"] = 1.0, -- Strength of the vertical displacement
["explosions_speed"] = 5.0, -- Shockwave speed
["shooting_str"] = 0.3, -- Strength of the shooting displacement
["shooting_range"] = 2.0, -- Range of the shooting displacement
["enable_anomalies"] = 1, -- Enable/Disable anomalies interactions
["anomalies_distance"] = 25, -- Maximum distance to render anomalies interactions
}
----------------------------------------------------
@@ -0,0 +1,167 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 19
-- @ Description: LUT script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
local ssfx_lut_default = { group = 1, intensity = 0.5 }
local ssfx_lut_transition_speed = 0.005
-- Internal vars
local ssfx_lut_group1 = 0
local ssfx_lut_group2 = 0
local ssfx_lut_lerp = 0
local ssfx_lut_lerp_target = 0
local ssfx_lut_int = 0
local ssfx_lut_lerp_done = true
local DebugGroup = 0;
-- Set a LUT table for a specific map
local ssfx_maps = {
-- ["jupiter"] = { group = 2, intensity = 1 }, -- Example
-- ["jupiter_underground"] = { group = 0, intensity = 0 },
-- ["k00_marsh"] = { group = 0, intensity = 0 },
-- ["k01_darkscape"] = { group = 0, intensity = 0 },
-- ["k02_trucks_cemetery"] = { group = 0, intensity = 0 },
-- ["l01_escape"] = { group = 0, intensity = 0 },
-- ["l02_garbage"] = { group = 0, intensity = 0 },
-- ["l03_agroprom"] = { group = 0, intensity = 0 },
-- ["l03u_agr_underground"] = { group = 0, intensity = 0 },
-- ["l04_darkvalley"] = { group = 0, intensity = 0 },
-- ["l04u_labx18"] = { group = 0, intensity = 0 },
-- ["l05_bar"] = { group = 0, intensity = 0 },
-- ["l06_rostok"] = { group = 0, intensity = 0 },
-- ["l07_military"] = { group = 0, intensity = 0 },
-- ["l08_yantar"] = { group = 0, intensity = 0 },
-- ["l08u_brainlab"] = { group = 0, intensity = 0 },
-- ["l09_deadcity"] = { group = 0, intensity = 0 },
-- ["l10_limansk"] = { group = 0, intensity = 0 },
-- ["l10_radar"] = { group = 0, intensity = 0 },
-- ["l10_red_forest"] = { group = 0, intensity = 0 },
-- ["l10u_bunker"] = { group = 0, intensity = 0 },
-- ["l11_hospital"] = { group = 0, intensity = 0 },
-- ["l11_pripyat"] = { group = 0, intensity = 0 },
-- ["l12_stancia"] = { group = 0, intensity = 0 },
-- ["l12_stancia_2"] = { group = 0, intensity = 0 },
-- ["l12u_control_monolith"] = { group = 0, intensity = 0 },
-- ["l12u_sarcofag"] = { group = 0, intensity = 0 },
-- ["l13_generators"] = { group = 0, intensity = 0 },
-- ["l13u_warlab"] = { group = 0, intensity = 0 },
-- ["labx8"] = { group = 0, intensity = 0 },
-- ["pripyat"] = { group = 0, intensity = 0 },
-- ["zaton"] = { group = 0, intensity = 0 },
-- ["y04_pole"] = { group = 0, intensity = 0 },
}
local function ssfx_lut_transition()
get_console():execute("ssfx_lut (" .. ssfx_lut_int .. "," .. ssfx_lut_group1 .. "," .. ssfx_lut_group2 .. "," .. ssfx_lut_lerp .. ")")
end
function ssfx_lut_diminish()
-- Frame independent smoothing
local smoothing = math.min(ssfx_lut_transition_speed * device().time_delta / 20, 0.19)
-- Let's go!
if (ssfx_lut_lerp < ssfx_lut_lerp_target) then
ssfx_lut_lerp = ssfx_lut_lerp + smoothing
else
ssfx_lut_lerp = ssfx_lut_lerp - smoothing
end
if math.abs(ssfx_lut_lerp - ssfx_lut_lerp_target) <= ssfx_lut_transition_speed then
ssfx_lut_group1 = ssfx_lut_group2
ssfx_lut_group2 = 0
ssfx_lut_lerp = 0
ssfx_lut_lerp_target = 0
ssfx_lut_lerp_done = true
end
end
function ssfx_lut_change(group, insta)
if (ssfx_lut_lerp_done == false) then return end
if (insta == true) then
ssfx_lut_group1 = group
ssfx_lut_lerp = 0
ssfx_lut_lerp_target = 0
ssfx_lut_lerp_done = true
ssfx_lut_transition()
else
ssfx_lut_group2 = group
ssfx_lut_lerp_target = 1
ssfx_lut_lerp_done = false
end
end
-- DEBUG
local function ssfx_on_key_press(dik)
local bind = dik_to_bind(dik)
local kb = key_bindings
if bind == kb.kWPN_RELOAD then
DebugGroup = DebugGroup + 1
ssfx_lut_change(DebugGroup, false)
end
end
local function actor_on_update()
--local game_hours = level.get_time_hours()
--printf("LUT TIME : %s", game_hours)
if (ssfx_lut_lerp_done == false) then
ssfx_lut_diminish()
ssfx_lut_transition()
end
end
local function actor_on_first_update()
if (ssfx_maps[level.name()]) then
Map_LUT = ssfx_maps[level.name()].group or ssfx_lut_default.group
ssfx_lut_int = ssfx_maps[level.name()].intensity or ssfx_lut_default.intensity
else
Map_LUT = ssfx_lut_default.group
ssfx_lut_int = ssfx_lut_default.intensity
end
ssfx_lut_change(Map_LUT, true)
end
function on_option_change()
end
function on_game_start()
--RegisterScriptCallback("on_key_press", ssfx_on_key_press)
-- General Functions
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
RegisterScriptCallback("actor_on_update", actor_on_update)
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,44 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Terrain script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Terrain setup
local ssfx_pom_quality = 0
local ssfx_pom_refine = 0
local ssfx_pom_range = 0
local ssfx_pom_height = 0
local ssfx_pom_ao = 0
-- Samples, Range, Height, Water Limit
function apply_parallax_settings()
get_console():execute("ssfx_pom (" .. ssfx_pom_quality .. "," .. ssfx_pom_range .. "," .. ssfx_pom_height .."," .. ssfx_pom_ao .. ")")
get_console():execute("ssfx_pom_refine " .. (ssfx_pom_refine and 1 or 0))
end
function on_option_change()
-- Get settings
ssfx_pom_quality = ssfx_001_mcm.ssfx_get_setting("parallax", "quality", ssfx_parallax_settings)
ssfx_pom_refine = ssfx_001_mcm.ssfx_get_setting("parallax", "refine", ssfx_parallax_settings)
ssfx_pom_range = ssfx_001_mcm.ssfx_get_setting("parallax", "range", ssfx_parallax_settings)
ssfx_pom_height = ssfx_001_mcm.ssfx_get_setting("parallax", "height", ssfx_parallax_settings)
ssfx_pom_ao = ssfx_001_mcm.ssfx_get_setting("parallax", "ao", ssfx_parallax_settings)
-- Apply settings
apply_parallax_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,27 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Parallax - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "parallax", sh=true, text="ui_mcm_ssfx_module_parallax", gr = {
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_parallax_title",size= {512,50},spacing= 20 },
{id = "quality_mcm", type = "list", val = 2, content={ {16.0,"ssfx_quality_low"}, {24.0,"ssfx_quality_medium"}, {36.0,"ssfx_quality_high"}}, def=16.0 },
{id = "refine_mcm", type = "check", val = 1, def=false, restart=true},
{id = "line", type = "line"},
{id = "range_mcm", type = "track", val = 2, min=0.0,max=40.0,step=0.1, def = 12},
{id = "height_mcm", type = "track", val = 2, min=0.01,max=0.05,step=0.001, def = 0.035},
{id = "ao_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.4},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,18 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Parallax script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["quality"] = 16.0,
["refine"] = 0,
["range"] = 12,
["height"] = 0.035,
["ao"] = 0.4,
}
----------------------------------------------------
@@ -0,0 +1,62 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Bloom script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Settings
local ssfx_bloom_use_weather = 0
local ssfx_bloom_threshold = 0
local ssfx_bloom_exposure = 0
local ssfx_bloom_blur = 0
local ssfx_bloom_vibrance = 0
local ssfx_bloom_sky = 0
local ssfx_bloom_lens = 0
local ssfx_bloom_dirt = 0
-- Internal vars
module_installed = true
local function apply_bloom_settings()
-- Apply commands
get_console():execute("ssfx_bloom_use_presets " .. (ssfx_bloom_use_weather and 1 or 0))
get_console():execute("ssfx_bloom_1 (" .. ssfx_bloom_threshold .. "," .. ssfx_bloom_exposure .. ",0," .. ssfx_bloom_sky .. ")")
get_console():execute("ssfx_bloom_2 (" .. ssfx_bloom_blur .. "," .. ssfx_bloom_vibrance .. ", " .. ssfx_bloom_lens .. "," .. ssfx_bloom_dirt .. ")")
end
local function update_settings()
-- Get settings
module_id = "ssfx_pp/ssfx_bloom"
ssfx_bloom_use_weather = ssfx_001_mcm.ssfx_get_setting(module_id, "use_weather", ssfx_pp_bloom_settings)
ssfx_bloom_threshold = ssfx_001_mcm.ssfx_get_setting(module_id, "threshold", ssfx_pp_bloom_settings)
ssfx_bloom_exposure = ssfx_001_mcm.ssfx_get_setting(module_id, "exposure", ssfx_pp_bloom_settings)
ssfx_bloom_blur = ssfx_001_mcm.ssfx_get_setting(module_id, "blur", ssfx_pp_bloom_settings)
ssfx_bloom_vibrance = ssfx_001_mcm.ssfx_get_setting(module_id, "vibrance", ssfx_pp_bloom_settings)
ssfx_bloom_sky = ssfx_001_mcm.ssfx_get_setting(module_id, "sky", ssfx_pp_bloom_settings)
ssfx_bloom_lens = ssfx_001_mcm.ssfx_get_setting(module_id, "lens", ssfx_pp_bloom_settings)
ssfx_bloom_dirt = ssfx_001_mcm.ssfx_get_setting(module_id, "dirt", ssfx_pp_bloom_settings)
-- Apply settings
apply_bloom_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", update_settings)
-- Read and apply settigns
update_settings()
end
@@ -0,0 +1,25 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Bloom script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["use_weather"] = 0.0,
["threshold"] = 3.5,
["exposure"] = 3.0,
["blur"] = 3.0,
["vibrance"] = 1.5,
["sky"] = 0.6,
["lens"] = 1.5,
["dirt"] = 1.0,
}
----------------------------------------------------
@@ -0,0 +1,49 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Post-Process - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id = "ssfx_pp", sh=false ,gr = {
{ id= "ssfx_bloom", sh=true, precondition={ssfx_001_mcm.ssfx_module_installed,ssfx_pp_bloom}, output="ui_mcm_ssfx_module_not_installed", gr =
{
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_bloom_title",size= {512,50},spacing= 20 },
{id = "use_weather_mcm", type = "check", val = 1, def=false},
{id = "line", type = "line"},
{id = "threshold_mcm", type = "track", val = 2, min=1.0,max=10.0,step=0.1, def = 3.5},
{id = "exposure_mcm", type = "track", val = 2, min=1.0,max=100.0,step=0.1, def = 3.0},
{id = "line", type = "line"},
{id = "blur_mcm", type = "track", val = 2, min=1.0,max=5.0,step=0.1, def = 3.0},
{id = "line", type = "line"},
{id = "vibrance_mcm", type = "track", val = 2, min=0.0,max=10.0,step=0.1, def = 1.5},
{id = "sky_mcm", type = "track", val = 2, min=0.0,max=10.0,step=0.1, def = 0.6},
{id = "line", type = "line"},
{id = "lens_mcm", type = "track", val = 2, min=0.0,max=10.0,step=0.1, def = 1.5},
{id = "dirt_mcm", type = "track", val = 2, min=0.0,max=10.0,step=0.1, def = 1.0},
}
},
--{ id= "ssfx_soon", sh=true, precondition={ssfx_001_mcm.ssfx_module_installed,ssfx_rain_hud_raindrops}, output="ui_mcm_ssfx_module_not_installed", gr =
--{
--}
--},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,71 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: Rain script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Settings
local ssfx_rain_quality = 0
local ssfx_rain_max_drops = 0
local ssfx_rain_radius = 0
local ssfx_rain_alpha = 0
local ssfx_rain_brightness = 0
local ssfx_rain_refraction = 0
local ssfx_rain_reflection = 0
local ssfx_rain_len = 0
local ssfx_rain_width = 0
local ssfx_rain_speed = 0
local ssfx_rain_splash_alpha = 0
local ssfx_rain_splash_refraction = 0
-- Internal vars
module_installed = true
local function apply_interactive_grass_settings()
-- Apply command
get_console():execute("ssfx_rain_1 (" .. ssfx_rain_len .. "," .. ssfx_rain_width .. "," .. ssfx_rain_speed .. "," .. ssfx_rain_quality .. ")")
get_console():execute("ssfx_rain_2 (" .. ssfx_rain_alpha .. "," .. ssfx_rain_brightness .. "," .. ssfx_rain_refraction .."," .. ssfx_rain_reflection .. ")")
get_console():execute("ssfx_rain_3 (" .. ssfx_rain_splash_alpha .. "," .. ssfx_rain_splash_refraction .. ",0,0)")
get_console():execute("ssfx_rain_drops_setup (" .. ssfx_rain_max_drops .. "," .. ssfx_rain_radius .. ",0,0)")
end
local function update_settings()
-- Get settings
module_id = "ssfx_rain_module/ssfx_rain_main"
ssfx_rain_quality = ssfx_001_mcm.ssfx_get_setting(module_id, "quality", ssfx_rain_settings)
ssfx_rain_max_drops = ssfx_001_mcm.ssfx_get_setting(module_id, "max_drops", ssfx_rain_settings)
ssfx_rain_radius = ssfx_001_mcm.ssfx_get_setting(module_id, "radius", ssfx_rain_settings)
ssfx_rain_alpha = ssfx_001_mcm.ssfx_get_setting(module_id, "alpha", ssfx_rain_settings)
ssfx_rain_brightness = ssfx_001_mcm.ssfx_get_setting(module_id, "brightness", ssfx_rain_settings)
ssfx_rain_refraction = ssfx_001_mcm.ssfx_get_setting(module_id, "refraction", ssfx_rain_settings)
ssfx_rain_reflection = ssfx_001_mcm.ssfx_get_setting(module_id, "reflection", ssfx_rain_settings)
ssfx_rain_len = ssfx_001_mcm.ssfx_get_setting(module_id, "len", ssfx_rain_settings)
ssfx_rain_width = ssfx_001_mcm.ssfx_get_setting(module_id, "width", ssfx_rain_settings)
ssfx_rain_speed = ssfx_001_mcm.ssfx_get_setting(module_id, "speed", ssfx_rain_settings)
ssfx_rain_splash_alpha = ssfx_001_mcm.ssfx_get_setting(module_id, "splash_alpha", ssfx_rain_settings)
ssfx_rain_splash_refraction = ssfx_001_mcm.ssfx_get_setting(module_id, "splash_refraction", ssfx_rain_settings)
-- Apply settings
apply_interactive_grass_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", update_settings)
-- Read and apply settigns
update_settings()
end
@@ -0,0 +1,177 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: Rain - Footsteps
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Settings
local ssfx_rf_vol = 0
local ssfx_rf_vol_variation = 0
local ssfx_rf_vol_multi_without_rain = 0
local ssfx_rf_vol_multi_walk = 0
local ssfx_rf_vol_multi_run = 0
local ssfx_rf_jump_vol = 0
local ssfx_rf_land_vol = 0
-- Internal vars
module_installed = true
local Rain_Hemi = 0
local Rain_Factor = 0
local Footstep_Snd = {}
local Footstep_Jump_Snd = {}
local Footstep_Land_Snd = {}
local Weapon_Aiming = 0
local Last_Snd = -1
local JL_Counter = { ["jump"] = 0, ["land"] = 0 }
function actor_on_first_update()
Rain_Hemi = 0
Rain_Factor = 0
end
function on_game_load()
-- Preload all the sounds
Footstep_Snd[0] = sound_object([[material\human\step\rain_01]])
Footstep_Snd[1] = sound_object([[material\human\step\rain_02]])
Footstep_Snd[2] = sound_object([[material\human\step\rain_03]])
Footstep_Snd[3] = sound_object([[material\human\step\rain_04]])
Footstep_Snd[4] = sound_object([[material\human\step\rain_05]])
Footstep_Snd[5] = sound_object([[material\human\step\rain_06]])
Footstep_Snd[6] = sound_object([[material\human\step\rain_07]])
Footstep_Snd[7] = sound_object([[material\human\step\rain_08]])
Footstep_Jump_Snd[0] = sound_object([[material\human\step\rain_jump_01]])
Footstep_Jump_Snd[1] = sound_object([[material\human\step\rain_jump_02]])
Footstep_Jump_Snd[2] = sound_object([[material\human\step\rain_jump_03]])
Footstep_Land_Snd[0] = sound_object([[material\human\step\rain_land_01]])
Footstep_Land_Snd[1] = sound_object([[material\human\step\rain_land_02]])
Footstep_Land_Snd[2] = sound_object([[material\human\step\rain_land_03]])
end
local TestValue = 0
function actor_on_footstep()
local Base_Vol = clamp(level.rain_wetness() * 2.0, 0.0, 1.0) -- Base sound volume
if Base_Vol > 0 then
Rain_Hemi = level.rain_hemi() -- Use rain hemi to detect cover
Rain_Factor = clamp(level.rain_factor(), ssfx_rf_vol_multi_without_rain, 1.0) -- Lower volume when rain stop
Base_Vol = Base_Vol * Rain_Hemi * Rain_Factor
if (Base_Vol < 0.05) then return end -- Just skip
local Actor_State = level.actor_moving_state()
-- Slower
Actor_Crouch = ssfx_rf_vol_multi_walk * (bit_and(Actor_State, 16) ~= 0 and 1 or 0)
Actor_Walk = ssfx_rf_vol_multi_walk * (bit_and(Actor_State, 32) ~= 0 and 1 or 0)
Actor_Aiming = ssfx_rf_vol_multi_walk * Weapon_Aiming
-- Faster
Actor_Sprint = bit_and(Actor_State, 4096) ~= 0
-- Adjust volume
Vol_Mod = 1.0 - (Actor_Crouch + Actor_Walk + Actor_Aiming)
Vol_Mod = Actor_Sprint and ssfx_rf_vol_multi_run or Vol_Mod
local rand = math.random(0, 7) -- Random Sound
-- Avoid repeat
if rand == Last_Snd then
rand = (Last_Snd + 1) % 8
end
-- Play Sound and set volume
variation = math.random(0.0, ssfx_rf_vol_variation * 100) / 100
Footstep_Snd[rand]:play(db.actor,0,sound_object.s2d)
Footstep_Snd[rand].volume = clamp(Base_Vol * (ssfx_rf_vol + variation) * Vol_Mod, 0.0, 1.0);
--printdbg("* RAIN - FOOTSTEP : [%s] vol:%s base:%s", rand, Footstep_Snd[rand].volume, Base_Vol)
Last_Snd = rand
end
end
local function actor_on_jump()
if ssfx_rf_jump_vol > 0 then
ssfx_JumpLand_Snd(Footstep_Jump_Snd, ssfx_rf_jump_vol, "jump")
end
end
local function actor_on_land()
if ssfx_rf_land_vol > 0 then
ssfx_JumpLand_Snd(Footstep_Land_Snd, ssfx_rf_land_vol, "land")
end
end
function ssfx_JumpLand_Snd(SndDB, Vol, CntStr)
-- Check last Rain_Hemi
if (Rain_Hemi > 0.1) then
-- Play Sound and set volume
SndDB[JL_Counter[CntStr]]:play(db.actor,0,sound_object.s2d)
SndDB[JL_Counter[CntStr]].volume = Vol * Rain_Factor
-- Next Sound
JL_Counter[CntStr] = (JL_Counter[CntStr] + 1) % 3
end
end
local function ssfx_aim_in()
Weapon_Aiming = 1
end
local function ssfx_aim_out()
Weapon_Aiming = 0
end
function on_option_change()
-- Get settings
local module_id = "ssfx_rain_module/ssfx_rain_footsteps"
ssfx_rf_vol = ssfx_001_mcm.ssfx_get_setting(module_id, "main_vol", ssfx_rain_footsteps_settings)
ssfx_rf_vol_variation = ssfx_001_mcm.ssfx_get_setting(module_id, "vol_rnd", ssfx_rain_footsteps_settings)
ssfx_rf_vol_multi_without_rain = ssfx_001_mcm.ssfx_get_setting(module_id, "multi_no_rain", ssfx_rain_footsteps_settings)
ssfx_rf_vol_multi_walk = ssfx_001_mcm.ssfx_get_setting(module_id, "multi_walk", ssfx_rain_footsteps_settings)
ssfx_rf_vol_multi_run = ssfx_001_mcm.ssfx_get_setting(module_id, "multi_run", ssfx_rain_footsteps_settings)
ssfx_rf_jump_vol = ssfx_001_mcm.ssfx_get_setting(module_id, "jump_vol", ssfx_rain_footsteps_settings)
ssfx_rf_land_vol = ssfx_001_mcm.ssfx_get_setting(module_id, "land_vol", ssfx_rain_footsteps_settings)
end
function on_game_start()
-- General Functions
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
RegisterScriptCallback("on_option_change", on_option_change)
RegisterScriptCallback("on_game_load", on_game_load)
-- Actor Actions
RegisterScriptCallback("actor_on_weapon_zoom_in", ssfx_aim_in)
RegisterScriptCallback("actor_on_weapon_zoom_out", ssfx_aim_out)
RegisterScriptCallback("actor_on_jump", actor_on_jump)
RegisterScriptCallback("actor_on_land", actor_on_land)
RegisterScriptCallback("actor_on_footstep",actor_on_footstep)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,20 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: Rain Footsteps script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["main_vol"] = 0.4,
["vol_rnd"] = 0.15,
["multi_no_rain"] = 0.3,
["multi_walk"] = 0.33,
["multi_run"] = 1.4,
["jump_vol"] = 0.7,
["land_vol"] = 0.7,
}
----------------------------------------------------
@@ -0,0 +1,123 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: HUD raindrops
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Settings
local ssfx_hud_raindrops_density = 0
local ssfx_hud_raindrops_refle = 0
local ssfx_hud_raindrops_refra = 0
local ssfx_hud_raindrops_anim_speed = 0
local ssfx_hud_raindrops_build_speed = 0
local ssfx_hud_raindrops_drying_speed = 0
local ssfx_hud_raindrops_size = 0
local ssfx_hud_raindrops_gloss = 0
local ssfx_hud_raindrops_extragloss = 0
-- Internal
module_installed = true
local drops_int = 0
local drops_anim = 0
local Rain_Hemi = 0;
local dbug_time = 0;
local function actor_on_update()
Rain_factor = level.rain_factor();
-- Don't do anything if intensity of drops is <= 0 and isn't raining
if (Rain_factor <= 0 and drops_int <= 0) then
return
end
delta_time = device().time_delta;
-- If raining
if (Rain_factor > 0) then
Rain_Hemi = level.rain_hemi()
if (Rain_Hemi > 0.15) then
-- Use rain intensity factor to slowdown <-> speedup rain animation
rain_speed_factor = (1.5 - Rain_factor) * 10
drops_anim = drops_anim + ssfx_hud_raindrops_anim_speed * delta_time / rain_speed_factor
drops_int = drops_int + ssfx_hud_raindrops_build_speed * delta_time / 100
else
drops_int = drops_int - ssfx_hud_raindrops_drying_speed * delta_time / 100
end
else
drops_int = drops_int - ssfx_hud_raindrops_drying_speed * delta_time / 100
end
-- Saturate drops intensity
drops_int = clamp(drops_int, 0.0, 1.0)
-- Reset after 99k
if (drops_anim > 99000) then
drops_anim = 0
end
-- Update shader data
ssfx_update_raindrops()
--dbug_time = dbug_time + 1
--if (dbug_time % 10 == 0) then printdbg("* RAIN - RAINDROPS : [%s] [%s]", drops_anim, drops_int) end
end
function actor_on_first_update()
Rain_Hemi = 0
drops_anim = 0
drops_int = 0
ssfx_update_raindrops()
end
function ssfx_update_raindrops()
get_console():execute("ssfx_hud_drops_1 (" .. drops_anim .. "," .. drops_int .. "," .. (ssfx_hud_raindrops_refle) .. "," .. (ssfx_hud_raindrops_refra) .. ")")
end
local function apply_extra_settings()
val_density = 0.15 * (3.5 - ssfx_hud_raindrops_density) -- 0.5 ~ 3.0
val_texsize = 2.0 - ssfx_hud_raindrops_size
get_console():execute("ssfx_hud_drops_2 (" .. val_density .. "," .. val_texsize .. "," .. ssfx_hud_raindrops_extragloss .. "," .. ssfx_hud_raindrops_gloss .. ")")
end
function on_option_change()
-- Get settings
local module_id = "ssfx_rain_module/ssfx_rain_hud_raindrops"
ssfx_hud_raindrops_density = ssfx_001_mcm.ssfx_get_setting(module_id, "density", ssfx_rain_hud_raindrops_settings)
ssfx_hud_raindrops_refle = 30 * ssfx_001_mcm.ssfx_get_setting(module_id, "reflection_str", ssfx_rain_hud_raindrops_settings)
ssfx_hud_raindrops_refra = 0.05 * ssfx_001_mcm.ssfx_get_setting(module_id, "refraction_str", ssfx_rain_hud_raindrops_settings)
ssfx_hud_raindrops_anim_speed = 0.02 * ssfx_001_mcm.ssfx_get_setting(module_id, "animation_speed", ssfx_rain_hud_raindrops_settings)
ssfx_hud_raindrops_build_speed = 0.009 * ssfx_001_mcm.ssfx_get_setting(module_id, "buildup", ssfx_rain_hud_raindrops_settings)
ssfx_hud_raindrops_drying_speed = 0.001 * ssfx_001_mcm.ssfx_get_setting(module_id, "drying", ssfx_rain_hud_raindrops_settings)
ssfx_hud_raindrops_size = ssfx_001_mcm.ssfx_get_setting(module_id, "size", ssfx_rain_hud_raindrops_settings)
ssfx_hud_raindrops_gloss = ssfx_001_mcm.ssfx_get_setting(module_id, "gloss", ssfx_rain_hud_raindrops_settings)
ssfx_hud_raindrops_extragloss = ssfx_001_mcm.ssfx_get_setting(module_id, "extra_gloss", ssfx_rain_hud_raindrops_settings)
apply_extra_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
RegisterScriptCallback("on_option_change", on_option_change)
RegisterScriptCallback("actor_on_update", actor_on_update)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,22 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: HUD raindrops - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["density"] = 2.0, -- Quantity of drops
["reflection_str"] = 1, -- Refrelction intensity
["refraction_str"] = 1, -- Refraction intensity
["animation_speed"] = 1, -- Speed of the drops animation
["buildup"] = 1, -- Drops build up speed
["drying"] = 1, -- Drying speed
["size"] = 0.75, -- Size of the drops
["gloss"] = 2, -- Raindrops gloss intensity
["extra_gloss"] = 0, -- Extra gloss to the weapons HUD elements when raining
}
----------------------------------------------------
@@ -0,0 +1,88 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: Main Rain - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id = "ssfx_rain_module", sh=false ,gr = {
{ id= "ssfx_rain_main", sh=true, precondition={ssfx_001_mcm.ssfx_module_installed,ssfx_rain}, output="ui_mcm_ssfx_module_not_installed", gr =
{
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_rain_title",size= {512,50},spacing= 20 },
{id = "quality_mcm", type = "list", val = 2, content={ {0.0,"ssfx_quality_low"} , {1.0,"ssfx_quality_medium"}, {2.0,"ssfx_quality_high"}}, def=2.0, restart=true},
{id = "line", type = "line"},
{id = "max_drops_mcm", type = "track", val = 2, min=1000,max=5000,step=1.0, def = 2500},
{id = "radius_mcm", type = "track", val = 2, min=10,max=30,step=0.1, def = 15.0},
{id = "line", type = "line"},
{id = "speed_mcm", type = "track", val = 2, min=0.1,max=2.0,step=0.1, def = 0.6},
{id = "len_mcm", type = "track", val = 2, min=0.1,max=5.0,step=0.1, def = 2.0},
{id = "width_mcm", type = "track", val = 2, min=0.01,max=0.5,step=0.01, def = 0.1},
{id = "line", type = "line"},
{id = "alpha_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.8},
{id = "brightness_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.3},
{id = "refraction_mcm", type = "track", val = 2, min=0.0,max=10.0,step=0.1, def = 1.0},
{id = "reflection_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 1.0},
{id = "line", type = "line"},
{id = "splash_alpha_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.5},
{id = "splash_refraction_mcm", type = "track", val = 2, min=0.0,max=10.0,step=0.1, def = 1.5},
}
},
{ id= "ssfx_rain_footsteps", sh=true, precondition={ssfx_001_mcm.ssfx_module_installed,ssfx_rain_footsteps}, output="ui_mcm_ssfx_module_not_installed", gr =
{
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_rain_footsteps_title",size= {512,50},spacing= 20 },
{id = "main_vol_mcm", type = "track", val = 2, min = 0.0, max = 1.0, step = 0.01, def = 0.4},
{id = "vol_rnd_mcm", type = "track", val = 2, min = 0.0, max = 1.0, step = 0.01, def = 0.15},
{id = "line", type = "line"},
{id = "multi_no_rain_mcm", type = "track", val = 2, min=0.0, max = 1.0, step = 0.01, def = 0.3},
{id = "multi_walk_mcm", type = "track", val = 2, min=0.0, max = 1.0, step = 0.01, def = 0.33},
{id = "multi_run_mcm", type = "track", val = 2, min=0.0, max = 2.0, step = 0.01, def = 1.4},
{id = "line", type = "line"},
{id = "jump_vol_mcm", type = "track", val = 2, min = 0.0, max = 1.0, step=0.01, def = 0.7},
{id = "land_vol_mcm", type = "track", val = 2, min = 0.0, max = 1.0, step=0.01, def = 0.7},
}
},
{ id= "ssfx_rain_hud_raindrops", sh=true, precondition={ssfx_001_mcm.ssfx_module_installed,ssfx_rain_hud_raindrops}, output="ui_mcm_ssfx_module_not_installed", gr =
{
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_hud_raindrops_title",size= {512,50},spacing= 20 },
{id = "density_mcm", type = "track", val = 2, min=0.5, max=3.0, step=0.01, def = 2.0},
{id = "reflection_str_mcm", type = "track", val = 2, min=0.5, max=1.5, step=0.01, def = 1.0},
{id = "refraction_str_mcm", type = "track", val = 2, min=0.5, max=1.5, step=0.01, def = 1.0},
{id = "line", type = "line"},
{id = "animation_speed_mcm", type = "track", val = 2, min=0.5, max=1.5, step=0.1, def = 1.0},
{id = "buildup_mcm", type = "track", val = 2, min=0.5, max=2.0, step=0.1, def = 1.0},
{id = "drying_mcm", type = "track", val = 2, min=0.5, max=2.0, step=0.1, def = 1.0},
{id = "size_mcm", type = "track", val = 2, min=0.5, max=1.5, step=0.01, def = 0.75},
{id = "line", type = "line"},
{id = "gloss_mcm", type = "track", val = 2, min=0.0, max=10.0, step=0.1, def = 2.0},
{id = "extra_gloss_mcm", type = "track", val = 2, min=0.0, max=1.0, step=0.01, def = 0.0},
}
},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,27 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: Rain script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["quality"] = 2,
["max_drops"] = 2500,
["radius"] = 15,
["alpha"] = 0.8,
["brightness"] = 0.3,
["refraction"] = 1.0,
["reflection"] = 1.0,
["len"] = 2,
["width"] = 0.1,
["speed"] = 0.6,
["splash_alpha"] = 0.5,
["splash_refraction"] = 1.5,
}
----------------------------------------------------
@@ -0,0 +1,73 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 15
-- @ Description: Shadow Cascades script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Shadow Cascades
local ssfx_shw_cas_size_1 = 0
local ssfx_shw_cas_size_2 = 0
local ssfx_shw_cas_size_3 = 0
-- Grass shadows settings
local ssfx_shw_cas_grass_quality = 0
local ssfx_shw_cas_grass_distance = 0
local ssfx_shw_cas_grass_nondir_max_distance = 0
function apply_shadow_cascades_settings()
get_console():execute("ssfx_shadow_cascades (" .. ssfx_shw_cas_size_1 .. "," .. ssfx_shw_cas_size_2 .. "," .. ssfx_shw_cas_size_3 .. ")")
get_console():execute("ssfx_grass_shadows (" .. ssfx_shw_cas_grass_quality .. "," .. ssfx_shw_cas_grass_distance .. "," .. ssfx_shw_cas_grass_nondir_max_distance .. ",0)")
end
function on_option_change()
-- Get settings
ssfx_shw_cas_size_1 = ssfx_001_mcm.ssfx_get_setting("shw_cascades", "size_1", ssfx_shadow_cascades_settings)
ssfx_shw_cas_size_2 = ssfx_001_mcm.ssfx_get_setting("shw_cascades", "size_2", ssfx_shadow_cascades_settings)
ssfx_shw_cas_size_3 = ssfx_001_mcm.ssfx_get_setting("shw_cascades", "size_3", ssfx_shadow_cascades_settings)
ssfx_shw_cas_grass_quality = ssfx_001_mcm.ssfx_get_setting("shw_cascades", "grass_shw_quality", ssfx_shadow_cascades_settings)
ssfx_shw_cas_grass_distance = ssfx_001_mcm.ssfx_get_setting("shw_cascades", "grass_shw_distance", ssfx_shadow_cascades_settings) / 100
ssfx_shw_cas_grass_nondir_max_distance = ssfx_001_mcm.ssfx_get_setting("shw_cascades", "grass_shw_nondir_maxdistance", ssfx_shadow_cascades_settings)
-- Clamp Distance 0 ~ 1
if (ssfx_shw_cas_grass_distance < 0) then
ssfx_shw_cas_grass_distance = 0
elseif (ssfx_shw_cas_grass_distance > 1) then
ssfx_shw_cas_grass_distance = 1
end
-- Limit cascades sizes to avoid rendering glitches
if (ssfx_shw_cas_size_1 < 10) then
ssfx_shw_cas_size_1 = 10
elseif (ssfx_shw_cas_size_1 > 30) then
ssfx_shw_cas_size_1 = 30
end
if (ssfx_shw_cas_size_2 < 40) then
ssfx_shw_cas_size_2 = 40
elseif (ssfx_shw_cas_size_2 > 110) then
ssfx_shw_cas_size_2 = 110
end
if (ssfx_shw_cas_size_3 < 120) then
ssfx_shw_cas_size_3 = 120
elseif (ssfx_shw_cas_size_3 > 300) then
ssfx_shw_cas_size_3 = 300
end
-- Apply settings
apply_shadow_cascades_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,26 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 15
-- @ Description: Shadow Cascades script - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "shw_cascades", sh=true, text="ui_mcm_ssfx_module_shw_cascades", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_shw_cascades_title",size= {512,50},spacing= 20 },
{id = "size_1_mcm", type = "track", val = 2, min=10.0,max=30,step=1.0, def = 20},
{id = "size_2_mcm", type = "track", val = 2, min=40.0,max=110,step=1.0, def = 60},
{id = "size_3_mcm", type = "track", val = 2, min=120.0,max=300,step=1.0, def = 160},
{ id = "line", type = "line" },
{id = "grass_shw_quality_mcm", type = "list", val = 2, content={ {0.0,"shw_cascades_low"} , {1.0,"shw_cascades_medium"}, {2.0,"shw_cascades_high"}, {3.0,"shw_cascades_ultra"}}, def=0.0},
{id = "grass_shw_distance_mcm", type = "track", val = 2, min=0.0,max=100.0,step=1.0, def = 35},
{id = "grass_shw_nondir_maxdistance_mcm", type = "track", val = 2, min=10.0,max=50.0,step=1.0, def = 30},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,28 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 15
-- @ Description: Shadow Cascades script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
-- Near Cascade Size. Try to use a lower size value to improve the quality of your sun shadows.
["size_1"] = 20,
-- Mid Cascade Size. Try to use a lower size value to improve the quality of your sun shadows.
["size_2"] = 60,
-- Far Cascade Size. This cascade define the final rendering distance of your sun shadows. Lower values will improve performance, higher values will improve your distant shadows at the cost of performance.
["size_3"] = 160,
-- 0 = Only NEAR cascade render grass shadows | 1 = Extend grass shadows to the mid cascade | 2 = All cascades render grass shadows | 3 = All lights will cast grass shadows
["grass_shw_quality"] = 0,
-- Rendering distance of sun grass shadows. The value is porcentual to your grass rendering distance. Lower values will improve performance.
["grass_shw_distance"] = 35,
-- This value adjust the rendering distance of grass shadows for non-directional lights. Lower values will improve performance, but you might notice when the shadows stop being rendered.
["grass_shw_nondir_maxdistance"] = 30,
}
----------------------------------------------------
@@ -0,0 +1,83 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Shadows script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Shadows
local ssfx_shadows_quality = 0
local ssfx_shadows_lod_min = 0
local ssfx_shadows_lod_max = 0
--local ssfx_shadows_volumetric_res = 0;
local ssfx_shadows_volumetric = false
local ssfx_shadows_volumetric_int = 0
local ssfx_shadows_volumetric_quality = 0
function apply_shadows_settings()
get_console():execute("r2_ls_depth_bias -0.00005" )
get_console():execute("r2_ls_squality " .. ssfx_shadows_quality )
get_console():execute("ssfx_shadows (" .. ssfx_shadows_lod_min .. "," .. ssfx_shadows_lod_max .. ",0)")
get_console():execute("ssfx_volumetric (" .. (ssfx_shadows_volumetric and 1 or 0) .. "," .. ssfx_shadows_volumetric_int .. "," .. ssfx_shadows_volumetric_quality .. ", 1)")
end
function on_option_change()
-- Get settings
ssfx_shadows_quality = ssfx_001_mcm.ssfx_get_setting("shadows", "lod_quality", ssfx_shadows_settings)
ssfx_shadows_lod_min = ssfx_001_mcm.ssfx_get_setting("shadows", "lod_min", ssfx_shadows_settings)
ssfx_shadows_lod_max = ssfx_001_mcm.ssfx_get_setting("shadows", "lod_max", ssfx_shadows_settings)
--ssfx_shadows_volumetric_res = ssfx_001_mcm.ssfx_get_setting("shadows", "volumetric_resolution", ssfx_shadows_settings)
ssfx_shadows_volumetric = ssfx_001_mcm.ssfx_get_setting("shadows", "volumetric_force", ssfx_shadows_settings)
ssfx_shadows_volumetric_int = ssfx_001_mcm.ssfx_get_setting("shadows", "volumetric_int", ssfx_shadows_settings)
ssfx_shadows_volumetric_quality = ssfx_001_mcm.ssfx_get_setting("shadows", "volumetric_quality", ssfx_shadows_settings)
-- Min resolution
if (ssfx_shadows_lod_min == 0) then
ssfx_shadows_lod_min = 128
elseif (ssfx_shadows_lod_min == 1) then
ssfx_shadows_lod_min = 256
elseif (ssfx_shadows_lod_min == 2) then
ssfx_shadows_lod_min = 512
elseif (ssfx_shadows_lod_min == 3) then
ssfx_shadows_lod_min = 768
elseif (ssfx_shadows_lod_min == 4) then
ssfx_shadows_lod_min = 1536
else
ssfx_shadows_lod_min = 768 -- Vanilla value
end
-- Max resolution
if (ssfx_shadows_lod_max == 0) then
ssfx_shadows_lod_max = 1536
elseif (ssfx_shadows_lod_max == 1) then
ssfx_shadows_lod_max = 2048
elseif (ssfx_shadows_lod_max == 2) then
ssfx_shadows_lod_max = 2560
elseif (ssfx_shadows_lod_max == 3) then
ssfx_shadows_lod_max = 3072
elseif (ssfx_shadows_lod_max == 4) then
ssfx_shadows_lod_max = 4096
else
ssfx_shadows_lod_max = 1536 -- Vanilla value
end
-- Volumetric resolution
--ssfx_shadows_volumetric_res = 100.0 / ssfx_shadows_volumetric_res
-- Apply settings
apply_shadows_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,27 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Shadows - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "shadows", sh=true, text="ui_mcm_ssfx_module_shadows", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_shadows_title",size= {512,50},spacing= 20 },
{id = "lod_quality_mcm", type = "track", val = 2, min=0.5,max=3,step=0.1, def = 1},
{id = "lod_min_mcm", type = "list", val = 2, content={ {0.0,"shadows_128"} , {1.0,"shadows_256"}, {2.0,"shadows_512"}, {3.0,"shadows_768_V"}, {4.0,"shadows_1536"}}, def=1.0},
{id = "lod_max_mcm", type = "list", val = 2, content={ {0.0,"shadows_1536_V"} , {1.0,"shadows_2048"}, {2.0,"shadows_2560"}, {3.0,"shadows_3072"}, {4.0,"shadows_4096"}}, def=0.0},
{ id = "line", type = "line" },
{id = "volumetric_force_mcm", type = "check", val = 1, def=true},
--{id = "volumetric_resolution_mcm", type = "track", val = 2, min=14,max=100,step=1, def = 14},
{id = "volumetric_int_mcm", type = "track", val = 2, min=0.0,max=3.0,step=0.1, def = 1.0},
{id = "volumetric_quality_mcm", type = "list", val = 2, content={ {1.0,"ssfx_quality_very_low"} , {2.0,"ssfx_quality_low"}, {3.0,"ssfx_quality_medium"}, {4.0,"ssfx_quality_high"}, {5.0,"ssfx_quality_veryhigh"}}, def=4.0},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,31 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 19
-- @ Description: Shadows - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
-- Base shadow map quality. The higher the value the higher the base shadow resolution and resolution through distance.
["lod_quality"] = 1,
-- Minimum shadow map resolution. When lights are away from the player the resolution of shadows drop to improve performance ( at the cost of image quality ).
["lod_min"] = 256,
-- Maximum shadow map resolution. When lights are closer, the resolution increases to improve the image quality of shadows ( at the cost of performance ).
["lod_max"] = 1536,
-- Force the volumetric effect on all non-directional lights. You need to reload the map to apply the setting.
["volumetric_force"] = true,
-- Volumetric rendering resolution. The value is the porcentage of your current resolution. [ min: 15% ~ max: 100% ]
["volumetric_resolution"] = 25,
-- Set the intensity of the volumetric effect.
["volumetric_int"] = 0.02,
-- Volumetric quality.
["volumetric_quality"] = 1.5,
}
----------------------------------------------------
@@ -0,0 +1,58 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 20
-- @ Description: SSR script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Screen Space Reflections
local ssfx_ssr_quality = 0
local ssfx_ssr_int = 0
local ssfx_ssr_int_sky = 0
local ssfx_ssr_int_wpn = 0
local ssfx_ssr_int_wpn_max = 0
local ssfx_ssr_scale = 0
local ssfx_ssr_blur = 0
--local ssfx_ssr_temporal = 0
local ssfx_ssr_noise = 0
function apply_ssr_settings()
get_console():execute("ssfx_ssr_quality " .. ssfx_ssr_quality)
get_console():execute("ssfx_ssr (" .. ssfx_ssr_scale .. "," .. ssfx_ssr_blur .. "," .. 0 .."," .. (ssfx_ssr_noise and 1 or 0) .. ")")
get_console():execute("ssfx_ssr_2 (" .. ssfx_ssr_int .. "," .. ssfx_ssr_int_sky .. "," .. ssfx_ssr_int_wpn .."," .. ssfx_ssr_int_wpn_max .. ")")
end
function on_option_change()
-- Get settings
ssfx_ssr_quality = ssfx_001_mcm.ssfx_get_setting("ssr", "quality", ssfx_ssr_settings)
ssfx_ssr_int = ssfx_001_mcm.ssfx_get_setting("ssr", "general_int", ssfx_ssr_settings)
ssfx_ssr_int_sky = ssfx_001_mcm.ssfx_get_setting("ssr", "sky_int", ssfx_ssr_settings)
ssfx_ssr_int_wpn = ssfx_001_mcm.ssfx_get_setting("ssr", "weapon_int", ssfx_ssr_settings)
ssfx_ssr_int_wpn_max = ssfx_001_mcm.ssfx_get_setting("ssr", "weapon_int_max", ssfx_ssr_settings)
ssfx_ssr_scale = ssfx_001_mcm.ssfx_get_setting("ssr", "render_scale", ssfx_ssr_settings)
ssfx_ssr_blur = ssfx_001_mcm.ssfx_get_setting("ssr", "blur", ssfx_ssr_settings)
--ssfx_ssr_temporal = ssfx_001_mcm.ssfx_get_setting("ssr", "temporal", ssfx_ssr_settings)
ssfx_ssr_noise = ssfx_001_mcm.ssfx_get_setting("ssr", "use_noise", ssfx_ssr_settings)
ssfx_ssr_scale = 1.0 / ssfx_ssr_scale -- 1.0 = 1.0 ~ 0.5 = 2.0
-- Apply settings
apply_ssr_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,33 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 20
-- @ Description: SSR - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "ssr", sh=true, text="ui_mcm_ssfx_module_ssr", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_ssr_title",size= {512,50},spacing= 20 },
{id = "quality_mcm", type = "list", val = 2, content={ {0.0,"ssfx_quality_very_low"} , {1.0,"ssfx_quality_low"}, {2.0,"ssfx_quality_medium"}, {3.0,"ssfx_quality_high"}, {4.0,"ssfx_quality_veryhigh"}, {5.0,"ssfx_quality_ultra"}}, def=0.0, restart=true},
{id = "render_scale_mcm", type = "track", val = 2, min=0.3,max=1.0,step=0.1, def = 1.0},
{ id = "line", type = "line" },
{id = "blur_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.2},
{id = "use_noise_mcm", type = "check", val = 1, def=false},
{ id = "line", type = "line" },
{id = "general_int_mcm", type = "track", val = 2, min=0.0,max=2.0,step=0.01, def = 1.0},
{id = "sky_int_mcm", type = "track", val = 2, min=0.0,max=2.0,step=0.01, def = 1.0},
{id = "weapon_int_mcm", type = "track", val = 2, min=0.0,max=2.0,step=0.01, def = 0.5},
{id = "weapon_int_max_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.02},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,25 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: Rain script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["quality"] = 0,
["render_scale"] = 0.5,
["blur"] = 0.0,
["temporal"] = 0.6,
["use_noise"] = 0.0,
["general_int"] = 1.0,
["sky_int"] = 1.0,
["weapon_int"] = 1.0,
["weapon_int_max"] = 0.02,
}
----------------------------------------------------
@@ -0,0 +1,49 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: SSS script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- SSS setup
local ssfx_sss_dir_quality = 0
local ssfx_sss_omni_quality = 0
local ssfx_sss_enable_dir = 0
local ssfx_sss_enable_omni = 0
local ssfx_sss_len_dir = 0
local ssfx_sss_len_omni = 0
-- Samples, Range, Height, Water Limit
function apply_sss_settings()
get_console():execute("ssfx_sss_quality (" .. ssfx_sss_dir_quality .. "," .. ssfx_sss_omni_quality .. "," .. (ssfx_sss_enable_dir and 1 or 0) .. "," .. (ssfx_sss_enable_omni and 1 or 0) .. ")")
get_console():execute("ssfx_sss (" .. ssfx_sss_len_dir .. "," .. ssfx_sss_len_omni .. ",0,0)")
end
function on_option_change()
-- Get settings
ssfx_sss_dir_quality = ssfx_001_mcm.ssfx_get_setting("sss", "quality_dir", ssfx_sss_settings)
ssfx_sss_omni_quality = ssfx_001_mcm.ssfx_get_setting("sss", "quality_point", ssfx_sss_settings)
ssfx_sss_enable_dir = ssfx_001_mcm.ssfx_get_setting("sss", "enable_dir", ssfx_sss_settings)
ssfx_sss_enable_omni = ssfx_001_mcm.ssfx_get_setting("sss", "enable_point", ssfx_sss_settings)
ssfx_sss_len_dir = ssfx_001_mcm.ssfx_get_setting("sss", "len_dir", ssfx_sss_settings)
ssfx_sss_len_omni = ssfx_001_mcm.ssfx_get_setting("sss", "len_point", ssfx_sss_settings)
-- Apply settings
apply_sss_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,29 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: SSS - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "sss", sh=true, text="ui_mcm_ssfx_module_sss", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_sss_title",size= {512,50},spacing= 20 },
{id = "quality_dir_mcm", type = "list", val = 2, content={ {6.0,"ssfx_quality_low"}, {12.0,"ssfx_quality_medium"}, {18.0,"ssfx_quality_high"}, {24.0,"ssfx_quality_veryhigh"} }, def=12.0, restart=true},
{id = "quality_point_mcm", type = "list", val = 2, content={ {2.0,"ssfx_quality_low"}, {4.0,"ssfx_quality_medium"}, {6.0,"ssfx_quality_high"}, {8.0,"ssfx_quality_veryhigh"} }, def=4.0, restart=true},
{ id = "line", type = "line" },
{id = "enable_dir_mcm", type = "check", val = 1, def=true },
{id = "enable_point_mcm", type = "check", val = 1, def=true },
{ id = "line", type = "line" },
{id = "len_dir_mcm", type = "track", val = 2, min=0.1,max=2.0,step=0.1, def = 1.0},
{id = "len_point_mcm", type = "track", val = 2, min=0.1,max=2.0,step=0.1, def = 1.0},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,20 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: SSS script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["quality_dir"] = 12,
["quality_point"] = 4,
["enable_dir"] = 1.0,
["enable_point"] = 1.0,
["len_dir"] = 1.0,
["len_point"] = 1.0,
}
----------------------------------------------------
@@ -0,0 +1,63 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Terrain script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Terrain setup
local ssfx_terrain_distance = 0
local ssfx_terrain_pom_quality = 0
local ssfx_terrain_pom_refine = 0
local ssfx_terrain_pom_range = 0
local ssfx_terrain_pom_height = 0
local ssfx_terrain_pom_water = 0
local ssfx_terrain_grass_align = 0
local ssfx_terrain_grass_slope = 0
-- Samples, Range, Height, Water Limit
function apply_terrain_settings()
get_console():execute("ssfx_terrain_quality (" .. ssfx_terrain_distance .. ",0,0,0)")
get_console():execute("ssfx_terrain_grass_align " .. (ssfx_terrain_grass_align and 1 or 0))
get_console():execute("ssfx_terrain_grass_slope " .. ssfx_terrain_grass_slope)
get_console():execute("ssfx_terrain_pom (" .. ssfx_terrain_pom_quality .. "," .. ssfx_terrain_pom_range .. "," .. ssfx_terrain_pom_height .."," .. ssfx_terrain_pom_water .. ")")
get_console():execute("ssfx_terrain_pom_refine " .. (ssfx_terrain_pom_refine and 1 or 0))
end
function on_option_change()
-- Get settings
ssfx_terrain_distance = ssfx_001_mcm.ssfx_get_setting("terrain", "distance", ssfx_terrain_settings)
ssfx_terrain_pom_quality = ssfx_001_mcm.ssfx_get_setting("terrain", "pom_quality", ssfx_terrain_settings)
ssfx_terrain_pom_refine = ssfx_001_mcm.ssfx_get_setting("terrain", "pom_refine", ssfx_terrain_settings)
ssfx_terrain_pom_range = ssfx_001_mcm.ssfx_get_setting("terrain", "pom_range", ssfx_terrain_settings)
ssfx_terrain_pom_height = ssfx_001_mcm.ssfx_get_setting("terrain", "pom_height", ssfx_terrain_settings)
ssfx_terrain_pom_water = ssfx_001_mcm.ssfx_get_setting("terrain", "pom_water_level", ssfx_terrain_settings)
ssfx_terrain_grass_align = ssfx_001_mcm.ssfx_get_setting("terrain", "grass_align", ssfx_terrain_settings)
ssfx_terrain_grass_slope = ssfx_001_mcm.ssfx_get_setting("terrain", "grass_slope", ssfx_terrain_settings)
-- Convert from degrees to 0 ~ 1
ssfx_terrain_grass_slope = ssfx_terrain_grass_slope / 90
-- Apply settings
apply_terrain_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,36 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Terrain - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "terrain", sh=true, text="ui_mcm_ssfx_module_terrain", gr = {
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_terrain_title",size= {512,50},spacing= 20 },
{id = "distance_mcm", type = "track", val = 2, min=0.0,max=40.0,step=1.0, def = 8.0},
{id = "line", type = "line"},
{id = "pom_quality_mcm", type = "list", val = 2, content={ {12.0,"ssfx_quality_low"}, {24.0,"ssfx_quality_medium"}, {36.0,"ssfx_quality_high"}}, def=12.0},
{id = "pom_refine_mcm", type = "check", val = 1, def=false, restart=true},
{id = "line", type = "line"},
{id = "pom_range_mcm", type = "track", val = 2, min=0.0,max=40.0,step=0.1, def = 20},
{id = "pom_height_mcm", type = "track", val = 2, min=0.01,max=0.1,step=0.01, def = 0.04},
{id = "pom_water_level_mcm", type = "track", val = 2, min=0.0,max=2.0,step=0.1, def = 1.0},
{id = "line", type = "line"},
{id = "grass_align_mcm", type = "check", val = 1, def=false},
{id = "grass_slope_mcm", type = "track", val = 2, min=0.0, max=90.0, step=1.0, def = 90.0}, -- 27
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,61 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 20
-- @ Description: Terrain - Parallax Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Internal vars
local ssfx_parallax_setup = {
["jupiter"] = { o1 = -0.05, o2 = -0.05, o3 = 0.05, o4 = -0.15 },
-- ["jupiter_underground"] = { },
["k00_marsh"] = { o1 = -0.13, o2 = -0.13, o3 = -0.13, o4 = -0.13 },
["k01_darkscape"] = { o1 = -0.13, o2 = -0.05, o3 = -0.13, o4 = 0.0 },
["k02_trucks_cemetery"] = { o1 = -0.07, o2 = -0.05, o3 = -0.13, o4 = 0.0 },
["l01_escape"] = { o1 = -0.1, o2 = -0.05, o3 = -0.1, o4 = 0.0 },
["l02_garbage"] = { o1 = -0.13, o2 = -0.05, o3 = -0.13, o4 = -0.1 },
["l03_agroprom"] = { o1 = -0.07, o2 = -0.05, o3 = -0.13, o4 = -0.1 },
-- ["l03u_agr_underground"] = { },
["l04_darkvalley"] = { o1 = -0.07, o2 = -0.05, o3 = -0.07, o4 = -0.1 },
-- ["l04u_labx18"] = { },
["l05_bar"] = { o1 = -0.07, o2 = -0.05, o3 = -0.13, o4 = 0.0 },
["l06_rostok"] = { o1 = -0.07, o2 = -0.05, o3 = -0.07, o4 = 0.0 },
["l07_military"] = { o1 = -0.07, o2 = -0.05, o3 = 0.0, o4 = -0.05 },
["l08_yantar"] = { o1 = -0.13, o2 = -0.05, o3 = -0.13, o4 = 0.0 },
-- ["l08u_brainlab"] = { },
["l09_deadcity"] = { o1 = -0.13, o2 = -0.05, o3 = -0.13, o4 = 0.0 },
["l10_limansk"] = { o1 = -0.13, o2 = -0.05, o3 = 0.0, o4 = 0.0 },
["l10_radar"] = { o1 = -0.07, o2 = -0.05, o3 = -0.07, o4 = 0.0 },
["l10_red_forest"] = { o1 = -0.13, o2 = -0.05, o3 = -0.07, o4 = -0.1 },
-- ["l10u_bunker"] = { },
["l11_hospital"] = { o1 = -0.13, o2 = -0.13, o3 = -0.13, o4 = -0.13 },
["l11_pripyat"] = { o1 = -0.1, o2 = -0.05, o3 = 0.0, o4 = -0.05 },
["l12_stancia"] = { o1 = -0.1, o2 = -0.05, o3 = 0.0, o4 = -0.1 },
["l12_stancia_2"] = { o1 = -0.1, o2 = -0.05, o3 = 0.0, o4 = 0.0 },
-- ["l12u_control_monolith"] = { },
-- ["l12u_sarcofag"] = { },
["l13_generators"] = { o1 = -0.07, o2 = -0.07, o3 = -0.13, o4 = -0.05 },
-- ["l13u_warlab"] = { },
-- ["labx8"] = { },
["pripyat"] = { o1 = -0.13, o2 = -0.05, o3 = -0.05, o4 = -0.1 },
["zaton"] = { o1 = -0.07, o2 = -0.05, o3 = -0.13, o4 = -0.1 },
["y04_pole"] = { o1 = -0.07, o2 = -0.05, o3 = -0.07, o4 = -0.07 },
}
local function actor_on_first_update()
if (ssfx_parallax_setup[level.name()]) then
local Setup = ssfx_parallax_setup[level.name()];
get_console():execute("ssfx_terrain_offset (" .. Setup.o1 .. "," .. Setup.o2 .. "," .. Setup.o3 .. "," .. Setup.o4 .. ")")
else
get_console():execute("ssfx_terrain_offset ( 0, 0, 0, 0 )")
end
end
function on_game_start()
-- General Functions
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
end
@@ -0,0 +1,23 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 22
-- @ Description: Terrain script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["distance"] = 8.0,
["pom_quality"] = 12,
["pom_refine"] = 0,
["pom_range"] = 20,
["pom_height"] = 0.04,
["pom_water_level"] = 1.0,
["grass_align"] = 0.0,
["grass_slope"] = 90.0,
}
----------------------------------------------------
@@ -0,0 +1,36 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 18
-- @ Description: Underground Check ( SSR )
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Internal vars
local underground_maps = {
l03u_agr_underground = true,
jupiter_underground = true,
l08u_brainlab = true,
l04u_labx18 = true,
l10u_bunker = true,
labx8 = true,
l12u_sarcofag = true,
l12u_control_monolith = true,
l13u_warlab = true
}
local function is_underground_map()
local level_name = level.name()
-- Enable/Disable SSR if the map is underground/overground
if (underground_maps[level_name]) then
get_console():execute("ssfx_is_underground 1")
else
get_console():execute("ssfx_is_underground 0")
end
end
function on_game_start()
-- General Functions
RegisterScriptCallback("actor_on_first_update", is_underground_map)
end
@@ -0,0 +1,70 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: Water script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Settings
local ssfx_water_res = 0
local ssfx_water_blur = 0
local ssfx_water_blur_pattern = 0
local ssfx_water_parallax_height = 0
local ssfx_water_distortion = 0
local ssfx_water_turbidity = 0
local ssfx_water_softborder = 0
local ssfx_water_reflection = 0
local ssfx_water_specular = 0
local ssfx_water_caustics = 0
local ssfx_water_ripples = 0
-- Internal vars
module_installed = true
local function apply_water_settings()
-- Apply commands
get_console():execute("ssfx_water (" .. ssfx_water_res .. "," .. ssfx_water_blur .. "," .. ssfx_water_blur_pattern .. ",0)")
get_console():execute("ssfx_water_setup1 (" .. ssfx_water_distortion .. "," .. ssfx_water_turbidity .. "," .. ssfx_water_softborder .."," .. ssfx_water_parallax_height .. ")")
get_console():execute("ssfx_water_setup2 (" .. ssfx_water_reflection .. "," .. ssfx_water_specular .. "," .. ssfx_water_caustics .."," .. ssfx_water_ripples .. ")")
end
local function update_settings()
-- Get settings
module_id = "water"
ssfx_water_res = ssfx_001_mcm.ssfx_get_setting(module_id, "ssr_res", ssfx_water_settings)
ssfx_water_blur = ssfx_001_mcm.ssfx_get_setting(module_id, "blur", ssfx_water_settings)
ssfx_water_blur_pattern = ssfx_001_mcm.ssfx_get_setting(module_id, "blur_pattern", ssfx_water_settings)
ssfx_water_parallax_height = ssfx_001_mcm.ssfx_get_setting(module_id, "parallax_height", ssfx_water_settings)
ssfx_water_distortion = ssfx_001_mcm.ssfx_get_setting(module_id, "distortion", ssfx_water_settings)
ssfx_water_turbidity = ssfx_001_mcm.ssfx_get_setting(module_id, "turbidity", ssfx_water_settings) * 10
ssfx_water_softborder = ssfx_001_mcm.ssfx_get_setting(module_id, "softborder", ssfx_water_settings)
ssfx_water_reflection = ssfx_001_mcm.ssfx_get_setting(module_id, "reflection_int", ssfx_water_settings)
ssfx_water_specular = ssfx_001_mcm.ssfx_get_setting(module_id, "specular_int", ssfx_water_settings) * 6
ssfx_water_caustics = ssfx_001_mcm.ssfx_get_setting(module_id, "caustics_int", ssfx_water_settings)
ssfx_water_ripples = ssfx_001_mcm.ssfx_get_setting(module_id, "ripples_int", ssfx_water_settings)
ssfx_water_res = 1.0 / ssfx_water_res
-- Apply settings
apply_water_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", update_settings)
-- Read and apply settigns
update_settings()
end
@@ -0,0 +1,44 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: Water - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "water", sh=true, text="ui_mcm_ssfx_module_water", gr = {
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_water_title",size= {512,50},spacing= 20 },
{id = "ssr_quality_mcm", type = "list", val = 2, content={ {0.0,"ssfx_quality_very_low"} , {1.0,"ssfx_quality_low"}, {2.0,"ssfx_quality_medium"}, {3.0,"ssfx_quality_high"}, {4.0,"ssfx_quality_veryhigh"}}, def=1.0, restart=true},
{id = "ssr_res_mcm", type = "track", val = 2, min=0.2,max=1.0,step=0.1, def = 1.0},
{id = "line", type = "line"},
{id = "parallax_quality_mcm", type = "list", val = 2, content={ {0.0,"ssfx_disable"} , {1.0,"ssfx_quality_low"}, {2.0,"ssfx_quality_medium"}, {3.0,"ssfx_quality_high"}}, def=2.0, restart=true},
{id = "parallax_height_mcm", type = "track", val = 2, min=0.01,max=0.1,step=0.01, def = 0.05},
{id = "line", type = "line"},
{id = "blur_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.8},
{id = "blur_pattern_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 1.0},
{id = "line", type = "line"},
{id = "distortion_mcm", type = "track", val = 2, min=0.0,max=2.0,step=0.1, def = 0.6},
{id = "turbidity_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.3}, -- * 10
{id = "softborder_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.3},
{id = "line", type = "line"},
{id = "reflection_int_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.8},
{id = "specular_int_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 1.0}, -- * 10
{id = "caustics_int_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.3},
{id = "ripples_int_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.5},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,26 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
-- @ Description: Water script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["ssr_res"] = 1.0,
["blur"] = 0.8,
["blur_pattern"] = 1.0,
["parallax_height"] = 0.05,
["distortion"] = 0.6,
["turbidity"] = 0.3,
["softborder"] = 0.3,
["reflection_int"] = 0.8,
["specular_int"] = 1.0,
["caustics_int"] = 0.3,
["ripples_int"] = 0.5,
}
----------------------------------------------------
@@ -0,0 +1,552 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 17
-- @ Description: Weapons DOF script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Internal vars
local ssfx_wpn_dof_minlen = 0
local ssfx_wpn_dof_maxlen = 0
local ssfx_wpn_dof_blur = 0
local ssfx_wpn_dof_edgeblur = 0
local ssfx_wpn_dof_aim_minlen = 0
local ssfx_wpn_dof_aim_maxlen = 0
local ssfx_wpn_dof_aim_blur = 0
local ssfx_wpn_dof_aim_edgeblur = 0
local ssfx_wpn_dof_reload = true
local ssfx_wpn_dof_pda = true
local ssfx_wpn_dof_inventory = true
local ssfx_wpn_dof_FDDA = true
local ssfx_wpn_dof_loot_mutant = true
-- Weapons that have kind "pistol" but aren't pistols
local ssfx_not_pistol = {
wpn_svt40_short = true,
wpn_avt40_short = true,
wpn_aek919k = true,
}
local ssfx_wpn_dof_blur_current = 0.0
local ssfx_wpn_dof_blur_to = 0.0
local ssfx_reloading = 0
local ssfx_reloadtime = 0
local ssfx_reloadforce_end = 0
local ssfx_wpn_one_shot = false
local ssfx_wpn_state = 0
local ssfx_inv_state = 0
local ssfx_itm_state = 0
local ssfx_pda_state = 0
local ssfx_pda_zoom = 0
local ssfx_itm_in_use
local ssfx_wpn_reloadtime_save = {}
-- Load FDDA settigns if exist
local ssfx_items_anim = ini_file("items\\items\\animations_settings.ltx") or {}
local tg_update = 0
local function ssfx_aim_in()
-- Apply aim DOF
if (not ssfx_check_item()) then
ssfx_set_dof(ssfx_wpn_dof_aim_minlen, ssfx_wpn_dof_aim_maxlen, 0, ssfx_wpn_dof_aim_blur)
ssfx_wpn_state = 1
else
ssfx_wpn_state = 2
get_console():execute("ssfx_wpn_dof_1 (0,0,0," .. ssfx_wpn_dof_aim_blur .. ")")
end
get_console():execute("ssfx_wpn_dof_2 " .. ssfx_wpn_dof_aim_edgeblur )
end
local function ssfx_aim_out()
-- Apply default DOF
ssfx_set_dof(ssfx_wpn_dof_minlen, ssfx_wpn_dof_maxlen, 0, ssfx_wpn_dof_blur)
get_console():execute("ssfx_wpn_dof_2 " .. ssfx_wpn_dof_edgeblur )
ssfx_wpn_state = 0
end
-- End Item animation
local function ssfx_item_anim_stop()
ssfx_itm_state = 0
ssfx_far_blur(0, 0)
return true
end
-- Use Item
local original_function = itms_manager.actor_on_item_before_use
function itms_manager.actor_on_item_before_use(obj,flags)
original_function(obj,flags)
if ssfx_wpn_dof_FDDA == false then
return
end
-- Item passes the utilization checks? only_movekeys is only true if check is ok ( FDDA reset the flags.ret_value )
if game.only_movekeys_allowed() then
ssfx_itm_state = 1
ssfx_itm_in_use = obj:section()
end
end
-- Loot monsters with FFDA
local function ssfx_monster_on_actor_use(obj)
if (ssfx_wpn_dof_loot_mutant == false) then
return
end
ssfx_itm_state = 1
ssfx_itm_in_use = "mutant_looting"
end
local function GUI_on_show(name)
if ssfx_wpn_dof_loot_mutant == false then return end
if name == "UIMutantLoot" then -- Remove time animation end if loot UIMutantLoot GUI shows
RemoveTimeEvent("ssfx_endanim", "ssfx_item_anim_stop")
-- Even without the FFDA animation, we want DOF with the UI
ssfx_itm_state = 2
ssfx_far_blur(1, 0)
end
end
local function GUI_on_hide(name)
if name == "UIMutantLoot" then -- Remove DOF if UIMutantLoot GUI hide
ssfx_item_anim_stop()
end
end
-- Check for PDA zoom
local function ssfx_on_key_press(dik)
if ssfx_pda_state ~= 2 then return end
local bind = dik_to_bind(dik)
local kb = key_bindings
if bind == kb.kWPN_ZOOM or bind == kb.kWPN_FIRE or bind == kb.kWPN_RELOAD then
if bind == kb.kWPN_RELOAD then
ssfx_pda_zoom = 1 - ssfx_pda_zoom
else
ssfx_pda_zoom = 1
end
end
end
-- Check PDA states
local function ssfx_PDA_state()
if ssfx_pda_state == 0 or ssfx_wpn_dof_pda == false then
return
end
-- Sprint disable PDA zoom
if IsMoveState("mcSprint") then
ssfx_pda_zoom = 0
end
-- PDA states
if ssfx_pda_state == 1 then
-- Wait for 100% ready
itm = db.actor:active_item()
if itm then
if itm:get_state() == 0 then ssfx_pda_state = 2 end
end
elseif ssfx_pda_state == 2 then
-- If Zoom, Enable DOF
if ssfx_pda_zoom == 1 then
ssfx_far_blur(1, 0)
else
ssfx_wpn_dof_minlen = 0
ssfx_wpn_dof_maxlen = 0
ssfx_far_blur(0, 0)
end
end
end
-- Function to end the PDA state
local function ssfx_PDA_reset()
ssfx_wpn_dof_minlen = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "fadestart", ssfx_weapons_dof_settings)
ssfx_wpn_dof_maxlen = ssfx_wpn_dof_minlen + ssfx_001_mcm.ssfx_get_setting("wpn_dof", "fadelen", ssfx_weapons_dof_settings)
ssfx_far_blur(0, 0)
ssfx_pda_state = 0
ssfx_pda_zoom = 0
end
local function actor_on_update()
-- Check Inventory, Reloading, PDA and Items states
ssfx_PDA_state() -- Outside the tick limit to avoid any unsync ( The zoom code is very hacky )
-- Not necessary to check every tick, let's update each 100ms
local tg = time_global()
if tg < tg_update then
return
end
tg_update = tg + 100
local itm = db.actor:active_item()
local slot = db.actor:active_slot()
local is_weapon = itm and IsWeapon(itm) or false
local is_pda = itm and slot == 8 or slot == 14 or false
local sec = nil
-- Item usage FDDA
if ssfx_itm_state == 1 then
if not db.actor:active_detector() and slot == 0 then -- ( Without a detector equiped and using slot 0 )
-- Change item state
ssfx_itm_state = 2
-- Get the animation time
local tm = ssfx_items_anim:r_float_ex(ssfx_itm_in_use, "tm")
if not tm then
ssfx_itm_state = 0
tm = 0
end
if ssfx_itm_in_use == "mutant_looting" then
tm = 4500
end
if tm > 0 then
-- Initialize far blur
ssfx_far_blur(1, 0)
-- Millisecs to secs
anim_tm = tm * 0.001
-- 70% of the animation or custom from settings...
if ssfx_weapons_dof_settings.items_time[ssfx_itm_in_use] then
anim_tm = anim_tm * ssfx_weapons_dof_settings.items_time[ssfx_itm_in_use]
else
anim_tm = anim_tm * 0.7
end
-- Create end of animation event
CreateTimeEvent("ssfx_endanim", "ssfx_item_anim_stop", anim_tm, ssfx_item_anim_stop)
end
end
end
-- Inventory stuff ( "Inventory" = 1 -- "trade" = 2 -- "repair" = 3 -- "loot" = 4 )
if actor_menu.last_mode == 1 and ssfx_wpn_dof_inventory then
if (ssfx_inv_state == 0) then
ssfx_inv_state = 1
ssfx_far_blur(1, 0)
end
else
if (ssfx_inv_state == 1) then
ssfx_inv_state = 0
ssfx_far_blur(0, ssfx_reloading + ssfx_itm_state)
end
end
-- PDA stuff
if is_pda then
local itm_state = itm:get_state()
if itm_state == 1 then -- Show PDA
ssfx_pda_state = 1
ssfx_set_dof(0, 0, 0, ssfx_wpn_dof_blur)
elseif itm_state == 2 then -- Hide PDA
ssfx_PDA_reset()
end
end
-- Reload stuff ( "Idle" = 0 -- "Raise" = 1 -- "Lower" = 2 -- "Reload" = 7 )
if is_weapon and ssfx_wpn_dof_reload then
--printf( "DEBUG %s", game.get_motion_length(itm:section(), "anm_reload", 1) )
-- Reload states
if ssfx_reloading == 0 then -- Idle
if itm:get_state() == 7 then -- Reload start
sec = itm:section()
-- Pump action, bold action, etc.
ssfx_wpn_one_shot = (ini_sys:r_string_ex(sec, "tri_state_reload") == "on") or (ini_sys:r_string_ex(sec, "class") == "WP_BM16")
ssfx_reloading = 1 -- Reloading
ssfx_far_blur(1, 0)
ssfx_reloadtime = tg
-- Check if we know the reload animation length, omit if ssfx_wpn_one_shot true
if ssfx_wpn_reloadtime_save[sec] or ssfx_weapons_dof_settings.wpn_reloadtime[sec] then
if not ssfx_wpn_one_shot then
-- Stop DOF at 80% of the animation
local anim_percentage = 0.8
-- Pistols lower the %
if SYS_GetParam(0, sec, "kind", "") == "w_pistol" and not ssfx_not_pistol[sec] then
anim_percentage = 0.7
end
-- From reloatime file or save
if ssfx_weapons_dof_settings.wpn_reloadtime[sec] then
ssfx_reloadforce_end = ssfx_weapons_dof_settings.wpn_reloadtime[sec] * anim_percentage -- % of animation
else
ssfx_reloadforce_end = ssfx_wpn_reloadtime_save[sec] * anim_percentage -- % of animation
end
end
else
ssfx_reloadforce_end = nil
end
end
elseif ssfx_reloading == 1 then -- Reload in progress...
if ssfx_reloadforce_end then
-- End reload if reload time
if (tg - ssfx_reloadtime) > ssfx_reloadforce_end then
ssfx_far_blur(0, ssfx_inv_state)
ssfx_reloading = 2 -- Wait animation to end
end
else
sec = itm:section()
-- End reload if current ammo == mag size
if itm:get_ammo_in_magazine() == ini_sys:r_u32(sec, "ammo_mag_size") then
ssfx_far_blur(0, ssfx_inv_state)
ssfx_reloading = 2 -- Wait animation to end
-- Save time if not ssfx_wpn_one_shot
if not ssfx_wpn_one_shot then
ssfx_wpn_reloadtime_save[sec] = tg - ssfx_reloadtime
end
end
end
end
-- Wait for the end of the reloading animation or any other state.
if itm:get_state() ~= 7 and ssfx_reloading > 0 then
ssfx_far_blur(0, ssfx_inv_state)
ssfx_reloading = 0
end
end
-- If weapon or PDA is dropped
if itm == nil then
if ssfx_reloading > 0 then
ssfx_far_blur(0, ssfx_inv_state)
ssfx_reloading = 0
end
if ssfx_pda_state > 0 then
ssfx_PDA_reset()
end
end
end
local function ssfx_change_blur()
-- Smooth to target
local smoothed = ssfx_diminish()
if (ssfx_wpn_dof_blur_to == 1) then
ssfx_set_dof(0, 0, smoothed, ssfx_wpn_dof_blur)
else
ssfx_set_dof(ssfx_wpn_dof_minlen, ssfx_wpn_dof_maxlen, smoothed, ssfx_wpn_dof_blur)
end
if (smoothed == ssfx_wpn_dof_blur_to) then
ssfx_stop_blur()
end
end
function ssfx_far_blur(to_val, checkvar)
if checkvar > 0 then return end
if (ssfx_wpn_dof_blur_to ~= to_val) then
ssfx_stop_blur()
ssfx_wpn_dof_blur_to = to_val
RegisterScriptCallback("actor_on_update", ssfx_change_blur)
end
end
function ssfx_stop_blur()
UnregisterScriptCallback("actor_on_update", ssfx_change_blur)
end
function ssfx_check_item()
local itm = db.actor:active_item()
if itm then
local name = itm:section() or nil
if (name and ssfx_weapons_dof_settings.wpn_nodof[name]) then
return true
end
end
return false
end
function ssfx_diminish()
-- Frame independent smoothing
local smoothing = math.min(0.1 * device().time_delta / 20, 0.19)
-- Let's go!
if (ssfx_wpn_dof_blur_current < ssfx_wpn_dof_blur_to) then
ssfx_wpn_dof_blur_current = ssfx_wpn_dof_blur_current + smoothing
else
ssfx_wpn_dof_blur_current = ssfx_wpn_dof_blur_current - smoothing
end
if math.abs(ssfx_wpn_dof_blur_current - ssfx_wpn_dof_blur_to) <= 0.1 then
ssfx_wpn_dof_blur_current = ssfx_wpn_dof_blur_to
end
return ssfx_wpn_dof_blur_current
end
function ssfx_set_dof(var1, var2, var3, var4)
ssfx_wpn_dof_blur_current = var3
get_console():execute("ssfx_wpn_dof_1 (" .. var1 .. "," .. var2 .. "," .. var3 .. "," .. var4 .. ")")
end
function actor_on_first_update()
-- Let's be sure
ssfx_aim_out()
end
local function save_state(mdata)
-- Save reload times
mdata.ssfx_saved_reload_time = ssfx_wpn_reloadtime_save
end
local function load_state(mdata)
-- Load reload times
ssfx_wpn_reloadtime_save = mdata.ssfx_saved_reload_time or {}
end
function on_option_change()
-- Force DOF
get_console():execute("r2_dof_enable 1")
-- Get settings
ssfx_wpn_dof_minlen = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "fadestart", ssfx_weapons_dof_settings)
ssfx_wpn_dof_maxlen = ssfx_wpn_dof_minlen + ssfx_001_mcm.ssfx_get_setting("wpn_dof", "fadelen", ssfx_weapons_dof_settings)
ssfx_wpn_dof_blur = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "blur", ssfx_weapons_dof_settings)
ssfx_wpn_dof_edgeblur = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "edgeblur", ssfx_weapons_dof_settings) / 2
ssfx_wpn_dof_aim_minlen = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "aim_fadestart", ssfx_weapons_dof_settings)
ssfx_wpn_dof_aim_maxlen = ssfx_wpn_dof_aim_minlen + ssfx_001_mcm.ssfx_get_setting("wpn_dof", "aim_fadelen", ssfx_weapons_dof_settings)
ssfx_wpn_dof_aim_blur = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "aim_blur", ssfx_weapons_dof_settings)
ssfx_wpn_dof_aim_edgeblur = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "aim_edgeblur", ssfx_weapons_dof_settings) / 2
ssfx_wpn_dof_reload = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "reloading", ssfx_weapons_dof_settings)
ssfx_wpn_dof_pda = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "pda", ssfx_weapons_dof_settings)
ssfx_wpn_dof_inventory = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "inventory", ssfx_weapons_dof_settings)
ssfx_wpn_dof_FDDA = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "fdda", ssfx_weapons_dof_settings)
ssfx_wpn_dof_loot_mutant = ssfx_001_mcm.ssfx_get_setting("wpn_dof", "looting_mutant", ssfx_weapons_dof_settings)
-- Apply settings to current state
-- Weapon
if ssfx_wpn_state == 0 then -- IDLE
ssfx_set_dof(ssfx_wpn_dof_minlen, ssfx_wpn_dof_maxlen, 0, ssfx_wpn_dof_blur)
get_console():execute("ssfx_wpn_dof_2 " .. ssfx_wpn_dof_edgeblur )
elseif ssfx_wpn_state == 1 then -- Aim
ssfx_set_dof(ssfx_wpn_dof_aim_minlen, ssfx_wpn_dof_aim_maxlen, 0, ssfx_wpn_dof_aim_blur)
get_console():execute("ssfx_wpn_dof_2 " .. ssfx_wpn_dof_aim_edgeblur )
elseif ssfx_wpn_state == 2 then -- Aim no DOF
get_console():execute("ssfx_wpn_dof_2 " .. ssfx_wpn_dof_aim_edgeblur )
end
-- Reload
if ssfx_reloading > 0 and ssfx_wpn_dof_reload ~= true then
ssfx_far_blur(0, ssfx_inv_state)
ssfx_reloading = 0
end
-- Inventory
if actor_menu.last_mode == 1 and ssfx_wpn_dof_inventory ~= true then
ssfx_inv_state = 0
ssfx_far_blur(0, ssfx_reloading)
end
-- FDAA or Looting mutant
if enhanced_animations == nil then
ssfx_wpn_dof_FDDA = false
else
if enhanced_animations.enable_animations == false then
ssfx_wpn_dof_FDDA = false
end
end
if ssfx_wpn_dof_FDDA == false or ssfx_wpn_dof_loot_mutant == false then
if ssfx_itm_state > 0 then
ssfx_itm_state = 0
ssfx_far_blur(0, ssfx_reloading)
end
end
-- PDA Zoom
if ssfx_wpn_dof_pda then
RegisterScriptCallback("on_key_press", ssfx_on_key_press)
else
UnregisterScriptCallback("on_key_press", ssfx_on_key_press)
end
end
function on_game_start()
-- General Functions
RegisterScriptCallback("actor_on_first_update", actor_on_first_update)
RegisterScriptCallback("on_option_change", on_option_change)
RegisterScriptCallback("actor_on_update", actor_on_update)
-- Save reload times
RegisterScriptCallback("save_state", save_state)
RegisterScriptCallback("load_state", load_state)
-- Weapon
RegisterScriptCallback("actor_on_weapon_zoom_in", ssfx_aim_in)
RegisterScriptCallback("actor_on_weapon_zoom_out", ssfx_aim_out)
-- Used for mutant loot
RegisterScriptCallback("GUI_on_show", GUI_on_show)
RegisterScriptCallback("GUI_on_hide", GUI_on_hide)
RegisterScriptCallback("monster_on_actor_use_callback",ssfx_monster_on_actor_use)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,35 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 12.3
-- @ Description: Weapons DOF script - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "wpn_dof", sh=true, text="ui_mcm_ssfx_module_wpn_dof", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_wpn_dof_title",size= {512,50},spacing= 20 },
{id = "aim_fadestart_mcm", type = "track", val = 2, min=0.0,max=0.3,step=0.01, def = 0.1},
{id = "aim_fadelen_mcm", type = "track", val = 2, min=0.0,max=1.3,step=0.01, def = 0.25},
{id = "aim_blur_mcm", type = "track", val = 2, min=0.0,max=2.0,step=0.05, def = 1.6},
{id = "aim_edgeblur_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 1.0},
{ id = "line", type = "line" },
{id = "fadestart_mcm", type = "track", val = 2, min=0.0,max=0.3,step=0.01, def = 0.15},
{id = "fadelen_mcm", type = "track", val = 2, min=0.0,max=1.3,step=0.01, def = 0.25},
{id = "blur_mcm", type = "track", val = 2, min=0.0,max=2.0,step=0.05, def = 1.1},
{id = "edgeblur_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.3},
{ id = "line", type = "line" },
{id = "reloading_mcm", type = "check", val = 1, def=true},
{id = "pda_mcm", type = "check", val = 1, def=true},
{id = "inventory_mcm", type = "check", val = 1, def=true},
{id = "fdda_mcm", type = "check", val = 1, def=true},
{id = "looting_mutant_mcm", type = "check", val = 1, def=true},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,423 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 12.3
-- @ Description: Weapons DOF script - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settigns here --
ssfx_default_settings = {
-- [ IDLE DOF ]
["fadestart"] = 0.15, -- Out of focus fade start
["fadelen"] = 0.25, -- Out of focus fade length
["blur"] = 1.1, -- Blur intensity ( 0 = Disable )
["edgeblur"] = 0.3, -- Peripheral Blur ( 0 = Disable )
-- [ AIMING DOF ]
["aim_fadestart"] = 0.1, -- Out of focus fade start
["aim_fadelen"] = 0.25, -- Out of focus fade length
["aim_blur"] = 1.6, -- Blur intensity ( 0 = Disable )
["aim_edgeblur"] = 1.0, -- Peripheral Blur ( 0 = Disable )
-- [ ACTIONS ]
["reloading"] = true, -- DOF when reloading
["pda"] = true, -- DOF when using PDA
["inventory"] = true, -- DOF when using Inventory
["fdda"] = true, -- DOF when using Items ( FDDA addon )
["looting_mutant"] = true, -- DOF when looting mutants
}
----------------------------------------------------
-- No aim DOF weapons. PIP scopes
wpn_nodof = {
["wpn_ak5c_bas_5c_tik"] = true,
["wpn_scar_siber_m2_custom"] = true,
["wpn_aug_a1_bas"] = true,
["wpn_aug_a1_custom_bas"] = true,
["wpn_saiga12s_m1_pka"] = true,
["wpn_sks_molot_pka"] = true,
["wpn_sks_tac_pka"] = true,
["wpn_abakan_n_pka"] = true,
["wpn_ak105_bas_pka"] = true,
["wpn_ak105_pka"] = true,
["wpn_ak74_n_pka"] = true,
["wpn_ak74_pmc_pka"] = true,
["wpn_ak74m_beard_pka"] = true,
["wpn_ak74m_n_pka"] = true,
["wpn_ak74u_n1_pka"] = true,
["wpn_ak74u_tac_pka"] = true,
["wpn_pkp_siber_pka"] = true,
["wpn_vintorez_isg_pka"] = true,
["wpn_vintorez_m1_pka"] = true,
["wpn_vintorez_m2_pka"] = true,
["wpn_vintorez_n1_pka"] = true,
}
-- FDDA animations, you can adjust times here ( Porcentual )
items_time = {
["medkit"] = 0.55,
["medkit_army"] = 0.55,
["antibio_chlor"] = 0.55,
["medkit_scientic"] = 0.55,
["medkit_elite"] = 0.55,
["tushonka"] = 0.4,
["conserva"] = 0.4,
["corn"] = 0.4,
["tomato"] = 0.4,
["beans"] = 0.4,
["chili"] = 0.4,
["antirad"] = 0.8,
["antirad_cystamine"] = 0.8,
["stimpack"] = 0.8,
["stimpack_army"] = 0.8,
["stimpack_scientic"] = 0.8,
["drug_coagulant"] = 0.5,
["drug_sleepingpills"] = 0.5,
["drug_psy_blockade"] = 0.5,
["antiemetic"] = 0.5,
["caffeine"] = 0.5,
["antirad_kalium"] = 0.5,
["drug_antidot"] = 0.5,
["antibio_sulfad"] = 0.5,
["drug_radioprotector"] = 0.5,
["mre"] = 0.9,
["ration_ukr"] = 0.9,
["ration_ru"] = 0.9,
["cigar1"] = 0.2,
["cigar2"] = 0.2,
["cigar3"] = 0.2,
["cigarettes"] = 0.2,
["cigarettes_lucky"] = 0.2,
["cigarettes_russian"] = 0.2,
["glucose"] = 0.85,
["glucose_s"] = 0.85,
}
-- Reload times, you can add or adjust times here ( millisecs )
wpn_reloadtime = {
-- Rifles
["wpn_9a91"] = 3130,
["wpn_ak5c_bas"] = 3160,
["wpn_abakan"] = 3630,
["wpn_abakan_camo"] = 3630,
["wpn_abakan_n"] = 3060,
["wpn_aek"] = 3500,
["wpn_aek_camo"] = 3500,
["wpn_aek_duty"] = 3500,
["wpn_ak"] = 3100,
["wpn_ak101"] = 2690,
["wpn_ak101_camo"] = 2700,
["wpn_ak102"] = 2670,
["wpn_ak103"] = 2700,
["wpn_ak103_camo"] = 2690,
["wpn_ak104"] = 2670,
["wpn_ak104_alfa"] = 3460,
["wpn_ak105_shakal"] = 2690,
["wpn_ak105_swamp"] = 2700,
["wpn_ak12"] = 2790,
["wpn_ak12_custom"] = 3470,
["wpn_ak12_custom_mono_kit"] = 2690,
["wpn_ak12_m1"] = 2690,
["wpn_ak5c_bas_5c_tik"] = 3170,
["wpn_ak5c_isg"] = 3170,
["wpn_ak74"] = 2700,
["wpn_ak74_alt"] = 2700,
["wpn_ak74_custom"] = 2690,
["wpn_ak74_isg"] = 2700,
["wpn_ak74_rpk"] = 2690,
["wpn_ak74m"] = 2690,
["wpn_ak74m_alt"] = 2700,
["wpn_ak74m_beard"] = 2800,
["wpn_ak74m_camo"] = 2700,
["wpn_ak74m_custom"] = 2690,
["wpn_ak74m_duty"] = 2700,
["wpn_ak74m_n"] = 2800,
["wpn_ak74m_pka"] = 2700,
["wpn_ak74u_snag"] = 2650,
["wpn_ace21"] = 4030,
["wpn_ak105"] = 2730,
["wpn_ak105_sp"] = 2700,
["wpn_ak74u"] = 2650,
["wpn_ak74u_camo"] = 2650,
["wpn_ak74u_isg"] = 2690,
["wpn_ak74u_m1_isg"] = 2700,
["wpn_ak74u_n1"] = 2730,
["wpn_ak74u_old"] = 2650,
["wpn_ak74u_tac"] = 3520,
["wpn_akm"] = 2690,
["wpn_fal_aus"] = 2790,
["wpn_mk14"] = 3730,
["wpn_pkm"] = 8030,
["wpn_pkm_zulus"] = 8030,
["wpn_pkp"] = 8030,
["wpn_rpd"] = 7140,
["wpn_rpk74_16"] = 2780,
["wpn_akm_alfa"] = 2690,
["wpn_akm_isg"] = 2690,
["wpn_akm_bas"] = 2700,
["wpn_akms"] = 2700,
["wpn_akms_alt"] = 2700,
["wpn_akms_bas"] = 2700,
["wpn_aks"] = 3100,
["wpn_aks74"] = 2690,
["wpn_aks74_new"] = 2690,
["wpn_aug"] = 3900,
["wpn_aug_a1_bas"] = 3230,
["wpn_aug_a3_bas"] = 3230,
["wpn_aug_custom"] = 3900,
["wpn_aug_merc"] = 3900,
["wpn_aug_modern"] = 3900,
["wpn_fal"] = 3200,
["wpn_fal_sa58_osw"] = 2240,
["wpn_fnc"] = 3330,
["wpn_g3"] = 3100,
["wpn_g36"] = 3570,
["wpn_g36_camo"] = 3570,
["wpn_g36_nimble"] = 3570,
["wpn_g36k"] = 3570,
["wpn_g3sg1"] = 3100,
["wpn_galil"] = 3500,
["wpn_galil_custom"] = 3500,
["wpn_galil_modern"] = 3500,
["wpn_hk416"] = 3970,
["wpn_howa20"] = 3600,
["wpn_l85"] = 3890,
["wpn_l85_alt"] = 3900,
["wpn_l85_custom"] = 3900,
["wpn_l85_m1"] = 3900,
["wpn_l85_m2"] = 3900,
["wpn_l85_m3"] = 3530,
["wpn_l85_modern"] = 3900,
["wpn_l85a2"] = 3900,
["wpn_l85a2_alt"] = 3900,
["wpn_l85a2_custom"] = 3900,
["wpn_l85a2_modern"] = 3900,
["wpn_lr300"] = 3100,
["wpn_lr300_camo"] = 3100,
["wpn_lr300_custom"] = 3100,
["wpn_m16"] = 3000,
["wpn_m16a2"] = 3000,
["wpn_m249"] = 7730,
["wpn_m4"] = 3030,
["wpn_m4_butcher"] = 3100,
["wpn_m4_ru556"] = 3000,
["wpn_m4_tac"] = 2960,
["wpn_m4a1"] = 4300,
["wpn_m4a1_camo"] = 4300,
["wpn_m4a1_custom"] = 4300,
["wpn_m4a1_freedom"] = 4300,
["wpn_m4a1_siber"] = 3160,
["wpn_ppsh41"] = 3740,
["wpn_ppsh41_rednew"] = 3740,
["wpn_ppsh41_woodnew"] = 3740,
["wpn_rpk"] = 3270,
["wpn_rpk74"] = 3260,
["wpn_scar"] = 3800,
["wpn_scar_custom"] = 3800,
["wpn_scar_new"] = 3800,
["wpn_scar_siber"] = 3590,
["wpn_scar_siber_black"] = 3600,
["wpn_scar_siber_m1"] = 3600,
["wpn_scar_siber_m1_black"] = 3600,
["wpn_scar_siber_m2"] = 3600,
["wpn_scar_siber_m2_custom"] = 3600,
["wpn_sig550"] = 4030,
["wpn_sig550_camo"] = 4030,
["wpn_sig550_custom"] = 4030,
["wpn_sig550_luckygun"] = 4030,
["wpn_val"] = 2480,
["wpn_val_modern"] = 4930,
["wpn_val_tac"] = 2900,
["wpn_vintorez"] = 2490,
["wpn_vintorez_1pn93"] = 2490,
["wpn_vintorez_alt"] = 2490,
["wpn_vintorez_isg"] = 2700,
["wpn_vintorez_m1"] = 3000,
["wpn_vintorez_m2"] = 3000,
["wpn_vintorez_n1"] = 2890,
["wpn_vintorez_nimble"] = 2940,
["wpn_vsk94"] = 3130,
["wpn_type63"] = 4230,
["wpn_ash12"] = 3660,
["wpn_aug_a1_custom_bas"] = 3230,
["wpn_aug_a3_custom_bas"] = 3230,
["wpn_famas3"] = 3500,
["wpn_fn2000"] = 3100,
["wpn_fn2000_camo"] = 3100,
["wpn_fn2000_custom"] = 3100,
["wpn_fn2000_nimble"] = 3100,
["wpn_groza"] = 2560,
["wpn_groza_nimble"] = 2560,
["wpn_sig552"] = 3330,
["wpn_vihr"] = 4530,
-- Pistols
["wpn_aps"] = 2850,
["wpn_aps_bas"] = 2850,
["wpn_aps_bas_apsabigo"] = 2850,
["wpn_beretta"] = 2870,
["wpn_beretta_alt"] = 2870,
["wpn_beretta_camo"] = 2870,
["wpn_beretta_modern"] = 2870,
["wpn_colt1911"] = 2570,
["wpn_colt1911_alt"] = 2570,
["wpn_colt1911_camo"] = 2570,
["wpn_colt1911_custom"] = 2570,
["wpn_colt1911_duty"] = 2570,
["wpn_colt1911_merc"] = 2570,
["wpn_colt1911_modern"] = 2570,
["wpn_colt1911_n"] = 2465,
["wpn_colt1911_new"] = 2570,
["wpn_colt_kimber"] = 2570,
["wpn_cz52"] = 2930,
["wpn_cz75"] = 2270,
["wpn_cz75_auto"] = 3300,
["wpn_desert_eagle"] = 2560,
["wpn_desert_eagle_custom"] = 2570,
["wpn_desert_eagle_modern"] = 2570,
["wpn_desert_eagle_nimble"] = 2570,
["wpn_fn57"] = 2970,
["wpn_fnp45"] = 2440,
["wpn_fnp45_custom"] = 2430,
["wpn_fnx45"] = 2430,
["wpn_fnx45_alt"] = 2430,
["wpn_fnx45_custom"] = 2430,
["wpn_fort"] = 2820,
["wpn_fort_snag"] = 2820,
["wpn_glock"] = 2860,
["wpn_glock17"] = 2960,
["wpn_glock17_m1"] = 2960,
["wpn_glock_custom"] = 2860,
["wpn_glock_modern"] = 2860,
["wpn_gsh18"] = 3110,
["wpn_gsh18_custom"] = 3110,
["wpn_hpsa"] = 2570,
["wpn_hpsa_alt"] = 2560,
["wpn_korth"] = 2820,
["wpn_korth_custom"] = 2820,
["wpn_mp412"] = 3430,
["wpn_oc33"] = 3230,
["wpn_pb"] = 2550,
["wpn_pb_bas"] = 4030,
["wpn_pb_bas_custom"] = 4030,
["wpn_pb_custom"] = 2550,
["wpn_pl15"] = 2820,
["wpn_pl15_pl15_scolaz"] = 2820,
["wpn_pm"] = 2550,
["wpn_pm_actor"] = 2550,
["wpn_pm_bas_actor"] = 4380,
["wpn_pm_bas_actor"] = 4030,
["wpn_pm_bas_custom"] = 4030,
["wpn_pm_custom"] = 2550,
["wpn_pmm"] = 2550,
["wpn_sig220"] = 11050,
["wpn_sig220"] = 2570,
["wpn_sig220_custom"] = 2570,
["wpn_sig220_n"] = 2460,
["wpn_sig220_n_u2p2g0r"] = 2460,
["wpn_sig220_n_upg220"] = 2460,
["wpn_sig220_nimble"] = 2560,
["wpn_sig226"] = 2470,
["wpn_sig226_226sig_kit"] = 2470,
["wpn_sr1m"] = 2960,
["wpn_sr1m_sr1upgr1"] = 9680,
["wpn_sr1m_sr1upgr1"] = 2960,
["wpn_usp_custom"] = 2430,
["wpn_usp_match"] = 2430,
["wpn_usp_nimble"] = 2430,
["wpn_usp_tac"] = 2470,
["wpn_walther"] = 3110,
["wpn_walther_custom"] = 3110,
["wpn_walther_p99"] = 2470,
["wpn_walther_p99_mod9"] = 2970,
-- Snipers with mag
["wpn_dvl10_m1"] = 3930,
["wpn_dvl10"] = 3930,
["wpn_k98_mod_silen98"] = 4300,
["wpn_l96a1"] = 4500,
["wpn_l96a1m"] = 4500,
["wpn_m24"] = 4070,
["wpn_m82"] = 4630,
["wpn_m98b"] = 4840,
["wpn_m82"] = 4630,
["wpn_remington700"] = 4300,
["wpn_remington700_archangel"] = 4300,
["wpn_remington700_lapua700"] = 4300,
["wpn_remington700_magpul_pro"] = 4300,
["wpn_remington700_mod_x_gen3"] = 4300,
["wpn_sig550_sniper"] = 4030,
["wpn_sv98"] = 4500,
["wpn_sv98_custom"] = 4500,
["wpn_svd"] = 5770,
["wpn_svd_custom"] = 5770,
["wpn_svd_m1"] = 4810,
["wpn_svd_nimble"] = 5770,
["wpn_svds"] = 4810,
["wpn_svds_pmc"] = 2800,
["wpn_vssk"] = 3670,
["wpn_wa2000"] = 3900,
["wpn_trg"] = 4470,
["wpn_gauss"] = 2990,
["wpn_gauss_quest"] = 3000,
["wpn_k98_mod"] = 4300,
["wpn_sr25"] = 3200,
["wpn_svu"] = 3600,
["wpn_svu_alt"] = 3600,
["wpn_svu_nimble"] = 5530,
["wpn_g43"] = 3500,
["wpn_mosin"] = 7330,
["wpn_sks"] = 4930,
["wpn_sks_b"] = 4930,
["wpn_sks_modern"] = 4930,
["wpn_sks_molot"] = 6360,
["wpn_sks_tac"] = 6370,
["wpn_svt40"] = 5010,
["wpn_svt40_modern"] = 5010,
-- SMGs
["wpn_aug_freedom"] = 3900,
["wpn_bizon"] = 4270,
["wpn_mp5"] = 2530,
["wpn_mp5_alt"] = 2530,
["wpn_mp5_custom"] = 2530,
["wpn_mp5_nimble"] = 2530,
["wpn_mp5sd"] = 3230,
["wpn_mp5sd_custom"] = 3230,
["wpn_mp5sd_new"] = 3230,
["wpn_p90"] = 4130,
["wpn_sr2_m1"] = 2460,
["wpn_sr2_veresk"] = 2470,
["wpn_sr2_veresk_sr2_upkit"] = 2460,
["wpn_ump45"] = 2760,
["wpn_ump45_custom"] = 2770,
["wpn_vityaz"] = 2900,
["wpn_kiparis"] = 2450,
["wpn_pp2000"] = 2930,
["wpn_mp7"] = 3730,
["wpn_vz61"] = 2450,
["wpn_vz61_alt"] = 2450,
["wpn_vz61_camo"] = 2450,
["wpn_vz61_freedom"] = 2450,
-- Shotguns with mag
["wpn_saiga12s_isg"] = 2780,
["wpn_saiga12s"] = 3260,
["wpn_saiga12s_m1"] = 3360,
["wpn_saiga12s_m2"] = 3360,
["wpn_usas12"] = 4970,
["wpn_vepr"] = 3260,
["wpn_toz106"] = 4300,
["wpn_toz106_m1"] = 4300,
-- Explosive
["wpn_rpg7"] = 3360,
}
@@ -0,0 +1,124 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 18
-- @ Description: Gloss & Wet Surfaces
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Settings
local ssfx_gloss_auto = true
local ssfx_gloss_auto_max = 0
local ssfx_gloss_min = 0
local ssfx_gloss_max = 0
local ssfx_spec_int = 0
local ssfx_spec_color = 0
-- Wet Surfaces
local ssfx_wet_buildup = 0
local ssfx_wet_drying = 0
local ssfx_wet_ripples_size = 0
local ssfx_wet_ripples_speed = 0
local ssfx_wet_ripples_minspeed = 0
local ssfx_wet_ripples_int = 0
local ssfx_wet_waterfall_size = 0
local ssfx_wet_waterfall_speed = 0
local ssfx_wet_waterfall_minspeed = 0
local ssfx_wet_waterfall_int = 0
local ssfx_wet_res = 0
local ssfx_wet_dist = 0
-- Internal
module_installed = true
local function update_rain()
if ssfx_gloss_auto then
Wetness_gloss = ssfx_gloss_min + (math.max(ssfx_gloss_auto_max - ssfx_gloss_min, 0) * level.rain_wetness())
get_console():execute("ssfx_gloss_factor " .. ( Wetness_gloss * 0.96 ) )
end
end
local function apply_extra_settings()
-- Gloss
get_console():execute("ssfx_lightsetup_1 (".. ssfx_spec_int .. "," .. ssfx_spec_color .. ",0,0)" )
get_console():execute("ssfx_gloss_minmax (" .. ssfx_gloss_min .. "," .. ssfx_gloss_max .. ",0)" )
if not ssfx_gloss_auto then
get_console():execute("ssfx_gloss_factor 0")
end
-- Wet Surfaces
get_console():execute("ssfx_wetness_multiplier (" .. ssfx_wet_buildup .. "," .. ssfx_wet_drying .. ",0)" )
ripples_size = math.max(2.0 - ssfx_wet_ripples_size, 0.01) -- Change how the value works to be more intuitive ( < 1.0 smaller | > 1.0 bigger )
get_console():execute("ssfx_wetsurfaces_1 (" .. ripples_size .. "," .. ssfx_wet_ripples_speed .. "," .. ssfx_wet_ripples_minspeed .. "," .. ssfx_wet_ripples_int .. ")" )
waterfall_size = math.max(2.0 - ssfx_wet_waterfall_size, 0.01) -- Change how the value works to be more intuitive ( < 1.0 smaller | > 1.0 bigger )
get_console():execute("ssfx_wetsurfaces_2 (" .. waterfall_size .. "," .. ssfx_wet_waterfall_speed .. "," .. ssfx_wet_waterfall_minspeed .. "," .. ssfx_wet_waterfall_int .. ")" )
wet_resolution = math.pow(2, ssfx_wet_res + 6)
get_console():execute("r3_dynamic_wet_surfaces_sm_res " .. wet_resolution )
get_console():execute("r3_dynamic_wet_surfaces_far " .. ssfx_wet_dist )
end
function on_option_change()
-- Get gloss settings
local module_id = "ssfx_wetness/ssfx_gloss"
ssfx_gloss_min = ssfx_001_mcm.ssfx_get_setting(module_id, "min_gloss", ssfx_wetness_settings)
ssfx_gloss_max = ssfx_001_mcm.ssfx_get_setting(module_id, "max_gloss", ssfx_wetness_settings)
ssfx_gloss_auto = ssfx_001_mcm.ssfx_get_setting(module_id, "auto_gloss", ssfx_wetness_settings)
ssfx_gloss_auto_max = ssfx_001_mcm.ssfx_get_setting(module_id, "auto_gloss_max", ssfx_wetness_settings)
ssfx_spec_int = ssfx_001_mcm.ssfx_get_setting(module_id, "specular_int", ssfx_wetness_settings)
ssfx_spec_color = ssfx_001_mcm.ssfx_get_setting(module_id, "specular_color", ssfx_wetness_settings)
local module_id_2 = "ssfx_wetness/ssfx_wet_surf"
ssfx_wet_buildup = ssfx_001_mcm.ssfx_get_setting(module_id_2, "buildup_speed", ssfx_wetness_settings)
ssfx_wet_drying = ssfx_001_mcm.ssfx_get_setting(module_id_2, "dry_speed", ssfx_wetness_settings)
ssfx_wet_ripples_size = ssfx_001_mcm.ssfx_get_setting(module_id_2, "ripples_size", ssfx_wetness_settings)
ssfx_wet_ripples_speed = ssfx_001_mcm.ssfx_get_setting(module_id_2, "ripples_speed", ssfx_wetness_settings)
ssfx_wet_ripples_minspeed = ssfx_001_mcm.ssfx_get_setting(module_id_2, "ripples_min_speed", ssfx_wetness_settings)
ssfx_wet_ripples_int = ssfx_001_mcm.ssfx_get_setting(module_id_2, "ripples_intensity", ssfx_wetness_settings)
ssfx_wet_waterfall_size = ssfx_001_mcm.ssfx_get_setting(module_id_2, "waterfall_size", ssfx_wetness_settings)
ssfx_wet_waterfall_speed = ssfx_001_mcm.ssfx_get_setting(module_id_2, "waterfall_speed", ssfx_wetness_settings)
ssfx_wet_waterfall_minspeed = ssfx_001_mcm.ssfx_get_setting(module_id_2, "waterfall_min_speed", ssfx_wetness_settings)
ssfx_wet_waterfall_int = ssfx_001_mcm.ssfx_get_setting(module_id_2, "waterfall_intensity", ssfx_wetness_settings)
ssfx_wet_res = ssfx_001_mcm.ssfx_get_setting(module_id_2, "cover_res", ssfx_wetness_settings)
ssfx_wet_dist = ssfx_001_mcm.ssfx_get_setting(module_id_2, "cover_distance", ssfx_wetness_settings)
if ssfx_gloss_auto then
RegisterScriptCallback("actor_on_update", update_rain)
else
UnregisterScriptCallback("actor_on_update", update_rain)
end
apply_extra_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,66 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 18
-- @ Description: Gloss & Wet Surfaces - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id = "ssfx_wetness", sh=false ,gr = {
{ id= "ssfx_gloss", sh=true, gr =
{
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_gloss_title",size= {512,50},spacing= 20 },
{id = "min_gloss_mcm", type = "track", val = 2, min=0.01,max=1.0,step=0.01, def = 0.6},
{id = "max_gloss_mcm", type = "track", val = 2, min=0.01,max=1.0,step=0.01, def = 0.9},
{id = "line", type = "line"},
{id = "auto_gloss_mcm", type = "check", val = 1, def=true},
{id = "auto_gloss_max_mcm", type = "track", val = 2, min=0.01,max=1.0,step=0.01, def = 1.0},
{id = "line", type = "line"},
{id = "specular_int_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.01, def = 0.35},
{id = "specular_color_mcm", type = "track", val = 2, min=0.0,max=1.0,step=0.1, def = 0.5},
}
},
{ id= "ssfx_wet_surf", sh=true, gr =
{
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_wet_surf_title",size= {512,50},spacing= 20 },
{id = "buildup_speed_mcm", type = "track", val = 2, min=0.1,max=20.0,step=0.1, def = 1.0},
{id = "dry_speed_mcm", type = "track", val = 2, min=0.1,max=20.0,step=0.1, def = 0.3},
{id = "line", type = "line"},
{id = "ripples_size_mcm", type = "track", val = 2, min=0.01,max=1.9,step=0.01, def = 1.5},
{id = "ripples_speed_mcm", type = "track", val = 2, min=0.01,max=2.0,step=0.01, def = 1.4},
{id = "ripples_min_speed_mcm", type = "track", val = 2, min=0.01,max=2.0,step=0.01, def = 0.7},
{id = "ripples_intensity_mcm", type = "track", val = 2, min=0.01,max=2.0,step=0.01, def = 1.25},
{id = "waterfall_size_mcm", type = "track", val = 2, min=0.01,max=2.0,step=0.01, def = 1.2},
{id = "waterfall_speed_mcm", type = "track", val = 2, min=0.01,max=2.0,step=0.01, def = 1.5},
{id = "waterfall_min_speed_mcm", type = "track", val = 2, min=0.01,max=2.0,step=0.01, def = 0.2},
{id = "waterfall_intensity_mcm", type = "track", val = 2, min=0.01,max=1.0,step=0.01, def = 0.35},
{id = "line", type = "line"},
{id = "cover_res_mcm", type = "list", val = 2, content={{0.0,"ssfx_cover_64"} , {1.0,"ssfx_cover_128"} , {2.0,"ssfx_cover_256"}, {3.0,"ssfx_cover_512"}, {4.0,"ssfx_cover_1024"}, {5.0,"ssfx_cover_2048"}}, def=1.0},
{id = "cover_distance_mcm", type = "track", val = 2, min=30.0,max=100.0,step=1.0, def = 30},
}
}
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,37 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 18
-- @ Description: Gloss & Wet Surfaces - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
-- Gloss
["min_gloss"] = 0.6, -- Minimum value of gloss.
["max_gloss"] = 0.9, -- Maximum value of gloss.
["auto_gloss"] = true, -- Automatic adjustment of gloss based on wetness.
["auto_gloss_max"] = 1.0, -- Value to control the maximum value of gloss when full wetness is reached. ( 0 = 0% | 1 = 100% )
["specular_int"] = 0.35, -- Set the intensity of specular lighting.
["specular_color"] = 0.5, -- Porcentage of the specular color. ( 0 = 0% | 1 = 100% )
-- Wet Surfaces
["buildup_speed"] = 1.0, --
["dry_speed"] = 0.3, --
["ripples_size"] = 1.5, --
["ripples_speed"] = 1.4, --
["ripples_min_speed"] = 0.7, --
["ripples_intensity"] = 1.25, --
["waterfall_size"] = 1.2, --
["waterfall_speed"] = 1.5, --
["waterfall_min_speed"] = 0.2, --
["waterfall_intensity"] = 0.35, --
["cover_res"] = 1, -- Resolution of the rain cover rendering. ( 0 Low ~ 5 High )
["cover_distance"] = 30 -- Distance of the rain cover rendering. Higher values are more performance expensive.
}
----------------------------------------------------
@@ -0,0 +1,53 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 19
-- @ Description: Wind script
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- Flora settings
local ssfx_wind_min_speed = 0
local ssfx_wind_grass_speed = 0
local ssfx_wind_grass_turbulence = 0
local ssfx_wind_grass_push = 0
local ssfx_wind_grass_wave = 0
local ssfx_wind_trees_anim = 0
local ssfx_wind_trees_trunk = 0
local ssfx_wind_trees_bend = 0
function apply_florafixes_settings()
get_console():execute("ssfx_wind_grass (" .. ssfx_wind_grass_speed .. "," .. ssfx_wind_grass_turbulence .. "," .. ssfx_wind_grass_push .. "," .. ssfx_wind_grass_wave .. ")")
get_console():execute("ssfx_wind_trees (" .. ssfx_wind_trees_anim .. "," .. ssfx_wind_trees_trunk .. "," .. ssfx_wind_trees_bend .. "," .. ssfx_wind_min_speed .. ")")
end
function on_option_change()
-- Get settings
local module_id = "wind"
ssfx_wind_min_speed = ssfx_001_mcm.ssfx_get_setting(module_id, "min_speed", ssfx_wind_settings)
ssfx_wind_grass_speed = ssfx_001_mcm.ssfx_get_setting(module_id, "grass_speed", ssfx_wind_settings)
ssfx_wind_grass_turbulence = ssfx_001_mcm.ssfx_get_setting(module_id, "grass_turbulence", ssfx_wind_settings)
ssfx_wind_grass_push = ssfx_001_mcm.ssfx_get_setting(module_id, "grass_push", ssfx_wind_settings)
ssfx_wind_grass_wave = ssfx_001_mcm.ssfx_get_setting(module_id, "grass_wave", ssfx_wind_settings)
ssfx_wind_trees_anim = ssfx_001_mcm.ssfx_get_setting(module_id, "trees_speed", ssfx_wind_settings)
ssfx_wind_trees_trunk = ssfx_001_mcm.ssfx_get_setting(module_id, "trees_trunk", ssfx_wind_settings)
ssfx_wind_trees_bend = ssfx_001_mcm.ssfx_get_setting(module_id, "trees_bend", ssfx_wind_settings)
-- Apply settings
apply_florafixes_settings()
end
function on_game_start()
-- General Functions
RegisterScriptCallback("on_option_change", on_option_change)
-- Read and apply settigns
on_option_change()
end
@@ -0,0 +1,30 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 19
-- @ Description: Wind - MCM Menu
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
function on_mcm_load()
op = { id= "wind", sh=true, text="ui_mcm_ssfx_module_wind", gr ={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_ssfx_module_wind_title",size= {512,50},spacing= 20 },
{id = "min_speed_mcm", type = "track", val = 2, min=0,max=1,step=0.01, def = 0.1},
{ id = "line", type = "line" },
{id = "grass_speed_mcm", type = "track", val = 2, min=0.1,max=13,step=0.1, def = 9.5},
{id = "grass_turbulence_mcm", type = "track", val = 2, min=0.1,max=3,step=0.1, def = 1.4},
{id = "grass_push_mcm", type = "track", val = 2, min=0.1,max=3,step=0.1, def = 1.5},
{id = "grass_wave_mcm", type = "track", val = 2, min=0.1,max=1,step=0.1, def = 0.4},
{ id = "line", type = "line" },
{id = "trees_speed_mcm", type = "track", val = 2, min=0.1,max=13,step=0.1, def = 11.0},
{id = "trees_trunk_mcm", type = "track", val = 2, min=0.1,max=0.3,step=0.01, def = 0.15},
{id = "trees_bend_mcm", type = "track", val = 2, min=0.1,max=2.0,step=0.1, def = 0.5},
}
}
return op, "ssfx_module"
end
@@ -0,0 +1,21 @@
-- @ Version: SCREEN SPACE SHADERS - UPDATE 19
-- @ Description: Wind - Settings
-- @ Author: https://www.moddb.com/members/ascii1457
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
-- If you're not using MCM you can customize your settings here --
ssfx_default_settings =
{
["min_speed"] = 0.1, -- Wind min speed [ 1 = 100% ]
["grass_speed"] = 9.5, -- Grass animation speed
["grass_turbulence"] = 1.4, -- Grass turbulence intensity
["grass_push"] = 1.5, -- Grass wind push intensity
["grass_wave"] = 0.4, -- Grass wave
["trees_speed"] = 11.0, -- Branches animation speed
["trees_trunk"] = 0.15, -- Trunk animation speed
["trees_bend"] = 0.5, -- Trunk swang intensity
}
----------------------------------------------------
File diff suppressed because it is too large Load Diff