Sonic Robo Blast 2 - Retro Bossses + Maces and Chains Resource

This text document will guide you through the steps of properly setting up these 
bosses and the "secret" 2.1/2.0 mace system.

If you plan to use anything from this PK3, please do not include this document.

(Most of this information comes from the SRB2 Wiki)

COMMONALITIES

By default, all of these bosses will cause an Egg Capsule to appear upon death, 
if it is set up. If any boss has the "Special" flag set, the stage will 
immediately end upon death, instead.

There are certain Lua files included in this pack that are required for certain 
bosses to work. Here is a list:

LUA_CMMN - Used by all bosses except for 2.1 and 2.0 Brak Eggman
LUA_OJTF - Used by 2.1 and 2.0 Egg Mobile, and 2.1 Metal Sonic
LUA_EMCM - Used by 2.1 and 2.0 Egg Mobile
LUA_ENCM - Used by 2.1 and 2.0 Egg Slimer
LUA_EOCM - Used by 2.1 and 2.0 Sea Egg
LUA_OMCE - Used by 2.1 Eggscalibur
LUA_BECM - Used by 2.1 and 2.0 Brak Eggman

EGG MOBILE (Greenflower Boss)

2.0 Version:

This boss spawns 33 fracunits above the ground, unless its Z position is 
overridden. Adding the "Ambush" flag will spawn a spike ball shield around the 
boss, akin to the pre-2.1 CEZ boss.

2.1 Version:

This boss spawns 128 fracunits above the ground, unless its Z position is 
overridden. Adding the "Ambush" flag will disable the horizontal aiming of the 
laser attack.

Both Versions:

The file LUA_EMCM is required for both versions to work, as it freeslots and 
defines sprites and states that are used in them. If you plan to use both bosses 
in the same WAD/PK3, you only need to copy this file once. Regardless, it must 
be loaded before either.

EGG SLIMER (Techno Hill Boss)

2.0 Version:

Setting the "Extra" flag on the boss's map Thing will change its behavior to 
that of its pre-1.09.4 version. This version will still look for an axis, but it 
will use its own hardcoded radius instead. It will also not speed up when hit.

Both Versions:

This boss's setup is nearly identical to 2.2's version, so instead, here's a 
link to the current boss's object page on the wiki: 
https://wiki.srb2.org/wiki/Egg_Slimer

The file LUA_ENCM is required for both versions to work, as it freeslots and 
defines sprites and states that are used in them. If you plan to use both bosses 
in the same WAD/PK3, you only need to copy this file once. Regardless, it must 
be loaded before either.

SEA EGG (Deep Sea Boss)

2.0 Version:

This version makes use of the LE_PINCHPHASE tag to raise the water, and the 
LE_BOSSDEATH tag to lower the water. Both tags are used in the example map.

Both Versions:

This boss behaves quite differently from its 2.2 counterpart. It requires a 
network of 6 to 16 waypoints, each numbered using their Angle value. This boss 
goes straight to the waypoint with an Angle of 0, then randomly decides on a 
waypoint with an Angle between 1 and 5. The next waypoint it goes to is 
determined by the Parameter value or Thing type number given to the current 
waypoint (The Thing type number is calculated as 292, plus the Angle of the 
next waypoint multiplied by 4096).

When this boss reaches the waypoint with Angle 0 again, it chooses another 
random waypoint with an Angle between 1 and 5, repeating the process. It will 
fire torpedoes at the player when it's stationed at a waypoint with the "Ambush" 
flag set.

Both Versions:

The file LUA_EOCM is required for both versions to work, as it freeslots and 
defines sprites and states that are used in them. If you plan to use both bosses 
in the same WAD/PK3, you only need to copy this file once. Regardless, it must 
be loaded before either.

EGGSCALIBUR (Castle Eggman Boss)

This boss makes use of a cage made out of FOFs that it can raise and lower 
during the fight. Please note that the FOF control sectors will need the tag 
65534 for this to work.

