Main menu pos, Pogoing kills Keen, No shoot anim if no ammo

Request patches for Keens 1-3.
Post Reply
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Main menu pos, Pogoing kills Keen, No shoot anim if no ammo

Post by Nospike »

Would it be possible to move the entire main menu frame in Keen 1 down a bit, say, 40 pixels? Couldn't find a patch for that anywhere, but I'm sure it's not too complicated, right? :p

The second request is probably a bit trickier but that's just because of some fancy details I need from it. If the pogo is used, Keen enters the first frame of the frozen animation (1SPR0028), the Keen shoot sound is played and Keen dies normally after a brief pause, losing a life etc. I'm thinking something like the suicide in Fall Up, except instead of shooting, it's triggered by pogoing.
If Keen doesn't have pogo, nothing happens.

My third request is probably the most important. If Keen attempts to shoot with no pogo (see further), he doesn't enter the shooting animation at all and nothing happens. This must be compatible with the following patch:

Code: Select all

#Pogo allows shooting
%patch $3E2D  $AA9AW  $00 $74
that makes it so that Keen needs a pogo instead of ammo to shoot.

If anyone decides to give this a shot for me, thanks. :) This is for a non-Botafloria-related mod that I'm sure has great potential but won't work too well without the latter two patches.

EDIT:
Whoosh, I completely forgot about this one last thing. Is it possible to make a level-block-like sprite on the world map that blocks Keen unless he has zero lives remaining? I guess it should be, but I have no idea about the inner workings of the Keen games. I could use that too for interesting effects.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

The Main Menu uses a 'centered window' meaning it's always the center of the screen and you can only alter its height and width, Moving it down can be done, but it's tricky and could take time. It can only be moved in 8x8 pixel blocks, if you want this patch I'll need to know the exact location of the window you want.

Oop, have to go now, will try to post more when I get to a computer next. Stuff should be possible.

EDIT:


This patch turns shooting into suicide. It is NOT compatible with the pogo patch you have above, but WILL stop Keen suiciding unless he has the pogo. This patch does not play the usual death sound when Keen suicides, just the shooting sound. It is simple enough to add the usual death sound when Keen flies up offscreen if you want.

The current pause where Keen is 'frozen' is currently $0044 ticks, this can be easily altered. Because of how jumping works sometimes if the player presses and holds the jump and pogo keys Keen will use the first jumping animation. This can't really be altered but doesn't look that different in most sets of graphics.

Code: Select all

#Don't do anything if Keen has no pogo
%patch $3B3F $83 $3E $AA9AW  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $EB $12
%patch $3C5C $83 $3E $AA9AW  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $5D $C3
%patch $3DD5 $83 $3E $AA9AW  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $5E $5D $C3
%patch $400A $83 $3E $AA9AW  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $EB $12

#Shoot: sound, animation, goto countdown
%patch $3E12 $55 $8B $EC $B8 $000CW  $50 $E8 $80D7W  $44 $44 $C7 $06 $8248W
             $001CW  $C7 $06 $8252W  $3E2CW  $5D $C3

#Countdown to suicide - 44 ticks
%patch $3E2C $55 $8B $EC $A1 $824AW  $03 $06 $5B14W  $A3 $824AW  $3D $0044W
             $7E $06 $C7 $06 $8252W  $41F8W  $5D $C3

The level block thing should be possible, the way I would approach it would be to have a block that Keen could not pass unless he had 0 lives, somewhat like a door on the world map. Is that worth trying?
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Post by Nospike »

Thanks for the quick response, Lass. :)

The main menu thing is a shame, but nothing gamebreaking. Let's not worry about it.

The second patch is a bit of a bummer. I need the pogo (suicide) and shooting actions to stay separate. For the suicide, it only triggers when Keen uses pogo (not shoots) and obviously requires the pogo to work. If Keen doesn't have a pogo, nothing happens.

For the shooting, Keen must not enter the shooting frame if he's "out of ammo." Keen should be "out of ammo" if he doesn't have a pogo. Alternately, since I won't be using or displaying the raygun charges anywhere (once I figure out the status screen patch), you could make it so that picking up the pogo gives Keen a pogo AND some raygun charges to let him shoot if the first option is difficult to implement. Again, the main goal here is that if Keen doesn't have the pogo, nothing at all happens.

And yes, the worldmap block you described is exactly what I had in mind! That would be awesome to have.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

