patch other important files

CKPatch is a set of patching tools for all Keen episodes.
Post Reply
drache
Posts: 6
Joined: Wed Nov 25, 2009 5:30 pm

patch other important files

Post by drache »

Dear CKPatch Development Team,

I'm a very great fan of of the 'Commander Keen' games and all the mods wich are created by the fans and to use all mods I sure - use your popular CKPatch.

But I have a question to you which I can't figure out - even after I read all your included readme and faq files twice.

Currently I already set up all the 'patch.pat' files described inside your readme file for every mod I play with 'Commander Keen: Episode 1' and patch the following files:
  • LEVELS*.CK1
  • EGAHEAD.CK1
  • EGALATCH.CK1
  • EGASPRIT.CK1
But how can I use your favourite CKPatch, to patch the following files correctly with 'Commander Keen: Vorticon Series (Keen I, II, III Games)':
  • ENDTEXT.CK1
  • FINALE.CK1
  • HELPTEXT.CK1
  • PREVIEW2.CK1
  • PREVIEW3.CK1
  • PREVIEWS.CK1
  • STORYTXT.CK1
Please help me.

Best regards
Drache
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

These patches right here:

FOR KEEN1:

Code: Select all

%patch $14D9C "LEVEL0"
%patch $14DA3 "LEVEL"
%patch $14DD4 "KEENSCRN.PIC" #Screenshot file
%patch $14F15 "CK1" #ending of filenames
%patch $1506B "SOUNDS"
%patch $15932 "SCORES" #scores loaded as
%patch $15925 "PREVIEWS"
%patch $15918 "STORYTXT"
%patch $1590B "ENDTEXT"
%patch $158FE "HELPTEXT"
%patch $158D4 "EGASPRIT"
%patch $158CA "EGALATCH"
%patch $158C1 "EGAHEAD" 
%patch $15B06 "SCORES" #scores saved as
%patch $16138 "SAVED" #load game
%patch $16145 "SAVED" #save game
%patch $16166 "PREVIEW2.CK1"
%patch $16173 "PREVIEW3.CK1"
%patch $15CB2 "FINALE.CK1"
%patch $1581E "CTLPANEL" #load settings as
%patch $1582A "CTLPANEL" #save settings as
FOR KEEN2:

Code: Select all

%patch $19874 "LEVEL0" #map
%patch $1987B "LEVEL" #levels
%patch $198AC "KEENSCRN.PIC" #Screenshot file
%patch $19A07 "CK2" #ending of filenames
%patch $1A4CA "SCORES" #scores loaded as
%patch $1A4BD "PREVIEWS" #Invalid
%patch $1A4B0 "STORYTXT" #Invalid
%patch $1A4A3 "ENDTEXT" #Invalid
%patch $1A496 "HELPTEXT" #Invalid
%patch $19ECB "EGASPRIT"
%patch $19EC1 "EGALATCH"
%patch $19EB8 "EGAHEAD" 
%patch $1A2EC "finale.ck2" 
%patch $1A515 "SCORES" #scores saved as
%patch $1A90C "SAVED" #load game
%patch $1A919 "SAVED" #save game
%patch $19EA4 "CTLPANEL" #load settings as
%patch $19EAE "CTLPANEL" #save settings as
FOR KEEN3:

Code: Select all

%patch $1BFFD "DEMO" $00 "." #unused
%patch $1C004 "DEMO" $00 "." #unused
%patch $1BA4C "LEVEL0"
%patch $1BA53 "LEVEL"
%patch $1BA84 "KEENSCRN.PIC" #Screenshot file
%patch $1BA15 "CK3" #ending of filenames
%patch $1C5A4 "SCORES" #scores loaded as
%patch $1C597 "PREVIEWS"
%patch $1C58A "STORYTXT"
%patch $1C57D "ENDTEXT"
%patch $1C570 "HELPTEXT"
%patch $1C067 "EGASPRIT"
%patch $1C05D "EGALATCH"
%patch $1C054 "EGAHEAD" 
%patch $1C657 "SCORES" #scores saved as
%patch $1CA28 "SAVED?." #load game
%patch $1CA35 "SAVED?." #save game
%patch $1C4FC "finale.ck3"
%patch $1C040 "CTLPANEL" #load settings as
%patch $1C04A "CTLPANEL" #save settings as
Hope this helps,
--FLEEXY--
drache
Posts: 6
Joined: Wed Nov 25, 2009 5:30 pm

thanks and idea

Post by drache »

Thanks for your fast response Fleexy,

all is working very good with your posted code.

It would be great if this code will be inserted into the readme and document files of CKPatch to help all other keeners out there.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Check the Patch Index, that's where most of the community's patches are kept in one place. The problem is nothing's been done with CKPatch for years, and we didn't know these things when it was written.
drache
Posts: 6
Joined: Wed Nov 25, 2009 5:30 pm

Post by drache »

Dear Fleexy,

today a new post with a new problem!

Please excuse my last post but I started the wrong executable in the wrong directory and thought that everything went fine, but after I found out my mistake I can only conclude that none of your Codes will work for me so I need your help again.

