Keen Dreams registered version modding?

This is where you can post your Commander Keen related stories, artwork, or other stuff that is related to Commander Keen but otherwise doesn't belong in another forum.
Post Reply
User avatar
szemi
Vorticon Elite
Posts: 1722
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Keen Dreams registered version modding?

Post by szemi »

Does anybody know how to mod Keen Dreams registered version? Before you say anything, I know there is the shareware 1.13 version of the game as well as the source code of CKD, but I still wanna know whether the registered version can modificated. I mean, for example, KDRPATCH.EXE would work for the registered versions? Tell me.
Yeah, piece of cake!
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 781
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Keen Dreams registered version modding?

Post by K1n9_Duk3 »

I don't see why KDRPATCH should be unable to modify the executable. I think the only reason why someone would claim that certain versions could not be modded would be that fact that some versions expect a special command line parameter that tells the game that it was lauched from the menu program that comes with the game. Basically, KDRPATCH works just fine, but runs the game without that command line parameter, so the game just exits with an error message telling you to use the menu program.

But: If KDRPARCH is able to patch the executable, it would probably be a piece of cake to remove/disable the part of the code that checks for that command line parameter, so the game would work perfectly fine.

If there's any other reason why the "unmoddable" versions "cannot be modded", then I don't know.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
User avatar
szemi
Vorticon Elite
Posts: 1722
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Re: Keen Dreams registered version modding?

Post by szemi »

I tried to modificate the registered version, but with KeenGraph I wasn't successful.

EDIT: KeenGraph works with Keen Dreams registered version perfectly as well as KDRPATCH, but I have one problem:

"Unrecognized version of KDREAMS.EXE"
Yeah, piece of cake!
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Re: Keen Dreams registered version modding?

Post by Levellass »

K1n9_Duk3 wrote: Sat Dec 16, 2017 21:26 I don't see why KDRPATCH should be unable to modify the executable.
Every version of *PATCH.EXE checks the executable's size, to ensure that it is not compressed in some manner. Removing this code causes the program to (try to) patch compressed executables with much furor. As such each version of *PATCH only works with a specific set of versions of Keen. This is why there are so many different programs when the basic functionality is so similar (nay identical) across various games.
What you really need, not what you think you ought to want.
User avatar
szemi
Vorticon Elite
Posts: 1722
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Re: Keen Dreams registered version modding?

Post by szemi »

In short: It is impossible to mod the registered version then?
Yeah, piece of cake!
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 781
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Keen Dreams registered version modding?

Post by K1n9_Duk3 »

I'd say impractical, but not impossible. And by that, I mean you'll have to either patch the executable directly or modify the KDRPATCH source code to add support for the version you want to modify. Either way, you'll need some advanced programming and/or disassembling skills to pull that off.

Is there any particular reason why you want to mod the registered version instead of one of the supported versions?
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
User avatar
szemi
Vorticon Elite
Posts: 1722
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Re: Keen Dreams registered version modding?

Post by szemi »

I mainly, definitely wanna improve my hungarian translation I made for the shareware version. Since the shareware hungarian translation is not as good as I expected, I wanna improve it for the registered version(for the latest). Because I can now accurately translate it. :)

Moreover, for making mods of the registered version. :)


So I very need help on the patches for the registered version!


As for the source code, I'm not that good to compile that.

And my "dream" has always been modding the registered version.



And it would be also a big advantage for those, who are beginners (who cannot compile the source code of the game).
Yeah, piece of cake!
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 781
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Keen Dreams registered version modding?

Post by K1n9_Duk3 »

You know, actually compiling the Keen Dreams source code should not be that much of a problem. But you'll need the right tools for that.

What you'll need in order to be able to compile the original DOS code is a copy of Borland C++ 3.1 (or similar) that also comes with Borland's Turbo Assembler (TASM). I suggest that you look around the Wold3D modding community for links and tutorials on how to set up the original Wolf3D source code and compile it. That's what I did way back in 2002 (or something). I didn't know anything about C/C++ programming, but I was still able to make some small changes (like translating the menu options into German).

For the most part, you should be able to take whatever tutorials you find on Wolf3D and just replace Wolf3D with Keen Dreams. The biggest difference would probably be that you'll have to convert some files (audio- map- & ega-headers, dicts, etc.) into .OBJ files using the MakeOBJ utility.

The biggest problem with this is that Borland C++ 3.1 and TASM were never officially released as freeware as far as I know. The version I've got is probably a pirated version that was uploaded by a member of the Wolf3D community. You might be able to use Turbo C++ 1.01 or Turbo C 2.01 instead (both of which were released as freeware) to compile the C-part of the source code, but you'd still need TASM to compile the ASM files.

If you don't want to go through all this trouble, then check out NY00123's Reflection Keen port of Keen Dreams. This will allow you to build a native Windows/Linux/whatever version of your mod. But getting all the required code libraries installed so that you can actually compile the code can actually be more complicated than getting the DOS version to compile...

I doubt that having an improved KDRPATCH would actually benefit beginners. If you are a beginner, you probably don't know much about the syntax of the patch utility. If you're going to have to learn a new language anyway, you might as well try to learn C, since you'll be able to use that in many more cases, not just for patching Keen executables. And since Keen Dreams is open source anyway, I think it will actually be a lot easier to modify the game this way (once you've got the compiler up and running). Things like replacing strings with longer strings, adding support for foreign (Hungarian) character sets and such are easy when compiling source code, but are difficult or impossible when patching existing code.

But there are also a few downsides. Since the original source was released under the GPL, you'll need to release the full source code of your project (read the damn license!). But basing your mod on the registered version also means that you could get in trouble when you release that mod. If I'm not mistaken, the registered version is copyrighted and still sold commercially. So you need to be very careful not to release any of the original files along with your mod. I have no idea how many aspects you want to modify, but I strongly suggest you leave at least the audio and/or map files unchanged (don't include them in the download) and tell people to use the files from the original version instead.
Last edited by K1n9_Duk3 on Sat Dec 23, 2017 23:40, edited 1 time in total.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
User avatar
szemi
Vorticon Elite
Posts: 1722
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Re: Keen Dreams registered version modding?

Post by szemi »

Well, I would only distribute the modificated files and nothing else. If I could use CKPATCH...
Yeah, piece of cake!
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 781
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Keen Dreams registered version modding?

Post by K1n9_Duk3 »

Have you tried asking NY00123 if he could add support for the other versions of Keen Dreams? I had a look at the CKPATCH source code and adding a new version should be easy, but I'm not sure if I would be able to compile the code. I've never worked with the combination of Pascal + ASM source code before.

Edit: If you change the executable as well as maps, sounds and graphics, you'll have no choice but to basically release a complete version of the game, that was my point.
Last edited by K1n9_Duk3 on Sat Dec 23, 2017 23:55, edited 1 time in total.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
User avatar
szemi
Vorticon Elite
Posts: 1722
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Re: Keen Dreams registered version modding?

Post by szemi »

Not yet, but it would be good.
Yeah, piece of cake!
Post Reply