I'm working on a new keen 1-3 modding tutorial
Posted: Fri Apr 04, 2025 16:51
Introduction:
Hello Keeners,
For my next keen project I am planning to do a minimalist keen1 mod. a very short and basic level pack with some small graphical changes. But I am also planning to experiment a bit with patching. Now my plan is while I am doing this to also write a tutorial for keen 1-3 modding. Now don't get me wrong, a lot of things have been documented fairly well already. But I still think some things might be overwhelming for beginners and I may be able to give some tips that aren't documented yet. I will probably also skip some stuff and simply refer to existing tutorials instead. For those who already know how to mod this might not be that interesting (at least initially). And I know there might not actually be that many new people discovering keen. I guess I am doing this for potential newcomers but also to practice my writing skills I guess. Or to document these things for my own use later. But hopefully when I get to the part where I will show examples of applying the existing patches and presenting them in a levelpack/mod this will interest some people that also enjoy keen modding and we can exchange ideas. I also plan to share different versions of my project as I am editing it. That way someone can see from the beginning what everything does and what was added for what and so on.
Chapter 1. extracting the graphics and level editing
Level editor: Mindbelt
The basis in keen modding is level editing. So if you are planning to make a keen mod it makes sense to first make a few levels. The level editor I recommend using is Mindbelt by CK Guy. Now I know there have been a few other level editors. I can't say for sure if they are or aren't better than Mindbelt but Mindbelt can do pretty much everything you would want for modding keen 1-3 so I think it is a good place to start.
The only noteworthy flaw if you can call it that is that you need to extract the keen graphics in order to use it. Of course if you are planning to mod the graphics you need to do this anyway, so it is not really a downside. However it means you have to do this before you can level edit. This is not very difficult but it can be slightly intimidating if you haven't done it before.
Graphics editor: Modkeen
So the first thing we'll do is use Modkeen to extract the graphics from keen1. First you need to acquire a copy of keen1. Obviously you will want to keep a backup of this before you start to edit it. Since you need Dosbox to run keen you probably want to put it in a directory that is easily accessible. For example make a folder c:\games\keen and put a copy of keen1 and rename it to keen1mod or something of your choosing. The only reason it matters where you put it is because you will have to type the directory every time you run Dosbox.
Take a look at the files in your copy of keen 1. If your version includes any files except keen1.exe that don't have the .ck1 extension feel free to delete them because you don't need them. And you will probably be adding extra files in this same folder as you continue modding so get rid of any junk files that may distract you.
Now acquire Modkeen from the keen wiki. Put modkeen.exe together with the rest of the game files. Now to run Modkeen to extract the graphics. The Modkeen help file and the tutorial on the keen wiki instruct you to use command prompt.
However if you are running a 64 bit version of windows it will not run. The solution is to run Modkeen through Dosbox just like how you run the game itself. There is also another reason to do it this way.
Open Dosbox and type: mount c c:\games\keen\keen1mod. Then run Modkeen (since we put modkeen.exe in the same map with the rest of the game).
Okay but we are not ready yet. to run Modkeen we need to type in a few commands to specify what we want. In fact if we only run modkeen.exe directly the program will specify that we need to give additional commands.
Now before we go on I should note that even after we have figured out everything we need to type. It is slightly inconvenient to type these specifications every time we need to run Modkeen. Now we only need to export the graphics one time in theory but even so there is an easier way to do this and also importing the graphics after you have edited them, that you may want to repeat many times during a project. and importing works very similar. And there is another reason you might want to automate the export command also.
The command we would have to type to export the graphics is:
modkeen -export -episode=1 -bmpdir="GRAPHICS"
There are three variables here. first typing -export specifies that we want to export the graphics rather than import. -episode=1 specifies that we are looking for keen 1 files. and -bmpdir="GRAPHICS" specifies in what folder we want the graphics files that we exported to be copied to.
Now in order to avoid having to type this whole string of text every time we have to use Modkeen I think it can be very beneficial to create a .bat file. Later if you want to use patching for your mod you will also have to make a .bat file to run keen. So why not make a .bat file to run Modkeen?
Open a notepad and copy on the first line the command we would otherwise have to type:
modkeen -export -episode=1 -bmpdir="GRAPHICS"
Then use save file as and save it as export1.bat. Take note that you have to specify the "save as type" option as "all files". Otherwise windows will ignore that you intended it to be saved as a .bat type file and will make it export1.bat.txt (a text file).
make sure that you put your .bat file with the rest of your keen files
Now go back to Dosbox and go to your game. You can now run the .bat file by typing its name "export1" and it will run by running Modkeen in turn with the specified commands
CWSDPMI.exe
Now running Modkeen with these commands (with a .bat or manually) Modkeen will tell us that we need the file CWSDPMI.exe to run Modkeen. So that is what we must do. Download this on the keen wiki or somewhere else and put it together with the rest of the game files.
Now there is one more error that can occur. Modkeen will not be able to open the GRAPHICS folder if it doesn't exist yet. so before you run Modkeen make an (empty) folder within the folder of the game. (I think you can also put a command in your .bat file to create the folder on your current directory but I don't know how)
( c:\games\keen\keen1mod\GRAPHICS)
Now if you have done these things and you run the "export1.bat" Modkeen should export all the game's graphics. This means you can now use the level editor Mindbelt and edit levels since it needs these files to function.
But first I should also explain that you can use Modkeen the same way to import the graphics again after you edited them. It goes much the same way. But we should now make a second .bat file for importing the graphics.
Now open the .bat file you already made export.bat in Notepad. Note that you can't just double click a .bat file in windows to open it because then windows will attempt to run it. So open Notepad some other way and choose "open" in the options. You have to specify that you are looking for any file type (and not just txt) or you will only be able to see .txt files. open export.bat. Alternatively if you right click a .bat and click edit this should also open it.
Now change:
modkeen -export -episode=1 -bmpdir="GRAPHICS"
to
modkeen -import -episode=1 -bmpdir="GRAPHICS"
And save it as import1.bat (remember to specify file type to all files)
Now the reason I suggest naming it export1 and import1 is because you may want to use these same bat files to use on keen 2 and 3. Just change the episode number. You may want to be able to distinguish for what episode your .bat files work if you make multiple versions for different episodes.
Now that you know how to export the graphics of keen1. Note that you can use the exact same method to export the graphics of any (keen1) mod. copy to any keen1 mod folder:
the export1.bat file
modkeen.exe
CWSDPMI
an (empty) "GRAPHICS" folder
and run export1 in dosbox. You can then borrow graphics from other mods if you don't want to make your own or simply look at how they have done certain things. Or even use the graphics to make a levelpack specifically for that mod.
The first version of this project will have all the things described as in this chapter. That means there are no modifications yet but a folder with the graphics is included and a means to import and export the graphics with a .bat file
mod001
Hello Keeners,
For my next keen project I am planning to do a minimalist keen1 mod. a very short and basic level pack with some small graphical changes. But I am also planning to experiment a bit with patching. Now my plan is while I am doing this to also write a tutorial for keen 1-3 modding. Now don't get me wrong, a lot of things have been documented fairly well already. But I still think some things might be overwhelming for beginners and I may be able to give some tips that aren't documented yet. I will probably also skip some stuff and simply refer to existing tutorials instead. For those who already know how to mod this might not be that interesting (at least initially). And I know there might not actually be that many new people discovering keen. I guess I am doing this for potential newcomers but also to practice my writing skills I guess. Or to document these things for my own use later. But hopefully when I get to the part where I will show examples of applying the existing patches and presenting them in a levelpack/mod this will interest some people that also enjoy keen modding and we can exchange ideas. I also plan to share different versions of my project as I am editing it. That way someone can see from the beginning what everything does and what was added for what and so on.
Chapter 1. extracting the graphics and level editing
Level editor: Mindbelt
The basis in keen modding is level editing. So if you are planning to make a keen mod it makes sense to first make a few levels. The level editor I recommend using is Mindbelt by CK Guy. Now I know there have been a few other level editors. I can't say for sure if they are or aren't better than Mindbelt but Mindbelt can do pretty much everything you would want for modding keen 1-3 so I think it is a good place to start.
The only noteworthy flaw if you can call it that is that you need to extract the keen graphics in order to use it. Of course if you are planning to mod the graphics you need to do this anyway, so it is not really a downside. However it means you have to do this before you can level edit. This is not very difficult but it can be slightly intimidating if you haven't done it before.
Graphics editor: Modkeen
So the first thing we'll do is use Modkeen to extract the graphics from keen1. First you need to acquire a copy of keen1. Obviously you will want to keep a backup of this before you start to edit it. Since you need Dosbox to run keen you probably want to put it in a directory that is easily accessible. For example make a folder c:\games\keen and put a copy of keen1 and rename it to keen1mod or something of your choosing. The only reason it matters where you put it is because you will have to type the directory every time you run Dosbox.
Take a look at the files in your copy of keen 1. If your version includes any files except keen1.exe that don't have the .ck1 extension feel free to delete them because you don't need them. And you will probably be adding extra files in this same folder as you continue modding so get rid of any junk files that may distract you.
Now acquire Modkeen from the keen wiki. Put modkeen.exe together with the rest of the game files. Now to run Modkeen to extract the graphics. The Modkeen help file and the tutorial on the keen wiki instruct you to use command prompt.
However if you are running a 64 bit version of windows it will not run. The solution is to run Modkeen through Dosbox just like how you run the game itself. There is also another reason to do it this way.
Open Dosbox and type: mount c c:\games\keen\keen1mod. Then run Modkeen (since we put modkeen.exe in the same map with the rest of the game).
Okay but we are not ready yet. to run Modkeen we need to type in a few commands to specify what we want. In fact if we only run modkeen.exe directly the program will specify that we need to give additional commands.
Now before we go on I should note that even after we have figured out everything we need to type. It is slightly inconvenient to type these specifications every time we need to run Modkeen. Now we only need to export the graphics one time in theory but even so there is an easier way to do this and also importing the graphics after you have edited them, that you may want to repeat many times during a project. and importing works very similar. And there is another reason you might want to automate the export command also.
The command we would have to type to export the graphics is:
modkeen -export -episode=1 -bmpdir="GRAPHICS"
There are three variables here. first typing -export specifies that we want to export the graphics rather than import. -episode=1 specifies that we are looking for keen 1 files. and -bmpdir="GRAPHICS" specifies in what folder we want the graphics files that we exported to be copied to.
Now in order to avoid having to type this whole string of text every time we have to use Modkeen I think it can be very beneficial to create a .bat file. Later if you want to use patching for your mod you will also have to make a .bat file to run keen. So why not make a .bat file to run Modkeen?
Open a notepad and copy on the first line the command we would otherwise have to type:
modkeen -export -episode=1 -bmpdir="GRAPHICS"
Then use save file as and save it as export1.bat. Take note that you have to specify the "save as type" option as "all files". Otherwise windows will ignore that you intended it to be saved as a .bat type file and will make it export1.bat.txt (a text file).
make sure that you put your .bat file with the rest of your keen files
Now go back to Dosbox and go to your game. You can now run the .bat file by typing its name "export1" and it will run by running Modkeen in turn with the specified commands
CWSDPMI.exe
Now running Modkeen with these commands (with a .bat or manually) Modkeen will tell us that we need the file CWSDPMI.exe to run Modkeen. So that is what we must do. Download this on the keen wiki or somewhere else and put it together with the rest of the game files.
Now there is one more error that can occur. Modkeen will not be able to open the GRAPHICS folder if it doesn't exist yet. so before you run Modkeen make an (empty) folder within the folder of the game. (I think you can also put a command in your .bat file to create the folder on your current directory but I don't know how)
( c:\games\keen\keen1mod\GRAPHICS)
Now if you have done these things and you run the "export1.bat" Modkeen should export all the game's graphics. This means you can now use the level editor Mindbelt and edit levels since it needs these files to function.
But first I should also explain that you can use Modkeen the same way to import the graphics again after you edited them. It goes much the same way. But we should now make a second .bat file for importing the graphics.
Now open the .bat file you already made export.bat in Notepad. Note that you can't just double click a .bat file in windows to open it because then windows will attempt to run it. So open Notepad some other way and choose "open" in the options. You have to specify that you are looking for any file type (and not just txt) or you will only be able to see .txt files. open export.bat. Alternatively if you right click a .bat and click edit this should also open it.
Now change:
modkeen -export -episode=1 -bmpdir="GRAPHICS"
to
modkeen -import -episode=1 -bmpdir="GRAPHICS"
And save it as import1.bat (remember to specify file type to all files)
Now the reason I suggest naming it export1 and import1 is because you may want to use these same bat files to use on keen 2 and 3. Just change the episode number. You may want to be able to distinguish for what episode your .bat files work if you make multiple versions for different episodes.
Now that you know how to export the graphics of keen1. Note that you can use the exact same method to export the graphics of any (keen1) mod. copy to any keen1 mod folder:
the export1.bat file
modkeen.exe
CWSDPMI
an (empty) "GRAPHICS" folder
and run export1 in dosbox. You can then borrow graphics from other mods if you don't want to make your own or simply look at how they have done certain things. Or even use the graphics to make a levelpack specifically for that mod.
The first version of this project will have all the things described as in this chapter. That means there are no modifications yet but a folder with the graphics is included and a means to import and export the graphics with a .bat file
mod001