Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GAMMA fov, snd_volume_eff, mouse_sens issues #171

Open
axet opened this issue Jul 14, 2023 · 0 comments
Open

GAMMA fov, snd_volume_eff, mouse_sens issues #171

axet opened this issue Jul 14, 2023 · 0 comments

Comments

@axet
Copy link
Contributor

axet commented Jul 14, 2023

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant