Need help with butler bot patching

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

Need help with butler bot patching

Post by Nospike »

I want to make butler bots killable and they use the two stunned yorp frames as death frames. They also don't interact with Keen in any way i.e. pass through him.

As of now, I'm using the $01 $00 interaction behavior to take care of the second part, and it seems to work. Are there any glitches this behavior can cause?
I'm also using the "when shot" chain behavior for the bots, so they turn into a zap/zot when shot. (This is an easy alternative to patching them to use the yorp frames, one that I can whip up myself) To prevent them from spawning the falling block, I use a patch that makes them not spawn it. However, I plan on using a lot of these butler bots in my levels, they could be called "scenery enemies." Would larger amounts of them, say, 20 per level cause problems because of the block spawning, or does the no falling block patch reduce the memory needed and thus make it safe? This is the patch in question:

Code: Select all

%patch $2369 $C3 $90
Thanks for the help.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

*Cricks*

The falling block is a metasprite, which means that only six can be int he level at one time, but it vanishes quite quickly, so it's unlikely the player will be able to shoot six bots fast enough.

To test this you simply need to place a large block of bots in the level then blast away at them. Everything should be fine.

However you may want a totally 'safe' collision; to do this we simply replace the falling block with the complete Yorp collision:

Code: Select all

#Make bots use Chain collision
%patch $17CB $22BBW 

#Yorp collision duplicate at Chain collision location
%patch $22BB $55 $8B $EC $56 $57 $8B $76 $04 $8B $7E $06 $83 $3D $0A $74 $05
             $83 $3D $0B $75 $27 $C7 $44 $2A $0000W  $C7 $44 $2C $0002W  $C7
             $44 $28 $003AW  $C7 $44 $32 $489DW  $C7 $44 $34 $3360W  $C7 $44
             $22 $FFB0W  $B8 $0022W  $50 $E8 $A451W  $44 $44 $5F $5E $5D $C3
The collision is taken from here: http://www.shikadi.net/keenwiki/Patch:Y ... sion_patch which also highlights the various values, such as the sprite frames, that you can alter. This automatically disables the falling block too.


EDIT:Forgot to take into account Keen 1-ness, the working patch is posted below, it needed one small tweak.
Last edited by levellass on Tue Jan 01, 2013 2:36 am, edited 1 time in total.
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Post by Nospike »

Shooting a bot with this patch causes gray vertical lines to appear all over the screen and the game freezes. I think I'll actually be okay knowing that the patches I made are somewhat safe, as I'm sure there won't be more than 2-3 of those bots shootable at the same time.
Just a question: can the blocks cause memory problems? As you said they still spawn, if only for a short moment. Would that possibly make the game crash/freeze/whatever if there's a lot of enemies in the level already? And what would happen if I shot more than 6 bots exactly at the same time? I'd generally expect the game to crash but something else could happen, like, no more sprites spawning.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

*Slaps self*

Stupid me! Forgot that I wasn't dealing with Keen 4 (Much easier to swap-patch like that.) The *REAL* patch should be this:

Code: Select all

#Make bots use Chain collision
%patch $17CB $22BBW

#Yorp collision duplicate at Chain collision location
%patch $22BB $55 $8B $EC $56 $57 $8B $76 $04 $8B $7E $06 $83 $3D $0A $74 $05
             $83 $3D $0B $75 $27 $C7 $44 $2A $0000W  $C7 $44 $2C $0002W  $C7
             $44 $28 $003AW  $C7 $44 $32 $489DW  $C7 $44 $34 $3360W  $C7 $44
             $22 $FFB0W  $B8 $0022W  $50 $E8 $9BFEW  $44 $44 $5F $5E $5D $C3

Note the one tiny change I forgot to do!



If 6+ bots are shot at the same time, the game *should* simply make some of them vanish. This metasprite overload can be seen also when doors are opened, close to the limit when Keen opens doors, they just vanish. It may however cause the game to crash, it can get a bit touchy.
Nospike
Posts: 160
Joined: Fri Apr 23, 2010 1:54 pm
Location: Some cool place, idk

Post by Nospike »

I altered the animations and got it to do what I wanted. A million thanks. :)
Post Reply