Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions .Build/F4SE/Plugins/Addictol.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ bSaveAddedSoundCategories = true
# Blocks the use of incorrect COM interface initialization settings for mods.
bCOMInit = true

# Raises the bloom render-target resolution to reduce flicker on bright pixels (sun glints, neon, fire). Cost scales with nBloomScale.
bHighResBloom = false

# Marks the process as DPI-aware so menus and cursor track correctly on high-DPI desktops.
bDpiScaling = true


[Fixes]

Expand Down Expand Up @@ -144,14 +150,35 @@ bWorkbenchSound = true
# Removes unused ActorCause data from projectiles when a cell is unloaded to reduce save size.
bActorCauseSaveBloat = true

# Fixes a CTD when loading animations with high-bit-set 16-bit event IDs.
bAnimSignedCrash = true

# Fixes a startup CTD on non-English Windows installs caused by Bethesda.net response headers containing non-ASCII characters.
bBethesdaNetCrash = true

# Fixes a crash when a shader can't be found for a given technique id.
bUtilityShader = true

# Automatically sets PipBoy Cursor Constraints based on PipBoy resolution for controllers.
bPipBoyCursorConstraints = true

# Fixes a CTD when loading animations with high-bit-set 16-bit event IDs.
bAnimSignedCrash = true
# Fixes a bug where the muzzle-flash light keeps illuminating the scene after the flash ends.
bMuzzleFlashLight = true

# Fixes the exclusive-fullscreen Alt-Tab hang by forcing the swap chain to borderless-windowed at creation and blocking DXGI's auto Alt+Enter handler.
bAltTabFullscreen = true

# Fixes a CTD when scrapping or wiring after a settlement mod has been removed, by cleaning up orphan power-grid entries left behind by deleted references.
bPowerGridScrap = true

# Fixes animated statics (fans, signs, generators) that stop animating after save/load until cell unload+reload.
bAnimatedStaticReload = true

# Fixes wrong specular lighting on the first-person viewmodel caused by the eye-position vector missing the engine's per-frame light offset.
bViewmodelShading = true

# Fixes the first-person viewmodel getting blurred by depth-of-field (iron-sight ADS, dialogue camera) by re-rasterizing it after the DoF pass.
bDofFix = true


[Warnings]
Expand Down Expand Up @@ -199,6 +226,9 @@ bIgnorePreInstallBias = false
# Delay (ms) before the deferred quit-to-desktop flag is set. Lets the UI/menu unwind so cleanup can't deadlock (needs bSafeExit fix).
nQuitGameDelayMs = 1000

# Bloom render-target downsample factor (needs bHighResBloom). 1 = full screen (highest quality, highest GPU cost), 2 = half (recommended), 4 = vanilla quarter, 8 = eighth.
nBloomScale = 2


[Profiler]

Expand Down
19 changes: 19 additions & 0 deletions Addictol/Include/Modules/AdModuleAltTabFullscreen.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <AdModule.h>

