Beyond Divinity

Beyond Divinity

Not enough ratings
[Beyond Divinity] DxWnd windowed mode
By The Goddamn Owl
This guide provides the configuration setup needed to run Beyond Divinity windowed through DxWnd. While there's alternative methods, they require editing important game files and thus represent a risk for less advanced users. A file configured with the steps described in this guide is provided at the end
   
Award
Favorite
Favorited
Unfavorite
Introduction
Divine Divinity and Beyond Divinity are well known for lacking a native way to play through a window. While it is true that there's methods to force the games to run windowed, these generally involve editing the executable of the game, which on itself can be dangerous if not done correctly and it is something that the average user won't even attempt. Besides that, there's also a risk of any future update overwritting the executable and thus the whole process starts anew.

There's confirmation that both games can be run through wrappers such as DgVoodoo2, but the later heavily depends on the process to even create a window in the first place if one wants to play in such a way. This brings us to DxWnd, which is a program with the sole purpose of running old games through a window as it "hijacks" the process and emulates the calls needed, even if there's no window created initially by said process.

However, there's a big issue in the current day where a lack of information, or rather disposal of, makes the endeavor of using DxWnd for some games more difficult than it should be. This brings us to Beyond Divinity, which unfortunately is one of the games hit by the passage of time in this regard

The following guide has been thus made with the purpose of sharing information to make the process of running this game windowed far less complicated and to maintain a hard documentation for future reference so anyone can have directions on where to start

The method described here should work with both Steam and GOG versions of the game as both use the same executable. I don't know if it will work with the retail disc as I don't own that version, but it should work as well
Preparing the setup
DxWnd indeed works for playing Beyond Divinity through a window, but there's a catch: newer versions of the software effectively are incapable of doing so due to under the hood changes in the way hooks interact with games.

So what to do? We get the version that actually works with the game.

The last known version of DxWnd which works without issues with this game is version 2.04.74, which you can download here from the source[sourceforge.net]. You'll need either WinRAR or 7-Zip to uncompress the file

Since I do have a local copy of the latest DxWnd for use with most other games, these copies I prefer to put them directly within the game's directory for ease of management. The guide then will use this setup but you can use whatever is more convenient for you



Now as for the program, the first thing you need to do is to open it, and then right-click inside the window to Add a new program to the task list



You'll be presented with a window to fill out with the information. We'll start by first filling the name and the process we want, in this case being Beyond Divinity. You can give it any name, but for the Path and Launch fields you must select the game's executable (div.exe) by clicking on the dot buttons



After that's done, we need to check some options in the tabs:

Main:
  • No banner
  • Run in window
  • Keep aspect ratio
  • Desktop center
  • For window initial position and size, you should input the current resolution of the game. I use 1280x720, but I substract 40px because my screen is somewhat small so I need to optimize the size a little



