It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hi there! I run a Twitch stream and I play a lot of older games and I want to make Dungeon Keeper 2 part of my routine. The problem right now is that getting DK2 to display on OBS (video capture software) is next to impossible and none of the settings or methods I use to capture the game window work on this game. The only possible workaround is to mess around with registry keys or some stuff and I am not taking that kind of risk.

If there was support for a windowed mode, I can capture it easily and stream DK2 and show it off to people, and it would allow many other folks to discover this great game through other streamers.
avatar
AutisticLucario: none of the settings or methods I use to capture the game window work on this game
Unfortunately none of us knows which methods you tried.
avatar
AutisticLucario: The only possible workaround is to mess around with registry keys or some stuff and I am not taking that kind of risk.
You seem to have some unusual views on how Windows works. May be worth asking someone technical to explain you things. Unless it's a matter of faith rather than knowing facts.

But I agree the central registry which Windows introduced is stupid. Its introduction broke many paradigms and tainted
that OS for ever. Fortunately every other OS keeps configuration of each application in separate file or folder.
avatar
AutisticLucario: If there was support for a windowed mode, I can capture it easily and stream DK2 and show it off to people
There are many streams with both DK1 and DK2. So people have no problem streaming these.

For windowed mode - the game does have a config switch for that, it's just not within options interface.

And if you don't want to reconfigure the game, or that doesn't produce the results you seek - you will need some kind of DirectX (D3D in this case) hook library, which modified the graphics calls the game does. There are multiple tools for that - recently dgVoodoo2 is quite popular.

One usually tries to reconfigure the game first though - 3D hooks are a complex thing, with a lot configuration options and dependencies between them.

If all fails - serious streamers tend to use hardware encoders.
avatar
mefistotelis: For windowed mode - the game does have a config switch for that, it's just not within options interface.
avatar
mefistotelis: One usually tries to reconfigure the game first though - 3D hooks are a complex thing, with a lot configuration options and dependencies between them.
Could you elaborate on what you mean by "reconfigure" here? Or point me in the direction of a beginner's guide on the subject? Thanks.

Could you elaborate on what you mean by "reconfigure" here?
How I find things:

I looked into the game folder. I searched for config files, found none. I then searched in my user folder, also found nothing. Then I grepped the binary:

[pre]
# strings DKII.exe | grep -i config
QSWaveMixConfigureChannel
Configuration
HKEY_CURRENT_CONFIG
[/pre]

From the last entry, I figured the config is in windows registry. In that registry, applications usually go into "software" key:

[code]
# strings DKII.exe | grep -i software
MMX Software Renderer, by Martin Griffiths, 1998/9 (fast sub-pixel triangles huh?!?!)mail me at mgriffiths@griffster.demon.co.ukWVRSUQ
%c4..Software3D MMX
%c3..Software3D
%c1..Software 2D
Engine, Software 3D MMX selected
Engine, Software 3D selected
Engine, Software 2D selected
-SOFTWAREFILTER
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\DirectXDrivers
HKEY_LOCAL_MACHINE\Software\Microsoft\DirectX
software\Bullfrog Productions Ltd
software\Electronic Arts
[/code]

So I learned who creates software renderer for the game, but also from the last two lines - where the registry keys for the game are.

Now I opened the game in a disasembler and searched for that. I got:

[code]
HKEY __thiscall read_configuration_from_registry(_DWORD *this)
{
_DWORD *v1; // esi
int v2; // edi
char v4; // [esp+10h] [ebp-128h]
int v5; // [esp+14h] [ebp-124h]
int handle; // [esp+18h] [ebp-120h]
int v7; // [esp+1Ch] [ebp-11Ch]
char v8; // [esp+20h] [ebp-118h]
int v9; // [esp+24h] [ebp-114h]
char v10; // [esp+28h] [ebp-110h]
int v11; // [esp+134h] [ebp-4h]

v1 = this;
unknown_libname_41(&v8);
v11 = 0;
unknown_libname_41(&v7);
LOBYTE(v11) = 1;
unknown_libname_41(&v9);
LOBYTE(v11) = 2;
v1[39] = 1;
*v1 = 4;
unknown_libname_41(&v4);
LOBYTE(v11) = 3;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&handle, "Version Number", 4u);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
if ( 1 == *(_DWORD *)open_config_key((HKEY *)&v8, (int)&handle, "Dungeon Keeper II", (HKEY)1) >= 0 )
{
if ( 1 != *(_DWORD *)open_config_subkey((int)&handle, "Configuration", (int)&v7) >= 0 )
create_config_key((HKEY *)&v8, (int)&handle, "Configuration", (int)&v7);
if ( 1 != *(_DWORD *)open_config_subkey((int)&handle, "Video", (int)&v9) >= 0 )
create_config_key((HKEY *)&v7, (int)&handle, "Video", (int)&v9);
}
v1[42] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 4;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&handle, "GUID Index", 0);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[43] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 5;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&handle, "GUID Index Verified Working", 0);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[44] = 1;
unknown_libname_41(&v4);
LOBYTE(v11) = 6;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&handle, "GUID Index Is Default", 1u);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
handle = 4096;
LOBYTE(v11) = 7;
v1[17] = 4096;
unknown_libname_41(&v4);
LOBYTE(v11) = 8;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Gamma Level", v1[17]);
LOBYTE(v11) = 7;
close_config_key((HKEY *)&v4);
v5 = 512;
LOBYTE(v11) = 9;
v1[19] = 512;
unknown_libname_41(&v4);
LOBYTE(v11) = 10;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&handle, "Ambient Light", v1[19]);
LOBYTE(v11) = 9;
close_config_key((HKEY *)&v4);
LOBYTE(v11) = 2;
v1[22] = 1;
unknown_libname_41(&v4);
LOBYTE(v11) = 11;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "HighWalls", v1[22]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[25] = 1;
unknown_libname_41(&v4);
LOBYTE(v11) = 12;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Torture Details", v1[25]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
sprintf(&v10, "Data\\%s", "TFile.tld");
if ( sub_5B3BF0(&v10) )
{
v1[25] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 13;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Torture Details", v1[25]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
}
v1[36] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 14;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Res 1600*1200 Enable", v1[36]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[35] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 15;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Res 1280*1024 Enable", v1[35]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[34] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 16;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Res 1024*768 Enabled", v1[34]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v2 = sub_5578E0();
if ( v2 < 0 )
{
v1[10] = 4;
v1[11] = 4;
unknown_libname_41(&v4);
LOBYTE(v11) = 18;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Engine Id", v1[10]);
LOBYTE(v11) = 2;
}
else
{
v1[10] = 2;
v1[11] = 2;
unknown_libname_41(&v4);
LOBYTE(v11) = 17;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Engine Id", v1[10]);
LOBYTE(v11) = 2;
}
close_config_key((HKEY *)&v4);
if ( sub_559790(&dword_756EE8) >= 210.0 )
{
if ( sub_559790(&dword_756EE8) >= 240.0 )
{
if ( sub_559790(&dword_756EE8) >= 340.0 )
{
sub_5666B0(0);
sub_5668F0(0);
sub_566320(12);
sub_5663A0(3);
sub_566420(1);
sub_5664A0(1);
sub_566DB0(0);
sub_566620(0);
sub_566740(0);
sub_5667D0(1);
sub_565FD0(0x20u, 0x58u, 0x10u, 0, 0, 1u);
}
else
{
sub_5666B0(0);
sub_5668F0(1);
sub_566320(10);
sub_5663A0(2);
sub_566420(1);
sub_5664A0(1);
sub_566DB0(0);
sub_566620(0);
sub_566740(0);
sub_5667D0(1);
sub_565FD0(0x80u, 0xE0u, 0x10u, 0, 0, 1u);
}
sub_566520(10);
}
else
{
sub_5666B0(0);
sub_5668F0(1);
sub_566320(10);
sub_5663A0(1);
sub_566420(0);
sub_5664A0(0);
sub_566DB0(-4);
sub_566620(1);
sub_566740(0);
sub_5667D0(0);
sub_565FD0(0, 0x80u, 0x10u, 0, 0, 1u);
sub_566520(5);
}
}
else
{
v1[32] = 1;
unknown_libname_41(&v4);
LOBYTE(v11) = 19;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Cheap Lighting", v1[32]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[26] = 1;
unknown_libname_41(&v4);
LOBYTE(v11) = 20;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Sine Wave Water", v1[26]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[20] = 10;
unknown_libname_41(&v4);
LOBYTE(v11) = 21;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "View Distance", v1[20]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[21] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 22;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Shadow Level", v1[21]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[23] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 23;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "EnvironmentMapping", v1[23]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[24] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 24;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Translucent Water", v1[24]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[41] = -8;
dword_7932DC = -8;
unknown_libname_41(&v4);
LOBYTE(v11) = 25;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "PMesh Reduction Level", v1[41]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[37] = 0;
unknown_libname_41(&v4);
LOBYTE(v11) = 26;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Should Draw Opt Background Alpha", v1[37]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
if ( v2 < 0 )
{
sub_566740(0);
sub_566620(2);
sub_565FD0(0x90u, 0x2Cu, 0x10u, 0, 0, 1u);
sub_566520(0);
}
else
{
v1[33] = 1;
unknown_libname_41(&v4);
LOBYTE(v11) = 27;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Solid Blueprints", v1[33]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
v1[31] = 1;
dword_7932DC = 1;
unknown_libname_41(&v4);
LOBYTE(v11) = 28;
if ( prepare_config_keys((int)&v4) )
read_config_option((int)&v5, "Texture Reduction Level", v1[31]);
LOBYTE(v11) = 2;
close_config_key((HKEY *)&v4);
sub_565FD0(0, 0x80u, 0x10u, 0, 0, 1u);
sub_566520(0);
}
}
if ( (unsigned int)sub_5B8210(&unk_757E11) <= 0x2000000 )
sub_5665A0(0);
else
sub_5665A0(1);
LOBYTE(v11) = 1;
close_config_key((HKEY *)&v9);
LOBYTE(v11) = 0;
close_config_key((HKEY *)&v7);
v11 = -1;
return close_config_key((HKEY *)&v8);
}
[/code]