To support some more informations I will list all the software and tools versions I use, the patch.pat file content and my files and folder tree. Perhaps this will help.

But perhaps I need to say that I want to use the CKPatch with the "Commander Keen: Episode X" and still want to play "Commander Keen: Episode 1 Marooned on Mars" - while using only one KEEN1.EXE excecutable file, cause of the small capacity of my portable usb stick and all this will run under DOSBox Portable Emulation.

USED SOFTWARE AND TOOLS
  • "Commander Keen: Episode 1 Marooned on Mars" Version 1.31 (from CloneKeenPlus)
  • "Commander Keen: Episode X" Version [full] 2002-06-30
  • CKPatch Version 0.11.0 Beta
  • DOSBox Portable Version 0.73
PATCH.PAT FILE CONTENT

Code: Select all

%ext ck1
%level.dir .
%egahead EGAHEAD.CK1
%egasprit EGASPRIT.CK1
%egalatch EGALATCH.CK1
%patch $14F15 "CK1"
%patch $15918 "STORYTXT"
%patch $1590B "ENDTEXT"
%patch $158FE "HELPTEXT"
# %patch $15925 "PREVIEWS" disabled (enable when content is done)
# %patch $16166 "PREVIEW2" disabled (enable when image is done)
# %patch $16173 "PREVIEW3" disabled (enable when image is done)
%patch $15CB2 "FINALE"

%level.hint 2
Mortimer McMire:

...
... the rest from the "Commander Keen: Episode X" patch.pat content (unchanged)
...

%end
FILES AND FOLDER TREE

Code: Select all

D:\DOSBOXPORTABLE\DATA\KEEN1 ("Commander Keen: Episode 1" main directory)
	|
	+- MODS (vorticon modifications subdirectory)
	|	|
	|	+- KEEN_X ("Commander Keen: Episode X" subdirectory)
	|		|
	|		+ EGAHEAD.CK1
	|		+ EGALATCH.CK1
	|		+ EGASPRIT.CK1
	|		+ ENDTEXT.CK1
	|		+ FINALE.CK1
	|		+ HELPTEXT.CK1
	|		+ LEVEL01.CK1
	|		+ LEVEL02.CK1
	|		+ LEVEL03.CK1
	|		+ LEVEL04.CK1
	|		+ LEVEL05.CK1
	|		+ LEVEL06.CK1
	|		+ LEVEL07.CK1
	|		+ LEVEL08.CK1
	|		+ LEVEL09.CK1
	|		+ LEVEL10.CK1
	|		+ LEVEL11.CK1
	|		+ LEVEL12.CK1
	|		+ LEVEL13.CK1
	|		+ LEVEL14.CK1
	|		+ LEVEL15.CK1
	|		+ LEVEL16.CK1
	|		+ LEVEL22.CK1
	|		+ LEVEL29.CK1
	|		+ LEVEL80.CK1
	|		+ LEVEL81.CK1
	|		+ LEVEL90.CK1
	|		+ PATCH.PAT
	|		+ STORYTXT.CK1
	|		+ _keen_x_readme.txt
	|
	+ CK1PATCH.EXE
	+ CTLPANEL.CK1
	+ EGAHEAD.CK1
	+ EGALATCH.CK1
	+ EGASPRIT.CK1
	+ ENDTEXT.CK1
	+ FINALE.CK1
	+ HELPTEXT.CK1
	+ KEEN1.EXE
	+ LEVEL01.CK1
	+ LEVEL02.CK1
	+ LEVEL03.CK1
	+ LEVEL04.CK1
	+ LEVEL05.CK1
	+ LEVEL06.CK1
	+ LEVEL07.CK1
	+ LEVEL08.CK1
	+ LEVEL09.CK1
	+ LEVEL10.CK1
	+ LEVEL11.CK1
	+ LEVEL12.CK1
	+ LEVEL13.CK1
	+ LEVEL14.CK1
	+ LEVEL15.CK1
	+ LEVEL16.CK1
	+ LEVEL80.CK1
	+ LEVEL81.CK1
	+ LEVEL90.CK1
	+ ORDER.FRM
	+ PREVIEW2.CK1
	+ PREVIEW3.CK1
	+ PREVIEWS.CK1
	+ SCORES.CK1
	+ SOUNDS.CK1
	+ STORYTXT.CK1
	+ VENDOR.DOC
RUNNING COMMAND

Code: Select all

D:\DOSBOXPORTABLE\DATA\KEEN1\CK1PATCH.EXE MODS\KEEN_X
So I think this will perhaps help a little more. If you have more questions, ideas, comments I will answer them as soon as possible.

Best regards
User avatar
Tulip
Posts: 394
Joined: Mon Jun 16, 2008 2:40 pm
Location: Heidelberg, Germany
Contact:

Post by Tulip »

There are two things I don't get here:

Why did you add all those file patches?

None of the names have been changed. You only need those patches when you want to change the file name (say the story should be read from mystory.ck1 instead of the default storytxt.ck1)

What's up with that running command?

I've never seen a format where a directory is specified after ck1patch. Shouldn't there be patch.pat or somethin like that?

