Keen 2 Requests

Request patches for Keens 1-3.
Post Reply
Kdash
Posts: 405
Joined: Sat Feb 26, 2005 5:45 pm

Keen 2 Requests

Post by Kdash »

I need the following patches:

1. Shooting the Tantalus Ray makes the lights turn off.
2. Lightswitch can only be flipped on.
3. The locations of the tiles that get replaced when the Tantalus rays are destroyed.

Also, I'd like there to only be two machines to destroy, so I also only want two places to appear on the status screen... How do I do that?
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

As a matter of fact, Harvey's mod uses a few of these, let's see...


1.) I'll have to work on this, I think it's possible, if I can find somewhere to insert the right code.

2.) I have no idea how to do this, Spleen may be able to help, I'll give it a whirl.

3.) From the Patch Index, ->Keen2 -> T.txt -> Tantalus

Code: Select all

#Nothing is replaced when Tantalus shot:
%patch $478C $00 $00

#Tiles replaced when Tantalus shot:
%patch $48BB $8F $00 #Top left square of glass sphere of ray
%patch $48D2 $8F $00 #Middle top
%patch $48EC $8F $00 #Right top
%patch $4905 $22 $02 #Bottom left
%patch $491B $23 $02 #Bottom middle
%patch $4934 $24 $02 #Bottom right
%patch $4952 $FA $01 #Switch
%patch $4958 $EC $01 #Left sparky thing
%patch $496D $EC $01 #Right sparky thing
%patch $49ED $15 $02 #City screen replacement tile
%patch $4981 $F9 $01 #1x3 purple anemba cell replacements
%patch $49A3 $25 $02 #Rightmost orangy 4x3 block of things replacement

#Tiles not replaced:
%patch $48BA $00 #Top left square of glass sphere of ray
%patch $48D1 $00 #Middle top
%patch $48EB $00 #Right top
%patch $4904 $00 #Bottom left
%patch $491A $00 #Bottom middle
%patch $4933 $00 #Bottom right
%patch $4951 $06 $90 $90 $90 #Switch
%patch $4980 $90 $90 $90 $90 $90 #Anmoeba cells [1x3]
%patch $49A2 $90 $90 $90 $90 $90 $90 $90 $90 #4x3 orangey blocks
%patch $49EB $90 $90 $90 $90 $90 $90 #City screen

#H/V positions of replaced tiles:
%patch $4939 $04 $00 #Switch replacement vertical position

#Tile required 3 tiles right and 5 tiles down from switch in order to make it an
#'end the world' switch
%patch $6443 $DF $01

#Number of tiles below switch tile needs to be
%patch $6429 $05 $00
#Number of tiles right of switch tile needs to be
%patch $6437 $03

#Game doesn't end when switch flicked
#[Keen stays in the level, but 'oops' sequence plays]
%patch $64F9 $00 $00
So all I have is the switch, but I should be able to get some others, as soon as I have a nap. (It's 2am)

4.) This can get a bit complex depending on what you want to do. First up we need to save all cities by two, that's easy enough, the first two cities will be unsaved. Sadly we can't as yet shift them around the status screen, so for now they'll have to stay put, but we'll need to remove the other city's text so they're not notice. As in Harvey's mod I simply replaced their names with dark blank space, but you'll probbably want to shift things about a bit. If so, I can change the status box text easily enough.

Code: Select all

#Keen has got cities at game start
%patch $8ACC  $01 $00 #SAVE all cities;
%patch $8ABF  $01 $00 #Remove x cities, starting with London

#Blank other city's text:
%patch $199B8 $00
%patch $199BF $00
%patch $199C8 $00
%patch $199CE $00
%patch $199D3 $00
%patch $199DA $00

#This is the dark blank space, it overwrites Washington text
#with grey space, use $00 to overwrite with white space:
%patch $199DA $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A0 $A0

#This makes all the other cities use the Washington text and thus
#be blank grey as well:
%patch $10DC $5A $22 #Sydney
%patch $10F8 $5A $22 #New York
%patch $1118 $5A $22 #Paris
%patch $1138 $5A $22 #Rome
%patch $1158 $5A $22 #Moscow
Stealthy71088
Posts: 583
Joined: Thu Mar 17, 2005 11:54 pm
Location: NY

Post by Stealthy71088 »

You'd have to make it so that the light switch used two different tiles, sort of like the bridge switch. Then you can simply disable one of the two tiles.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

The problem there is that they share some code and putting in a 'switch tiles' code is going to take some space.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Well, I've done some research and rewritten the tantalus patches here http://levellord.toxicsheep.com/Index/Keen2/T.txt

It seems that changing the locations of tiles is more difficult than you'd think since they are replaced using a mix of classical and nonclassical code. What this means is that while some lucky parts have nice clean variables such as '$C6 $05 $06 $00' [H position 6 tiles down] most use more compact coding like $40 $40 [H position 2 tiles down] that cannot be patched much [Since $40 $40 takes up 2 bits and a proper h position patch needs at least 3.] Therefore you don't have a lot of wiggle room with what you can do.