While this is not easy to read, it lists all names of the options within registry, and final branch name.
Now I opened `regedit` on a machine with DK2 installed, and searched for the names. I found this:

```
[HKEY_CURRENT_USER\Software\Bullfrog Productions Ltd\Dungeon Keeper II\Configuration\Video]
"GUID Index"=dword:00000000
"GUID Index Verified Working"=dword:00000001
"Gamma Level"=dword:00001000
"Ambient Light"=dword:00000200
"HighWalls"=dword:00000001
"Torture Details"=dword:00000001
"Res 1600*1200 Enable"=dword:00000001
"Res 1280*1024 Enable"=dword:00000001
"Res 1024*768 Enabled"=dword:00000000
"Engine Id"=dword:00000004
"Cheap Lighting"=dword:00000000
"Sine Wave Water"=dword:00000000
"View Distance"=dword:0000000c
"Shadow Level"=dword:00000003
"EnvironmentMapping"=dword:00000001
"Translucent Water"=dword:00000001
"PMesh Reduction Level"=dword:00000000
"Texture Reduction Level"=dword:00000000
"Solid Blueprints"=dword:00000000
"Should Draw Opt Background Alpha"=dword:00000001
"Screen Width"=dword:00000320
"Screen Height"=dword:00000258
"Screen Depth"=dword:00000010
"Screen Windowed"=dword:00000000
"Screen Swap"=dword:00000000
"Screen Hardware3D"=dword:00000000
"Machine Spec Level"=dword:0000000a
"High Res Textures"=dword:00000001
"D3D Device Guid"="{84E63DE0-46AA-11CF-816F-0000C020156E}"
"Version Number"=dword:00000003
"Screen Mode Type"=dword:00000003
"GUID Index Is Default"=dword:00000000
"StippleAlpha"=dword:00000000
"BumpMappingEnabled"=dword:00000001
```

And that's one way of finding where game configuration is.
Post edited April 06, 2022 by mefistotelis
This forum is primitive - I can't seem to make preformatted block.. sorry for that.
Also editing my previous post does not work. Hopeless.

Try going to keeperklan forum - it works. And you will get help from fans there.
avatar
mefistotelis: Try going to keeperklan forum - it works. And you will get help from fans there.
I feel this is a good moment to post the Keeperklan Discord link again: https://discord.gg/zKTjfDh