TheDraw

From KeenWiki
Jump to navigation Jump to search

TheDraw
TheDraw.png
Developer(s)
Initial release
Development statusFinished
Programming languageTurbo Pascal, Assembly
PlatformDOS
Tool TypeText Editor
Engine(s)Keen:Vorticons, Keen:Galaxy
Homepagehttp://www.syaross.org/thedraw/
DownloadKeenScr (inlc. TheDraw v.4.63) newest
Mirror
TheDraw editing the final Keen 4 screen.

TheDraw is a text editor for MS DOS to create ANSI and animations as well as ASCII art.[1] This article contains information on how to use this tool with ModKeen and KeenScr to replace the final screen in Keen 4-6, as well as the title in the loading screen for those episodes. The tool can also be used to edit the final screen in Keen 1-3.

Setting up

Extract the contents of the file KeenScr to any folder. It includes the last version of TheDraw, without the other utilities that are not needed for our purposes.

In order to edit the final screen, you need to use ModKeen to extract it. For this example, I will use Keen 6. Extract the Galaxy Mod Kit in the same directory the Keen 6 files, then run the following two lines:

  • unlzexe keen6.exe
  • modkeen -export -episode=6

ModKeen will extract all the game's resources, but we are only interested in the file 6msc0000.bin, which you should copy to your KeenScr folder.

The file 6msc0000.bin will be exactly 4008 bytes long. Its structure is a 7-byte header, 4000 bytes of data, and the end of file marker.

  • Header: FD 00 B8 00 00 A0 0F
  • Data: 4000 bytes BSAVE format
  • EOF: 1A

You will need to extract the 4000 bytes of BSAVE data in order to edit them with TheDraw. That's what KeenScr will do.

Editing the final screen

Saving a edited Keen 6 screen.

KeenScr will strip the Header and EOF byte from the ?msc0000.bin files and load them in TheDraw, reattaching them afterwards. Simply run:

  • keenscr 6

And TheDraw will immediately start editing the screen, with the filename keenscr.bin.

Alt+H will display the help screen with all the commands that TheDraw supports; however, its basic use is extremely simple. Use the arrow keys to select where you want to enter text, then type it in. By default, it uses bright white color over black color; you can pick a color straight from the screen by placing the cursor over any character and pressing Alt+U, and it will use that color as you type.

You can use Alt+M to enter drawing mode, where you can use the cursor keys or the mouse to draw on the screen; you should enable Draw mode with the cursor in the place where you want to start drawing, as it will start immediately. Alt+F1 to Alt+F4 will give you different line styles for Draw mode.

Once you are done editing the screen, you can save it by pressing Alt+S. TheDraw will ask which format to save it in; press B to select Binary, and enter the filename keenscr.bin. It's important that you keep this filename (overwriting the existing one) as KeenScr will recreate the original ?msc0000.bin file with it. After you exit TheDraw and KeenScr notifies you that the file has been updated, you can import it back using ModKeen. The file keenscr.bin you edited will remain in the harddisk in case something went wrong, so you don't lose the edited screen.

Editing the loading screen

TheDraw editing the loading screens.

KeenScr includes the top lines of the loading screen for Keen 4-6 for easy editing; they are named ck?load.bin. If any of them is missing, you will get black space instead of the part of the loading screen for that episode, but everything else will work fine. Simply run:

  • keenscr LOAD

The program will create a combined keenscr.bin file with the data of all three files, allowing you to edit them all at once, then run TheDraw.

Make your modifications to the screen, and then save it as keenscr.bin overwriting the generated file. You must save it in Binary format when TheDraw asks.

Once you are done editing, exit TheDraw and KeenScr will load the screen you saved and write back the separate ck?load.bin files.

The file keenscr.bin will remain in the harddisk in case something went wrong, so you don't lose the edited screen.

In order to apply the screen to your mod, use one of the following lines in your patch file (they are all for v1.4)

  • %patchfile $1fe47 ck4load.bin
  • %patchfile $20cd7 ck5load.bin
  • %patchfile $1fca7 ck6load.bin

See Also