PDA

View Full Version : Working on DKII



Displacer
August 30th, 2011, 01:52
I'm in the process of reverse engineering the .exe, if people could post bugs, issues, errors, etc. in the game here I'll keep an eye out for them and try and sort out fixes. I don't need map errors or bugs, ones that are in the level files, only engine bugs. Anything else you want me to look for post here as well. I'll try and post findings here too.

Metal Gear Rex
August 30th, 2011, 02:04
I want to know how much you can do for DK2 anyways. Is it just fixing bugs, issues, ect the only thing you can do or can you go beyond that? Or are you simply giving that kind of task priority?

I'm remembering some weird bugs that may have been posted around the DK2 Section. One of them involved Units that were in the North/South to be stronger than Units in the opposite direction, or something like that. It wasn't a map bug or anything like that, it seemed to exist in all Levels. Perhaps later when I get some of my work out of the way, I can do some searching around and post any kind of errors I find that have been found before.

Displacer
August 30th, 2011, 02:21
Depends on what I find. For instance I hear the AI is hard coded in the .exe. Might be a way to make that external (I've done it before) and therefore editable, along with whatever else is hard coded. Bug fixes, enhancements, etc. On the other hand, there may be nothing I can do, it depends on how it's coded.

Metal Gear Rex
August 30th, 2011, 02:37
Depends on what I find. For instance I hear the AI is hard coded in the .exe. Might be a way to make that external (I've done it before) and therefore editable, along with whatever else is hard coded. Bug fixes, enhancements, etc. On the other hand, there may be nothing I can do, it depends on how it's coded.

I see. Perhaps you could see what kinds of things you can find while I also look for some kinds of bugs I can find. I can also form a list of potential enhancements but I'd prefer if you see what you're more capable of doing first before I try getting a list of things like that.

theleo_ua
August 30th, 2011, 23:49
I'm in the process of reverse engineering the .exe, if people could post bugs, issues, errors, etc. in the game here I'll keep an eye out for them and try and sort out fixes. I don't need map errors or bugs, ones that are in the level files, only engine bugs. Anything else you want me to look for post here as well. I'll try and post findings here too.

Nice! Good Luck in that hard task.

About bugs - I played only old russian version, and there were annoying bugs, when the game autoexited to windows approximately 1 time per 30 minutes. I bet that those bugs were only because of bad russian localisation.

Also I have another interesting bug - if you set the resolution to 1600x1200 (using regedit), you will not see the text in the ingame menu (only icons). I bet, that this bug is reproducible in last version of the official English DK2, but never tried it (I have this bug on my old russian version).

GL anyway.

Displacer
August 31st, 2011, 00:22
Thanks. I'm using the last official updated .exe, v1.7 so I only need bugs, or issues from that version

Metal Gear Rex
August 31st, 2011, 00:31
Thanks. I'm using the last official updated .exe, v1.7 so I only need bugs, or issues from that version

I wonder if you could solve the bug with multiplayer in that version.

Displacer
August 31st, 2011, 01:30
Depends on what it is

Metal Gear Rex
August 31st, 2011, 01:42
Depends on what it is

Oh I actually thought you knew what I was talking about. Multiplayer is pretty unplayable as far as I know in 1.7. You'll see "Max Players: 0" in flashing red before you start the game. I don't remember all the details as I haven't played it in so long, but that's the bug I remember.

Displacer
August 31st, 2011, 01:57
I've actually never played it in multiplayer, if you find any info on what's broken, let me know

Displacer
September 9th, 2011, 12:44
Something interesting while tracing the registry code. It checks for a file named "TFile.tld" in the data folder. It's not included in the release (at least not mine). It has something to do with Torture. If this file is found it sets the "Torture Details" registry value to 0 no matter what it was before. Has anyone seen this file by chance? Would be interesting to find out what it is...

EDIT: After some research It seems that file and another I haven't gotten to is for the German version, and has to do with censorship. Can someone send me this file and I think there is another one named "bfile.bld"?

MeinCookie
September 9th, 2011, 14:30
GL, if you can fix either AI or mutliplayer in 1.7 it would be a major lease of life.

And, sorry, I can't help. English Version too. Anyone?

Skarok
September 9th, 2011, 21:17
I think I've got the german version somwhere, but I'm currently very busy, so it could take a few days for me to install the game again. But if you can wait, I could help you out. If you play with the censored version, you'll simply don't see blood and the tortured creatures in the torture chamber are in a closed chamber, nothing special. You won't see them on the wheels or on the electric chair, thats all.

Displacer
September 9th, 2011, 21:19
Yea, all I need is those 2 files, you may not even need to install it, might be on the cd. I know what it does, I just need to know what those files contain (just for completeness) . No big hurry and thanks!

The 2 files are in the data folder and are named:

TFile.tld
bfile.bld

EDIT: As a side note, the .exe is the same. It checks for these files and if it finds them it sets the reg entry Torture Details to 0 so if you just delete these files your game is uncensored (after resetting the reg entry to 1)

Skarok
September 10th, 2011, 15:24
Here are the files. And I know how i delete the censorship, but I don't play the game on german anyways ;). English is much better than german, and it's also my favorit language.

893

Displacer
September 10th, 2011, 16:30
Thanks. I don't think they contain anything but garbage, they're just there to check if the game should be censored. I suppose a feeble attempt to make people think they're important. The code only checks if they are present and acts accordingly, nothing is read from them. I guess they may be used later on but I doubt it. Anyway thanks again!

natchoguy
September 11th, 2011, 14:58
cool thread; there's one bug (maybe just a flaw in the program) where creatures that are in the hatchery or liar will simply towards a wall non stop and they will get pissed of at lack of food or liar. do you know why this happens?

Displacer
September 11th, 2011, 16:47
Well I finally found a copy of the Qmixer 5 SDK. That was almost impossible to find so if anyone needs a copy let me know. Don't know if it will help with the sound problems, probably not as the sdk only contains the library and .h file for qmixer, not the .dll source code itself but it may come in handy.

Metal Gear Rex
September 11th, 2011, 17:35
cool thread; there's one bug (maybe just a flaw in the program) where creatures that are in the hatchery or liar will simply towards a wall non stop and they will get pissed of at lack of food or liar. do you know why this happens?

I forgot about that glitch. That's so annoying, especially considering how sensitive the Creatures are.

DragonsLover
September 12th, 2011, 04:42
I also remember a bug where a pissed off creature would eat chickens over and over and over again.

Metal Gear Rex
September 12th, 2011, 04:53
I also remember a bug where a pissed off creature would eat chickens over and over and over again.

That's interesting. I've never seen such a bug.

DragonsLover
September 12th, 2011, 13:16
It happened with a Dark Mistress. I don't remember exactly. I just remember she kept eating chickens for no apparent reason and that didn't make her happy.

Displacer
September 12th, 2011, 14:28
Yea that bug about running into the hatchery wall and not actually eating is annoying as hell. I'll see if I can hunt it down, still tracing and documenting the startup process, working on the part that processes the registry entries so if there are any of these that are unknown what they do let me know so I can sort them out

Displacer
September 12th, 2011, 17:19
Found some registry values that are not included by default in the regular game. They are under the registry entry "Game" and I think they are there to override the default values for the maps. They are:

"FogOfWar"
"ImpenetrableWalls"
"GoldDensity"
"GameDuration"
"LoseHeartType"
"MaxCreatures"
"ManaRegeneration"

Actually I'm not sure if these override the map settings since these are read in at the start of the program, but it may look at these values at map load and if they are already set it will ignore the map settings.

dotted
September 13th, 2011, 07:33
Well I finally found a copy of the Qmixer 5 SDK. That was almost impossible to find so if anyone needs a copy let me know. Don't know if it will help with the sound problems, probably not as the sdk only contains the library and .h file for qmixer, not the .dll source code itself but it may come in handy.

Do send please!

Displacer
September 13th, 2011, 16:22
OK, here's the qmixer v5 sdk. It's the official one they released way back when. It contains the free version and the commercial version which if you are going to distribute you need a license, but you're allowed to use it for anything you like without one as long as you don't make a game or something with it and try and sell it. As a side note, it needs to be installed. Some may have trouble on XP or higher as I did, it's a 16 bit installer and sometimes it will not work normally. Way around this is to boot into safe mode and run the installer from there. Worked like a charm for me :)

897

Tacyarts
September 15th, 2011, 12:55
Found some registry values that are not included by default in the regular game. They are under the registry entry "Game" and I think they are there to override the default values for the maps. They are:

"FogOfWar"
"ImpenetrableWalls"
"GoldDensity"
"GameDuration"
"LoseHeartType"
"MaxCreatures"
"ManaRegeneration"

Actually I'm not sure if these override the map settings since these are read in at the start of the program, but it may look at these values at map load and if they are already set it will ignore the map settings.


All of the above mentioned items appear in the "Game Settings" section under "Single Player"- "Skirmish".

I've noticed that the settings in that area change each time DK2 is launched.
DK2 chooses a random map each time it loads and I know for a fact it changes some of the settings in that area depending which random map it loads.
The reason I know is I have (1) map that allows Horned Reapers via portals and when that map is chosen by DK2 as the random map, the "Horned Reaper" appears in the creature list.
Choosing a different map manually has no effect on the values in that area so it appears as if DK2 does not read any information other than the first random map it loads.

Tacy.

Displacer
September 15th, 2011, 13:25
Ah, thanks for the info. If I remember correctly, these settings can be changed with the editor on each individual map, so I'm thinking if these values are set in the registry, they will override the per map settings. I'll have to test that sometime. Anyway thanks for letting me know where these options are in-game