Patch:Yorp Messages
Yorp messages are the text boxes that appear when Keen touches a Yorp statue in Keen 1. They provide Keen with hints or just random banter throughout the game. This page also deals with the Garg statue, which is a special case.
The window appears when Keen touches a specific tile type and vanishes when a key is pressed, along with the tile being transformed into another, inert tile.
Contents
%level.hint and CKPatch
CKPatch has a special command for dealing with Keen 1 level hints. it is %level.hint <n> [text] For example:
Patch: Keen 1 |
%level.hint 2 This is a hint message that spans multiple lines. |
To quote the CKPatch readme: Changes the text that the Yorp or Garg statue for level <n> gives you. It does not include the 'Press ENTER' footer at the bottom. <n> may only be 2,6,9,10,11,12 or 15. Lines of text are separated by putting carriage returns in the text. The limit on the message is 20 characters per line, and a maximum of 7 lines for all levels except for level 11 (4 lines) and level 15 (6 lines). The message is automatically padded with spaces/blank lines.
This somewhat inelegant approach is quite simple and easy to use, as it does not require much knowledge of text patches, but also quite limited, keeping the patcher to a strict formula for messages.
Statue tiles
The tile property 'Yorp message' causes the Yorp messages to appear and the tile to transform. If the 'starting tile' is larger than a certain value (in the tileset) then another tile, the Garg replacement tile will replace it. If the replacing tile also has the Yorp message property then it too will bring up the Yorp message and so on, causing annoying loops.
Patch: Keen 1 |
|
Level 1 can have a message
By default any level above and including 2 can have a message. This patch alters things so that level 1 can also have a message. As a side effect it 'drops' all messages down one level. (So level 2's message will appear in level 1, level 6's in level 5 and so on.) This is compatible with all other patches on this page.
Patch: Keen 1 |
|
Message completes level
This patch wins the level when the message is played. Note that this patch is potentially unstable and may cause unforeseen problems if used.
Patch: Keen 1 |
|
Message window
This is the window that displays all he messages, including the text.
What messages appear in each level
This patch shows the default layout of messages in the game. Like several things in Keen it is a 'pointer list'; that is the game reads a value then goes to that place in the code where there is a list. It then reads the value off that list corresponding to the level Keen is currently in then runs the code at that location.
As things are set up here it not possible to make new messages, but it is possible to rearrange what replies are shown on what levels. The value $26ABW is 'blank' meaning no text (Except the press any key line.) will appear in the message window. It can immediately be seen that there are 7 unique messages.
Note that by default entries exist only for the first 15 levels which can be a problem if the 32 levels patch is used. Swapping one value with another will swap what level a given message is shown in, and one message can be used in multiple levels. It is also possible to extend the list, but in order to do this more space for the list will have to be found.
Patch: Keen 1 |
|
Message window size and text
These patches alter the size of the message window and what text is displayed in it. patch:Text patches may be valuable when using these. Notice that each line in the window has its own text call, this is inefficient and annoying. (See section below.)
Patch: Keen 1 |
|
Message text appears letter-by-letter
This patch changes the messages so that the text appears not line-by-line but letter-by-letter, as it does in the ending sequence text boxes. These patches are incompatible with CKPatch's default %level.hint commands, the message must be patched and parsed directly.
The following patches use the maximum line length, extra spaces at the end of lines can be deleted with no ill effect.
Patch: Keen 1 |
|
Dismiss window with any key
This patch allows the player to dismiss the message window by pressing any key instead of having to press enter.
Patch: Keen 1 |
|
Simplifying text patching
If a patcher wishes to make text patching simpler, but not as simple as the %level.hint patch above, an easy way is to set the text calls for all but the first line of a window to $202FW, thus blanking them.
This has a number of advantages; firstly, if the patcher wishes to change the text in a window they need only change the text itself instead of having to recalculate the locations of every line of text in the window. (Notice how in our above example the several separate lines of text in the window are joined together into a single message.) It also frees up some text space since the text doesn't have to be so padded. (This can double the length of some messages.)
Patch: Keen 1 |
|