Keen 5: Enemy Shooter request

Request patches for Keens 4-6.
Post Reply
User avatar
Dr.Colossus
Posts: 33
Joined: Thu Aug 02, 2012 8:41 pm
Location: Germany

Keen 5: Enemy Shooter request

Post by Dr.Colossus »

I'm still working on my "Marooned on Mars" mod and now I have trouble with the purple shooter/ice cannon. It won't work properly. Therefore I ask here for a few patches. If it helps to make the patches, I don't need the up/down shooters.

- The left and the right shooter should also shoot upwards (45 degree).
- When the shots are hitting Keen they stun him. Like this patch

Code: Select all

#Disable EGAGRAPH check in Keen 5 (Frees 389 bytes at $3CF0)
%patch $3CDF $90 $90

#Shocksund's shot's collision transforms Keen
%patch $1358B $56 $9A $037D05AFRL     $83 $C4 $02 $EB $19
- When Keen gets shot he also hops a few tiles up.


By the way, I have also two other requests.
1. The "Keg O' Vitalin" gives Keen 1 Vitalin.
2. You can not use the pogo until you have collect the keycard. Keen also keeps the keycard/pogo for all the remaining levels.

Thank you
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Let's do this easy to hard.

First up the Vitalin keg:

Code: Select all

#What Kegs increase
%patch $C102 $6F58W

Next you want the shooter to act like an ice cube. This makes the shots move horizontally. (There's probably a more elegant patch, but eh.) Note that this patch is INCOMPATIBLE with speed changing patches for the shots since it rearranges their speeds. The speeds are contained here, $0040W and $FFC0W, change THEM to change the shot speeds.

Code: Select all

#Shots move diagonally upwards
%patch $10F58 $8B $1E $40 $9E $C7 $47 $16 $FFC0W $EB $16 #Left move upwards
              $8B $1E $40 $9E $C7 $47 $18 $0040W $EB $14
              $8B $1E $40 $9E $C7 $47 $16 $0040W $90 $90 #Right moves upwards
              $8B $1E $40 $9E $C7 $47 $18 $FFC0W

#Directions shots are spawned:
%patch $10FA1 $1659W #Up (At $10F79)
              $164EW #Right (At $10F6E)
              $1643W #Down (At $10F63)
              $1638W #Left (At $10F58)
Next we have to make Keen transform when shot. This is easier than I thought but you'll possibly need to customize his stunned action some.

Code: Select all

#Shots use transform code
%patch $10FB6 $06B90E68RL

#Custom collision: Transform
%patch $79F6 $EB $5C
%patch $79F8 $55 $8B $EC $83 $3E $BC91W  $00 $75 $2A $B8 $0B94W  $50 $FF
             $36 $3E $9E $9A $090B1242RL     $83 $C4 $04 $B8 $0017W  $50 #Stun sound
             $9A $196E09EFRL     $83 $C4 $02 $8B $1E $3E $9E $C7 $47 $18
             $FFD8W  $C7 $47 $16 $0010W  $5D $CB			 #Stunned Keen speeds

#Keen stunned action =$0B94W
%patch $30ED4 $008CW $008CW $0003W $0000W $0000W $0190W $0000W $0000W
              $090B1710RL   $0AAF1597RL   $090B17B5RL   $0888W

#Keen can die while stunned
%patch $C021 $90 $90

Now there are a few things to note here. First of all here Keen cannot be stunned in God Mode. (This can be removed.) Secondly Keen can be killed while stunned. (This too can be removed.) Thirdly the 'stun sound' here is the same as his dying sound, you'll probably want to change that. A list of Keen 5 sounds is here: http://www.shikadi.net/keenwiki/Patch:Sounds#Keen_5

Keen's stun speed is set in the last line of the big paragraph. It's vertical $FFD8W and horizontal $0010W or up and to the right. You'll want to tweak those. I do not know how to make different shots bounce Keen differently.

Keen's stunned animation is $008CW, the same as one of his death animations, again you'll probably want to change that. I am not sure, but there may be issues with stunned Keen landing on platforms or something, if so do mention them.

Keen's stun-recovery time is $0190W, same as Keen 1 I think.

And that's that for now.
User avatar
Dr.Colossus
Posts: 33
Joined: Thu Aug 02, 2012 8:41 pm
Location: Germany

Post by Dr.Colossus »

Awesome. Thank you :)
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