A little confused on what you want on the suicide patch. The patch above does the following:

* If Keen has no pogo he cannot suicide, in fact trying to shoot does nothing.

* If Keen has the pogo he *can* suicide by shooting and use the pogo.


What did you want done different? I'm having a hard time figuring it out.



This patch implements map door blocks. The blocks must be of the property 'Yellow door' and block on whatever sides you want. Keen will be unable to pass them unless he has exactly 0 lives. If he has 0 lives he will be able to walk through the tile. This shouldn't have any side effects, it uses the 'Decompressing graphics' code that no mod uses. If there are problems notify me.

Code: Select all

#Map block function: Yellow doors block if lives =\=0
%patch $6884                                             $3D $0000W  $9F $88
             $E0 $8B $9F $6E $05 $83 $EB $02 $7C $0A $D1 $E3 $83 $BF $AAC6W
             $04 $9F $08 $C4 $9E $74 $05 $58 $05 $001AW  $50 $C3

#Call the map-door-checking function from appropriate spots
%patch $A71B  $8B $87 $34 $0A $E8 $C162W
%patch $A808  $8B $87 $C0 $13 $E8 $C075W
%patch $A933  $8B $87 $86 $18 $E8 $BF4AW
%patch $AA20  $8B $87 $FA $0E $E8 $BE5DW
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Post by Nospike »

Thanks for the block patch, it's really pretty awesome!

What I need from the second patch is for Keen to suicide by pogoing, not by shooting. Shooting is unchanged, except it doesn't enter the animation if Keen doesn't have ammo.
I also need the pogo item to give Keen a raygun charge in addition to the pogo itself to fuse both of those patches together.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Aaah I see, I got shooting and pogoing confused there because of the whole 'no animation' thing. This just requires a little tweaking. Same notes apply as to the first version of this patch.

However I will note that if you're using two button firing it is VERY easy to suicide while jumping\falling and that will be a serious issue. I would recommend using the space-shoot enter-status patch added in here.

Code: Select all

#OPTIONAL: Change the controls to Space, shoot; Enter, status.
%patch $1251  $5048W
%patch $7FA3  $5048W
%patch $3B23  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3C4E  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3DB9  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3DCC  $90 $90 
%patch $3E6D  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00

#Don't do anything if Keen has no ammo
%patch $3B3F $83 $3E $AAC8W  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $EB $12
%patch $3C5C $83 $3E $AAC8W  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $5D $C3
%patch $3DD5 $83 $3E $AAC8W  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $5E $5D $C3

#Pogo: sound, animation, goto countdown
%patch $3EC8 $55 $8B $EC $B8 $000CW  $50 $E8 $8021W  $44 $44 $C7 $06 $8248W
             $001CW  $C7 $06 $8252W  $3EE2W  $5D $C3

#Countdown to suicide - 44 ticks
%patch $3EE2 $55 $8B $EC $A1 $824AW  $03 $06 $5B14W  $A3 $824AW  $3D $0044W
             $7E $06 $C7 $06 $8252W  $41F8W  $5D $C3
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Post by Nospike »

Yep, already using that patch. Thanks a bazillion, Lass. :)

Edit: Whoops, just tried it out. The suicide works like a charm, but shooting does weird things. It works normally when Keen is falling/jumping, but when standing on the ground, holding the shoot key seems to somehow pause the entire game instead :S
Speaking of which... would it be possible to disable shooting completely while jumping?
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Ok, is it pausing the game or just Keen? An issue with this patch is that Keen can get stuck in an animation when the shot key is held down, but other stuff is unaffected. If the whole game, including enemies and tile animations are paused that suggests some sort of patch conflict and I'd need to check your patch file. I think I can fix the 'stuck Keen' issue it'll just take a while.

This updated patch stops Keen shooting while in the air:

Code: Select all

#OPTIONAL: Change the controls to Space, shoot; Enter, status.
%patch $1251  $5048W
%patch $7FA3  $5048W
%patch $3B23  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3C4E  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3DB9  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3DCC  $90 $90 
%patch $3E6D  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3FFC  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $40AA  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00

#Don't do anything if Keen has no ammo, can't shoot when in air
%patch $3B3F $83 $3E $AAC8W  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $EB $12
%patch $3C5C $83 $3E $AAC8W  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $5D $C3
%patch $3DD5 $5E $5D $C3