This boss makes use of the ported 2.1 mace system, which uses a slightly 
different setup compared to 2.2's mace system. As such, it requires LUA_OMCE to 
function properly. Look further below for an in-depth explanation on how to set 
these up.

METAL SONIC (Egg Rock Boss)

This boss will need "gather points" (same as the 2.2 version) placed on the map 
to be able to use his energy ball attacks. Otherwise, he will resort to his 
other methods of attack.

BRAK EGGMAN (Egg Rock Core Boss)

2.0 Version:

This boss uses a network of five boss waypoints to determine where it can jump 
to and stand on. When a player is hit by the boss's goop, the boss will jump 
to the waypoint closest to that player. The boss will interpret a waypoint with 
no flags as the "center" platform, and it will be ignored after the sixth hit. 
After it throws missile, the boss will jump to the center platform if it is not 
already on it or it is not disabled. Otherwise, it will jump to a random 
platform instead.

The five waypoints should have these flags set:

Waypoint 1 = No Flags
Waypoint 2 = Extra
Waypoint 3 = Flip
Waypoint 4 = Extra and Flip
Waypoint 5 = Special

*** IMPORTANT NOTES ***
This boss needs the special flag to be set on its map Thing if there is no egg 
capsule. Otherwise, the stage will not end.

This boss will automatically scale to twice the default in a level (2*FRACUNIT 
in regular levels, FRACUNIT in "OldBrak" levels). This behavior can be disabled 
if the "Extra" flag is set on the map Thing's flags.

2.1 Version:

This boss gains an eletric shield when the "Ambush" flag is set. It also makes 
use of the LE_BRAKVILEATACK tag, which is used in the example map to raise the 
barriers when Brak begins his "sniping attack". Otherwise, this boss functions 
identically to its 2.2 counterpart, with the exception of its death behavior 
(it doesn't get flung off the arena).

Both Versions (Might be deleted):

The file LUA_BECM is required for both versions to work, as it freeslots and 
defines sprites and states that are used in them. If you plan to use both bosses 
in the same WAD/PK3, you only need to copy this file once. Regardless, it must 
be loaded before either.

2.0/2.1 MACE SYSTEM

Setting the "Ambush" flag on any of the chain spawn Things will make them use 
the "big" maces/chains rather than the smaller ones.

Setting the "Extra" flag on any of the chain spawn Things (besides the hidden 
sling) will make them use the 2.0 maces/chains rather than the 2.1 versions.

Linedef type 9 is used for setting up maces, just like 2.2. However, the 
parameters to pass in are slightly different from 2.2's maces:

	*Linedef tag*
	Should be set to the Angle of the mace/chain you are controlling.

	*Floor height*
	Determines the spinning/swinging direction of the mace/chain.
	(For swinging maces/chains, this is limited to instances where all 
	maces/chains in a control sector are given the same properties)

	*Ceiling height*
	Spinning maces/chains - Determines the maximum speed
	Swinging maces/chains - Determines the swinging angle
	Both - Setting this to 0 makes the mace/chain stationary

	*Linedef X distance*
	Determines the number of chain links in the mace/chain.
	
	*Linedef Y distance*
	Determines the speed of the mace/chain (0 is stationary).
	
	*Front texture X offset*
	Spinning maces/chains - Determines the spinning direction 
		(between 0 and 359; 0 and 180 are vertical, 90 and 270 horizontal)
	Swinging maces/chains - Determines the spawn angle
	
	*Front texture Y offset*
	Spinning maces/chains - Determines the swinging direction
		(between 0 and 359; 0 and 180 are vertical, 90 and 270 horizontal)
	Swinging maces/chains - Determines the spawn angle 
		(between 0 and 359; 0 is east)
	
	*Not Climbable lindef flag*
	When set, this lets the player change the direction of the spinning chains 
	ONLY. This has been changed from 2.1, where the flag disabled this behavior, 
	in order to stay consistent with 2.2's spinning chains.

The "Hidden Sling" chain should be used alongside a control linedef of type 442 
in order for it to appear in-stage by changing its state.
