Skip to content

Releases

Witcher 2 Engine Fix 0.12.2

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 12 Nov 14:55

A quest fix for 0.12.1, a crash on Quit, and large interiors that no longer pay for the land outside. Extract the zip into the game folder, over the old version. The ini in the zip replaces yours, so note your changes first.

Fixed

  • Poker Face: Vergen can be finished again (broken by 0.12.1; thanks for the precise report on Nexus). The last dice player declared Geralt the loser without a game, also when met in the street. The quest learns that Geralt is indoors from a marker that the game loads only inside three of Vergen's houses and the inn; 0.12.1 loads those houses with the town, marker included, so the quest thought he was always indoors. Such quest markers now load at their door and unload behind it, as in the game. The arm wrestling spot in Vergen's inn worked the same way and is covered too.
  • Crash on Quit soon after loading a save. A loading screen ends by asking its movie to fade out, and the game only frees it once the movie answers. After a load it often never did, so the movie stayed for the rest of the session, and a Quit could then crash in the GUI shutdown (silently: the game closed and left a dump). The left-over screen is now freed 4 s after its loading screen ended, and when you quit. [stability] loading_screen_cleanup=1.
  • A black wall and darkness coming out of a cave. The black plane in a cave mouth, the box that keeps the sun out of a cave and an area's own lighting stayed loaded after you left the area: coming out of the cave near Vergen you walked through a black wall, and the ground outside was dark, with the cave's sky above it. A door between two areas now swaps these, as the game does.

Changed

  • Large interiors no longer pay for the land outside ([loading] release_kept=30, hide_kept=1). A door between two whole areas (a cave and the land outside it) keeps the area you leave loaded, and the renderer worked through it every frame although you could not see it. Deep in the cave near Vergen that cost a third of the frame rate (49 instead of 75 fps measured), almost all of it for the grass above. Once you are 30 m from such a door the area left behind is taken out of the picture, without unloading it, and it is back before you reach the door again. The terrain and single large meshes stay, so a crack in a cave's roof still shows rock. With little memory free it is unloaded instead and loads again at the door, behind a short fade. House doors are not affected: a house keeps its street. release_kept=0 restores 0.12.1's behaviour.

  • Small areas behind an area's doors load with the area ([loading] preload_areas=1). The interiors of houses already loaded with their area; a cave off the quarry did not, and its door faded and loaded on the first visit. Such areas now load behind the area's loading screen, while 1.5 GB of memory is free, and stay out of the picture until you use their door, so they cost no frame rate and the door goes without loading or fade. The mod learns an area's doors the first time the area loads and uses them from its next load on; until then, and for bigger areas, the door keeps its short fade. preload_areas=0 restores 0.12.1's behaviour.

Upgrade

Extract the zip into the game folder and overwrite. Your bin\witcher2_enginefix.ini is replaced: copy your changes over, or keep your old file. The new keys have the same defaults without a line in the ini:

[loading]
release_kept=30
hide_kept=1
preload_areas=1
[stability]
loading_screen_cleanup=1

Tested

Steam 3.5.0.26 and GOG 3.5.0.26g with DXVK, Windows 11: the cave near Vergen (preloaded with the quarry, its door without a fade, the area outside hidden 30 m in and shown again on the way back, rock in the cracks of the roof, no black wall and the same light and sky outside as before going in, stable frame rate), the loading screen cleanup after every load, clean quits. On Steam also houses in Flotsam and Binduga, without a fade as before, and the crash itself before the fix (a Quit 7 s after a load).

Not seen in game yet: Poker Face itself and the doors of those Vergen houses (my save is on Roche's path, where Vergen is closed; the quest's data and the layers involved were read from the game files), the hiding in Act 3, where the areas are open-air quarters, the area preload anywhere but that cave, and what happens when memory gets short while an area is hidden or preloaded. If the dice player still refuses to play, or something looks wrong behind a door, please post bin\witcher2_enginefix.log.

Full list: CHANGELOG.md

Witcher 2 Engine Fix 0.12.1

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 11 Nov 13:50

Seamless interiors now work in Vergen (Act 2), plus two small fixes. Extract the zip into the game folder, over the old version. The ini in the zip replaces yours, so note your changes first.

