Status screen [Fully customizable!]

Completed patches for Keen3.
Post Reply
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Status screen [Fully customizable!]

Post by levellord »

And so it came to pass that the Keener Levellord dist want a status screen patch for Keen 3, and lo she did beseech the great Adur with many an email, yet she got no response. And lo she didst weep and gnash her teeth and exlaim 'Oh bugger, why hast he forsaken me?' Then she went unto the land of Keen code and didst make herself a patch that was almost as good, and lo she was satisfied.

~Keenesis 4:28
Well now, first up I have a full breakdown of the status screen structure, just like the other text/text loaction things I've done.

Code: Select all

#Statusbox size:
%patch $0EC0 $0B $00 #Height [In lines of text]
%patch $0EC4 $1C $00 #width [in letters]

#Text read from: [Long lines marked]
%patch $0ED5 $D4 $22 #1st line
%patch $0EE5 $F2 $22
%patch $0EED $F5 $22 #3rd
%patch $0EFD $13 $23
%patch $0F0D $16 $23
%patch $0F1D $19 $23
%patch $0F25 $1C $23 #7th
%patch $0F35 $3A $23
%patch $0F45 $3D $23
%patch $0F55 $40 $23
%patch $0F5D $43 $23 #11th

#Text 
%patch $1BAF4 "    SCORE     EXTRA KEEN AT " $0A $00
%patch $1BB12 " " $0A $00
%patch $1BB15 "    KEENS            PISTOL " $0A $00
%patch $1BB33 " " $0A $00
%patch $1BB36 " " $0A $00
%patch $1BB39 " " $0A $00
%patch $1BB3C " ANKH TIME      KEY CARDS   " $0A $00
%patch $1BB5A " " $0A $00
%patch $1BB5D " " $0A $00
%patch $1BB60 " " $0A $00
%patch $1BB63 "     PLEASE PRESS A KEY     " $00

#Text structure
%patch $0EDF $0C $00 #2nd line h position
%patch $0EF7 $13 $00 #4th line
%patch $0F07 $13 $00 #5th line
%patch $0F17 $13 $00 #6th line
%patch $0F2F $0B $00 #8th
%patch $0F3F $0B $00 #9th
%patch $0F4F $0B $00 #10th

#Values structure [i.e score, etc text]
%patch $0F65 $0A $00 #Score base [0A = 10 = decimal, $10 =hex, $01 = binary, $00 don't show]
%patch $0F86 $0A     #Score h position
%patch $0F9C $0A $00 #Extra Keen base [like above, $00, don't show]
%patch $0FC5 $1A     #Extra Keen h position
%patch $102F $18 $00 #Ammo h position
%patch $1037 $04 $00 #Ammo v position
%patch $1066 $07 $00 #Ankh time h position
%patch $106E $08 $00 #Ankh time v position

#Keen's lives structure
%patch $0FD7 $00     #Lives h position [lives stop at $12, so $0A doesn't show lives]
%patch $0FE1 $03 $00 #Sprite vertical position
%patch $FED $90 $90 #Sprites close together

#Tiles used:
%patch $100E $D8 $00 #Raygun tile
%patch $1014 $03 $00 #Vertical position [lines]
%patch $101D $04 $00 #Plus xx pixels [i.e loc is 3 4/8 lines]
%patch $1023 $15 $00 #H position
%patch $1045 $D6 $00 #Ankh tile
%patch $104B $07 $00 #V position [lines]
%patch $1054 $04 $00 #Plus xx pixels [i.e loc is 7 4/8 lines]
%patch $105A $03 $00 #H position
%patch $1084 $0D $00 #Keycards h position [4 keycards start here]
%patch $108C $08 $00 #Keycards v position [All 4 keycards this height]
%patch $1099 $D9 $00 #Yellow keycard tile [No 'no keycard' tile]
%patch $10BB $DA $00 #Red keycard tile
%patch $10CF $04 $00 #Red keycard left xx [i.e 0D + 04 = 11]
%patch $10E0 $DB $00 #Green keycard tile
%patch $10F4 $08 $00 #Green keycard left xx [i.e 0D + 08 = 15]
%patch $1105 $DC $00 #Blue keycard tile
%patch $1119 $0C $00 #Blue keycard left xx [i.e 0D + 0C = 19]

%patch $1094 $01 $00 #Always show yellow keycard
%patch $10B6 $01 $00 #Always show red keycard
%patch $10DB $01 $00 #Always show green keycard
%patch $1100 $01 $00 #Always show blue keycard
'Thats all very nice' you're saying 'but I don't really give a damn about all that stuff.' Well wait a moment; there's more!

Now we can use the ordering info text as space for some looong statusbox text. If we tweak the text stuff a bit; we can make an external status.ck3 file, just like Andy's Keen 1 patch does! Whats more, we can now shift [nearly] everything in the status screen around wherever we want! [Or, if you want, even delete it] Just like Andy's patch! Here's how its done:

Code: Select all

#Blank O.I text [We're using it now!]
%patch $AE43 $CD $33 #1st line, etc
%patch $AE4E $CD $33
%patch $AE56 $CD $33
%patch $AE5E $CD $33
%patch $AE66 $CD $33
%patch $AE6E $CD $33
%patch $AE76 $CD $33
%patch $AE7E $CD $33
%patch $AE86 $CD $33

#Blank status text, except for fist line
#This now reads from the O.I text
%patch $0ED5 $CE $33 #1st line [Note, 1 larger than above O.I]
%patch $0EE5 $CD $33
%patch $0EED $CD $33 #3rd
%patch $0EFD $CD $33
%patch $0F0D $CD $33
%patch $0F1D $CD $33
%patch $0F25 $CD $33 #7th
%patch $0F35 $CD $33
%patch $0F45 $CD $33
%patch $0F55 $CD $33
%patch $0F5D $CD $33 #11th

#Change O.I text into status textfile, you can edit this how you want! 
%patchfile $1CBEE "STATUS.CK3"

#Or, for simplicity; use this text patch!

%patch $1CBEE "    SCORE     EXTRA KEEN AT " $0A
              "                            " $0A
              "    KEENS            PISTOL " $0A
              "                            " $0A
              "                            " $0A
              "                            " $0A
%patch $1CC9C " ANKH TIME      KEY CARDS   " $0A
              "                            " $0A
              "                            " $0A
              "                            " $0A
              "     PLEASE PRESS A KEY     " $00
O.o I hear you think, that text patch is all blank! Not exactly, it uses hex 160, which *looks* like a blank space, but appears white on the status screen, instead of grey like normal status text. [You can even put white text in your status screen] What this patch does is put a grey border around the statusbox. This is what the text patch looks like when all the invisible spaces have been replaced with .'s

Code: Select all

%patch $1CBEE "    SCORE     EXTRA KEEN AT " $0A
              " .......... ............... " $0A
              "    KEENS            PISTOL " $0A
              " ................. ........ " $0A
              " ................. ........ " $0A
              " ................. ........ " $0A
%patch $1CC9C " ANKH TIME      KEY CARDS   " $0A
              " ......... ................ " $0A
              " ......... ................ " $0A
              " ......... ................ " $0A
              "     PLEASE PRESS A KEY     " $00
Editing either the text patch or the file is as easy as Andy's patch. If you need help customizing your statusbox, I can put any [and I mean ANY] arrangement of text and characters into it. [For example, you can divide your statusbox into two seperate windows; O.o]

The status.CK3 file can be downloaded from here: http://levellord.toxicsheep.com/Index/Keen3/STATUS.CK3

Post Reply