Patch:Story Screen (Galaxy)

From KeenWiki
Jump to navigation Jump to search

The Keen Galaxy Story Screen also known as the Scrolling Story Screen or Star Wars Story Screen, is how a brief summary of the story is displayed in Keen Galaxy. It mirrors the story scene in the Star Wars movie, involving text scrolling upwards and shrinking in size so it appears to be moving away from the viewer.

Most notable the screen uses its own special color map with only eight functioning colors. (See the palette patch page for details on such patches.)


Disable

These patches stop the story screen appearing in the demo loop. This means there is no way to see any of the story at all. As it is part of the demo loop there are more complete patches relating to changing the story screen into something else on that page.

Keen 4

#Disable star wars story screen
%patch $3CBD $04D1W


Story location

Patching the story text is detailed at Patch:Large text files. By default an entire segment of the executable is set aside for the story. It is thus possible to change where the story is located, and thus how much space it has by patching what segment the game reads for data. The simplest way to do this is to replace the default value with the new location divided by $10 (Thus for Keen for the value is $1EE4, for story data located at $1EE40) The exact location to the byte can be specified if this is desired, increasing flexibility.

Making up a segment like this has been known to cause problems in the past, with the game freezing. However in this case the nature of the story text segment means that there should be no problem with doing this. However if problems do occur this patch may be to blame.

Simpler is patching a story text file. The text file is similar to the 'usual' text format except lines cannot be too long and only carriage returns can be used.

Keen 4 story segment location

#Story read from
%patch $5582 $1EE4RW #This * $10
%patch $5587 $0000W  #Plus this

#Story text file
%patchfile $1EE40 "STORY.CK4"

Keen 5 story segment location

#Story read from
%patch $557C $1FDERW #This * $10
%patch $5581 $0000W  #Plus this

#Story text file
%patchfile $1FDE0 "STORY.CK5"


Font to use for story

This patch controls what font to use for the scrolling story text. By default this is font 3 (Out of three possible choices.) Using the standard story only font 1 or 3 can be used. Changing font will also require the story to be 'interpreted' to fit the new font. (Otherwise it will appear as gibberish.)

Keen 4

#Font to use for story
%patch $57DD $0002W


Music to use

By default the story screen uses the same music as an in-game level. The value of this level determines the music played. (See Patch:Music.) This can be the map level if desired but cannot be a nonexistent level or a 'bad level number' error will result.

Music to use for story screen

#Keen 4
%patch $5836 [$000CW]

#Keen 5
%patch $5830 [$0011W]

#Keen 6
%patch $563F [$000DW]


Background image

This is the image used as the background in the story. The scrolling text appears over it. Notice the text warps the color of pixels behind it, adding $08 to the color. (So color $07, light grey, becomes $0F or white.) The image, like all images, must be cached first before it is displayed. Removing the display call will result in a black screen with white text over it.

Keen 4

#Story background image
%patch $57EA [$006CW] #Cache
%patch $57FC [$006CW] #Display

#No background image
%patch $57E9 $EB $20


Player cannot stop story screen by pressing any key

This patch removes the player's ability to 'skip' the story screen by pressing nay key; they will be 'stuck' on the screen until it finishes automatically.

Player cannot stop story screen by pressing any key

#Player cannot stop story screen by pressing any key -Keen 4
%patch $5772 $90 $90

#Player cannot stop story screen by pressing any key -Keen 5
%patch $576C $90 $90

#Player cannot stop story screen by pressing any key -Keen 6
%patch $577B $90 $90


How long to wait after text has scrolled

This patch controls how long the story screen remains after the last line of story text has scrolled past the bottom of the screen. By default this is a considerable time allowing the text to nearly vanish.

Note that even if this is set to 0 the entire story will have to scroll by first before the screen finishes.

How long to wait after text has scrolled in story screen

#How long to wait after text has scrolled in story screen -Keen 4
%patch $5778 [$0190W]

