Patch:Vorticon Elite

From KeenWiki
Jump to navigation Jump to search

Vorticon Elites are extremely dangerous enemies found in Keen 2. This page lists patches relating to these sprites. It is divided into sections relating to the various sprite properties the patches involve. Being fluent with various sprite patch pages will help when working with these patches.

This page includes patches relating to the elite's shot, which is also the same as the Guard Robot's. This means any patches affecting it will affect the Guard Robot also.

Sprite Type

Elites use sprite type 4, which means they are deadly to touch. This not only affects Keen, but the orange enemy shot also respond to it. Changing the Elite's type will make it so that the orange shot hits it (Meaning it can't shoot well.) The 'enemy shot' is the projectile the elite (And Guard Robot) shoot.

Keen 2

#Elite sprite type:
%patch $3CB9 $04 #Elite
%patch $7648 $0B #Enemy shot

Sprite Behavior

The Elite has three behaviors. The first, and most complex is to walk towards Keen, occasionally jumping or shooting him. The elite will not jump however if the lights are off. The second behavior is to create a shot, then resume walking. The third behavior is to slide along the ground, turning when hitting walls, and afterwards returning to walking.

Note that altering the orange shot will also affect the shots of the Guard Robot.

$40CEW #Run, jump, seek Keen
$41C2W #Shoot
$423CW #Slide back and forth along the ground
$4283W #Elite collision

When spawned

#Run, jump, seek Keen
%patch $3CDC {$40CEW}

In level

%patch $4121 {$423CW} #Slide (Randomly when walking)
%patch $418A {$41C2W} #Shoot (Randomly when walking)
%patch $41BD {$423CW} #Slide (When landing after jumping)
%patch $4237 {$40CEW} #Run, jump, seek Keen (After shooting)
%patch $4266 {$40CEW} #Run, jump, seek Keen (After sliding)

%patch $766C {$7567W} #Orange shot behavior
%patch $7677 {$775FW} #Orange shot collision

Elite jumping frequency

This patch controls how often the Elite jumps. By default the Elite's frequency depends on a general 'difficulty variable' with value 6. This patch creates a new variable for the Elite to use which can be customized. (Here a lower value results in less jumping.)

Elite jumping frequency

#Elite jumping frequency
%patch $4100  $212CW
%patch $198AC [$0006W]

Elite jumps in the dark

This patch allows the Elite to continue jumping 'in the dark' (When the lights have been turned off.)

Elite jumps in the dark

#Elite jumps in the dark
%patch $410D $90 $90

Elite stands\crouches instead of jumping

This patch turns the Elite's jump into a 'freezing' which can be used to make it stand still or crouch (Ducking under shots.) The first line stops the Elite moving. On the second line is the 'timer'; when this reaches $0040W the Elite will stop. On the third line the Elite's action is set back to 'walking' and its speed to $0064W. (Walk right.)

Elite stands\crouches instead of jumping

#Elite crouches instead of jumping
%patch $410F $A1 $0002W $A3  $96EAW  $A3 $96E0W
%patch $425B $A1 $96EAW  $03 $06 $5AF0W  $A3 $96EAW  $3D [$0040W]  $7E $0C $C7
             $06 $96F2W  {$40CEW}  $C7 $06 $96E0W  [$0064W]  $5E $5D $C3

Complete Elite jumping behavior

This is the complete code for the Elite's jumping behavior. It is relatively simple. On the first line the Elite's direction is checked and one of two animations chosen. (Left or right.) $E8 $1814W $E8 $1854W calls tile collision and gravity; replacing the first part with $90 $90 $90 will make the Elite 'ghost' through tiles, replacing the second part will stop it falling.

One line 3 the tile checks begin. If the Elite touches a floor it changes to its 'walking' behavior while touching walls makes it change its direction to move away ('bounce off') from them.

Complete Elite jumping behavior

#Complete Elite jumping behavior
%patch $423C $55 $8B $EC $56 $83 $3E $96E0W  $00 $7E $08 $C7 $06 $96E8W  [$0064W]
                 $EB $06 $C7 $06 $96E8W  [$0063W]  $E8 $1814W  $E8 $1854W  $8B
             $F0 $A9 $02 $00 $74 $06 $C7 $06 $96F2W  {$40CEW}  $F7 $C6 $04 $00
             $74 $06 $C7 $06 $96E0W  [$FF9CW]  $F7 $C6 $01 $00 $74 $06 $C7 $06
             $96E0W  [$0064W]  $5E $5D $C3

Elite doesn't jump OR shoot in the dark

This patch stops the Elites from jumping OR shooting Keen whenever the lights are off. This makes them considerably less of a threat when this happens. The second version of this patch is compatible with the 'custom jump frequency' patch given above.

Elite doesn't jump OR shoot in the dark

#Elite doesn't jump OR shoot in the dark
%patch $40FB $83 $3E $96BEW  $00 $74 $21 $E8 $76E1W  $8B $16 $5AF0W  $D1
             $E2 $3B $C2 $73 $16

#Elite doesn't jump OR shoot in the dark - custom jumping frequency
%patch $198AC [$0006W]
%patch $40FB  $83 $3E $96BEW  $00 $74 $21 $E8 $76E1W  $8B $16 $212CW  $D1
              $E2 $3B $C2 $73 $16