Video:
  • Thin frame (this is personal preference, I don't like the window with thick borders)
  • Monitor native modes
  • Initial resolution, this one must match your game's internal resolution, which in my case is 1280x720



Input:
All of these options can stay on the program's default checks, but I checked the following just to make sure nothing weird happens
  • Cursor visibility: Hide
  • Cursor clipper: ON
  • Correct mouse position
  • Keep cursor within window



DirectX(2)
  • Set 16BPP RGB 565 encoding (This is important as the game uses a 16-bit color mode)



Everything else can stay as defaults, for now. Click on "Ok" to save the configuration

The next thing we need to do is to configure the hook. For this, we need to go to the Options button and click on "Expert mode"



After that, we enter once again to the game's configuration by right-clicking the icon in the window and then click on "Modify". This time we'll have many more tabs to check, but the most important one is the Hook tab, since we need to tell the program how to "talk" to the game. The options that need to be checked are "Inject suspended process" and IAT aligment must be "Word"



Finally, we go to the Compat. tab and check "Limit available resources"


Note: If the game has performance hiccups, you should also check "Set single core process affinity", also in the Compat. tab

Click on "Ok" to save the configuration, and in the File menu select "Save" so that the configuration is stored in disk
Last steps
Now, you can run the game directly from DxWnd, or you can keep DxWnd open and then run the game, but we want to make a clean way to play on a window without having to micromanage the utility. For that, we can make a batch file or a shortcut that helps us do just that, using the available options in DxWnd.

I personally prefer the batch file because I can use relative paths so it will always work no matter where I install the game as long as DxWnd is stored inside of it, so I'll share the code used for it:

::Use path of the folder where cmd is called, navigate to DxWnd dir cd "%~dp0\dxwndv2_04_74" ::Run DxWnd minimized and select the first (and only) game in the task list start "DxWnd" "dxwnd.exe" /R:1 ::DxWnd will close itself after game closes

the "/R:1" parameter can be used on a shortcut's Launch path but this way has the disadvantage of not being able to use relative paths

The results speak by themselves. The game should also have better performance on top:

Final words
There's a few considerations to take regarding this method to run Beyond Divinity: firstly, the cinemas will maintain the focus on the window no matter what so you'll be able to Alt+Tab once a cinema is done playing or if you skip them

Another consideration is regarding loading. There's no appreciable difference in load times, but it may sometimes look like the game hangs. Its ok, the game is not crashing, is just finishing loading, which you can see if you use the alternate method for windowed mode that involves enabling Debug mode

As a fun little detail, this same configuration works with Divine Divinity too, same DxWnd version and all, but the performance in DX6 is not that good and there's tearing due to not being filtered. I'd say software rendering with cnc-ddraw is the way to go for that game anyways, but now you know DxWnd works for it too without much change

Finally, for those who have used DxWnd before, bear in mind that the proxies do not work with these games, so you'll have to use either a batch or a shortcut to DxWnd to run the games windowed

All in all, this guide should make sure that anyone looking for this specific topic gets a good start on what to do, and how. You can fiddle with the configurations to better suit your needs

If you don't want to deal with the hassle, you can have my .dxw file.[drive.google.com] Just import it to DxWnd and change the Path and Launch to your game install, and the resolution to what suits your game's configuration
7 Comments
WhiteFlex 30 Jan @ 12:09pm 
when trading with npc heroes and pressing 'alt' key to highlight items, the game slows down drastically, fps are reduced many times, can you help me? can i solve this problem by editing values ​​in dxw?
The Goddamn Owl  [author] 14 Jun, 2024 @ 10:00pm 
@Druss the Axe Just for safe measure, I've updated my .dxw file with my current configuration. For the config tool of the game, you need to go to the game's install directory and you'll find a configtool.exe, though it seems that its been a while and I was mistaken, you can only change the resolution in there. Glad to have been of help!
Druss the Axe 14 Jun, 2024 @ 6:33pm 
Thank you, i’ll give it a try. I have just installed it on my old W10 laptop (which i was about to send to silicone heaven) and it works fine. Im still using DXWnd to get past the 16bit issue but no rendering issue at all.

I think the 11 year old decrepit thing might just have escaped digital desth and may end up in the “do not throw on pain of death” pile 😂

I would like to try and get it running on my new device, the load times are so much quicker. I believe that the set single core is checked. Not sure how to configure the rendering method, a little above my novice knowledge.

I’ll have a play and see what happens, at least it seems I can still play it on the old machine.

Thanks for the thread, it was easy enough for an middle aged noob to follow and you have brought some nostalgia back into my world. Appreciate it.
The Goddamn Owl  [author] 14 Jun, 2024 @ 5:02pm 
@Druss the Axe iirc its the game's renderer which is causing the issues. You'll need to configure it through its own tool to a different video rendering method and see what works. From my experience, rendering with DX6 often has stuttering troubles and other stuff. If that doesn't work, check in the compatibility options "Set Single Core Process Priority" and it should be fixed. Both DD and BD are weird in this regard given their age
Druss the Axe 14 Jun, 2024 @ 7:18am 
Hi

I have followed the steps above and the game loads, the Larian intro and Game intro work fine, as does the title screen. Once I start the game I suffer awful graphics lag which is unplayable. Is there a setting on DXWnd I need to alter to fix this or do you believe it would it be a separate issue?

Cheers
The Goddamn Owl  [author] 9 May, 2024 @ 7:53am 
@Fat K I personally didn't have issues with it, wasn't even running as admin to make it run but is good to have that in account for that kind of case. Thanks!
Fat K 9 May, 2024 @ 4:06am 
Just a small thing to add, I was getting an error after following your instructions exactly. You need to make sure that dxwnd.exe always runs as administrator (right click -> properties -> checkbox run as administrator) for this to work.

Thanks for the guide!