Stalker_GAMMA icon indicating copy to clipboard operation
Stalker_GAMMA copied to clipboard

GAMMA fov, snd_volume_eff, mouse_sens issues

Open axet opened this issue 2 years ago • 1 comments

Hello!

GAMMA know to have bugs related to chaining fov, snd_volume_eff, and mouse sensitivity.

GAMMA has few mods which changes 'fov' using console commands using temporary variables without synchronization. As result 'fov' jumps randomly.

Here an example:

  1. first mod save 'fov' to fov_tmp
  2. change fov to 120
  3. second mod save 'fov' to fov_tmp2
  4. first mod restore fov_tmp -> fov
  5. second mod restore fov_tmp2 (120) -> fov

as result 'fov' jumps.

If you using several mods which changes 'fov' or 'snd_volume_eff' or any global variable you have to create any sort of synchronization!

Here list or your mods:

snd_volume_eff

184- Body Health System - Grokitach
112- FDDA Immersive Sleep Patch - Feel_fried
111- Immersive Sleep - tkcrits
52- Perk-Based Artefacts - Demonized
40- Food Drugs and Drinks Animations FDDA - Feel_Fried
G.A.M.M.A. Artefacts Reinvention
G.A.M.M.A. Hip quest rewrite
G.A.M.M.A. Medications Balance
G.A.M.M.A. Sleep Balance

fov

72- Adjustable Scope View - sneaky
71- Weapons Reanimation and Rebalance - Blindside
267- Dynamic Dialog UI - Demonized
236- 1st Person Visible Body Ported from SWM - Wang_Laoshi & SWM Team
181- Ballistics Overhaul (GBOOBS) - Grokitach
178- Free Zoom - SlowVibe
40- Food Drugs and Drinks Animations FDDA - Feel_Fried
G.A.M.M.A. Enhanced Recoil
G.A.M.M.A. Free Zoom v3

mouse_sens

G.A.M.M.A. Free Zoom v3
178- Free Zoom - SlowVibe
185- Shader Driven Scopes

You basically need something like that:

glob.script

local map = {}

function get(key)
  old = map[key]
  if (old == nil) then
    return get_console_cmd(nil, key)
  else
    return old
  end
end

function cur(key)
  return get_console_cmd(nil, key)
end

function set(key, value)
  printf("glob.set %s %s", key, value)
  if (map[key] == nil) then
    map[key] = get_console_cmd(nil, key)
  end
  get_console():execute(key .. " " .. value)
end

function reset(key)
  printf("glob.reset %s", key)
  old = map[key]
  if (old == nil) then
    return
  end
  get_console():execute(key .. " " .. old)
  map[key] = nil
end

Name the script glob.script and then replace all calls in all other mods using styles like that

glob.set("fov", 120)
glob.set("fov", 140)
glob.reset("fov")

all patches are here:

  • https://gitlab.com/axet/homebin/-/tree/debian/homebin.d/stalker3gamma.d

axet avatar Jul 14 '23 03:07 axet

Since the new GAMMA update used my Free Zoom mod, which enables the use of a lot of fov changing, I might use this. Can you provide any problem of any fov jumping that's causing any real issue? So far I haven't seen any, it is definitely not optimal to overwrite each other a lot of the times but the changes is done in a short time so not noticeable. This will require an entire overhaul of scripts/system related to fov, sound, mouse sens, etc. So Grok will need a big improvement to change that.

Kutez avatar Jan 22 '25 14:01 Kutez