diff --git a/Applications/Games/Subnautica/Steam/script.js b/Applications/Games/Subnautica/Steam/script.js index aa24b10be1..52df25410c 100644 --- a/Applications/Games/Subnautica/Steam/script.js +++ b/Applications/Games/Subnautica/Steam/script.js @@ -1,6 +1,7 @@ const SteamScript = include("engines.wine.quick_script.steam_script"); -const { getLatestStableVersion } = include("engines.wine.engine.versions"); - +const { getLatestDevelopmentVersion } = include("engines.wine.engine.versions"); +const OverrideDLL = include("engines.wine.plugins.override_dll"); +const { touch, writeToFile } = include("utils.functions.filesystem.files"); const VirtualDesktop = include("engines.wine.plugins.virtual_desktop"); const Vcrun2013 = include("engines.wine.verbs.vcrun2013"); const Corefonts = include("engines.wine.verbs.corefonts"); @@ -12,29 +13,32 @@ new SteamScript() .author("Zemogiter") .applicationHomepage("https://unknownworlds.com/subnautica/") .wineDistribution("upstream") - .wineVersion(getLatestStableVersion) + .wineVersion(getLatestDevelopmentVersion) .wineArchitecture("amd64") .appId(264710) .preInstall((wine) => { - const wizard = wine.wizard(); - - wizard.message( - tr("You can make the game smoother by using this: https://github.com/lutris/lutris/wiki/How-to:-Esync") - ); - new Vcrun2013(wine).go(); new Corefonts(wine).go(); new DXVK(wine).go(); - + new OverrideDLL(wine) + .withMode("disabled", ["nvapi", "nvapi64"]) + .go(); new VirtualDesktop(wine).go(); + const dxvkConfigFile = wine.prefixDirectory() + "/drive_c/dxvk.conf"; + touch(dxvkConfigFile); + writeToFile(dxvkConfigFile, "dxgi.nvapiHack = False"); }) .postInstall((wine) => { const wizard = wine.wizard(); - wizard.message( tr( - "Due to a potential conflict with Vulkan, shader mods break the game (the executable file works but no window is displayed)." + "Due to a potential conflict with Vulkan, shader mods may break the game (the executable file works but no window is displayed)." ) ); }) - .gameOverlay(false); + .gameOverlay(false) + .environment((wine) => { + const dxvkConfigFile = wine.prefixDirectory() + "/drive_c/dxvk.conf"; + + return '{"DXVK_CONFIG_FILE": "${dxvkConfigFile}", "STAGING_SHARED_MEMORY": "0", "WINEESYNC": "1"}'; + })