Here are the patches you may find most useful, you can also stop tiles being replaced and other things:

Code: Select all

#####
TILES AND LOCATIONS
#####

#How many tiles are replaced; starting with left spark,
#then right, then each of 3 purple squares then each of
# 4 orange rows: Total 1 + 1 + 3 + 4 = 9
%patch $4896 $09

#All tiles:
%patch $478C $00 $00     #Nothing is replaced when Tantalus shot:
%patch $479B $90 $90 $90 #Nothing replaced, but still explosion sounds
%patch $47EE $C3         #Sparks, purple and orange not replaced, no zapzots
%patch $48B0 $90         #Dome not replaced
%patch $4986 $05         #Purple cells not replaced
%patch $4798 $04         #Everything RIGHT location (Centered below spark, combine with next patch for any h position)
%patch $479A $0C         #H position, each 1 less shift Tantalus ~20 tiles LEFT
%patch $47A8 $00         #Shift Tantalus up 16 tiles
%patch $486A $08         #All tiles replaced at once

#Dome:
%patch $48BB $8F $00 #Top left dome replacement tile
%patch $48D2 $8F $00 #Top middle
%patch $48EC $8F $00 #Top right
%patch $4905 $22 $02 #Bottom left
%patch $491B $23 $02 #Bottom middle
%patch $4934 $24 $02 #Bottom right
#Tile, and all DOME tiles AFTER it are shifted down 1 row
#per line patched:
%patch $48D6 $47     #Top left
%patch $48A5 $47     #Top middle
%patch $48BF $47     #Top right

#Sparks (Blue electric things):
%patch $4958 $EC $01 #Left spark replacement tile
%patch $496D $EC $01 #Right spark replacement tile
%patch $4960 $FE $FF #left spark h position (-2)
%patch $4974 $40 $40 #right spark h position (+2, each 40 = +1, replace with $90 to decrease)

#Switch
%patch $4952 $FA $01 #Switch replacement tile
%patch $4939 $04 $00 #V position of tile

#Purple cells (1x3 block)
%patch $4981 $F9 $01 #Replacement tile
%patch $498C $47     #Move block 1 row down
%patch $4883 $05     #Only 1 cell (and 1 orange ROW) replaced

#Orange blocks (4x3 block):
%patch $49A3 $25 $02 #Replacement tile
%patch $49A9 $03     #1 row left of the switch is replaced with dead orange tiles
%patch $499C $03 $00 #Top (3 down from dome top)
%patch $49BE $06 $00 #Bottom (6-3 = 3 tiles high)
%patch $49B1 $FC $FF #Left side (3 riles RIGHT of dome center)
%patch $49BE $06 $00 #Number of columns(6 - 3 + 1 = 4)

#City screen:
%patch $49ED $15 $02 #Replacement tile
%patch $49CA $F9 $FF #Left side
%patch $4A00 $FC $FF #Right side
%patch $49D3 $40 $40 #Top ($40 = +1 down, replace with $90 to decrease)
%patch $49F3 $05 $00 #Bottom

#Tiles not replaced:
%patch $48BA $00 #Top left square of glass sphere of ray
%patch $48D1 $00 #Middle top
%patch $48EB $00 #Right top
%patch $4904 $00 #Bottom left
%patch $491A $00 #Bottom middle
%patch $4933 $00 #Bottom right
%patch $4951 $06 $90 $90 $90 #Switch
%patch $4980 $90 $90 $90 $90 $90 #Amoeba cells [1x3]
%patch $49A2 $90 $90 $90 $90 $90 $90 $90 $90 #4x3 orangery blocks
%patch $49EB $90 $90 $90 $90 $90 $90 #City screen
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

genius314 wrote:2. Lightswitch can only be flipped on.
Specifically the lightswitch, or the bride switch that uses a separate tile for its on and off states? The latter I would expect to be simple enough if you change the tileinfo for the 'on' state such that it's just background (or foreground if you want to make things trippy). But for all I know the tile numbers could be hard-coded or something.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

The bridge switch tiles are hardcoded and will only animate if the right tiles are used, but any tile with the bridge property can be used on and off as much as you like, even if it doesn't animate, much like a lightswitch, since these share code.

Lightswitch tiles are hardcoded also, but I fear that if the lightswitch tile is made only to flip off, that the bridge switches will do the same.
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Just my luck, MM's dissassembly stuff was a help, the palette changing is separate from the main code, and so we can fill those last two requests!

Code: Select all

#Stop lights...
%patch $6564 $8D $FE #Turning off
%patch $656A $67 $FE #Turning on

#When we shoot tantalus:
%patch $47BD $15 $1C #Lights turn on
%patch $47BD $35 $1C #Lights turn off
Post Reply