#Pogo: sound, animation, goto countdown
%patch $3EC8 $55 $8B $EC $B8 $000CW  $50 $E8 $8021W  $44 $44 $C7 $06 $8248W
             $001CW  $C7 $06 $8252W  $3EE2W  $5D $C3

#Countdown to suicide - 44 ticks
%patch $3EE2 $55 $8B $EC $A1 $824AW  $03 $06 $5B14W  $A3 $824AW  $3D $0044W
             $7E $06 $C7 $06 $8252W  $41F8W  $5D $C3


Do you still need the pogo gives ammo patch, if so, how much ammo? (Do you want shooting to not take shots away? Since if you have a pogo and no shots you can still shoot and get negative shots.)
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Post by Nospike »

I'll just send you my patchfile I reckon, it'll be a whole lot simpler. :P I'm already using a lot of patches so a patch conflict is probably a possibility. It's the entire game including all sprites, even sounds get stuck in a loop. Pretty funny effect, but not what I need.

It'll be in your PCKF inbox momentarily.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Right, I'll check it out.

Also since you're using the main menu patch it should be possible to move the menu to wherever you want on the screen if you like.


EDIT: Just looking at this I think there may be conflict with the Vorticons Extended patch.


EDIT2: Yeppers. Specifically the 'EXTRA STUFF' section not needed for Vorticons 2. You'll notice it alters both the shooting and pogoing code, this messes up those patches. You'll want to remove this part of the patch file and see how things go:

Code: Select all

# EXTRA STUFF -----------------------------------------------

# All of this is optional, but might make the game nicer to play

# remove del_x = 0 on keen shot
%patch $3B47 $90 $90 $90

# pogo and jump fix: keen must have > 0 Y velocity to pogo
%patch $3FAC $F7 $C6 $02 $00 $74 $18 $83 $3E $42 $82 $00 $7C $11 $E9 $44 $D5
%patch $3D68 $F7 $C6 $02 $00 $74 $12 $83 $3E $42 $82 $00 $7C $0B $E9 $A3 $D7

That should fix your problem, tell me if it doesn't.
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Post by Nospike »

Nuts, I thought I'd removed all of the extra stuff already. Silly me. Of course it works now.
Though there's now an issue with Keen not using the shooting animation at all, even when he's supposed to... :X
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Ah tch! Silly me, the altered patch from the initial *would* need them. The control change can be altered too. Here y'go:

Code: Select all

#OPTIONAL: Change the controls to Space, shoot; Enter, status.
%patch $1251  $5048W
%patch $7FA3  $5048W
%patch $3B23  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3C4E  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 
%patch $3E6D  $90 $90 $90 $90 $90 $90 $90 $80 $3E $5065W $00 

#Don't do anything if Keen has no ammo, can't shoot when in air
%patch $3B3F $83 $3E $AAC8W  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $C7 $06 $8248W  $0015W  $83 $3E
             $604CW  $00 $7E $04 $FF $0E $8248W  $90 $90 $90
%patch $3C5C $83 $3E $AAC8W  $00 $74 $25 $33 $C0 $A3 $823CW  $A3 $824CW  $A3
             $824AW  $C7 $06 $8252W  $3E12W  $C7 $06 $8248W  $0015W  $83 $3E
             $604CW  $00 $7E $04 $FF $0E $8248W  $5D $C3
%patch $3DB9 $5E $5D $C3
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Post by Nospike »

Absolutely spot-on perfect, Lass. You've saved me once again. ^^ Thanks so much.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

No problem, I look forward to whatever mod this will spawn.

Now, since you're using the menu text patch this will let you move your menu all around the screen; just replace this:

Code: Select all

#Simple Main Menu text patch
%patch $9625 $27D8W  $50 $E8 $CCA7W  $44 $44 $EB $46

With this:

Code: Select all

#Positionable menu (Bottom, right, top, left.)
%patch $9601 $000CW  $50 $B8 $0020W  $50 $B8 $0004W  $50 $B8 $0010W  $50 $E8
             $C90BW  $83 $C4 $08 $A1 $8282W  $99 $A3 $AAF4W  $89 $16 $F6 $AA
             $A1 $82F8W  $99 $A3 $AAF8W  $89 $16 $FA $AA $B8 $27D8W  $50 $E8
             $CC9FW  $44 $44 $EB $3E

The vertical position is currently set at top-$04 and bottom-$0C. The other two variables (10,20) control the window's width. You should now be able to move the window anywhere you like.
Post Reply