Fixed

  • Seamless interiors in Vergen. In Act 2 nothing was preloaded, and the dark fake-room box behind each door stayed loaded inside the house, around Geralt (thanks for the report and the screenshots on Nexus). Act 2 names its houses, their lighting and its fake rooms differently from Act 1, so the mod did not recognise them. Houses are now also found by the interior lighting each one has: Vergen's 24 houses load with the area, the boxes are gone and doors go without a fade. Flotsam and the prologue behave as before.
  • Fake rooms stay when the interiors could not load. With too little memory to preload (the game's own Direct3D 9 at 4K), the fake rooms were still left out, so open doors showed nothing behind them. They are now only left out when every interior is loaded; otherwise doors swap them as the game does and keep their short fade.
  • A crash while the game reads a text table. The game ends a UTF-16 text file (such as its CSV tables) with one 0 byte where it needs two, so reading one could run on past the file and close the game. Seen once, right after loading a save. Such files now end in three 0 bytes. [stability] text_guard=0 turns it off.

Changed

  • Doors between whole areas give memory back sooner ([loading] area_memory_mb=1536). A door between two whole areas (a cave and the land outside it, the quarters of Loc Muinne) kept the area you left loaded, like a house keeps its street, until only 1 GB was free. Such a door now unloads the area left behind once less than 1.5 GB is free, behind the short area fade. House doors keep their street as before. 0 = never.
  • The intro skip starts no startup movie any more ([startup] skip_intro=1, off by default). It marks the startup movies as played before any of them starts, so no video opens and the logo does not flash up.

Upgrade

Extract the zip into the game folder and overwrite. Your bin\witcher2_enginefix.ini is replaced: copy your changes over, or keep your old file. The two new keys have the same defaults without a line in the ini:

[loading]
area_memory_mb=1536
[stability]
text_guard=1

Tested

Steam 3.5.0.26 with DXVK, Windows 11: four houses in Vergen on Roche's path (all interiors preloaded for 35 MB, no fake rooms inside, no fade, a save made inside a house) and Flotsam unchanged. GOG 3.5.0.26g with DXVK: the new intro skip, the text guard, a Flotsam save with every interior preloaded and doors without a fade, a normal quit.

Not seen in game yet: the rest of Vergen (Iorveth's path opens the whole town; all 24 houses are checked against the game's level data), the fake rooms staying when memory is short, and the new memory step on doors between areas. If a house in Act 2 or Act 3 still shows a dark box inside or fades, please post bin\witcher2_enginefix.log.

Full list: CHANGELOG.md

Witcher 2 Engine Fix 0.12.0

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 06 Nov 16:40

Fewer crashes and freezes, and memory that no longer runs out after an evening of loads. Extract the zip into the game folder, over the old version. The ini in the zip replaces yours, so note your changes first.

Fixed

  • Memory leak on save load. Every time a save was loaded, the game kept the stored state of every NPC in the world and read a new copy from the save. After an evening with many loads that was about 370 MB, enough to stop the seamless interiors. The mod frees the old copies: about 20 MB per load in Flotsam. [stability] layer_storage_leak=0 turns it off.
  • Prologue interrogation drawn whole. With seamless interiors on, the wall behind Roche and Roche's face could be missing. The interior preload loaded the whole dungeon next to the scene, with its occluders. It now preloads houses only and holds every occluder back. The prologue's houses still open without a fade.
  • No crash when quitting. Quit in the pause menu closed the game with the area still loaded, and in the prologue's interrogation that crashed every time on the way out. Quit now ends the game session first, as Exit current game does, and closes the game from the main menu about 1.5 s later; you may see the menu for a moment. [stability] clean_quit=0 quits at once as before.
  • A freeze in the game's pathfinding. A frozen game showed the pathfinding asked about a line whose two ends are the same point: it then loops for good, and the next door or load freezes. The mod answers such a line at once. [stability] path_guard=0 turns it off. The freeze is rare, so the guard has not caught one in a test yet.

New

  • [diagnostics] mem_trace=N (off by default): a census of the game's memory every N minutes, written next to the log, to find what keeps growing over a long session. It found the save load leak above.

Tested

Steam 3.5.0.26 and GOG 3.5.0.26g, Windows 11, both with DXVK.

Full list: CHANGELOG.md

Witcher 2 Engine Fix 0.11.0

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 05 Nov 17:26

Sharper sun shadows if you want them, plants that hold their detail further away, and a faster start. Extract the zip into the game folder, over the old version. The ini in the zip replaces yours, so note your changes first.

New

  • Shadow quality. A new row in Options > Graphics (Vanilla, High, Ultra), also Ctrl+Shift+F10. The hard line in the shadows on the ground 10-14 m ahead of Geralt is where the sun's sharpest shadow zone ends. High and Ultra move it out until it no longer shows and sharpen the shadows, for more video memory. It switches live, with a pause of 2-3 s. Vanilla is the default, so nothing changes until you pick a level. [shadows] enabled=0 removes the feature.
  • Plants keep their detail further away. The distance where a plant turns into a flat picture now follows the Draw distance level: high 1.5x, ultra 2x, extreme 3x, vanilla the game's own. After changing level, load a save to see it. Tune it with billboard_scale in [preset.*]; 1 is the game's value.
  • Faster start. Most of an idle wait of about 11 s while the sound system loads is gone: main menu after 6.5 s instead of 16 s on the machine measured. [startup] fast_start=0 restores the wait.
  • Faster save previews. About ten times faster: 165 saves took 2.9 s, now under 0.3 s. [saves] light_previews=0 restores the game's way.

Changed

  • The Draw distance row and the ini say Vanilla for the game's own values. An older ini's baseline still works.
  • The preset text no longer shows at startup, where it could float over the launcher or the desktop.

Tested

Steam 3.5.0.26 and GOG 3.5.0.26g, Windows 11, both with DXVK.

Not measured yet: the frame rate cost of High, Ultra and the plant distances. If you lose frames in dense forest, lower billboard_scale in [preset.extreme]. Without DXVK, High and Ultra add to a 32-bit process that is already short of memory, so use them with DXVK.

Full list: CHANGELOG.md

Witcher 2 Engine Fix 0.10.0

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 04 Nov 16:49

GOG support, softer door lighting and a memory guard

GOG is supported now. Besides the Steam version (3.5.0.26), this version also supports the GOG version of The Witcher 2: Assassins of Kings - Enhanced Edition (3.5.0.26g), with every feature and setting. The GOG game is a separately compiled build, so each fix had to be found in it again. The DLL tells the two builds apart at start and uses each one's own addresses.

DXVK is strongly recommended, and at 4K you need it. The game is a 32-bit program, so it has 4 GB of memory at most. With the game's own Direct3D 9 every texture also takes room there, and at 4K the game runs out of memory soon after loading a save in Flotsam, with or without this mod. DXVK keeps the textures on the graphics card: copy its x32\d3d9.dll into the game's bin folder. If the game hangs after a while with DXVK (a GPU reset, "device lost"), put the line dxvk.enableDescriptorHeap = False in bin\dxvk.conf.

  • New: GOG 3.5.0.26g. Seamless interiors, draw distance presets and the Options rows, the save fixes, the Display mode, the Windows keys, the book markers, Continue, Quit, the medallion, the crash and quit guards and the interior maps all work on GOG. On GOG the save previews go next to the save in Documents\Witcher 2\gamesaves, and the save list has no leak to fix.
  • Changed: the lighting at house doors blends over 1 second instead of jumping. Inns and houses have their own lighting (no sun, other colours, a shorter view), and the game used to switch it in one frame behind its fade. Without the fade you saw the street go flat as Geralt opened the door, and the inn's walls change colour on the way out. [loading] door_light_blend=0 switches at once again.
  • Changed: no loading spinner in the corner on doors without a fade. [loading] door_spinner=1 shows it again.
  • Fixed: a freeze on the first walk out after loading a save made inside a house. The street was not part of the load, so the first door loaded it in plain view (~0.4 s), and every later exit from that house blinked black. The street now loads with the save.
  • New: memory guard for the seamless interiors. Preloaded interiors load only while at least 1280 MB of the game's memory is free; the rest load on their first visit, behind a short fade. A door that starts with less than 1024 MB free uses the game's own door. With DXVK there is room to spare and neither kicks in. [loading] preload_memory_mb and door_memory_mb.
  • Fixed: two QuickSaves within 10 seconds could show the same picture.
  • New: the log says how the game ended (exit: lines). On GOG the log ends with exit: CorExitProcess(0) instead of unloaded; that is a normal quit.

Upgrading

Extract the zip over the previous version (into the game folder, so that bin\dinput8.dll is replaced). The new ini replaces the old one; if you changed settings, note them first. bin\witcher2_enginefix.log should start with witcher2_enginefix 0.10.0 loaded, followed by a build: line naming Steam 3.5.0.26 or GOG 3.5.0.26g.

Tested on Steam 3.5.0.26 and GOG 3.5.0.26g (Enhanced Edition), Windows 11, with DXVK and with the game's own Direct3D 9. Not yet seen in game: on GOG, the preview fix writing a late preview (the game wrote its own every time) and the memory guard skipping a preloaded interior.

Witcher 2 Engine Fix 0.9.0

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 04 Nov 10:04

Medallion on the move, and fixes for 32-thread CPUs, script mods and quitting

Steam only for now. This version supports the Steam version of The Witcher 2: Assassins of Kings - Enhanced Edition 3.5.0.26. The GOG version is a separately compiled build: the engine fixes skip themselves there and the save fixes do not apply. GOG support is being worked on for a later version.

  • New: medallion on the move. The medallion key works at once: Geralt keeps walking, running or fighting instead of stopping for the animation, and the medallion is ready again after 1 second instead of 2. The pulse, sound and highlights are unchanged. A medallion started by a quest keeps the animation. [scriptpatches] medallion=0 turns it off.
  • Fixed: no window on CPUs with 32 or more threads. On such a CPU the game's own CPU count never ended, so it stayed in the background without a window. The mod skips that count, the same as taking a core away in Task Manager, but you keep every core. Not yet run on such a CPU; when it applies, the log says cpu32: 32 logical processors seen. [stability] cpu32_guard=0 turns it off.
  • Fixed: "Script compilation error" with other script mods. A mod with its own copy of a script this mod patches could take the patched copy's place, and the game stopped with errors such as I dont know any 'W2EF_LootName'. That happens with mods installed as user content (Documents\Witcher 2\UserContent) and with a modded base_scripts.dzip that holds a file twice. The mod now patches whichever copy the game actually compiles, and the book helpers live in their own script. If a mod's copy is too different for a patch, that one feature stays off, the game starts without it, and the log says so.
  • Fixed: Quit in the pause menu crashed the game while it shut down. You did not see it, because the game was closing anyway, but each such quit left a crash dump in bin. Quitting is also a little faster now. [stability] quit_guard=0 turns it off.
  • Fixed: opening the launcher's settings overwrote the mod's log. The launcher's settings tool loads the mod's DLL too, and it replaced witcher2_enginefix.log and .prev.log, so the log of a crash was lost. Outside the game the DLL now only forwards input.

Upgrading

Extract the zip over the previous version (into the game folder, so that bin\dinput8.dll is replaced). The new ini replaces the old one; if you changed settings, note them first. The patched scripts are rebuilt once at the first start. bin\witcher2_enginefix.log should start with witcher2_enginefix 0.9.0 loaded.

Tested on Steam 3.5.0.26 (Enhanced Edition), Windows 11. The 32-thread fix was not run on such a CPU.

Witcher 2 Engine Fix 0.8.1

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 02 Nov 22:14

Fix for the seamless interiors

  • Fixed: see-through street when leaving a building in Flotsam. Walking out of a Flotsam building (seen at the inn's harbour door), everything in front of Geralt turned see-through and only the water showed until he was outside. The town's occluders (invisible blocks the game uses to skip drawing what is hidden behind buildings) came back while the camera was still inside the building, so everything in front of it was skipped. The game's old fade used to hide that. Now the occluders load a moment later, once Geralt is a few steps out of the door.
  • Better log for missed interiors. bin\witcher2_enginefix.log now says how each area's interiors were found and lists any interior a house door still had to load. If you find a house that shows a flat box or nothing through its open door, or blinks when you enter, attach the log to a report.

No setting changed: [loading] interiors=2 (default) as in 0.8.0.

Upgrading

Extract the zip over the previous version (into the game folder, so that bin\dinput8.dll is replaced). The new ini replaces the old one; if you changed settings, note them first. bin\witcher2_enginefix.log should start with witcher2_enginefix 0.8.1 loaded.

Tested on Steam 3.5.0.26 (Enhanced Edition), Windows 11.

Witcher 2 Engine Fix 0.8.0

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 02 Nov 21:28

Seamless interiors

Walk into houses, shops and inns without a fade to black, with the street still there outside the windows.

Going through a house door used to fade to black, unload the outdoors around you, swap in the interior and load everything back on the way out. In The Witcher 2 an interior is not a separate level: it sits inside its own building, and the door only switches which parts of the world are loaded. 0.8.0 uses that:

  • The outdoors stays loaded. You can see the street through the windows, and coming out has nothing to load. A door only swaps what each place has of its own: ambient sound and music, lighting, occluders and the flat "fake room" boxes the game shows behind open doors.
  • Interiors load together with the area, behind the loading screen or the area-change fade. Open doors show the real rooms instead of flat boxes, and no house door has anything to load.
  • No fade on house doors. A door now takes a few hundredths of a second (7-50 ms measured) instead of ~0.65 s (0.7.x) or ~2.2 s (the game). A door that turns out to be slow keeps a very short fade.
  • Doors that change area, such as the gate into Flotsam, are real loads (~1 s) and keep a soft 0.25 s fade (area_fade).
  • The ground and grass stay drawn while you are indoors, so they do not vanish behind Geralt as he walks in.

Tested in Binduga, Flotsam (houses, shops, the inn, Sheala's quarter) and the prologue village. Loading a save takes about 1 s longer (the interiors load with it); memory use stays well within the game's limits.

Settings

bin\witcher2_enginefix.ini, [loading]:

  • interiors=2 (default): all of the above.
  • interiors=1: keep the outdoors loaded but load each interior the first time you go in (a short fade then). Once you have been inside one house, other houses' open doors show nothing until you change area. Use this if 2 gives you trouble.
  • interiors=0: the game's own doors.
  • door_fade / area_fade: fade lengths in seconds for house doors and area changes.

Upgrading

Extract the zip over the previous version (into the game folder, so that bin\dinput8.dll is replaced). The new ini replaces the old one; if you changed settings, note them first. bin\witcher2_enginefix.log should start with witcher2_enginefix 0.8.0 loaded.

Tested on Steam 3.5.0.26 (Enhanced Edition), Windows 11. Full details: CHANGELOG.md and docs/fixes/interior-preload.md.

Witcher 2 Engine Fix 0.7.1

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 02 Nov 18:16

Tested on The Witcher 2: Assassins of Kings - Enhanced Edition 3.5.0.26 (Steam), Windows 11.

New

  • Draw distance in Options > Graphics: the four draw-distance levels (default, high, ultra, extreme), which Ctrl+F10 cycles through, are now also a row under Display mode, in your game's language. A choice applies at once, without the on-screen text, and the game remembers it between sessions. Ctrl+F10 works as before, and the row always shows the level in use. A stored choice wins over [presets] default in the ini. Off: [scriptpatches] window_mode=0, which also removes the Display mode row.

Upgrade

Extract the zip over the previous version, so dinput8.dll lands in bin next to witcher2.exe. The ini in the zip replaces yours, so note any changes you made first. The script patches rebuild themselves once at the first start. bin\witcher2_enginefix.log should begin with witcher2_enginefix 0.7.1 loaded.

Everything new in 0.7.0 (Display mode, Windows keys and Snipping Tool, faster house doors and save list, crash guard and crash capture) is in the 0.7.0 release and in CHANGELOG.md.

Witcher 2 Engine Fix 0.7.0

Choose a tag to compare

@MariusTBjercke MariusTBjercke released this 02 Nov 17:45

Tested on The Witcher 2: Assassins of Kings - Enhanced Edition 3.5.0.26 (Steam), Windows 11, with and without DXVK.

New

  • Display mode in Options > Graphics: full screen, borderless window or windowed, switched at once without a restart. Borderless fills the screen at the desktop resolution with no border or title bar. Pick the desktop resolution for it. Off: [scriptpatches] window_mode=0.
  • Snipping Tool and Windows keys in game: Win+Shift+S, Print Screen, Win+D and the other Windows key combinations now work while the game is in front. A Windows key tapped on its own still does not open the Start menu. Off: [hotkeys] windows_keys=0.
  • Faster house doors: going in or out of a house kept the screen black until the door animation finished. Now the picture comes back as soon as the interior is in, and the fades are shorter. A door takes about 0.65 s on screen instead of 2.2 s. Off: [loading] fast_doors=0, door_fade=0.5.
  • Faster save list: the Load/Save list (and game start) no longer unpacks every save in full. It is about 2.5x faster with 120 saves and shows the same list. Off: [saves] fast_list=0.
  • Crash guard: walking out of the Flotsam inn closed the game once in testing. The cause was a physics ray cast against an object that had just been unloaded, and the ray now misses it. It has not been seen to trigger yet. Off: [stability] raycast_guard=0.
  • Crash capture: the game's own crash handler closes the game silently. The DLL now logs the crash and writes a small dump next to the log ([diagnostics] crash_dump). The previous session's log is kept as witcher2_enginefix.prev.log.

Save loading and area transitions were measured as well ([diagnostics] load_trace). A save load is about 3 s, held by the engine's own single-threaded work, and is unchanged.

Upgrade

Extract the zip over the previous version, so dinput8.dll lands in bin next to witcher2.exe. The ini in the zip replaces yours, so note any changes you made first. The script patches rebuild themselves once at the first start. bin\witcher2_enginefix.log should begin with witcher2_enginefix 0.7.0 loaded.

Full details are in CHANGELOG.md.