********************************** Introduction to text patching: ********************************** This is a brief introduction allowing you to understand how to manipulate and alter the various patches used in this folder, which will allow you to totally alter [or eliminate] any and all of the text filled windows that appear during the gameplay of Keen 3. ****** Step 1: Window setup ****** Windows can be created in two main ways; each of their corners can be specified, or the windows width and height can be specified. In the first, which is more versitile; you can position the window anywhere on the screen. However most windows center themselves in the center of the screen and all you can do is specify their size. Window height is the number of lines of text it can hold; $09 $00 will make a window that can hold 9 lines of text for example Window width is the number of 8x8 'letters' [ANY font letters] that it can hold. So if we want to make a window of 4 lines, 28 characters wide we patch: %patch $0000 $04 $00 #Height %patch $0000 $1C $00 #Width Most windows are of this type. Other windows will be more complex, requiring 4 patches one for the top, bottom, left side, and right side of the window. Here the window width for example will be the right side value - the left side value. For our window above we migh patch: %patch $0000 $01 $00 #Window top %patch $0000 $01 $00 #Window left side %patch $0000 $05 $00 #Window bottom %patch $0000 $1D $00 #Window right side Exceptions: There are several exceptions to this; these are usually not 'real' windows. These may need their corners AND sides patched, as well as what tiles these are made of. Other windows center, but have a value saying what height they canter at. These exceptions are usually easy to understand. ****** Step 2: Where text is called from ****** The second thing about windows is that they contain text. This text is usually held somewhere in the executable and 'called' when it is needed. Thus for every line of text there will be a 4 digit value that tells the game where to look for the text it wants. This value is usually Text location - $17780; Thus a window looking for text at $1C7C7 will have the patch: %patch $0000 $A7 $2F #Text called from Here 2FA7 is the value we get from $1C7C7 - $17780 Some basic principles of this are that it doesn't matter what window uses what text; and the same text can be used twice or more. This means you can 'cut' text out of one window and 'paste' it into another. Also, if two windows use the same text, they will have the same value to find it. This is great news, since all you need to do is write whatever text you want, find where it is, and add that value to your window. Compliations: It is a simple matter to 'erase' a line by reducing its value by 1; the entire line will be deleted, not even leaving a blank space. Just because a window contains 5 values for text, doesn't mean it has to have 5 lines. This brings us to: ****** Step 3: Text itself ****** Text is often stored a long way from the window in plain little lines. A common piece of text could be: %patch $1C7C7 "Wheee! Zibble!" $0A $00 There are several things to notice; the first is that the text is in plain text form, thus easy to edit. You can in fact easily make a piece of text shorter, but not longer. If a piece of text is longer, some other piece must be made shorter, or destroyed entirely [and the window that uses it changed] This will require at least 3 patches instead of 1. The second thing is the $00 at the end. This tells the program to stop reading. All text strings must end with this, or the program will keep reading, and ruin your nice window. When your text is screwed up it will most often be because a $00 has been destroyed. The third thing is the $0A; this means 'go down a line' otherwise the next line will appear right after the previous one, all strung together, this can get messy. Most text strings will have a $0A also, but those that are the last line in a window will often not. Sometimes there are 2 $0A's, this means go down 2 lines, etc. However, a $0A can be anywhere in the text, this allows you to turn one line into two, or more just by splitting it up; our previous line can become 2: %patch $1C7C7 "Wheee!" $0A "Zibble!" $0A $00 Notice that both pieces of text are enclosed in "" You will often find, when patching that instead of the many lines in a window, it is mush easier and neater to have only 1 Thus you will need to 'blank' all the other lines and make the one line you use longer with $0A's So, a 3 line window may become a 1 line like this: #Before: %patch $0000 $A7 $2F #Text called from 1 %patch $0000 $B7 $2F #Text called from 2 %patch $0000 $C7 $2F #Text called from 3 %patch $1C7C7 "Wheee! Zibble!" $0A $00 %patch $1C7D7 "Wheee! Ziblle!" $0A $00 %patch $1C7E7 "Wheee! Zillle!" $0A $00 #After %patch $0000 $A7 $2F #Text called from 1 %patch $0000 $A6 $2F #Text called from 2 %patch $0000 $A6 $2F #Text called from 3 %patch $1C7C7 "Wheee! Zibble!" $0A "Wheee! Ziblle!" $0A "Wheee! Zillle!" $0A $00 You will notice a few things. First, the second patch has got rid of 2 $00's that are not needed anymore, this gives you two more spaces for your text. Second the last 2 lines have been blanked. This is done by giving them a value 1 LESS than the first line in the window. While it doesn't look like much has changed, the second patch is MUCH easier to change than the first; if you want to change where the text is read, you only have to change the first line instead of 3, if you want to add or delete text you can do so without having to shift where all 3 lines are read from finally there is some space freed up without all those $00's and that can add up. For these reasons I suggest you use this system when text patching. There are two disadvantages; the first is that CKPatch cannot patch too long pieces of text, this is easily overcome. The second is that now all the text is clumped together; if you want to shift some of it, you must now shift ALL of it, and it is quite possible you will have nowhere to put it. Hence all patches in this folder give each single line its value in the game. A final note; some text contains $0D's Usually you will not be patching these, but if you do leave the $0D's in place, this tells the game to overwrite the text when certain things are done, and can cause messy windows if removed. Any text characters can be used in windows, you can even put pictures in [see the help] and a mixture of white/grey backgrounded text. There is a lot of unused font tiles that you can use to make your windows more colorful and informative. ****** Step 4: Other stuff ****** Thats about all involved in patching; specific problems will usually be mentioned in the file dealing with the affected windows. On a few final note, you may find it useful just to utterly blank a window, this is easily done with a $C3 in the right place. You will find many patches that disable a window so it doesn't even appear or affect Keen. Other windows must be blanked by overwriting them. Some windows, especially those in conversations [Mort, end sequence] have another variable, how long the window stays onscreen, in 144ths of a second. You should make sure it stays long enough to be read, but not so long as to be boring. Time is counted AFTER the text has stopped writing. Now go patch!