Elite doesn't shoot

This patch stops the Elites from ever shooting Keen.

Elites don't shoot

#Elites don't shoot
%patch $4184 $EB

Elite shooting duration

This patch controls how long the Elite spends shooting. The first value is how long into the shooting behavior the Elite produces a shot while the second value is how long the shooting behavior lasts. (By default the first is one half of the second.)

Elites don't shoot

#Elite shooting timing
%patch $41E6 [$001EW] {$7C} #Make shot here
%patch $41E6 [$32]    {$7E} #Return to walking here

Complete Elite shooting behavior

This is the complete code for the Elite's shooting behavior. On the first line the Elite's direction is checked and one of two animations chosen. (Left or right.) The Elite doesn't respond to gravity or tiles while shooting.

One line 3 the Elite's timer is checked. If this is greater than $1E then the Elite will continue, otherwise it skips to the end of the code. After this is a second check is made to see how many shots the Elite has made. If it has made 0 then it will run the 'make shot' code, otherwise it skips to the end of line 7 (The second timer check.)

The first thing the 'make shot' code does is to set the Elite's shots made to 1. It then plays sound $26. Line 5 is a direction check that tweaks the shot's horizontal position. Line 6 sets the shot's vertical position relative to the shooter.

At the end of line 7 a second timer check is made; if the Elite's timer is larger than $32 it sets its action to $40CEW or 'walking'.

Complete Vorticon Elite shooting code

#Vorticon Elite shooting code
%patch $41C2 $55 $8B $EC $56 $83 $3E $96E0W  $00 $7D $08 $C7 $06 $96E8W  [$0060W]
                 $EB $06 $C7 $06 $96E8W  [$0061W]  $A1 $96EAW  $03 $06 $F0 $5A
             $A3 $96EAW  $3D [$001EW]  $7C $4F $83 $3E {$96ECW}  [$00] {$75} $3B $C7
             $06 {$96ECW}  [$0001W]  $B8 [$0026W]  $50 $E8 $740DW  $44 $44 $BE $5E
             $01 $83 $3E $96E0W  $00 $7D $03 $BE $A2 $FE $56 $A1 $96CAW  $8B
             $16 $96C8W  $81 $C2 [$FF00W]  $15 [$FFFFW]  $50 $52 $FF $36 $96C6W
             $FF $36 $96C4W  $E8 $3414W  $83 $C4 $0A $83 $3E $96EAW  [$32] {$7E}
             $06 $C7 $06 $96F2W  {$40CEW}  $5E $5D $C3

Speed and Jump Height

The default speed of Elites is +-100 when walking. They will head towards Keen when spawned by default. The Elite will double its speed in a 'charge' towards Keen if Keen is level with it. Elites can jump as high as the Vorticon.

Note that altering the Elite's shot speed will not change the speed of the Guard Robot's shot. This aspect of the shot is different for both sprites.

Starting speeds

%patch $3D06 [$0064W] #If left of Keen (Move right)
%patch $3CFF [$FF9CW] #If right of Keen (Move left)

In level

#When walking\jumping
%patch $4150 [$00C8W] #Charging speed l/r (If Keen is level with Elite)
%patch $4158 [$0064W] #Walking speed l/r (If Keen is above\below Elite)

%patch $4110 [$012CW] #Jump height

#Orange shot
%patch $4201 [$015EW] #Right
%patch $420B [$FEA2W] #Left

Sprite Collision

Elites interact with Keen's shots. This produces a shot Elite. (See behavior section.) The shot Elite also resets its collision and behavior, the new collision, used for most dead sprites ignores all other sprites, the new behavior likewise is just 'fall an animate'

The Elite's shot specifically isn't destroyed by three sprites, the Elite itself, the Guard Robot and the Tantalus ray. This is to stop 'friendly fire'


%patch $3CE1 {$4283W}   #Elite collision
%patch $428E $3F $0A  #Elite killed by Keen's shot

%patch $42BC {$75FCW}   #Dead Elite behavior
%patch $42B7 {$61A2W}   #Dead Elite collision

#Orange shot
%patch $7677 {$775FW}  #Orange shot collision
%patch $776B $3D $06 #Enemy shot ISN'T destroyed by Robot
%patch $7770 $3D $0D #Enemy shot ISN'T destroyed by Tantalus
%patch $7775 $3D $04 #Enemy shot ISN'T destroyed by Elite

Elite strength

This is the number of shots minus one needed to kill the Elite. By default it is 3.

Elite strength

#Elite strength
%patch $3CE6 [$0002W]


The Elite has four animation cycles, a four frame walking cycle, a two frame dying cycle and two one-frame shooting and sliding cycles

When spawned

%patch $3D0B [$0058W] #Start

In level

%patch $40DD [$005CW] #Walking right
%patch $40E5 [$0058W] #Walking left
%patch $40EF $03    #Frames used -1
%patch $40EB $04    #Animation speed

%patch $41D1 [$0060W] #Shooting right
%patch $41D9 [$0061W] #Shooting left

%patch $424B [$0062W] #Walking right
%patch $4253 [$0063W] #Walking left

%patch $42B2 [$0064W] #Shot
%patch $42AD $02    #Frames used, not -1


These are the sounds the sprite uses.

%patch $429D $27 #Elite death