Keen 1 "Cheat Items" and Keens Left Box

Request patches for Keens 1-3.
Post Reply
User avatar
Flaose
Posts: 18
Joined: Sat Sep 27, 2003 11:50 am

Keen 1 "Cheat Items" and Keens Left Box

Post by Flaose »

Hey all,

So I've been slaving away on my super-secret mod (heh), and have almost finished the patch file and am nearly ready to begin art-changing and level creation (which, I guess, is my preferred order of doing things). However, a few things stand in my way, and I hope you geniuses can help me out.

First, I'm looking for a way to automate the cheat codes. The first one I need is a one-time event that activates the C+T+Space cheat. Preferably this would be done by the collection of an arbitrary item such as the battery or lollypop, if that's completely impossible then an alternative would be to activate it upon exiting level.

The second, and more important, thing that I need is a way to activate the GOD patch at the beginning of a level if the player is in possession of a certain ship-part. That is, the logic would be something like:

Code: Select all

WHEN Keen enters a level
IF he has the Joystick
THEN activate G+O+D
Obviously programming is not my strong suit, but I think you get the gist.

Finally, I've been able to stop the "Keens Left" box from appearing and from playing its sound, but there's still a pause for when it should appear. How do I eliminate the box's effects completely? Fall Up's patch-code is less than forthcoming.

Thanks!
Mink
Posts: 192
Joined: Sat Nov 03, 2007 4:08 pm
Location: Providence, RI, US

Post by Mink »

Hopefully these'll still be of some use despite how long it's been since your request:

Code: Select all

# call ctspace when you hit the battery
%patch $4452 $E8 $C95BW $90 $90 $90

Code: Select all

# enable god mode if you have the joystick when you enter a level

# the very end of the level init function was moved so we can add stuff -- jump to the new locat
%patch $1703 $E9 $CFBAW

# the joystick check itself - sans message
%patch $E6C0 $83 $3E $94 $AA $01        # cmp joystick, 1
             $75 $06                    # jne 06
             $C7 $06 $AA $5D $01 $00    # mov godmode, 1
             $5F $5E $8B $E5 $5D        # pop di; mov sp, bp; pop bp;
             $C3                        # retn

Code: Select all

# skip keens left
%patch $7E99 $90 $90 $90 # skip the display_keens_left() call
%patch $7EBC $90 $90 $90 # skip the delay() call
The 'you are now cheating' window pops up when Keen hits the battery, but that can be disabled if you prefer. It also shouldn't be too hard to make some other ship part trigger this, but using an arbitrary item like the lollipop looks to be more trouble than its worth unless you want the overall game winning condition to involve finding more than like two ship parts.

The second patch, however, doesn't have the 'god mode enabled' window pop up (since that would've been more work :-0) -- would you rather it did?

The god mode patch uses the first bit of space freed up by Lemm's rewritten tile-drawing routine, so you'll need to use that, too. I don't know if any other patches you're using also use that space, but if they do, I can always move these to some more desirable spot.

And ALSO: I'll be looking forward to your mod; hopefully it isn't years away ;-)
User avatar
Flaose
Posts: 18
Joined: Sat Sep 27, 2003 11:50 am

Post by Flaose »

Mink, you are a god! I'm not sure why I didn't receive the reply notification that I had signed up for, but luckily I noticed when 'lass posted your patch on the wiki.

Well, the last great hurdles have been jumped so now I have no excuses :)

And no, it's fine that the message box doesn't pop up with god-mode (and perhaps preferable)!

Thanks for words of encouragement. I'm not sure if the mod will be all that fun to play, but at the very least it should be a very different kind of gameplay style.
Mink
Posts: 192
Joined: Sat Nov 03, 2007 4:08 pm
Location: Providence, RI, US

Post by Mink »

Oh good! -- I was debating on whether to send you a pm over on That Other Forum but figured you'd already seen this.

Also: If you're using lemm's amazing v2 tileset patch, you don't have to worry about using the rewritten drawing routine since the latter is incorporated into the former.

And awesome, I'd much rather see inventive stuff far more than conventionally fun stuff. :)

edit: And if you need more help down the line, don't hesitate to ask!
Post Reply