Pad Floor Traps & Triggers - HoraceAndTheSpider/Bloodwych-68k GitHub Wiki

When the reference number of a Pad / Trigger has been allocated in the map data (see Map-Location Data - (6) Pads, Triggers & Holes) the "action" of that reference number is defined within a 128 byte block for each tower.

Each definition is 4 bytes long, following the below AA BB CC DD structure.

In some cases, these are universally set to the same special-case throughout the game, such as with the Vivifcation Machines in BW (ref 4 & ref 5) and spinners.

Pad / Trigger Functions (AA)

00 - NONE
02 - SPIN 180 
04 - SPIN RANDOM 
06 - OPEN VOID-LOCK DOOR (X/Y) 
08 - VIVIFY MACHINE EXTERNAL PAD 
0A - VIVIFY MACHINE INTERNAL PAD 
0C - WOOD DOOR CLOSER #1 (SPECIAL CASE) 
0E - WOOD DOOR CLOSER #2 (SPECIAL CASE) 
10 - TRADER DOOR 
12 - TOWER ENTRANCE (SIDE PAD) (X/Y OF OPPOSITE PAD)
14 - TOWER ENTRANCE (CENTRAL PAD)
16 - REMOVE (X/Y) 
18 - CLOSE VOID-LOCK DOOR (X/Y) 
1A - TOGGLE PILLAR (X/Y) 
1C - CREATE SPINNER (OR OTHER) (X/Y) 
1E - OPEN/CREATE WALL WITH SWITCHES? (X/Y) 
20 - CREATE PAD (F/X/Y)
22 - MOVE PILLAR AT PLAYER X,Y TO PLAYER X-1,Y-1 (SPECIAL CASE) 
24 - CREATE PILLAR (X/Y) 
26 - KEEP ENTRANCE (SIDE PAD) (X/Y OF OPPOSITE PAD)
28 - KEEP ENTRANCE (CENTRAL PAD)
2A - FLASH TELEPORT (F/X/Y)
2C - ROTATE STONE WALL (X/Y) 
2E - TOGGLE WALL (X/Y) 
30 - SPINNER (UNKNOWN DIFFERENCE) (X/Y) 
32 - CLICK TELEPORT (F/X/Y)
34 - TOGGLE GREEN PAD (X/Y) 
36 - ROTATE WOOD WALL COUNTER-CLOCKWISE (X/Y) 
38 - TOGGLE HOLE (X/Y) 
3A - GAME COMPLETION PAD
3C - REMOVE PILLAR / OTHER EVENT (X/Y) 

Pad / Trigger Parameter (BB) Functions marked * or ** use no parameter here

For Those marked (F/X/Y); BB is the floor on which the action is taken.

Pad / Trigger Parameter (CC DD) Functions marked ** use no parameter here

For Those marked (X/Y); CC is the X coordinate at which the action is taken. DD is the Y coordinate at which the action is taken.

Special Cases

Data Locations: (Amiga - IPF: 102)

(0D0)  [D66] [TriggersData1] The Keep
(140)  [DE6] [TriggersData2] Serpent Tower
(1D0)  [E66] [TriggersData3] Moon Tower
(240)  [EE6] [TriggersData4] Dragon Tower
(2D0)  [F66] [TriggersData5] Chaos Tower
(340)  [FE6] [TriggersData6] Zendik's Tower

Example Data: The Keep

00000000 - none
02000000 - special case - spin 180
04000000 - special case - spin random
06000E06 - ref 03 / 1B - open black-locked metal door @ x0E y06
08000000 - ref 04 / 23 - special case - vivify machine external
0A000000 - ref 05 / 2A - special case - vivify machine internal
0C000000 - ref 06 / 32 - special case - bluish gemhole wood doors closer @ (hardcoded x,y)
0E000000 - ref 07 / 3A - special case - tan gemhole wood doors closer @ (hardcoded x,y)
06001403 - ref 08 / 42 - open black-locked metal door @ x04 y03
10000000 - ref 09 / 4B - special case - trader door (closes Northwards wood door in location to the left)
12020A01 - ref 10 / 52 - serpent tower entrance left
14040000 - ref 11 / 5A - serpent tower entrance middle
12030801 - ref 12 / 62 - serpent tower entrance right
12040A11 - ref 13 - 6A - moon tower entrance right
14080000 - ref 14 - 72 - moon tower entrance middle
12050811 - ref 15 - 7A - moon tower entrance left
1206110A - ref 16 - 82 - dragon tower entrance right
140C0000 - ref 17 - 8A - dragon tower entrance middle
12071108 - ref 18 - 92 - dragon tower entrance left
1208010A - ref 19 - 9A - chaos tower entrance right
14100000 - ref 20 - A2 - chaos tower entrance middle
12090108 - ref 21 - AA - chaos tower entrance left
120A0103 - ref 22 - B2 - zendik tower entrance right
14140000 - ref 23 - BA - zendik tower entrance middle
120B0101 - ref 24 - C2 - zendik tower entrance left
16000002 - ref 25 / CB - remove pillar @ x00 y02
16000202 - ref 26 / D3 - remove pillar @ x02 y02
00000000 - unused
00000000 - unused
00000000 - unused
00000000 - unused
00000000 - unused