This patch lets Keen keep the keycard forever once he's got it: (Keenwiki, useful resource.)

Code: Select all

#Don't lose V card on starting a level
%patch $6A2B $EB $04

Now, I've patched a lot of things in my time, a lot of things. But I think I am most proud of this patch here. It rewrites the alt-ctrl-space code so that Keen cannot pogo without the card. That was harder to do than it sounds, since you need to take two button firing into account.

Code: Select all

#Rewrite HandleInput to take not pogo without Keycard
%patch $8ABF $3B
%patch $8AB8 $42
%patch $8AF1 $75 $06 $C7 $06 $BC27W  $0000W  $5D $CB $83 $3E $BC37W  $00 $75
             $0A $83 $3E $332CW  $00 $75 $03 $E9 $008BW  $83 $3E $9E2EW  $00
             $74 $1D $83 $3E $9E30W  $00 $74 $16 $C7 $06 $BC29W  $0001W  $33
             $C0 $A3 $BC2BW  $A3 $BC2FW  $A3 $BC2DW  $A3 $BC31W  $5D $CB $33
             $C0 $A3 $BC27W  $A3 $BC29W  $83 $3E $9E2EW  $00 $74 $08 $C7 $06
             $BC31W  $0001W  $EB $08 $33 $C0 $A3 $BC2FW  $A3 $BC31W  $83 $3E
             $9E30W  $00 $74 $22 $83 $3E $6F5AW  $00 $74 $19 $83 $3E $9E59W
             $08 $7F $0C $A1 $9E59W  $03 $06 $9BB4W  $A3 $9E59W  $5D $CB $C7
             $06 $BC2DW  $0001W  $5D $CB $83 $3E $9E59W  $00 $74 $08 $C7 $06
             $BC2DW  $0001W  $EB $08 $33 $C0 $A3 $BC2BW  $A3 $BC2DW  $C7 $06
             $9E59w  $0000W  $5D $CB $A1 $9E2EW  $A3 $BC31W  $A1 $9E30W  $83
             $3E $6F5AW  $00 $74 $03 $A3 $BC2DW  $A0 $38 $03 $B4 $00 $D1 $E0
             $8B $D8 $8B $87 $BCAFW  $A3 $BC29W  $33 $C0 $83 $3E $BC31W  $00
             $75 $03 $A3 $BC2FW  $83 $3E $BC2DW  $00 $75 $03 $A3 $BC2BW  $83
             $3E $BC29W  $00 $75 $03 $A3 $BC27W  $5D $CB
This patch *should* be issue free and there shouldn't be a way around it. However I am unable to test the entire game in all situations due to lack of time, imagination and luck. As such, if you encounter a regular, repeatable way around this, do mention it and I'll see if I can patch the hole.

Also since this is a Keen Vorticons emulation the following patch will force Two-button firing on the game. (Ctrl + Alt to fire, not space.) The Two button option can also be removed from the options menu or changed into another, custom option.

Code: Select all

#Force 2-button firing -modified patch
%patch $8B07 $EB
User avatar
Dr.Colossus
Posts: 33
Joined: Thu Aug 02, 2012 8:41 pm
Location: Germany

Post by Dr.Colossus »

WoW Thanks! This patch works perfectly.
User avatar
MoffD
Posts: 62
Joined: Wed Mar 12, 2014 8:50 pm

Post by MoffD »

Hmmm... Queen of the patches doesn't sound glamorous, but it's certainly fitting...

Looking forward to the mod on completion :)
User avatar
troublesomekeen
Posts: 223
Joined: Fri Feb 03, 2012 7:56 pm
Location: Shadowlands
Contact:

Post by troublesomekeen »

*applause*
THAT was one of THE biggest patch concerns for this project, I'd say. Bravo!
Post Reply