A tale of three programs... ModKeen2, TEDSetup and TED5

Utilities for editing Keen:Galaxy and Keen:Dreams levels.
Post Reply
User avatar
Shadow Master
Posts: 129
Joined: Fri Oct 20, 2006 3:14 pm
Location: Santiago, Chile
Contact:

A tale of three programs... ModKeen2, TEDSetup and TED5

Post by Shadow Master »

I (hopefully) discovered how to solve Xky's problem with ModKeen and TED5 this afternoon. Here's the methods you have to follow to make levels for a Keen4 mod using modified tiles and such:

This may work with Keen5 and Keen6 too, if so, reply here.

1. Export Keen4 data (after UnLZexe-ing KEEN4E.EXE, of course) with the command line:
modkeen -episode=4 -export
I recommend you to put a copy of MODKEEN.EXE in the same directory where you're working on. You might keep the exported data in a separate directory using the -bmpdir switch with ModKeen too, but I haven't tested it yet.
2. Modify stuff with your favourite graphics editor.
3. When you're ready to use TED5, be sure to copy the following files to the same directory where you keep the Keen4 exe: CK4PATCH.EXE, FIXMHEAD.EXE, TED5.EXE, TEDSETUP.EXE
4. Import the data with:
modkeen -episode=4 -import
5. Now, you must rename the file EGAHEAD.CK4 to something different (i.e. EGAHEAD.REN).
6. Run Andy's TEDSetup.
7. Now delete the EGAHEAD.CK4 file generated by TEDSetup and rename the file in step 4 to its original name (EGAHEAD.CK4).
8. Run TED5.

Next time you execute ModKeen with -import, you won't need to do all this because you should not need to run TEDSetup again, because you have to run it only once to create the files TED5 will work with. When you use TED5, those files are modified, and when you run the mod via CKPatch, the files are used instead of the builtin data. So, there's really no need to run TEDSetup more than once, unless something bad happens and the TEDSetup-generated files become corrupted. So, if you ever need to run TEDSetup again, only follow steps 4 to 8 again.

EDIT: now all the utilities required can be downloaded as a single .zip package here.

The files CKxPATCH.EXE, FIXMHEAD.EXE, TED5.EXE and TEDSETUP.EXE can be found in a single zip here. You might want to update the CKxPATCH.EXE files included with that zip using this package.
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

For those of you looking to use TED5 to help put together a Keen:Galaxy mod, this post in quite possibly the most important step of the modding process. Stickied!
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

Alright, so here's how the basic deal works:

You run TEDSetup once, and only once.

Import your new graphics with ModKeen as often as you want, to update your EGAHEAD.CK4. This is where TED5 will look for the graphics.

When you finish editing levels with TED5, you not only have to SAVE, but also CARMACIZE maps. You can quit without Carmacizing, but you will not be able to play your maps until you go back and make sure they're compressed.

Here's the important part: Our patch files need some work! Make sure your patch file has these three commands:

Code: Select all

%egahead EGAHEAD.CK4		#Change the graphics,
%ckmhead.obj ck4mhead.obj #and the map headers!
Make sure the number in the %ckmhead.obj command line is relevant to your episode! I'm doing a Keen4 mod, so I use 4. :)

Now, while you're editing maps with TED5, the GAMEMAPS.CKx file is going to be changing frequently--that's because that's the default place for TED5 to save to/from. Just work with it like that for now--you can pop in and out of game without anything extra in your patch file. HOWEVER, when you're ready to distribute your mod, you'll want to change things!

Rename your final GAMEMAPS.CKx to something different--just be sure to keep the filename 8 letters or shorter, to make DOS happy. In this case, I'll use MODMAPS.CK4.

Now, we need to update our patchfile to include:

Code: Select all

%gamemaps MODMAPS.ck4	#Change the level data
...You can do this in advance, as you're still playtesting, but keep in mind that every single time you update/change your levels with TED5, you'll need to make a copy of GAMEMAPS.CKx and rename it to your changed filename. That's why I recommend doing this last, when you are ready to distribute!

Chances are you're not going to keep the exact same ground/background/points layout for your tileset as the original. Personally, I can't imagine how those iD guys built maps with the tiles scattered about like that! So chances are you'll want to use the CK456tli and change things.

If that's the case, also be sure to include this in your patch file:

Code: Select all

%patchfile $249C2 MODTLI.tli	#Change the tile info.
Just be sure the name matches whatever you named your TLI file.

Hopefully that helps! Feel free to post if you have questions--you all have no idea how overjoyed I am that I got this working! :)
User avatar
Shadow Master
Posts: 129
Joined: Fri Oct 20, 2006 3:14 pm
Location: Santiago, Chile
Contact:

Post by Shadow Master »

I updated the ZIP file I provided. Replaced ModKeen 2.0.1 Kdreams Ed. with the original ModKeen 2.0.1. For some reason the Kdreams Ed. screws up my EGAGRAPH.CK4 file and never writes EGAHEAD.CK4 even if it already exists.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Wouldn't it be easier to run tedsetup first, *then* modkeen, whicj would automatically overwrite the 'old' EGAHEAD.CK4 file?

You could include a BAT file to do both steps automatically in that zip.


Also, CK4PATCH doesn't recognize the %ckmhead.obj comand
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

levellass wrote:Also, CK4PATCH doesn't recognize the %ckmhead.obj comand
Then you're using the old version of CK4Patch, and you need to download the new one.
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

levellass wrote:Wouldn't it be easier to run tedsetup first, *then* modkeen, whicj would automatically overwrite the 'old' EGAHEAD.CK4 file?
Yeah, that's what I did with my Keen 5 level pack - it was really easy. Now I can edit the graphics, run ModKeen, and run TED5/FIXMHEAD in whatever combinations I want :-)
User avatar
Shadow Master
Posts: 129
Joined: Fri Oct 20, 2006 3:14 pm
Location: Santiago, Chile
Contact:

Post by Shadow Master »

You should have shared the tip with us all, CK G.
Anyway, go ahead and fix my method for the common final user. I'm too busy with college stuff lately to do it myself.
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

A TALE OF THREE PROGRAMS : 2ND EDITION

Post by ckguy »

Okay, here's the new, latest mod development cycle. All of these directions are for editing Keen 4. Make the obvious changes for episodes 5 and 6.

Do The Following Only Once
  1. Unlzexe KEEN4E.EXE
  2. Run TEDSETUP
  3. Run LModKeen -episode=4 -export -bmpdir=bmps
  4. Create a patch file something like this: (Note that this is just a bare bones example, and a finished mod should have much more.)

    Code: Select all

    %ext ck4
    %version 1.4
    %maphead maphead.ck4
    %end
    
  5. Create a batch file to call CKPatch using the patch file.
Do The Following After Editing Graphics (or anything else in the EGAGRAPH file)
  1. Run LModKeen -episode=4 -import -bmpdir=bmps
  2. That's it
Do The Following After Making Changes To A Level And Before Playtesting It
  1. Save it in TED5 (press Alt-S)
  2. Do not carmackize the maps or quit TED5
  3. Run IC (or EModKeen, once it's released)
  4. Warp to the level in Keen.
Note that you can leave TED5 running throughout the editing/playtesting cycle. You can usually leave Keen running, although sometimes it will crash upon attempting to load a level. In this case, close it if it has locked up, and restart it.

Also note that FIXMHEAD is no longer needed, as TED5 is not doing the carmackization.

If anyone has any problems to report or suggestions to make regarding this post, please let me know! I expect it to see a revision at least when EModKeen is released.
Post Reply