The door opening involves 3 tiles; one 3 below the door top, one 2 below the door top, and the door top (And the tile that follows it in the tileset) There are also 2 tiles that replace the door when it is opened. For the opening door, it is possible to change where in the level these tiles are taken from; normally the tile displayed is the same as that already there, but this can be changed.
Thus when Keen opens a door the door top tiles is copied from the level, and it and the tile after it are pasted in FRONT of Keen and these lower, making it appear that the door is sinking into the ground. To see this try this patch:
Code: Select all
#Insane doors
%patch $28D6 $00
The following patch allows you to change what tiles replace the doors when they're opened, and what tiles are displayed as the door 'sinks into the ground' Fiddle about with it and see what you get! (If you can see where the little patches at the bottom go you can fit them into the big patch all in one clean block.)
Code: Select all
#Ultimate door versatility patch; set default door code:
%patch $28A1 $C7 $05 $02 $00 $F7 $2E $08 $6C $03 $46 $04 $D1 $E0 $C4 $1E $48 #1
%patch $28B1 $6C $03 $D8 $26 $8B $07 $89 $44 $0E $8B $C7 $05 $00 $00 $F7 $2E #3-4
%patch $28C1 $08 $6C $03 $46 $04 $D1 $E0 $C4 $1E $48 $6C $03 $D8 $26 $8B $07
%patch $28D1 $89 $44 $10 $8B $5E $FE $D1 $E3 $C7 $87 $9A $AA $00 $00 $8B $C7
%patch $28E1 $05 $00 $00 $F7 $2E $08 $6C $03 $46 $04 $D1 $E0 $C4 $1E $48 $6C #3-7
%patch $28F1 $03 $D8 $26 $C7 $07 $8F $00 $8B $C7 $05 $01 $00 $F7 $2E $08 $6C #2-9
%patch $2901 $03 $46 $04 $D1 $E0 $C4 $1E $48 $6C $03 $D8 $26 $C7 $07 $8F $00
%patch $2911 $5F $5E $8B $E5 $5D $C3 $90 $90
#Adjustable stuff:
%patch $2889 $03 $00 #Tile for 4 below doortop is picked from... [Vert location]
%patch $28A3 $02 $00 #Tile for 3 below doortop is picked from...
%patch $28BD $00 $00 #Doortop is picked from...
%patch $28E2 $00 $00 #First replacement tile vert location
%patch $28FB $01 $00 #Second replacement tile vert location
%patch $28F6 $8F $00 #First replacement tile
%patch $290F $8F $00 #Second replacement tile
Code: Select all
#Probbably poinmtless stuff:
%patch $289F $12 #Make 4 below tile always tile 0
%patch $28B9 $12 #Make 3 below tile always tile 0
%patch $28D3 $12 #Make descending door tiles always tile 0
Code: Select all
#Door opening sound
%patch $2801 $21 $00
#Only blue door takes key
%patch $28D7 $A0
#Doors don't take keys
%patch $28D7 $00
#Doors don't open, Keen can just walk right through them
#If he has the right key- over and over. (Doesn't take Keen's key.)
%patch $27F8 $C3