#How long to wait after text has scrolled in story screen -Keen 5
%patch $5772 [$0190W]

#How long to wait after text has scrolled in story screen -Keen 6
%patch $5581 [$0190W]


Story screen stays until key is pressed

This patch makes it so that the story screen will not automatically finish when the scrolling text is complete. The player will need to press a key instead.

Story screen stays until key is pressed

#Story screen stays until key is pressed -Keen 4
%patch $577D $90 $90

#Story screen stays until key is pressed -Keen 5
%patch $5777 $90 $90

#Story screen stays until key is pressed -Keen 6
%patch $5586 $90 $90


Colors

These patches set the colors used for the story screen and images. Patches like these regarding how color maps are used are explained on the palettes page. Keen Galaxy uses 16 colors which are created from different sums of four 'plane values' of 1, 2, 4 and 8. In the normal game these planes are blue, green, red and brightness. Thus 'dark blue' is color 1, 'purple' is color 1 + 4 = 5 and white is color 1 + 2 + 4 + 8 = 15.

The story screen text is transparent and in plane 4. This means it makes anything it appears over turn from a dark color to a light color. In the default color map all light colors are white, making the story text appear white and opaque. Due to the odd way the story screen works this sort of arrangement is the only one that doesn't produce odd artifacts. If light colors are desired, they need to be placed in the 'dark half' of the color map.

All of this means that the appearance of the story background image is different in the game than when extracted with ModKeen or Keengraph.

Notice that the color map call has two lines, one for the color map itself and one for the 'screen border' color. (Highlighted in blue and brown respectively.) The border is generally not that important.

Keen 4

#Palette read from:
%patch $581B [$01EEW] #Colors
%patch $5814 [$01FEW] #Border

#Story background palette:
%patch $2F05E [$00 $01 $02 $03 $04 $10 $06 $07]     #Dark colors
              [$1F $1F $1F $1F $1F $1F $1F $1F] {$00} #Light colors and border

Keen 5

#Palette read from:
%patch $5815 [$019EW] #Colors
%patch $580E [$01AEW] #Border

#Story background palette:
%patch $304DE [$00 $01 $18 $1E $1F $1C $06 $07]     #Dark colors
              [$13 $13 $13 $13 $13 $13 $13 $13] {$00} #Light colors and border

Keen 6

#Palette read from:
%patch $5624 [$0132W] #Colors
%patch $561D [$0142W] #Border

#Story background palette:
%patch $30E62 [$00 $01 $18 $19 $04 $1C $06 $07]     #Dark colors
              [$1F $1F $1F $1F $1F $1F $1F $1F] {$00} #Light colors and border


Play story text before every new game

This patch causes the story screen to appear whenever a new game is started. The player can skip the story screen by pressing a key; this causes the game to start sooner. As a side effect the high word of Keen's Extra Keen At score is not set. (By default it is set to 0, which has no effect on gameplay.)

In this patch the story screen is removed from the game demo loop as if it is not the player can press a key during it causing the screen and the following demo to load and be stopped. This is a cosmetic effect and not vital to the patch.

The patch to stop the player going to the main menu is included since otherwise at the start of a new game the player cannot skip the story, getting stuck in the menu if they try. An alternative patch is to use the patch on this page that stops the player from halting the story by pressing any key. This however means the story must be sat through each time a game is started, which could be a trying experience.

Keen 4

#Star wars text appears before new game
%patch $5CB9 $9A $03ED18B8RL     $90

#Pressing any key in the story screen doesn't go to main menu
%patch $5894 $90 $90 $90 $90

#Remove Story screen from demo loop
%patch $3CBD $04D1W

Keen 5

#Star wars text appears before new game
%patch $5C8D $9A $03ED18B2RL     $90

#Pressing any key in the story screen doesn't go to main menu
%patch $588E $90 $90 $90 $90

#Remove Story screen from demo loop
%patch $3CB7 $047BW