Apart from that KeenX uses the same Keen1- 1.31 base, as do all mods to my knowledge. There should be no difference between those.
Draik
Posts: 117
Joined: Sat Jul 26, 2008 8:52 am
Contact:

Post by Draik »

I think he intends to use CKPatch to patch all of the Keen X things in at runtime. Instead of uing a subdirectory, simply changing the first letter of each filename to X and updating the patch appropriately would work better.

And specifying a directory after CKPatch tells it to search that directory for the file PATCH.PAT. Not often used however. I quite like it though, instead of typing "CK4PATCH MYPATCH.PAT" I can just use "CK4PATCH ."
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

Let's have a lookzorz, shall we?

First, try THIS command:

D:\DOSBOX~1\DATA\KEEN1\MODS\KEEN_X\CK1PATCH.EXE [whateveryourpatfileiscalled].pat

And for the code itself, it is correct, I have checked it myself. However, the KEEN1.EXE absolutely MUST be UNLZEXE'd or UNP'd. I do not know why it has to be one of those, but it must. Hope that helps!
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

It must be decompressed before running because:

1.) It's much easier to understand the decompressed code and-
2.) The default Keenx.exe is basically a self-extracting zip file; it decompresses the executable then passes control over to it. CKPatch cannot do that, instead patching the executable into memory and passing control over to it. If the exe was compressed it would need to be able to decompress the file first, something that is time consuming to code. (And no, you can't get the exe to decompress itself THEN patch it, since as noted, after decompression control is passed to the decompressed file only.)

Whew!
drache
Posts: 6
Joined: Wed Nov 25, 2009 5:30 pm

clear up some questions, DosBoxPortable archive

Post by drache »

Dear CKPatch Development Team,

as first big thanks to Fleexy, levelass, Tulip and Draik for your comments, help and ideas to solve my CKPatch problem.

To clear up some questions I'll try to answer them:

"Why did you add all those file patches?" posted by Tulip

As you've read in my above post I want to use the CK1Patch for the use of the mod "Commander Keen: Episode X" - so I add all those file patches, cause the mod need all those files to view the changed content. The file name were still the old names as original given in the "Commander Keen: Episode X" mod archive - so only the folder and the content of each file is different. To use this mod full with CK1PATCH you need to tell CK1PATCH which files you need for your mod.


"What's up with that running command?" posted by Tulip

As Draik alread explained I want to use the CK1Patch running command - you only need to explain CK1Patch the folder and it simply search for the corresponding PATCH.PAT file inside this folder and makes the folder to the base directory of the mod.


"Instead of using a subdirectory, simply changing the first letter of each filename to X and updating the patch appropriately would work better." posted by Draik

Can you explain this process a little bit closer. I don't understood what you mean by "updating the patch appropriately".


"First, try THIS command: D:\DOSBOX~1\DATA\KEEN1\MODS\KEEN_X\CK1PATCH.EXE [whateveryourpatfileiscalled].pat" posted by Fleexy

I have the problem that my CK1PATCH executable is located in the KEEN1 directory. So the CK1PATCH uses the KEEN1.EXE from this folder. After I UNLZEXE the KEEN1.EXE and copy the CK1PATCH.EXE and the KEEN1.EXE into the KEEN_X folder a message appear: "missing text file".


So thanks again four your help and big thanks to Fleexy for checking my code.


DosBoxPortable archive

To give more support I've uploaded my DosBoxPortable archive - which includes all the files (KEEN1, KEEN_X mod, PATCH.PAT, CK1PATCH, UNLZEXE, running command) I use.

Perhaps with my archive and the files included you can fix the problem a little better. All the Keen files are located inside the DATA directory. You can simply run both _start_*.bat files to run either KEEN1 or KEEN_X mod.

The folder tree is the same as already explained in my 5th post of this topic.

Download link: [url]http://tabaluga_fx.oos.cc/web/DOSBoxPortable.7z[/url] (1,8 MB)
(archive packed with 7-Zip. You can download 7-Zip from http://sourceforge.net/projects/sevenzip/ (991,0 KB))

Best regards
drache
Posts: 6
Joined: Wed Nov 25, 2009 5:30 pm

14 days are over

Post by drache »

14 days are over and no reply since my last post :-(

I'll still hope that someone could help me out with my problem and I'm waiting for your helping comments, advises and suggestions.

Best regards
drache
lemm
Posts: 554
Joined: Sun Jul 05, 2009 12:32 pm

Re: clear up some questions, DosBoxPortable archive

Post by lemm »

drache wrote: I have the problem that my CK1PATCH executable is located in the KEEN1 directory. So the CK1PATCH uses the KEEN1.EXE from this folder. After I UNLZEXE the KEEN1.EXE and copy the CK1PATCH.EXE and the KEEN1.EXE into the KEEN_X folder a message appear: "missing text file".
"Missing a text file!" is produced by keen1.exe, not ckpatch.

I downloaded your files and it looks like you forgot to put sounds.ck1, help.ck1, and a few other files into KEEN_X directory. I copied the missing files into that directory and it worked.
Post Reply