For new users: To put it briefly, this is all-in-one patch containing every known bug fix for the game and the editing tools. Please read the included Readme for the most up-to date information about the patch as it contains everything you need to know (list of fixes, installation procedure and more). The patch also increases game version number to distinguish it from vanilla Drakan. If you have any further questions, you can post them here.
Because all-in-one may sound confusing, it's meant as all-in-one when it comes to unofficial improvements to the game not made by the developers who made the game, but rather the community/fans of the game. Therefore, official patch 445 must be installed before applying AiO Patch. It would be possible to literally make All-in-One Patch including the official fixes, but would require distribution of certain patched game data files that official patches also alter.
Last update: 8/18/2018
(Final) release, Second Edition (377/447)
Google Drive, ModDB, Arokh's Lair
Older release (8/6/2018)
Recently updated maps (6/17/2018)
Hill of Fire - HD textures (credit goes to Mauva Malhar)
DLLs' source code:
Complete list of changes compared to vanilla Drakan:
- Fixed black menu background bug (occurs on newer graphics hardware).
- Fixed crash after selecting difficulty or pressing ESC while on the difficulty selection screen.
- Fixed crash after exiting Alwarren.
- Removed special camera rotation mode from 'left' special combo (left-forward-attack).
- Removed special camera rotation mode from 'back' special combo (forward-backward-attack).
- Added 2 active 'hitting intervals' for 'left' special attack.
- Removed 'stuck in block' bug.
- Increased amount of allocated memory for one of rendering routines (increases FPS a bit in more complex levels).
- Removed part of problematic code that has to do with lens flare effects, prevents the crash during gameplay when there are lots of lightning effects, but you should still disable Lens Flare Effects under Graphics options, they cause quite significant lag spikes.
- Level of detail (LOD) value is set to zero -> fully detailed in-game objects regardless of camera distance, small performance decrease, original LOD feature wasn't exactly doing miracles neither when it comes to excessive polygon counts in certain player-created levels, also fixes crash when setting FOV to a higher value.
- Added code that adjusts FOV based on your selected resolution's aspect ratio, so you see more things at once and actually utilize extra horizontal space if you have a wide monitor.
- Session creation failed error will no longer occur if running server on anything newer than Windows XP or under WINE (Linux) or when setting up listen server AFTER playing a multiplayer game on someone else's server (assuming ports server intends to use aren't in use by some other program).
- Fixed crash that occurs if Giant grabs you just after your death. Note that I only added an extra safeguard that prevents the crash, but doesn't fix the actual bug. Should the situation occur, the screen won't start fading to black like it normally would and the game won't end, but you can reload the last save and move on like nothing happened.
- Fixed ice effect not showing up on Arokh after being frozen by an enemy and game crashing the moment he is supposed to blow into pieces. This bug only occurred when bump mapping was enabled.
- Increased Max Fog Distance that can be set under Graphics options up to 200% (same as 'foghack' cheat), also overriding Max Fog Depth setting defined by level designer.
- Dedicated server stores graphics settings (the ones in Windows registry) separately. Useful because dedicated server window size is defined by game resolution setting and can't be resized.
- Minimizing the game when in fullscreen mode and connected to online game no longer causes disconnect after 30 seconds.
- NAT fix - server has been patched so that it no longer responds back to the client using the UDP port that was used on the client side to establish connection, but rather the port visible on the server side as the originating source of the first packet sent by client. This eliminates the most notorious 30s disconnect bug.
- Fixed crash that occurs when game contacts running machine that has no server running (no more crashing in multiplayer menu or while running server if contacting master server fails).
- Added some common resolutions for use in windowed mode.
- Fixed crash due to stack buffer overrun that occurs when entering Graphics menu on machines whose graphics hardware exposes a lot of available resolutions.
- Default value of MasterServerList variable in Drakan.cfg has been changed to "master.qtracker.com:27900,gsm.qtracker.com:27900" since GameSpy is gone.
- Game settings that get stored in registry are now stored under local user's registry key instead of system-wide key (HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE).
- Removed all calls to RegFlushKey API.
- Fixed some codepaths not closing registry key handle after use.
- Fixed Texture Filtering drop-down list in Riot Engine Options not indicating Trilinear Filter was selected.
- Automatically applies compatibility fixes required for the game to work properly on Windows 8+.
- Fixes game not remembering windowed/fullscreen setting if changed in-game.
- Populates windowed mode resolution list with the ones detected in the system.
- Adds borderless windowed mode, when window is in that mode, it will also minimize when it looses focus.
- Enables resizing of dedicated server window.
- Makes the game able to get the server list from Qtracker.
- Ported relevant engine fixes over to Level Editor's Engine.exe.
- Changed borderless window settings to off by default, they're kinda hacky.
- Borderless windowed mode code now places the window on correct monitor if you move it from the primary monitor and afterward set the correct resolution.
- Added option to set whether borderless window minimizes when it loses focus.
- Added option to make borderless window topmost.
- Added Direct3D resolution limit remover, the game can now run through the old Direct3D API at resolutions above 2048 pixels, if the hardware supports it.
- Added mini AiO Patch for the demo version.
- Fixed Direct3D resolution limit remover so it doesn't crash the game anymore on some Windows versions.
- Fixed the bug with quick-save not saving the correct music track ID to the save file under certain circumstance.
- Restored engine's original LOD feature, crash-free, with LOD factor configurable by the user.
- Skip FOV calculations unless the aspect ratio is actually greater than 4:3.
- Added compatibility database with some additional fixes for the game and the Level Editor.
- 2 forgotten fixes for the Level Editor 3D Viewer.
- Respect Max Fog Depth property of the level, permanent 'foghack' is now optional setting, upper limit is still 60 (200%), vanilla Drakan has this at 30 (100%).
- Min Fog Depth lower limit decreased from 12 (40%) to 5 (16%).
- Added FOV multiplier setting.
- Level Editor: Fixed memory leak caused by original patch that fixed 3D view crash.
- Restored mipmapping feature, lost with a patch that addressed black menu bug.
- Increased maximum texture size limit to 1024x1024 (was 256x256).
- Made executables Large Address Aware, maybe it proves beneficial in the future.
- Level Editor Texture View Options dialog updated to accept maximum view size of 1024.
- Level Editor now releases handles to the 3D Viewer process and its thread.
- Added registry config with correct settings for running the editor through WINE.
- Level Editor: Fixed crashes and bugs that were caused by recursive calls to SendMessage API (SendNotifyMessage FTW!).
- Level Editor: Fixed 2 memory leaks (messaging problem), one occurred when communicating STOMP time (STOP button), the other when painting in 3D window.
- Level Editor: Changed default Level Properties regarding fog depth to be consistent with new engine limits.
- Level Editor: Changed default value of Fog Limit in Calculate Layer Visibility window to be consistent with new engine limits.
- Added updated Modeler.
- Level Editor: Fixed some stupid regression that caused 3D view to error when selecting models.
- Level Editor: Minor changes to used message sending APIs where STOMP time is involved, resolves memory leak when recording key frame.
- Updated most of the levels' visibility data, with exception of Ruined Village and Volcano (Max Fog Distance at 200% is effective now).
- Tweaked ballista and dragon NPCs to detect player sooner to compensate for larger viewing distance.
- Implemented technically more correct fix for players being disconnected from multiplayer server when the game is minimized in fullscreen mode.
- Controller Sensitivity slider under Options->Controls now allows minimum value of 0.1 (previous minimum was 0.6).
- Level Editor 3D engine will idle unless the user is interacting with it instead of hogging the CPU while not doing anything.
- If game window doesn't have the focus, it will run at 15 FPS and sleep when the limit is reached to reduce CPU usage.
- Made game and Level Editor 3D engine's message loops more conventional (PeekMessage called without message filtering).
- Removed DisableProcessWindowsGhosting hack, not needed anymore due to above fix, game will never appear frozen unless it's actually frozen.
- Level Editor 3D engine: Added option Timeout that specifies how much time passes with no activity before PeekMessage function is redirected to GetMessage.
- Embedded manifest in executables that enables Visual Styles which makes editing tools look more faithful to Windows theme settings.
- Fixed the glitch with some things not being initialized on the level transition if the game was minimized and in fullscreen mode.
- Added dedicated server launcher which automatically restarts it if it crashes.
- Reverted fix from previous update due to severe stability issues.
- Fixed text corruption when multi-sample anti-aliasing is forced via graphics drivers (set Text Adjustment to Shifted in Graphics menu).
- Allow 2048x2048 textures.
- Taken care of some stupidities in dinput.dll, including doing things in DllMain that shouldn't be there.
- Added compatibility database install/uninstall script for easier (de)installation.
- Fixed some visual anomalies caused by new texel alignment code (scrollbar blur and vertical line through the map).
- Fixed some layer visibility glitches in Alwarren.
- Minor code fixes.
- Fixed another visibility glitch in Alwarren.
- Fixed regression from one of previous updates that caused dedicated server window to not refresh.
- Added option to specify refresh rate.
- Fixed some layer visibility glitches in Wartok Canyons (3 were also present in original level file, last one slipped in after visibility data update).
- 445SP1 Patch features intended for usage of special attack animations in NoWhere level are now activated only for specified levels (see 445SP1 section in Arokh.ini).
- 445SP1 Patch code for attack intervals was previously overwriting some unrelated code, this has been reverted.
- Corrected HTTP GET request to have standard compliant line endings (server browser works again!).
- Corrected issue with HTTP GET request not containing slash if URL lacked one.
- Game will no longer display "This is not the correct version of Drakan for this territory!" message and quit if system locale is set to Japanese.
- Fixed critical bug in Wartok Canyons since 5/31/2017 update, the floor with pushable stone to open wall door wasn't rendered.
- Added a backup copy of NPCs.odb file (Drakan\Common\NPC\NPCs.odb.bak).
- Level Editor 3D engine: Removed Timeout option, it's not needed anymore.
- Level Editor 3D engine: Hopefully no more hangs caused by dinput.dll.
- Fixed the remaining layer visibility glitches in Alwarren (hopefully that's everything).
- Layer visibility optimizations in Grotto and Wartok Canyons.
- Fixed a lot of layer visibility bugs in Ruined Village.
- Minor layer visibility fixes in Volcano.
- Another 2 missed layer glitches in Ruined Village were fixed.
- ReceiveCallback functions now handle socket errors so they won't crash the engine anymore, eg. it was possible to crash the server by sending it an oversized query packet. The crash that could occur when leaving Join Game menu may be gone as well.
- Replaced some duplicate memory management code in server query command processing functions with a call to common routine.
- When combining multiple query commands, responses will be broken down in multiple packets only when the size of the previous one is approaching the maximum.
- Added small routine to determine whether to tag the current query response packet with \queryid\#.# and/or \final\, previously this was under control of each query command processing function.
- Sending a query string that begins with \secure\ command won't crash the server anymore.
- \echo\ query command now responds with whatever was put as the second parameter.
- Allow specifying server region code in the Arokh.ini file.
- Game server will now notify master servers when it's shutting down.
- Added master.333networks.com as one of the default master servers.
- Added DirectSound DLL overrides in Drakan_Wine_Settings.reg.
- Server browser now uses GameSpy protocol by default to get the server list.
- Added more detailed status messages to the server browser, the original "Master Server Contacted" was very misleading.
- Fixed the bug when refreshing server list could randomly corrupt process' internal state, among other things causing inability to connect to any server and the game process deadlocking on exit.
- Resolved the problem with game temporarily freezing when multiplayer session ends and no players are connected.
- Just another minor layer fix in Ruined Village.
- Level Editor 3D engine: Empty DebugLog.txt will no longer be created.
- Level Editor 3D engine: Sounds will no longer be muted when window loses focus.
- Implemented per-user settings; config, saves and other data will be saved to user's Documents folder, in "My Games\Drakan".
- Added option to turn on/off redirection of user data to user's Documents folder.
- Screenshots will go to Screenshots subfolder and the old screenshots won't be overwritten.
- Added option to disable the usage of performance counter for timing.
- Game will no longer force-create registry key with A3D settings for old Aureal sound cards.
- Reverted change from previous update that caused "No Servers Listed" message in server browser remain on screen permanently.
- Deleting last user defined server from server browser will now delete servers.txt file from disk (only if the list is COMPLETELY empty), previously the file remained on disk with 1 server in it if the GUI was showing total of 0 servers.
- Replaced PeekMessage call with GetMessage in a message loop for Riot Engine Options dialog, taking care of excessive CPU utilization.
- Changed main loop to process all pending window messages before running a frame instead of just one per frame.
- Increased default limit of concurrent playing sounds from 20 to 64 (no more sound cutoffs without a DirectSound wrapper).
- Added missing trigger that turns off EAX Cave sound effect when leaving the cave in Ruined Village where 2 Scavengers attack an Orc.
- Game will now use the audio device selected in Riot Engine Options dialog instead of always using default device.
- It's now possible to select which monitor to use for fullscreen mode in Riot Engine Options dialog.
- Added FPS limiter.
- Restored compatibility with Windows 9x family of operating systems.
- Removed now redundant compatibility database from the archive, you may remove "Drakan SDB" entry from programs list or using Compatibility Administrator if you've installed it.
- Fixed regression introduced in previous update that causes dedicated server to get stuck in infinite loop on level change if its window is minimized.
- Screenshots made while in 32-bit display mode will no longer be black under certain circumstances due to engine's indifference regarding display buffer format.
- Removed incomplete crash fix for lens flare issue.
- Added missing exports to hook dinput.dll that might be expected by 3rd-party software.
- Fixed the item duplication bug that occurred when placing an item taking 2 horizontal slots at the far lower right side of the inventory.
- Fixed the 'sword block flying' glitch.
- Corrected the behavior of CPU feature detection function.
- Increased Controller Sensitivity minimum value to 0.3 (lower values reset at startup).
- Level Editor 3D engine: Inverted camera Y axis.
- Loading the game the first time after level transition is now faster if the save is from the same level and is not loaded via Load Game menu.
- Game will now load the Auto Save after level transition if the player hits any key on death fadeout screen and hasn't saved manually since.
- Fixed the bug in the server browser that could result in invalid servers being added to the server list.
- Now almost fully compatible with dgVoodoo2's fast video memory access.
- Lens flare effects should now render under most circumstances, they're also smooth under dgVoodoo2 (turn on Fast video memory access in the latter!).
- Crashes related to lens flare effects rendering are gone for good!
- Now it really works properly with dgVoodoo2's fast video memory access.
- Level Editor 3D engine: Allow system supported resolutions.
- Level Editor 3D engine: Added option to turn off window message based execution blocking during inactivity for cases when it causes problems.
- Added option to enable DSBCAPS_GLOBALFOCUS flag for DirectSound buffers.
- Copy Drakan.cfg from install folder to user's personal Drakan folder if (s)he doesn't have config file already.
- Prevent Windows from scaling game window at high DPI settings because it breaks the mouse.
- Don't call SetWindowPos on fullscreen window, it's redundant and can permanently mess up other applications' window sizes and positions.
- Enabled enhanced GDI scaling at high DPI settings by default for the editing tools (supported on Windows 10 version 1703 and above).
- Disabled mplayer.com button in Multiplayer menu since the service is long gone.
- Dedicated server launcher now recognizes /abovenormal and /high parameters to set process priority of Drakan.exe (put them before anything else).
- Drakan dedicated server now inherits priority of its launcher process (DrakanServer.exe) also if it's higher than normal (if applicable).
- Moved SetErrorMode call to dinput.dll to allow dedicated server to be invoked by other means while keeping crash dialog disabled.
- Added VBScript script for dedicated server invocation.
- Minor code fixes.
- No longer required to specify levels in Arokh.ini 445SP1 section in Level#=levelfile.lvl format, just normally one per line.
- Automatically append file extension for the levels in 445SP1 section if missing.
- Fixed the issue from the previous update with MDL_SWITCH flag being accidentally reset.
- Fixed the inventory glitch which allowed items with width greater than 1 slot to be placed outside its boundaries.
- Don't allow quick weapon switching when Rynn is in middle of attack or stunned.
- Don't allow opening inventory when Rynn is stunned.
- Editing tools now remember 9 recently opened files (increased from 4 for Level Editor and from 6 for Modeler).
- Level Editor: Memory warning that always showed when setting number of undo levels above 4 now only appears on machines with low amount of installed physical memory.
- Level Editor: Default setting for undo levels has been increased to 20 (initial setting will still be 4 on machines with 64 MB or less memory).
- Level Editor: Fixed the issue with message boxes related to undo setting popping up continuously if user closed the Level Properties dialog while undo number text box had keyboard focus.
- Level Editor: Level Properties dialog now allows setting number of undo levels up to 50 (previous maximum was 16).
- Level Editor: Now remembers number of undo levels across sessions.
- Stupid random crashes of the game and editor might still occur at times, they seem rare though.
- Support for true-color textures, we only have 16-bit now.
- There should be more blood, try running the game at 20 - 30 FPS and see the gore.
- In multiplayer, players that had their game minimized and in full screen mode during level transition will slide across the level until their game is restored.
- Fixing in-game map to not stretch on wide monitors would be nice.
- Texture previews in Databases window don't work properly on Windows 8+ when they have to be downscaled to fit preview square.
- After using Control menu in 3D window, user must click anywhere outside of it then click on it to be able to regain camera control.
- If above is not done right after Control menu usage, eg. Space is pressed before clicking outside, user may find the 3D engine laggy, scenario in which user should turn off camera control, click on menu, press Space to reset state variable, then do the procedure described in previous bullet.
- With current editor tweaks, STOMP sequence playback is a little stuttery, but we do see animated characters in their correct animation state most of the time when we move the time slider.
- Function for limiting 3D engine CPU usage uses window message APIs to halt the process when user isn't interacting with it; it crahes on WINE, so don't set dinput.dll override for Engine.exe. It also doesn't take closing and re-opening the window well under certain circumstances on Windows regardless of presence of dinput.dll.
- 3D view reqires 3D sound buffers option in Riot Engine Options dialog to be enabled, otherwise most sounds don't play.
I recently got into Drakan again. Seeing community managed to squash most annoying bugs occuring on modern PCs, game pretty much works nicely with 445++ patch. Anyway, one thing that still bugged me, game offers every possible resolution your hardware can manage, but field of view remains at 80, which is OK for 4:3 resolutions, but kinda low for wide resolutions, everything's zoomed in. Command "fov" was also a no-go, since it crashed the game plus it's not fun to manually fix FOV every time. Oh, and there is also a slight problem with hosting multiplayer server, even with 10th Anniversary Mod, but more on that later.
So I decided to fire-up OllyDbg, hoping to figure something out. Long story short, I located the function which takes FOV as the parameter and some sub-function, which, among other things, calculates model Level of Detail value using some number calculated from FOV. 0.0 is maximum detail, higer values mean less detail as the camera moves away, anything negative is catastrophic, which is exactly what happens when you try to set FOV higher than 93.
Then, knowing what's the problem, I coded a small hack DLL with the following features:
- Alters the model LoD calculation so it always returns 0 which fixes FOV related crash and makes characters, trees,... look nicer if looked at from the distance.
EDIT: This is now part of patched Drakan.exe.
- Automatic FOV adjustment for wide monitors.
- Fixes "Session creation failed!" error on Vista and newer.
- Ability to apply any combination of unofficial game patches on startup, configurable via configuration file.
EDIT: Realized that the whole memory patching thing was stupid so all patches are now part of patched Drakan.exe and Dragon.rfl.
Before I move on to instructions on how to use the hack, I'd like to address something about Drakan's compatibility with modern flavors of Windows. It seems that patched Drakan doesn't require any compatibility fixes applied. But Windows is actually set to apply 3 so called compatibility shims to Drakan, which are:
- EmulateCDFS - patched Drakan doesn't use CD in any way so this one is completely redundant.
- IgnoreAltTab - this one is meant for applications which don't handle alt-tabbing well. Drakan does it perfectly well.
- IgnoreLoadLibrary - don't know which DLL it's trying to ignore, but it also seems unnecessary.
- Extract Arokh.dll, Drakan.exe and Dragon.rfl from attached archive to your Drakan directory.
- You'll now need something to inject the DLL into Drakan when it starts, my favorite method is to set Windows to automatically do it every time the game is started, so extract Drakan.sdb from archive to Desktop.
- Go to Start menu->Programs->Accessories, right click on Command Prompt and select Run as administrator.
- Command window should open in your user profile directory, so now you just need to navigate to Desktop by typing in following command without quotes: "cd Desktop"
- Now that you arrived at your Desktop, type in the following command without quotes: "sdbinst Drakan.sdb"
- Message "Installation of Drakan SDB complete." should appear, meaning all went well and you have successfully installed custom compatibility database for Drakan which tells Windows to load Arokh.dll everytime you want to play.
- You're done, start Drakan as usual and enjoy!
You could achieve the same thing by downloading Microsoft Application Compatibility Toolkit from here and using Compatibility Administrator to create custom compatibility database with a special shim for Drakan called InjectDll and specify Arokh.dll as a parameter. In case you're familiar with the program and are using it to fix some other problematic programs/games, you'll probably want to add this fix to your existing database. WinJect 1.7 can also be used for DLL injection.
Any kind of feedback is appreciated!
PS: I forgot about compilation requirements, nothing fancy: Microsoft Visual C++ 6.0 or newer and Microsoft Detours 1.5
Edit: updated instructions for those who have User Account Control enabled since apparently you can't open command window with admin privileges right from the Desktop. Hopefully they will work for everyone now.
IMPORTANT UPDATE: I discovered alternative possible way to implement 445++ patch, not only solving crashes, but also fixing black menu background bug. Details in 14th post.