Yorp and Garg messages: UPDATE
Yorp and Garg messages: UPDATE
The tile the yourps [and gargs] statue eye becomes after Keen gets a message.
#Change tile yorp message head becomes
%patch $455E $3B $01
#And Garg
%patch $4547 B2 $01
EDIT: Made a mistaike in the Garg offset.
Enjoy.
#Change tile yorp message head becomes
%patch $455E $3B $01
#And Garg
%patch $4547 B2 $01
EDIT: Made a mistaike in the Garg offset.
Enjoy.
Last edited by levellord on Sat May 27, 2006 3:55 pm, edited 1 time in total.
And now two more patches I'm sure someone will like; now you can exit the level right after giving the player a message.
Enjoy.
Code: Select all
#Garg message completes level
%patch $454A $90
#Yorp message completes level
%patch $4561 $90
Drool!!!
Holy!!!
You can use this to make a Keen4 mod out of Keen1; you make the statues into orcal dudes!!!
Sweetness!!!
You can use this to make a Keen4 mod out of Keen1; you make the statues into orcal dudes!!!
Sweetness!!!
Now, a while back I posted the text in proper form, i.e %patch da-da-da because that allowed someone to see the line length and thus make optimal use of the avalible space. I want that topic deleted, it is outdated. I have, after trying to fit a big word into the yorp messages found a way to edit where the text is read from, simalar to my menu patch earlier:
This means a lot, firstly, Yorp and Garg messages can be *any* length you want, indeed I can make them storytxt length if you ask. Secondly it doesn't matter how many lines each message has, one could have 3, the next 15, you decide. Here is a patch of the first two windows of my mod Djaser translated:
Notice the first window has each line patched seperately with just the offsets changed. In the second window however only the first line is used the others are redirected to $92 $20, which is blank. This means I only need one patch for the whole window text, just like the old %level.hint command. In its enitrety, these patches saved me a total of 262 characters! [Enough for an additional two messages]
Code: Select all
#Yorp mesage window height in lines of text
%patch $2508 $0A $00
#Yorp mesage window width in letters
%patch $2508 $15 $00
#All text reading values are from $13050
#e.g at $252B; $2030 + $13050 = $15080, so the first line text is from $15080
#Level 2 hint window
%patch $252B $30 $20 #First line
%patch $2534 $46 $20 #Second line
%patch $253D $5C $20 #Third
%patch $2546 $72 $20 #4th
%patch $254F $88 $20 #5th
%patch $2558 $9E $20 #6th
%patch $2561 $B4 $20 #7th
#Level 6 window
%patch $2558 $CA $20 #1st
%patch $2570 $E0 $20 #2nd
%patch $2579 $F6 $20 #3rd
%patch $2582 $0C $21 #4th
%patch $258B $21 $21 #5th
%patch $2594 $38 $21 #6th
%patch $259D $4E $21 #7th
#Level 9 window
%patch $25A3 $64 $21 #1st
%patch $25AC $7A $21 #2nd
%patch $25B5 $90 $21 #3rd
%patch $25BE $A6 $21 #4th
%patch $25C7 $BC $21 #5th
%patch $25D0 $D2 $21 #6th
%patch $25D9 $E8 $21 #7th
#Level 10 window
%patch $25DF $FE $21 #1st
%patch $25E8 $14 $22 #2nd
%patch $25F1 $2A $22 #3rd
%patch $25FA $40 $22 #4th
%patch $2603 $56 $22 #5th
%patch $260C $6C $22 #6th
%patch $2615 $82 $22 #7th
#Level 11 window [GAAAARG!]
%patch $261B $98 $22 #1st
%patch $2624 $AE $22 #2nd
%patch $262D $C4 $22 #3rd
%patch $2636 $DA $22 #4th
#Level 12 window
%patch $263B $F0 $22 #1st
%patch $2644 $06 $23 #2nd
%patch $264D $1C $23 #3rd
%patch $2656 $32 $23 #4th
%patch $265F $49 $23 #5th
%patch $2668 $5F $23 #6th
%patch $2671 $75 $23 #7th
#Level 15 window
%patch $2676 $8B $23 #1st
%patch $267F $A1 $23 #2nd
%patch $2688 $B7 $23 #3rd
%patch $2691 $CD $23 #4th
%patch $269A $E3 $23 #5th
%patch $26A3 $F9 $23 #6th
#Press any key text [centers itself in screen middle]
%patch $26AF $05 $00 #Location from bottom of box
%patch $26B5 $0F $24
Code: Select all
#Level 2 window
%patch $250C $1C $00
%patch $2534 $3F $20
%patch $253D $40 $20
%patch $2546 $4D $20
%patch $254F $5E $20
%patch $2558 $6F $20
%patch $2561 $7E $20 #Space saved: 54 characters
#Level 6 window
%patch $2567 $93 $20
%patch $2570 $92 $20
%patch $2579 $92 $20
%patch $2582 $92 $20
%patch $258B $92 $20
%patch $2594 $92 $20
%patch $259D $92 $20 #Space saved: 71 characters
%patch $15080 "Logfile 4479:" $0A $0A $00
%patch $15090 "Unser Alien" $0A $00
%patch $1509D "Erforchung geht" $0A $00
%patch $150AE "weiter. Es gibt" $0A $00
%patch $150BF "einige fremde" $0A $00
%patch $150CE "Signale vom plateu." $0A $00
%patch $150E3 "Logfile 45314:" $0A $0A
"Es scheint, eine andere" $0A
"Forschungsstation in der" $0A
"Nähe dem plateu zu befinden" $0A
"Herr Totenzähler hat uns" $0A
"das nicht erzählt." $0A $00
Last edited by levellord on Thu Jul 20, 2006 12:12 pm, edited 1 time in total.
The number of lines in a window is hardcoded, we can change the code to make less lines, but thats too complicated. What each line 'really' is is an instruction for the game to find some text. You'll notice that all the text lines end with $0A, that makes sure that the next line isn't just tacked onto the last one. It is that $0A that defines the number of lines.
So if you wanted to add a line, you just put another $0A in your message somewhere. When it is read the program will move down a line, just as if you'd hardcoded another line. This gives you a lot of space; Id put a line of blanks [" "] instead of a simple $0A so each yorp message has 20 spare spaces in it for use. [at least!]
But what if we want to have one line less? Well we can imagine that if the game was told to go to a piece of very short text, we'd hardly notice the line right? Now each text line ends with $00, which means 'stop reading go back' So if we made a line read directly a $00 it would have no text at all in it, and wouldn't even go down a line, it would be as if it had never been coded.
You can see in my above patch oe of my lines begins at $93 $20, this has all the text for the whole window, and has 6 $0A on it, to make it look like seven lines. The other lines are set to read one letter before it, which happens to be $00, so they are ignored. When my next mod comes out you'll be able to see how the whole set of patches work.
As for how I found these out, I noted the window width and height, looked for one indexed close to the other. One result came up, the two of them were only 4 characters apart at one spot [result number two was 28 characters apart] So this must be the start of the window code. Then since I knew how the windows worked from the ending sequence patch, I could easily spot all the text values. Simple!
I can do the same with any other window in Keen, but whats the point?
So if you wanted to add a line, you just put another $0A in your message somewhere. When it is read the program will move down a line, just as if you'd hardcoded another line. This gives you a lot of space; Id put a line of blanks [" "] instead of a simple $0A so each yorp message has 20 spare spaces in it for use. [at least!]
But what if we want to have one line less? Well we can imagine that if the game was told to go to a piece of very short text, we'd hardly notice the line right? Now each text line ends with $00, which means 'stop reading go back' So if we made a line read directly a $00 it would have no text at all in it, and wouldn't even go down a line, it would be as if it had never been coded.
You can see in my above patch oe of my lines begins at $93 $20, this has all the text for the whole window, and has 6 $0A on it, to make it look like seven lines. The other lines are set to read one letter before it, which happens to be $00, so they are ignored. When my next mod comes out you'll be able to see how the whole set of patches work.
As for how I found these out, I noted the window width and height, looked for one indexed close to the other. One result came up, the two of them were only 4 characters apart at one spot [result number two was 28 characters apart] So this must be the start of the window code. Then since I knew how the windows worked from the ending sequence patch, I could easily spot all the text values. Simple!
I can do the same with any other window in Keen, but whats the point?
- MultiMania
- Patch Master
- Posts: 153
- Joined: Mon Nov 24, 2003 3:09 am
- Location: Deep in the heart of keen.
- Contact:
At $26E2 ($28E2 if you are not using ckpatch) is the data table containing what messages go in what levels.
It starts with level 2.
To change the message for level 2 use
$patch $26E2 $????
increment the adress by 2 in order to edit the message for the next level. (ie level 3 is $26E4)
The possible values for ???? are:
Note: These haven't been tested, and were created by me looking through some old disassemble and decompilation. They are probably wrong.
It starts with level 2.
To change the message for level 2 use
$patch $26E2 $????
increment the adress by 2 in order to edit the message for the next level. (ie level 3 is $26E4)
The possible values for ???? are:
Code: Select all
$26AB - No Message
$252A - Level 2 Message
$2566 - Level 6 Message
$25A2 - Level 9 Message
$25DE - Level 10 Message
$261A - Level 11 Message
$263A - Level 12 Message
$2675 - Level 15 Message