Maybe a slight bit if you're CPU bottlenecked (all CET mods have a slight CPU impact)... If you're CPU bottlenecked, this mod won't really help anyway, though since it only disables graphical features...
Also could reduce FPS if you normally play with ini tweaks that disable any of the settings, as this will force them to be enabled on launch if they're enabled in the mod's menu... If you think that may be the case (if it's a pretty large FPS drop, it likely is), I'd recommend checking any ini tweaks you have installed for the settings in this mod, and uncheck conflicting settings in this mod's menu (which will prevent this mod from adjusting the setting and will use your ini tweak values instead)...
Hey thanks. I'm losing around 8-10 FPS with this and that's pretty expensive for my card. I have many mods installed, not sure how I'm going to know what is conflicting with this mod. This mod is essential for me since it can disable bloom but the FPS drop isn't helping.
Is it possible to disable bloom in another way that doesn't get me to lose FPS? What about creating an ini that only disables bloom, is that possible? If so can you please help with that? (I have not the slightest idea on how to do something like that)
That won't disable duplicate crowds but should reduce the amount of duplicates you see (and not even to any degree that you'll likely even notice the difference with only that value being changed)...
But no, you can't just leave that one by itself line and expect it to work... Something else needs to call on that in the script or it'll never happen (the checkbox and the player actions call on it now)...
Edit: You could put just that one line in the "onInit" event in the script and get rid of everything else, and it would technically work, but again, you likely won't notice any difference with only that value changing (there is a difference, it's just subtle since it's not actually disabling clones altogether, it's disabling clones in a spawn "batch" (NPCs/Vehicles spawn in batches of like 5 at at time or so... No idea how many, but something like that)...
Like this? registerForEvent('onInit', function() GameOptions.SetInt("Crowd", "SpawnLimit", 1) end)
I'm just trying to avoid situations where the same NPC stands in the same group, walks 6 feet apart, etc. I assume some of them are part of the same spawn batch. I haven't found any npc diversity mods that solves this consistently, atleast not without other issues. It's a fairly rare issue, so a solution with a small footprint would be ideal.
About the multiple languages, though, the mod doesn't support multiple languages in one download, there are just multiple language options available (specifically a Spanish translation done by myself in the "Optional" files, and a Mandarin Chinese translation by another Nexus user in the "Translations")...
Can i use this together with your "General Performance Improvements (ini Tweaks) - Updated for 2.0" mod? or will the settings conflict with each other?
Yes, it's more true for that than the old ini tweak files... The CET version applies the same ini values, just after the game launches, so it overrides any that are in .ini files...
Can i save the setting of Imgui version? I disabled some features such as bloom. After restart the game the setting is still off but the ingame effect is on. I neet to enable and disable it again to take effective.
Please TheManualEnhancer, you're the only one capable to bring us the RUN TOGGLE for CP2077. My GOSH, my L3 is going to be trashed and my thumb is almost falling down. PLEASEEEEEE make this mod!
I made a Smaller version out it and in German Language
Spoiler:
Show
local nativeSettings = nil local configFileName = "config.json" local settings = { Current = { modautos = false, autos = true, vehicles = true, peds = true, allcrowds = true, crowditems = true, spawns = 3, lightblock = true, rimenhance = true, terrainsnap = true, moveattempts = 100, antialias = true, cas = true, statics = true, dynamics = true, bloom = true, cascades = true, distantfog = true, distantgi = true, distantshadows = true, distantvolfog = true, gi = true, ssao = true, ssheathaze = true, sspr = true, ssr = true, ssrain = true, volfog = true, async = true, vrs = true, checkerGI = true, rtao = true, rttrans = true, rtdi = true, rtSSR = true, dlssd = false }, Default = { modautos = false, autos = true, vehicles = true, peds = true, allcrowds = true, crowditems = true, spawns = 3, lightblock = true, rimenhance = true, terrainsnap = true, moveattempts = 100, antialias = true, cas = true, statics = true, dynamics = true, bloom = true, cascades = true, distantfog = true, distantgi = true, distantshadows = true, distantvolfog = true, gi = true, ssao = true, ssheathaze = true, sspr = true, ssr = true, ssrain = true, volfog = true, async = true, vrs = true, checkerGI = true, rtao = true, rttrans = true, rtdi = true, rtSSR = true, dlssd = false } } function ModAutoSave() if settings.Current.modautos == true then local file = io.open("config.json", "w") if file ~= nil then local content = json.encode(settings.Current) file:write(content) file:close() end else return end end function MainMenu() nativeSettings.addTab("/JustSomeFeatureToggles", "Fine Tuning") nativeSettings.addSubcategory("/JustSomeFeatureToggles/main", "Extra Einstellungen [> CPU/GPU,Einwohner,Raytracing/Pathtracing <]") nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Erzwinge Auto Spielstand Speichern", "Toggles autosaving on/off for gameplay. This setting autosaves whether you have the 'Mod Auto Saves' switched on or off. ***Warning*** - Disabling autosaves can break quests, so enable when questing.", settings.Current.autos, settings.Default.autos, function(state) settings.Current.autos = state SetAutoSaves() SaveSettings() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Mod Einstellung Auto Speichern", "Toggles autosaving of the mod settings on/off. Off by default. You can always use the 'Save' buttons on each menu to save the settings at any time. Settings always apply automatically with or without autosaving.", settings.Current.modautos, settings.Default.modautos, function(state) settings.Current.modautos = state SetAutoSaves() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Einwohner", "Toggles only pedestrian crowds", settings.Current.peds, settings.Default.peds, function(state) settings.Current.peds = state SetPeds() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Fahrzeuge", "Toggles only vehicles", settings.Current.vehicles, settings.Default.vehicles, function(state) settings.Current.vehicles = state SetVehicles() SaveSettings() ModAutoSave() end) nativeSettings.addRangeFloat("/JustSomeFeatureToggles/main", "Begrenzung für NPCs des gleichen Typs", "Sets the limit of same type NPCs (clones) that are allowed to spawn around you. Higher values should improve performance", 1, 10, 1, "%0.0f", settings.Current.spawns, settings.Default.spawns, function(value) settings.Current.spawns = value SetSpawns() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Menschenmengen haben Items", "Toggles items from crowd members such as cell phones", settings.Current.crowditems, settings.Default.crowditems, function(state) settings.Current.crowditems = state SetCrowdItems() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Charakter - Lichtblockieren", "Toggles the blocking of lights by characters", settings.Current.lightblock, settings.Default.lightblock, function(state) settings.Current.lightblock = state SetLightBlock() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Charakterrandes - Verbesserung", "Toggles the artificial glow on the edges of characters", settings.Current.rimenhance, settings.Default.rimenhance, function(state) settings.Current.rimenhance = state SetRimEnhance() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "NPC Leichen an Boden Fixieren", "Toggles the checks to make sure that NPCs stay stuck to the ground - Doesn't really break anything, but NPCs may appear to hover a bit", settings.Current.terrainsnap, settings.Default.terrainsnap, function(state) settings.Current.terrainsnap = state SetSnap() SaveSettings() ModAutoSave() end) nativeSettings.addRangeFloat("/JustSomeFeatureToggles/main", "NPC CPU-Berechnungs Entfernung", "Reducing this could help reduce CPU load. 0 doesn't quite disable pathing, but makes NPCs walk in circles sometimes", 0, 100, 1, "%0.0f", settings.Current.moveattempts, settings.Default.moveattempts, function(value) settings.Current.moveattempts = value SetMoveAttempts() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Antialiasing", "Enabled gets rid of most jagged edges - Warning, ugly when disabled", settings.Current.antialias, settings.Default.antialias, function(state) settings.Current.antialias = state SetAntiAlias() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Statische Aufkleber", "Static (non-changing) decals... Haven't tested this enough to know what all the game considers to be static decals", settings.Current.statics, settings.Default.statics, function(state) settings.Current.statics = state SetStatics() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Dynamische Aufkleber", "Things like bullet holes and broken glass", settings.Current.dynamics, settings.Default.dynamics, function(state) settings.Current.dynamics = state SetDynamics() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Schatten(Sonne) - Kaskaden", "Sun Shadows", settings.Current.cascades, settings.Default.cascades, function(state) settings.Current.cascades = state SetCascades() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Schatten(Fake) - Entfernung", "Fake shadows in the distance", settings.Current.distantshadows, settings.Default.distantshadows, function(state) settings.Current.distantshadows = state SetDistantShadows() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "SSAO", "Ambient darkening of objects close to each other or surfaces, like shadows", settings.Current.ssao, settings.Default.ssao, function(state) settings.Current.ssao = state SetSSAO() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Globale Beleuchtung", "Global lighting - Warning, disabled is ugly", settings.Current.gi, settings.Default.gi, function(state) settings.Current.gi = state SetGI() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Globale Beleuchtung Entfernung", "Distant global lighting - Warning, disabled is ugly", settings.Current.distantgi, settings.Default.distantgi, function(state) settings.Current.distantgi = state SetDistantGI() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Nebel - Entfernung", "Distant horizon fog", settings.Current.distantfog, settings.Default.distantfog, function(state) settings.Current.distantfog = state SetDistantFog() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Nebel (Voll)", "Fog that fills your screen - Warning, you need this on to see rain", settings.Current.volfog, settings.Default.volfog, function(state) settings.Current.volfog = state SetVolFog() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Nebel (Voll) - Entfernung", "Fog from the volumetric clouds - Warning, disabling is ugly", settings.Current.distantvolfog, settings.Default.distantvolfog, function(state) settings.Current.distantvolfog = state SetDistantVolFog() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Beleuchtung", "Makes lights glow - Vol Fog assists it", settings.Current.bloom, settings.Default.bloom, function(state) settings.Current.bloom = state SetBloom() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Hitze flimmern", "The hazy glow around the city", settings.Current.ssheathaze, settings.Default.ssheathaze, function(state) settings.Current.ssheathaze = state SetHaze() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Planare Reflexionen", "I would try disabling this before SSR", settings.Current.sspr, settings.Default.sspr, function(state) settings.Current.sspr = state SetPlanar() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "ScreenSpace Reflexionen", "Good old SSR", settings.Current.ssr, settings.Default.ssr, function(state) settings.Current.ssr = state SetSSR() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "ScreenSpace Regen", "Toggles some rain post-processing effects. This doesn't disable rain, just makes it kinda ugly", settings.Current.ssrain, settings.Default.ssrain, function(state) settings.Current.ssrain = state SetSSRain() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Asynchron Computer", "Generally performs better disabled on RTX 20 series and older, or AMD RX 500 series and older", settings.Current.async, settings.Default.async, function(state) settings.Current.async = state SetAsync() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Schattierung mit variabler Rate", "Could perform better, could be worse, could be no change", settings.Current.vrs, settings.Default.vrs, function(state) settings.Current.vrs = state SetVrs() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "AMD FidelityFx CAS", "Contrast adaptive sharpening", settings.Current.cas, settings.Default.cas, function(state) settings.Current.cas = state SetCAS() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "CPU Schachbrett-GI", "Should perform better enabled, but could improve performance in CPU-bound scenarios", settings.Current.checkerGI, settings.Default.checkerGI, function(state) settings.Current.checkerGI = state SetCheckerGI() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "RTAO", "See SSAO details", settings.Current.rtao, settings.Default.rtao, function(state) settings.Current.rtao = state SetRTAO() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Raytracing Diffuse Beleuchtung", "This really shouldn't make a huge difference to RT lighting and should improve performance", settings.Current.rtdi, settings.Default.rtdi, function(state) settings.Current.rtdi = state SetRTDI() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Raytracing Transparente Reflexionen", "Again, shouldn't reduce visuals too much for a little performance lift", settings.Current.rttrans, settings.Default.rttrans, function(state) settings.Current.rttrans = state SetRtTrans() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Raytracing SSR-Fallback", "Toggles screenspace reflections while using RT/PT", settings.Current.rtSSR, settings.Default.rtSSR, function(state) settings.Current.rtSSR = state SetRtSSR() SaveSettings() ModAutoSave() end) nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Raytracing wiederaufbau", "Force Ray REconstruction On/Off (default is off)", settings.Current.dlssd, settings.Default.dlssd, function(state) settings.Current.dlssd = state SetRtSSR() SaveSettings() ModAutoSave() end) end registerForEvent("onInit", function() nativeSettings = GetMod("nativeSettings") LoadSettings() MainMenu() end) function AllMenus() nativeSettings.addSubcategory("/JustSomeFeatureToggles/all", "=====================================================") end function SetAutoSaves() GameOptions.SetBool("SaveConfig", "AutoSaveEnabled", settings.Current.autos) end function SetAllCrowds() GameOptions.SetBool("Crowd", "Enabled", settings.Current.allcrowds) end function SetPeds() GameOptions.SetBool("Crowd", "EnablePedestrians", settings.Current.peds) end function SetVehicles() GameOptions.SetBool("Crowd", "EnableVehicles", settings.Current.vehicles) end function SetSpawns() GameOptions.SetInt("Crowd", "SpawnLimit", settings.Current.spawns) end function SetCrowdItems() GameOptions.SetBool("Crowds", "EnableItems", settings.Current.crowditems) end function SetLightBlock() GameOptions.SetBool("Developer/FeatureToggles", "CharacterLightBlockers", settings.Current.lightblock) end function SetRimEnhance() GameOptions.SetBool("Developer/FeatureToggles", "CharacterRimEnhancement", settings.Current.rimenhance) end function SetSnap() GameOptions.SetBool("SnapToTerrainIk", "Enabled", settings.Current.terrainsnap) end function SetMoveAttempts() GameOptions.SetFloat("Traffic", "MaxLocalPathLength", settings.Current.moveattempts) end function SetAntiAlias() GameOptions.SetBool("Developer/FeatureToggles", "Antialiasing", settings.Current.antialias) end function SetCAS() GameOptions.SetBool("Developer/FeatureToggles", "ConstrastAdaptiveSharpening", settings.Current.cas) end function SetStatics() GameOptions.SetBool("Streaming/Culling/StaticDecals", "Enabled", settings.Current.statics) end function SetDynamics() GameOptions.SetBool("Developer/FeatureToggles", "DynamicDecals", settings.Current.statics) end function SetCascades() GameOptions.SetBool("Developer/FeatureToggles", "CascadeShadows", settings.Current.cascades) end function SetDistantShadows() GameOptions.SetBool("Developer/FeatureToggles", "DistantShadows", settings.Current.distantshadows) end function SetSSAO() GameOptions.SetBool("Developer/FeatureToggles", "SSAO", settings.Current.ssao) end function SetDistantGI() GameOptions.SetBool("Developer/FeatureToggles", "DistantGI", settings.Current.distantgi) end function SetGI() GameOptions.SetBool("Developer/FeatureToggles", "GlobalIllumination", settings.Current.gi) end function SetDistantFog() GameOptions.SetBool("Developer/FeatureToggles", "DistantFog", settings.Current.distantfog) end function SetDistantVolFog() GameOptions.SetBool("Developer/FeatureToggles", "DistantVolFog", settings.Current.distantvolfog) end function SetVolFog() GameOptions.SetBool("Developer/FeatureToggles", "VolumetricFog", settings.Current.volfog) end function SetBloom() GameOptions.SetBool("Developer/FeatureToggles", "Bloom", settings.Current.bloom) end function SetHaze() GameOptions.SetBool("Developer/FeatureToggles", "ScreenSpaceHeatHaze", settings.Current.ssheathaze) end function SetPlanar() GameOptions.SetBool("Developer/FeatureToggles", "ScreenSpacePlanarReflection", settings.Current.sspr) end function SetSSR() GameOptions.SetBool("Developer/FeatureToggles", "ScreenSpaceReflection", settings.Current.ssr) end function SetSSRain() GameOptions.SetBool("Developer/FeatureToggles", "ScreenSpaceRain", settings.Current.ssrain) end function SetAsync() GameOptions.SetBool("Rendering/AsyncCompute", "Enable", settings.Current.async) end function SetVrs() GameOptions.SetBool("Rendering/VariableRateShading", "Enable", settings.Current.vrs) end function SetRTAO() GameOptions.SetBool("Raytracing", "EnableAmbientOcclusion", settings.Current.rtao) end function SetRTDI() GameOptions.SetBool("Raytracing", "EnableDiffuseIllumination", settings.Current.rtdi) end function SetRtTrans() GameOptions.SetBool("Raytracing", "EnableTransparentReflection", settings.Current.rttrans) end function SetCheckerGI() GameOptions.SetBool("Rendering", "CheckerboardGI", settings.Current.checkerGI) end function SetRtSSR() GameOptions.SetBool("Editor/PathTracing", "UseSSRFallback", settings.Current.rtSSR) end function SetDLSSD() GameOptions.SetBool("Developer/FeatureToggles", "DLSSD", settings.Current.dlssd) end function LoadSettings() local file = io.open(configFileName, "r") if file ~= nil then local configStr = file:read("*a") settings.Current = json.decode(configStr) file:close() end end function SaveSettings() if not settings.Current.modautos == true then local file = io.open(configFileName, "w") if file ~= nil then local content = json.encode(settings.Current) file:write(content) file:close() end else return end end
Yeah, it's a weird toggle... Idk why, but sometimes it just doesn't work... I think it may be quest related... Like at certain points of the game the crowds aren't affected by those ini values or something...
107 comments
Also could reduce FPS if you normally play with ini tweaks that disable any of the settings, as this will force them to be enabled on launch if they're enabled in the mod's menu... If you think that may be the case (if it's a pretty large FPS drop, it likely is), I'd recommend checking any ini tweaks you have installed for the settings in this mod, and uncheck conflicting settings in this mod's menu (which will prevent this mod from adjusting the setting and will use your ini tweak values instead)...
Is it possible to disable bloom in another way that doesn't get me to lose FPS? What about creating an ini that only disables bloom, is that possible? If so can you please help with that? (I have not the slightest idea on how to do something like that)
EDIT: Never mind I found this and it's working.GameOptions.SetInt("Crowd", "SpawnLimit", 1)
But no, you can't just leave that one by itself line and expect it to work... Something else needs to call on that in the script or it'll never happen (the checkbox and the player actions call on it now)...
Edit: You could put just that one line in the "onInit" event in the script and get rid of everything else, and it would technically work, but again, you likely won't notice any difference with only that value changing (there is a difference, it's just subtle since it's not actually disabling clones altogether, it's disabling clones in a spawn "batch" (NPCs/Vehicles spawn in batches of like 5 at at time or so... No idea how many, but something like that)...
registerForEvent('onInit', function()
GameOptions.SetInt("Crowd", "SpawnLimit", 1)
end)
I'm just trying to avoid situations where the same NPC stands in the same group, walks 6 feet apart, etc. I assume some of them are part of the same spawn batch. I haven't found any npc diversity mods that solves this consistently, atleast not without other issues. It's a fairly rare issue, so a solution with a small footprint would be ideal.
Thanks for your help and hard work.
ty! ;*
About the multiple languages, though, the mod doesn't support multiple languages in one download, there are just multiple language options available (specifically a Spanish translation done by myself in the "Optional" files, and a Mandarin Chinese translation by another Nexus user in the "Translations")...
local nativeSettings = nil
local configFileName = "config.json"
local settings =
{
Current = {
modautos = false,
autos = true,
vehicles = true,
peds = true,
allcrowds = true,
crowditems = true,
spawns = 3,
lightblock = true,
rimenhance = true,
terrainsnap = true,
moveattempts = 100,
antialias = true,
cas = true,
statics = true,
dynamics = true,
bloom = true,
cascades = true,
distantfog = true,
distantgi = true,
distantshadows = true,
distantvolfog = true,
gi = true,
ssao = true,
ssheathaze = true,
sspr = true,
ssr = true,
ssrain = true,
volfog = true,
async = true,
vrs = true,
checkerGI = true,
rtao = true,
rttrans = true,
rtdi = true,
rtSSR = true,
dlssd = false
},
Default = {
modautos = false,
autos = true,
vehicles = true,
peds = true,
allcrowds = true,
crowditems = true,
spawns = 3,
lightblock = true,
rimenhance = true,
terrainsnap = true,
moveattempts = 100,
antialias = true,
cas = true,
statics = true,
dynamics = true,
bloom = true,
cascades = true,
distantfog = true,
distantgi = true,
distantshadows = true,
distantvolfog = true,
gi = true,
ssao = true,
ssheathaze = true,
sspr = true,
ssr = true,
ssrain = true,
volfog = true,
async = true,
vrs = true,
checkerGI = true,
rtao = true,
rttrans = true,
rtdi = true,
rtSSR = true,
dlssd = false
}
}
function ModAutoSave()
if settings.Current.modautos == true then
local file = io.open("config.json", "w")
if file ~= nil then
local content = json.encode(settings.Current)
file:write(content)
file:close()
end
else
return
end
end
function MainMenu()
nativeSettings.addTab("/JustSomeFeatureToggles", "Fine Tuning")
nativeSettings.addSubcategory("/JustSomeFeatureToggles/main", "Extra Einstellungen [> CPU/GPU,Einwohner,Raytracing/Pathtracing <]")
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Erzwinge Auto Spielstand Speichern", "Toggles autosaving on/off for gameplay. This setting autosaves whether you have the 'Mod Auto Saves' switched on or off. ***Warning*** - Disabling autosaves can break quests, so enable when questing.", settings.Current.autos, settings.Default.autos, function(state)
settings.Current.autos = state
SetAutoSaves()
SaveSettings()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Mod Einstellung Auto Speichern", "Toggles autosaving of the mod settings on/off. Off by default. You can always use the 'Save' buttons on each menu to save the settings at any time. Settings always apply automatically with or without autosaving.", settings.Current.modautos, settings.Default.modautos, function(state)
settings.Current.modautos = state
SetAutoSaves()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Einwohner", "Toggles only pedestrian crowds", settings.Current.peds, settings.Default.peds, function(state)
settings.Current.peds = state
SetPeds()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Fahrzeuge", "Toggles only vehicles", settings.Current.vehicles, settings.Default.vehicles, function(state)
settings.Current.vehicles = state
SetVehicles()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addRangeFloat("/JustSomeFeatureToggles/main", "Begrenzung für NPCs des gleichen Typs", "Sets the limit of same type NPCs (clones) that are allowed to spawn around you. Higher values should improve performance", 1, 10, 1, "%0.0f", settings.Current.spawns, settings.Default.spawns, function(value)
settings.Current.spawns = value
SetSpawns()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Menschenmengen haben Items", "Toggles items from crowd members such as cell phones", settings.Current.crowditems, settings.Default.crowditems, function(state)
settings.Current.crowditems = state
SetCrowdItems()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Charakter - Lichtblockieren", "Toggles the blocking of lights by characters", settings.Current.lightblock, settings.Default.lightblock, function(state)
settings.Current.lightblock = state
SetLightBlock()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Charakterrandes - Verbesserung", "Toggles the artificial glow on the edges of characters", settings.Current.rimenhance, settings.Default.rimenhance, function(state)
settings.Current.rimenhance = state
SetRimEnhance()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "NPC Leichen an Boden Fixieren", "Toggles the checks to make sure that NPCs stay stuck to the ground - Doesn't really break anything, but NPCs may appear to hover a bit", settings.Current.terrainsnap, settings.Default.terrainsnap, function(state)
settings.Current.terrainsnap = state
SetSnap()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addRangeFloat("/JustSomeFeatureToggles/main", "NPC CPU-Berechnungs Entfernung", "Reducing this could help reduce CPU load. 0 doesn't quite disable pathing, but makes NPCs walk in circles sometimes", 0, 100, 1, "%0.0f", settings.Current.moveattempts, settings.Default.moveattempts, function(value)
settings.Current.moveattempts = value
SetMoveAttempts()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Antialiasing", "Enabled gets rid of most jagged edges - Warning, ugly when disabled", settings.Current.antialias, settings.Default.antialias, function(state)
settings.Current.antialias = state
SetAntiAlias()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Statische Aufkleber", "Static (non-changing) decals... Haven't tested this enough to know what all the game considers to be static decals", settings.Current.statics, settings.Default.statics, function(state)
settings.Current.statics = state
SetStatics()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Dynamische Aufkleber", "Things like bullet holes and broken glass", settings.Current.dynamics, settings.Default.dynamics, function(state)
settings.Current.dynamics = state
SetDynamics()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Schatten(Sonne) - Kaskaden", "Sun Shadows", settings.Current.cascades, settings.Default.cascades, function(state)
settings.Current.cascades = state
SetCascades()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Schatten(Fake) - Entfernung", "Fake shadows in the distance", settings.Current.distantshadows, settings.Default.distantshadows, function(state)
settings.Current.distantshadows = state
SetDistantShadows()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "SSAO", "Ambient darkening of objects close to each other or surfaces, like shadows", settings.Current.ssao, settings.Default.ssao, function(state)
settings.Current.ssao = state
SetSSAO()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Globale Beleuchtung", "Global lighting - Warning, disabled is ugly", settings.Current.gi, settings.Default.gi, function(state)
settings.Current.gi = state
SetGI()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Globale Beleuchtung Entfernung", "Distant global lighting - Warning, disabled is ugly", settings.Current.distantgi, settings.Default.distantgi, function(state)
settings.Current.distantgi = state
SetDistantGI()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Nebel - Entfernung", "Distant horizon fog", settings.Current.distantfog, settings.Default.distantfog, function(state)
settings.Current.distantfog = state
SetDistantFog()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Nebel (Voll)", "Fog that fills your screen - Warning, you need this on to see rain", settings.Current.volfog, settings.Default.volfog, function(state)
settings.Current.volfog = state
SetVolFog()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Nebel (Voll) - Entfernung", "Fog from the volumetric clouds - Warning, disabling is ugly", settings.Current.distantvolfog, settings.Default.distantvolfog, function(state)
settings.Current.distantvolfog = state
SetDistantVolFog()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Beleuchtung", "Makes lights glow - Vol Fog assists it", settings.Current.bloom, settings.Default.bloom, function(state)
settings.Current.bloom = state
SetBloom()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Hitze flimmern", "The hazy glow around the city", settings.Current.ssheathaze, settings.Default.ssheathaze, function(state)
settings.Current.ssheathaze = state
SetHaze()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Planare Reflexionen", "I would try disabling this before SSR", settings.Current.sspr, settings.Default.sspr, function(state)
settings.Current.sspr = state
SetPlanar()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "ScreenSpace Reflexionen", "Good old SSR", settings.Current.ssr, settings.Default.ssr, function(state)
settings.Current.ssr = state
SetSSR()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "ScreenSpace Regen", "Toggles some rain post-processing effects. This doesn't disable rain, just makes it kinda ugly", settings.Current.ssrain, settings.Default.ssrain, function(state)
settings.Current.ssrain = state
SetSSRain()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Asynchron Computer", "Generally performs better disabled on RTX 20 series and older, or AMD RX 500 series and older", settings.Current.async, settings.Default.async, function(state)
settings.Current.async = state
SetAsync()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Schattierung mit variabler Rate", "Could perform better, could be worse, could be no change", settings.Current.vrs, settings.Default.vrs, function(state)
settings.Current.vrs = state
SetVrs()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "AMD FidelityFx CAS", "Contrast adaptive sharpening", settings.Current.cas, settings.Default.cas, function(state)
settings.Current.cas = state
SetCAS()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "CPU Schachbrett-GI", "Should perform better enabled, but could improve performance in CPU-bound scenarios", settings.Current.checkerGI, settings.Default.checkerGI, function(state)
settings.Current.checkerGI = state
SetCheckerGI()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "RTAO", "See SSAO details", settings.Current.rtao, settings.Default.rtao, function(state)
settings.Current.rtao = state
SetRTAO()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Raytracing Diffuse Beleuchtung", "This really shouldn't make a huge difference to RT lighting and should improve performance", settings.Current.rtdi, settings.Default.rtdi, function(state)
settings.Current.rtdi = state
SetRTDI()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Raytracing Transparente Reflexionen", "Again, shouldn't reduce visuals too much for a little performance lift", settings.Current.rttrans, settings.Default.rttrans, function(state)
settings.Current.rttrans = state
SetRtTrans()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Raytracing SSR-Fallback", "Toggles screenspace reflections while using RT/PT", settings.Current.rtSSR, settings.Default.rtSSR, function(state)
settings.Current.rtSSR = state
SetRtSSR()
SaveSettings()
ModAutoSave()
end)
nativeSettings.addSwitch("/JustSomeFeatureToggles/main", "Raytracing wiederaufbau", "Force Ray REconstruction On/Off (default is off)", settings.Current.dlssd, settings.Default.dlssd, function(state)
settings.Current.dlssd = state
SetRtSSR()
SaveSettings()
ModAutoSave()
end)
end
registerForEvent("onInit", function()
nativeSettings = GetMod("nativeSettings")
LoadSettings()
MainMenu()
end)
function AllMenus()
nativeSettings.addSubcategory("/JustSomeFeatureToggles/all", "=====================================================")
end
function SetAutoSaves()
GameOptions.SetBool("SaveConfig", "AutoSaveEnabled", settings.Current.autos)
end
function SetAllCrowds()
GameOptions.SetBool("Crowd", "Enabled", settings.Current.allcrowds)
end
function SetPeds()
GameOptions.SetBool("Crowd", "EnablePedestrians", settings.Current.peds)
end
function SetVehicles()
GameOptions.SetBool("Crowd", "EnableVehicles", settings.Current.vehicles)
end
function SetSpawns()
GameOptions.SetInt("Crowd", "SpawnLimit", settings.Current.spawns)
end
function SetCrowdItems()
GameOptions.SetBool("Crowds", "EnableItems", settings.Current.crowditems)
end
function SetLightBlock()
GameOptions.SetBool("Developer/FeatureToggles", "CharacterLightBlockers", settings.Current.lightblock)
end
function SetRimEnhance()
GameOptions.SetBool("Developer/FeatureToggles", "CharacterRimEnhancement", settings.Current.rimenhance)
end
function SetSnap()
GameOptions.SetBool("SnapToTerrainIk", "Enabled", settings.Current.terrainsnap)
end
function SetMoveAttempts()
GameOptions.SetFloat("Traffic", "MaxLocalPathLength", settings.Current.moveattempts)
end
function SetAntiAlias()
GameOptions.SetBool("Developer/FeatureToggles", "Antialiasing", settings.Current.antialias)
end
function SetCAS()
GameOptions.SetBool("Developer/FeatureToggles", "ConstrastAdaptiveSharpening", settings.Current.cas)
end
function SetStatics()
GameOptions.SetBool("Streaming/Culling/StaticDecals", "Enabled", settings.Current.statics)
end
function SetDynamics()
GameOptions.SetBool("Developer/FeatureToggles", "DynamicDecals", settings.Current.statics)
end
function SetCascades()
GameOptions.SetBool("Developer/FeatureToggles", "CascadeShadows", settings.Current.cascades)
end
function SetDistantShadows()
GameOptions.SetBool("Developer/FeatureToggles", "DistantShadows", settings.Current.distantshadows)
end
function SetSSAO()
GameOptions.SetBool("Developer/FeatureToggles", "SSAO", settings.Current.ssao)
end
function SetDistantGI()
GameOptions.SetBool("Developer/FeatureToggles", "DistantGI", settings.Current.distantgi)
end
function SetGI()
GameOptions.SetBool("Developer/FeatureToggles", "GlobalIllumination", settings.Current.gi)
end
function SetDistantFog()
GameOptions.SetBool("Developer/FeatureToggles", "DistantFog", settings.Current.distantfog)
end
function SetDistantVolFog()
GameOptions.SetBool("Developer/FeatureToggles", "DistantVolFog", settings.Current.distantvolfog)
end
function SetVolFog()
GameOptions.SetBool("Developer/FeatureToggles", "VolumetricFog", settings.Current.volfog)
end
function SetBloom()
GameOptions.SetBool("Developer/FeatureToggles", "Bloom", settings.Current.bloom)
end
function SetHaze()
GameOptions.SetBool("Developer/FeatureToggles", "ScreenSpaceHeatHaze", settings.Current.ssheathaze)
end
function SetPlanar()
GameOptions.SetBool("Developer/FeatureToggles", "ScreenSpacePlanarReflection", settings.Current.sspr)
end
function SetSSR()
GameOptions.SetBool("Developer/FeatureToggles", "ScreenSpaceReflection", settings.Current.ssr)
end
function SetSSRain()
GameOptions.SetBool("Developer/FeatureToggles", "ScreenSpaceRain", settings.Current.ssrain)
end
function SetAsync()
GameOptions.SetBool("Rendering/AsyncCompute", "Enable", settings.Current.async)
end
function SetVrs()
GameOptions.SetBool("Rendering/VariableRateShading", "Enable", settings.Current.vrs)
end
function SetRTAO()
GameOptions.SetBool("Raytracing", "EnableAmbientOcclusion", settings.Current.rtao)
end
function SetRTDI()
GameOptions.SetBool("Raytracing", "EnableDiffuseIllumination", settings.Current.rtdi)
end
function SetRtTrans()
GameOptions.SetBool("Raytracing", "EnableTransparentReflection", settings.Current.rttrans)
end
function SetCheckerGI()
GameOptions.SetBool("Rendering", "CheckerboardGI", settings.Current.checkerGI)
end
function SetRtSSR()
GameOptions.SetBool("Editor/PathTracing", "UseSSRFallback", settings.Current.rtSSR)
end
function SetDLSSD()
GameOptions.SetBool("Developer/FeatureToggles", "DLSSD", settings.Current.dlssd)
end
function LoadSettings()
local file = io.open(configFileName, "r")
if file ~= nil then
local configStr = file:read("*a")
settings.Current = json.decode(configStr)
file:close()
end
end
function SaveSettings()
if not settings.Current.modautos == true then
local file = io.open(configFileName, "w")
if file ~= nil then
local content = json.encode(settings.Current)
file:write(content)
file:close()
end
else
return
end
end