namespace Addictol
{
class ModuleAltTabFullscreen :
public Module
{
public:
ModuleAltTabFullscreen();
virtual ~ModuleAltTabFullscreen() = default;

[[nodiscard]] virtual bool DoQuery() const noexcept override;
[[nodiscard]] virtual bool DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoListener([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoPapyrusListener([[maybe_unused]] RE::BSScript::IVirtualMachine* a_vm) noexcept override;
};
}
19 changes: 19 additions & 0 deletions Addictol/Include/Modules/AdModuleAnimatedStaticReload.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <AdModule.h>

namespace Addictol
{
class ModuleAnimatedStaticReload :
public Module
{
public:
ModuleAnimatedStaticReload();
virtual ~ModuleAnimatedStaticReload() = default;

[[nodiscard]] virtual bool DoQuery() const noexcept override;
[[nodiscard]] virtual bool DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoListener([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoPapyrusListener([[maybe_unused]] RE::BSScript::IVirtualMachine* a_vm) noexcept override;
};
}
19 changes: 19 additions & 0 deletions Addictol/Include/Modules/AdModuleDofFix.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <AdModule.h>

namespace Addictol
{
class ModuleDofFix :
public Module
{
public:
ModuleDofFix();
virtual ~ModuleDofFix() = default;

[[nodiscard]] virtual bool DoQuery() const noexcept override;
[[nodiscard]] virtual bool DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoListener([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoPapyrusListener([[maybe_unused]] RE::BSScript::IVirtualMachine* a_vm) noexcept override;
};
}
19 changes: 19 additions & 0 deletions Addictol/Include/Modules/AdModuleDpiScaling.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <AdModule.h>

namespace Addictol
{
class ModuleDpiScaling :
public Module
{
public:
ModuleDpiScaling();
virtual ~ModuleDpiScaling() = default;

[[nodiscard]] virtual bool DoQuery() const noexcept override;
[[nodiscard]] virtual bool DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoListener([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoPapyrusListener([[maybe_unused]] RE::BSScript::IVirtualMachine* a_vm) noexcept override;
};
}
19 changes: 19 additions & 0 deletions Addictol/Include/Modules/AdModuleHighResBloom.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <AdModule.h>

namespace Addictol
{
class ModuleHighResBloom :
public Module
{
public:
ModuleHighResBloom();
virtual ~ModuleHighResBloom() = default;

[[nodiscard]] virtual bool DoQuery() const noexcept override;
[[nodiscard]] virtual bool DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoListener([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoPapyrusListener([[maybe_unused]] RE::BSScript::IVirtualMachine* a_vm) noexcept override;
};
}
19 changes: 19 additions & 0 deletions Addictol/Include/Modules/AdModuleMuzzleFlashLight.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <AdModule.h>

namespace Addictol
{
class ModuleMuzzleFlashLight :
public Module
{
public:
ModuleMuzzleFlashLight();
virtual ~ModuleMuzzleFlashLight() = default;

[[nodiscard]] virtual bool DoQuery() const noexcept override;
[[nodiscard]] virtual bool DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoListener([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoPapyrusListener([[maybe_unused]] RE::BSScript::IVirtualMachine* a_vm) noexcept override;
};
}
19 changes: 19 additions & 0 deletions Addictol/Include/Modules/AdModulePowerGridScrap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <AdModule.h>

namespace Addictol
{
class ModulePowerGridScrap :
public Module
{
public:
ModulePowerGridScrap();
virtual ~ModulePowerGridScrap() = default;

[[nodiscard]] virtual bool DoQuery() const noexcept override;
[[nodiscard]] virtual bool DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoListener([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoPapyrusListener([[maybe_unused]] RE::BSScript::IVirtualMachine* a_vm) noexcept override;
};
}
19 changes: 19 additions & 0 deletions Addictol/Include/Modules/AdModuleViewmodelShading.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <AdModule.h>

namespace Addictol
{
class ModuleViewmodelShading :
public Module
{
public:
ModuleViewmodelShading();
virtual ~ModuleViewmodelShading() = default;

[[nodiscard]] virtual bool DoQuery() const noexcept override;
[[nodiscard]] virtual bool DoInstall([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoListener([[maybe_unused]] F4SE::MessagingInterface::Message* a_msg = nullptr) noexcept override;
[[nodiscard]] virtual bool DoPapyrusListener([[maybe_unused]] RE::BSScript::IVirtualMachine* a_vm) noexcept override;
};
}
7 changes: 5 additions & 2 deletions Addictol/Source/AdConfigValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Addictol
"bFacegen", "bMemoryManager", "bSmallBlockAllocator", "bScaleformAllocator",
"bBSMTAManager", "bBSPreCulledObjects", "bINISettingCollection",
"bArchiveLimits", "bInputSwitch", "bFasterWorkshop",
"bSaveAddedSoundCategories", "bCOMInit"
"bSaveAddedSoundCategories", "bCOMInit", "bHighResBloom", "bDpiScaling"
}},
{ "Fixes", {
"bGreyMovie", "bPackageAllocateLocation", "bInitTints", "bLODDistance",
Expand All @@ -29,6 +29,9 @@ namespace Addictol
"bBakaMaxPapyrusOps", "bPapyrusGCBug", "bCreateD3DAndSwapchain",
"bCheckInternetAccess", "bStolenPowerArmorOwnership", "bManyItems",
"bCombatMusic", "bWorkbenchSound", "bActorCauseSaveBloat",
"bAnimSignedCrash", "bBethesdaNetCrash",
"bMuzzleFlashLight", "bAltTabFullscreen", "bPowerGridScrap",
"bAnimatedStaticReload", "bViewmodelShading", "bDofFix",
"bUtilityShader", "bPipBoyCursorConstraints"
}},
{ "Warnings", {
Expand All @@ -39,7 +42,7 @@ namespace Addictol
"uScaleformPageSize", "uScaleformHeapSize",
"nSleepTimer", "nMaxLockCount",
"bInteriorNavCutMultiThreading", "nMaxPapyrusOpsPerFrame",
"bIgnorePreInstallBias", "nQuitGameDelayMs"
"bIgnorePreInstallBias", "nQuitGameDelayMs", "nBloomScale"
}},
{ "Profiler", {
"bProfiler", "bESPProfiler", "bESPSubHooks", "bDLLProfiler",
Expand Down
36 changes: 30 additions & 6 deletions Addictol/Source/AdRegisterModules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,18 @@
#include <Modules/AdModuleCombatMusic.h>
#include <Modules/AdModuleWorkbenchSound.h>
#include <Modules/AdModuleActorCauseSaveBloat.h>
#include <Modules/AdModuleAnimSignedCrash.h>
#include <Modules/AdModuleBethesdaNetCrash.h>
#include <Modules/AdModuleMuzzleFlashLight.h>
#include <Modules/AdModuleHighResBloom.h>
#include <Modules/AdModuleAltTabFullscreen.h>
#include <Modules/AdModulePowerGridScrap.h>
#include <Modules/AdModuleDpiScaling.h>
#include <Modules/AdModuleAnimatedStaticReload.h>
#include <Modules/AdModuleViewmodelShading.h>
#include <Modules/AdModuleDofFix.h>
#include <Modules/AdModuleUtilityShader.h>
#include <Modules/AdModulePipBoyCursorConstraints.h>
#include <Modules/AdModuleAnimSignedCrash.h>
//#include <Modules/AdModuleBethesdaNetCrash.h>
#include <Modules/AdModuleReferenceHandleLimitWarning.h>

// Create patches
Expand Down Expand Up @@ -107,10 +115,18 @@ static auto sModuleProfiler = std::make_shared<Addictol::ModuleProfiler>()
static auto sModuleCombatMusic = std::make_shared<Addictol::ModuleCombatMusic>();
static auto sModuleWorkbenchSound = std::make_shared<Addictol::ModuleWorkbenchSound>();
static auto sModuleActorCauseSaveBloat = std::make_shared<Addictol::ModuleActorCauseSaveBloat>();
static auto sModuleAnimSignedCrash = std::make_shared<Addictol::ModuleAnimSignedCrash>();
static auto sModuleBethesdaNetCrash = std::make_shared<Addictol::ModuleBethesdaNetCrash>();
static auto sModuleMuzzleFlashLight = std::make_shared<Addictol::ModuleMuzzleFlashLight>();
static auto sModuleHighResBloom = std::make_shared<Addictol::ModuleHighResBloom>();
static auto sModuleAltTabFullscreen = std::make_shared<Addictol::ModuleAltTabFullscreen>();
static auto sModulePowerGridScrap = std::make_shared<Addictol::ModulePowerGridScrap>();
static auto sModuleDpiScaling = std::make_shared<Addictol::ModuleDpiScaling>();
static auto sModuleAnimatedStaticReload = std::make_shared<Addictol::ModuleAnimatedStaticReload>();
static auto sModuleViewmodelShading = std::make_shared<Addictol::ModuleViewmodelShading>();
static auto sModuleDofFix = std::make_shared<Addictol::ModuleDofFix>();
static auto sModuleUtilityShader = std::make_shared<Addictol::ModuleUtilityShader>();
static auto sModulePipBoyCursorConstraints = std::make_shared<Addictol::ModulePipBoyCursorConstraints>();
static auto sModuleAnimSignedCrash = std::make_shared<Addictol::ModuleAnimSignedCrash>();
//static auto sModuleBethesdaNetCrash = std::make_shared<Addictol::ModuleBethesdaNetCrash>();
static auto sModuleReferenceHandleLimitWarning = std::make_shared<Addictol::ModuleReferenceHandleLimitWarning>();

void AdRegisterPreloadModules()
Expand All @@ -124,6 +140,7 @@ void AdRegisterPreloadModules()
modules.Register(sModuleMaxStdIO);
modules.Register(sModuleCheckInternetAccess);
modules.Register(sModuleCOMInit);
modules.Register(sModuleDpiScaling);
}

void AdRegisterModules()
Expand Down Expand Up @@ -178,9 +195,16 @@ void AdRegisterModules()
modules.Register(sModuleCombatMusic);
modules.Register(sModuleWorkbenchSound);
modules.Register(sModuleActorCauseSaveBloat);
modules.Register(sModuleReferenceHandleLimitWarning);
modules.Register(sModuleAnimSignedCrash);
//modules.Register(sModuleBethesdaNetCrash);
modules.Register(sModuleBethesdaNetCrash);
modules.Register(sModuleMuzzleFlashLight);
modules.Register(sModuleHighResBloom);
modules.Register(sModuleAltTabFullscreen);
modules.Register(sModulePowerGridScrap);
modules.Register(sModuleAnimatedStaticReload);
modules.Register(sModuleViewmodelShading);
modules.Register(sModuleDofFix);
modules.Register(sModuleReferenceHandleLimitWarning);

// Registers other patches
modules.Register(sModuleThreads, kGameDataReady);
Expand Down
Loading