Documentation (Prince of Persia 2 Special Events)

Are you creating new levels/mods for DOS or did you finish your work? Tell us here!

Moderator: English Moderator Team

Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3281
Joined: April 9th, 2009, 10:58 pm
Contact:

Documentation (Prince of Persia 2 Special Events)

Post by Norbert » June 22nd, 2014, 3:56 pm

[Edit: the latest version can be downloaded here.]

I have finished the first version of a document that describes all the special events that take place in PoP2:

2014-06-22_PoP2_Special_Events.pdf

The source document (.odt; OpenDocument) is also available, here.
Its main page on PoPOT.org is here.
Feedback is welcome. Just post it in this thread or send an e-mail.

David
The Prince of Persia
The Prince of Persia
Posts: 1548
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 2 Special Events)

Post by David » June 30th, 2014, 6:45 pm

I made a list of all events I could find (from the disassembly and by playing the game). I attached the list to this post.
Spoiler: show

Code: Select all

Prince of Persia 2 special events

Topic in forum: http://forum.princed.org/viewtopic.php?f=73&t=3497

(PoP2 Initial Release)

Notes:
* Xpos is measured the same way as for guards: 144=left edge, 464=right edge of the room
* "VERIFIED" means that when I hex-edited the room number at or around the mentioned location, the special event changed or disappeared.
	If a line is not marked as such:
		* If there is an offset, then it's a guess based on the disassembly.
		* If there is no offset, then it's an observation based on playing the game.


level 1
seg003:1AC2 dead kid/guard disappears on rooftops, except where otherwise noted
	Because you don't see them anyway behind the ledge.
seg030:0633 kid/guard splats after falling (ypos>384), except where otherwise noted
(no offset yet) Guard's 1 HP doesn't blink, unless you come here from level 14 with alt-N.

level 1 room 4:
seg011:0222 [VERIFIED] if starting here: falling entry
(tile type 0x27) when kid enters here first: breaking window

level 1 room 11: last chasm
seg030:1748 [VERIFIED] don't follow down
seg032:0316 [VERIFIED] falling 2 rows + landing below the room = die (instead of -1 HP) (row>=3)

level 1 room 15: market
seg003:1520 [VERIFIED] can climb from row 0, but not from other rows
seg006:07A0 ??? drawing custom images
seg010:005D [VERIFIED] kid doesn't scream
seg030:1719 [VERIFIED] don't follow to the right + killed if goes right
seg032:13BD [VERIFIED] jump up as if there was nothing above
seg032:147F [VERIFIED] hang against wall
seg003:1AD7 [VERIFIED] dead kid/guard does not disappear
OVL_04/L00000145 [VERIFIED] load other palette
OVL_04/L000001E3 [VERIFIED] water palette animation
OVL_04/L0000023E [VERIFIED] (kid is past right edge and xpos>513) killed if goes right (Note: room number is not checked here, only xpos)

level 1 room 16: bridge right
seg003:0DFB [VERIFIED] kid/guard doesn't splat after falling (ypos>384)
seg006:0799 ??? drawing custom images
seg006:07BA ??? drawing custom images
seg010:0057 kid doesn't scream?
seg030:064A guard doesn't splat?
seg003:1AD0 [VERIFIED] dead kid/guard does not disappear
OVL_04/L000000BC (CUST 0x12) [VERIFIED] splash when kid/guard falls, dies in bottom row
OVL_04/L0000013F [VERIFIED] load other palette
OVL_04/L00000197 [VERIFIED] kid is clipped at bottom at y=172
OVL_04/L000001DC [VERIFIED] water palette animation
OVL_04/L000003BF [VERIFIED] kid splash
OVL_04/L00000447 [VERIFIED] guard splash (ypos>=172)
OVL_04/L0000049A (CUST 0x12) [VERIFIED] if someone is in the bottom row: start splash
OVL_04/L000007EC [VERIFIED] (tile type 0x25) animated water on pillar
OVL_12/L0000010A [VERIFIED] guards fall off the bridge when they die

level 1 room 19: bridge left
seg003:0DF4 [VERIFIED] kid/guard doesn't splat after falling (ypos>384)
seg006:0792 ??? drawing custom images
seg006:07B3 ??? drawing custom images
seg010:0051 kid doesn't scream?
seg030:0643 guard doesn't splat?
seg003:1AC9 [VERIFIED] dead guard/kid does not disappear
OVL_04/L000000C2 (CUST 0x13) [VERIFIED] splash when kid/guard falls, dies in bottom row
OVL_04/L00000139 [VERIFIED] load other palette
OVL_04/L00000190 [VERIFIED] kid is clipped at bottom at y=172
OVL_04/L000001D5 [VERIFIED] water palette animation
OVL_04/L000003B8 [VERIFIED] if hanging, go with ship + kid splash (ypos>=172)
OVL_04/L000003D6 [VERIFIED] when hanging in row 0 or 1: go with ship + play music
OVL_04/L00000440 [VERIFIED] guard splash (ypos>=172)
OVL_04/L000004A0 (CUST 0x13) [VERIFIED] if someone is in the bottom row: start splash
OVL_04/L000007D8 [VERIFIED] (tile type 0x25) animated water on pillar
OVL_04/L00000A12 [VERIFIED] climb up onto ship
OVL_04/L00000A2E [VERIFIED] grab ship (row<3, xpos<208)
OVL_04/L00000A54 [VERIFIED] go with ship, climbing up = next level (xpos<208)
OVL_12/L00000103 [VERIFIED] guards fall off the bridge when they die
(tile type 0x26) ship


level 2
seg011:0234 [VERIFIED] start lying + stand up
(no offset yet) when climbing up or down: as if I released up/down and pressed shift
(no offset yet) when falling: buried in sand
	Note: if kid is not in room 1, something else is drawn instead of the sand.
OVL_05/L0000001A: kid is clipped at bottom at y=126

level 2 room 1: left side of island
seg030:16F8 [VERIFIED] don't follow to the left
OVL_05/L00000121 [VERIFIED] no water palette animation in this room, only in others
OVL_05/L00000172 [VERIFIED] no sea sound in this room, only in others
OVL_05/L00000207 [VERIFIED] sandfloor sinks when kid steps on it (column 2..7)
OVL_05/L0000026E [VERIFIED] leave left: exit level (xpos<130) (Note: room number is not checked here, only xpos)
OVL_05/L0000038B: (CUST 0x06) ???
(desert_left_proc = 29CFh:370h)
(no offset yet) door opens when all sandfloors sink
(tile type 0x1E) sandfloors

level 2 room 2: middle of island
(tile type 0x1D) water on raft

level 2 room 3: right side of island
seg030:1667 [VERIFIED] don't follow right if kid turns left?
seg030:16B3 [VERIFIED] don't follow right
OVL_05/L000002A6 [VERIFIED] walk in water sound + disable standing jump/crouch/jump up + disable run-turn from right to left (xpos>489)
(tile type 0x1C) water on rocks


(level 3: nothing)


level 4
seg002:0159 [VERIFIED] time starts when restarting level 4
seg002:0165 [VERIFIED] time starts after completing level 4
OVL_12/L00001209 room 22,23,28 ?
Note: Sigh is not a special event. It is played (on any level) when kid just closed a gate between him and a guard.


level 5
seg007:0768 load "sitting" image
seg011:0F7E ???

level 5 room 3: carpet
seg001:0897 [VERIFIED] kid sitting -> carpet goes up
seg003:1B60 ???
seg008:1803 something about modifiers after clearing the loose floor
seg030:1547 [VERIFIED] don't follow up
	(without this, kid dies when the carpet reaches the top of the screen)
seg032:081C [VERIFIED] crouch on carpet -> sit on carpet
OVL_13 is loaded only if kid is in this room
(carpet_room_proc = 2DC2h:0) OVL_13/L00000000: play music 0x21=33 (RugRoom.gmf)
OVL_13/L00000428: load other palette?
(tile type 0x12) carpet
(tile type 0x1B) top hole

level 5 room 7: left of bridge
seg003:0653 (row 1) something about flipping with sword
seg003:096F (row 1) skeleton on bridge has infinite HP
seg004:0368 ???
seg006:265F (row 1) skeleton on bridge shows no HP
seg008:0ACB something about the gate
seg008:251C load music 65 (BrgDoor.gmf) when the door is closed (col>=3)
seg008:2537 play music 65 (BrgDoor.gmf) when the door is closed (col>=3)
seg010:0620 bridge fight music 64 (BrgFight.gmf)
seg011:0880 (row 1) ??? bounds check?
seg030:11DD (row 1) ???
OVL_06/L00000133 (row 1) ???
OVL_06/L00000C01 ???
OVL_12/L000003B9 (row 1) ???
OVL_12/L00000827 (row 1) ???
OVL_12/L00000881 (row 1) ???
OVL_12/L00000BBF (row 1) ???
OVL_12/L00000C36 (row 1) ???
OVL_12/L00000C8A (row 1) ???
OVL_12/L00000CF1 (row 1) ???
OVL_12/L00000D2A (row 1) ???
OVL_12/L000010F8 (row 1) ???
OVL_14/L0000016E ???

level 5 room 10: bridge
seg001:0443 [VERIFIED] needed for correct drawing of collapsed bridge
seg003:064C (row 1) something about flipping with sword
seg003:0968 [VERIFIED] (row 1) skeleton on bridge has infinite HP
seg003:0ACD something about going right
seg006:0F1E something about CUST
seg006:2655 [VERIFIED] (row 1) skeleton on bridge shows no HP
seg010:0619 [VERIFIED] bridge fight music 64 (BrgFight.gmf)
seg011:0879 (row 1) ??? bounds check?
seg030:11D6 (row 1) ???
seg030:1779 [VERIFIED] don't follow down
seg030:17D7 [VERIFIED] down = scream + die
seg032:14CC [VERIFIED] when climbing up: lose sword
seg032:1C6E ??? something about shift-back?
OVL_06/L0000012C (row 1) ???
OVL_06/L00000BF3 ???
OVL_12/L000003B2 (row 1) ???
OVL_12/L00000820 (row 1) ???
OVL_12/L0000087A (row 1) ???
OVL_12/L00000BB8 (row 1) ???
OVL_12/L00000C2F (row 1) ???
OVL_12/L00000C83 (row 1) ???
OVL_12/L00000CEA (row 1) ???
OVL_12/L00000D23 (row 1) ???
OVL_12/L000010F1 (row 1) ???
OVL_14 is loaded only if kid is in this room
OVL_14/L00000110 bridge falls when 4<=Kid.col<=6 and 5<=Guard.col<=6 and Kid.seq!=0x55 (dying) + music 0x42=66 (BrgFall.gmf)
OVL_14/L000003F3 [VERIFIED] load other palette
OVL_14/L0000055B ???
OVL_14/L00000803 ???
OVL_14/L000008BF [VERIFIED] needed for correct drawing of collapsed bridge
(caverns_bridge_proc = 2DC2h:3ECh)
(tile type 0x2C) bridge
(no offset yet) kid can turn left when the bridge collapses (or is this not special?)
(no offset yet) kid shows through floor when climbing (looking right) (bug?)
(no offset yet) skeleton wants to press the button if the door is open
(no offset yet) skeleton won't step on the middle of the bridge
(no offset yet) when jumping up from bridge, kid does not jump up as far as usual -- though this is probably because of the tiletype, not the room

level 5 room 12: right of bridge 
seg003:065A (row 1) something about flipping with sword
seg003:0976 (row 1) skeleton on bridge has infinite HP
seg004:0376 ???
seg006:2669 (row 1) skeleton on bridge shows no HP
seg010:0627 bridge fight music 64 (BrgFight.gmf)
seg011:0887 (row 1) ??? bounds check?
seg030:11E4 (row 1) ???
OVL_06/L0000013A (row 1) ???
OVL_06/L00000C0F ???
OVL_12/L000003C0 (row 1) ???
OVL_12/L0000082E (row 1) ???
OVL_12/L00000888 (row 1) ???
OVL_12/L00000BC6 (row 1) ???
OVL_12/L00000C3D (row 1) ???
OVL_12/L00000C91 (row 1) ???
OVL_12/L00000CF8 (row 1) ???
OVL_12/L00000D31 (row 1) ???
OVL_12/L000010FF (row 1) ???
OVL_14/L00000181 ???


level 6
seg003:04AA [VERIFIED] the two exits bring to different places of next level
	if (col<6) then which=1 else which=2
seg007:0C72 [VERIFIED] start without sword

level 6 room 27: cliff where carpet lands
seg002:00AE [VERIFIED] if kid starts the level here: seamless transition from cutscene
seg003:01BE [VERIFIED] room 0 is filled with "empty" tile (other rooms have wall, except if it's above the current room)
	So kid won't hang against wall at the bottom of this room.
seg003:17D0 [VERIFIED] don't clip kid when he's climbing/hanging
seg011:0240 [VERIFIED] standing entry, set xpos=240
seg030:17AA [VERIFIED] don't follow down when climbing or hanging against wall
seg030:1815 [VERIFIED] leave left: enter the ruins
	OVL_08/L000001A3: dir=right, seq=turning, room=3, col=4, row=2
(ruins_start_proc = 2A4E:01EEh) OVL_08/L000001EE: load other palette
(ruins_start_exit_proc) OVL_08/L00000202: load default palette


level 7
seg007:0C80 [VERIFIED] start with short sword
seg011:01B4 [VERIFIED] has two alternate start positions
	if (which=2) then room=4, tile=25
	else room=32, tile=24


level 8
seg007:0C87 [VERIFIED] start with short sword
seg008:12FC [VERIFIED] you can open the exit only if you have the long sword
	Note that you can always open exit doors in the starting room, but you can never enter them. (bug?)

level 8 room 9: father's sword
seg002:00D8 if kid (re)starts the level here: seamless transition from cutscene
seg006:2790 [VERIFIED] don't display the front part of the floor of the sword
	Top 2 bits of modifier 2 are set to 01. That means "draw front layer only", but that is too much.
seg007:0C8E [VERIFIED] if restarting from here: start with long sword
seg011:0D95 [VERIFIED] checkpoint is activated only if you have father's sword
seg032:09E2 [VERIFIED] after shock: cutscene
seg032:0E70 something about turning around?
seg032:1176 [VERIFIED] pick up sword and be shocked
seg033:029C [VERIFIED] kid bumps into gate at different x-coordinate (needed because of different perspective)
seg033:0904 something about standing up from crouch under a gate
seg033:0CB7 ???
seg033:0D7E [VERIFIED] if kid draws sword at the gate, he can go through gate to the left
OVL_08/L00000C87 ???
OVL_16 is loaded only if kid is in this room
OVL_16/L000000BD go to room 9?
(sword_room_proc = 2DC2h:1Ch)


level 9 room 2: horse
seg006:229F [VERIFIED] horse image (25457), layer=0 (behind kid), pos=[22,159]
OVL_08/L00000246 play music 0x5B=91 (Horse.gmf) (only once)
(horse_chasm_proc = 2A4E:0226h)

level 9 room 8
seg030:160C [VERIFIED] (row 0, run-jump) leave left: jump onto horse
OVL_08/L00000C87 ???

level 9 room 16: chasm which is jumped by the horse
seg003:17BF [VERIFIED] don't clip kid when he's climbing/hanging
seg010:066D ??? something about guards?
seg030:179C [VERIFIED] don't follow down when climbing or hanging against wall
OVL_08/L0000022D when entering from right (col>=9) play music 0x5C=92 (Chasm.gmf)
(horse_chasm_proc = 2A4E:0226h)


level 10 room 22: horse
seg002:00B5 [VERIFIED] if kid starts the level here: seamless transition from cutscene (don't load palette)
seg006:13FA horse?
seg006:1F8B horse?
seg006:22DE [VERIFIED] horse image (25456), layer=1 (in front of kid), pos=[102,119]
seg011:025A [VERIFIED] standing entry, set xpos=310


(level 11: nothing)


level 12 room 11
seg030:039B ??? something about the flaming sword?

level 12 room 19
seg030:03A2 ??? something about the flaming sword?


level 13
seg007:0770 load "flamed" images
seg007:0778 load "flaming" images
seg008:133C [VERIFIED] no "leveldoor open" music

level 13, room 2: text
(temple_text_proc = 2A4E:0FAEh) when entering from right (col>=9) play music? 0x5C=92 (Chasm.gmf)

level 13, room 4: flame
seg000:0466 ??? shadow?
seg003:0186 [VERIFIED] room 0 is filled with "empty" tile
seg008:0CC8 [VERIFIED] no "leveldoor stopping" sound
seg008:0CE3 [VERIFIED] no "leveldoor opening" sound
seg008:1625 [VERIFIED] button has no sound
seg011:0B07 [VERIFIED] shadow animation
seg030:1780 [VERIFIED] don't follow down
seg030:17DE [VERIFIED] down = scream + die
OVL_09/L00000FC0 [VERIFIED] needed for the shadow animation
OVL_15 is loaded only if kid is in this room
OVL_15/L0000022E [VERIFIED] (row=1, xpos<=0xDA=218) If kid touches row 0, column <= 1, he'll burn. (even if the blue flame is not there!)
OVL_15/L00000268 [VERIFIED] (row=1, xpos<=0xEC=236) play music 0x3D=61 (Approach.gmf)
OVL_15/L00000288: (row=1) If kid dies, shadow jumps over to flame and picks it up.
OVL_15/L000002C8 [VERIFIED] needed for the shadow animation
	Without this, nothing happens. The "PRESS ANY KEY" won't blink either.
OVL_15/L000003F8 (CUST 0x20) [VERIFIED] animate flame
OVL_15/L000005E0 ??? some rect?
(flame_room_proc = 2DC2h:4ECh)
(tile type 0x2B) blue flame
(no offset yet) Shadow hangs as if there was no wall under the ledge.
(no offset yet) After getting the flame, guards bow if kid is in the same row as them.

level 13, room 13: chasm before flame
seg003:019B [VERIFIED] room 0 is filled with "empty" tile
	Only for collision detection, not for drawing!
seg030:1795 [VERIFIED] don't follow down
seg030:17F3 [VERIFIED] down = scream + die
OVL_12/L0000070F (something with guards)


level 14
seg005:0CE1 can't save after level 14?

level 14 room 1: tower top
seg002:00C3 [VERIFIED] if kid starts the level here: seamless transition from cutscene
seg003:172E [VERIFIED] don't clip kid when he's climbing/hanging
seg006:0650 ??? cust?
seg006:13EC [VERIFIED] horse is behind the tower
seg006:1F84 [VERIFIED] horse is behind the tower
seg006:22C4 [VERIFIED] horse image (25458), layer=1 (in front of kid), pos=[37,112]
seg007:0461 something about sword (palette?)
seg011:027B [VERIFIED] standing entry, set xpos=306
(palacetop_proc = 29CF:12FEh)

level 14 room 2: tower bottom
OVL_10/L000004FD [VERIFIED] enter the tower (char_x_right_coll<=0x0131=305, action!=falling)
(no offset yet) Then kid is brought to room 4, (col=???) and draws his sword.

level 14 room 3: spider
seg003:01DD about room 0
seg003:0EBD fell out? (row>=11)
seg003:0FDF something about walls? (col<0)
seg003:17DE [VERIFIED] don't clip kid when he's climbing/hanging
seg030:1736 [VERIFIED] don't follow to the right
seg030:1756 [VERIFIED] don't follow down
seg032:0634 [VERIFIED] dead guards disappear
OVL_10/L000000B6 [VERIFIED] guards may give potion when they die (3 possibilities with equal chances: no potion, small potion, big potion)
OVL_10/L000002E6 [VERIFIED] (row=1 && kid is dead) kid is clipped at bottom at y=0x0077=119
OVL_10/L00000600 [VERIFIED] guards appear (with sound)
	in row 1 and 2, only on rows where there is nobody, there may be no more then 2 guards at the same time.
	OVL_10/L00000278 room number for new guard is set here
OVL_10/L000013A7 Music: 0x10D=269 (Spider.gmf)
OVL_10/L00001386 [VERIFIED] load potions palette (without this, potions and their bubbles will be grey)
OVL_10/L000014D0 (cust 0x19) [VERIFIED] animate spider
(spider_chess_proc = 29CF:1334h)
(tile type 0x28) spider

level 14 room 4: chessboard left
OVL_10/L00000561 ???
OVL_10/L0000135B [VERIFIED] clear screen before drawing room (black background)
sOVL_10/L00001456 (cust 0x1A) [VERIFIED] animate Jaffar's face
(spider_chess_proc = 29CF:1334h)
(tile type 0x1F) Jaffar's face

level 14 room 5: chessboard right
seg003:0ECB fell out? (row>=11)
seg030:1764 [VERIFIED] don't follow down
OVL_10/L00000553 [VERIFIED] if (kid is flame && kid's body is in room 7 or 8 && kid.col<=4 && kid's current frame requires floor below) then die (+ Jaffar laughs)
(spider_chess_proc = 29CF:1334h)

level 14 room 6: crystal
seg000:0BCC [VERIFIED] if (modifier[0] & 0x10) sparkle
seg003:17EC [VERIFIED] don't clip kid when he's climbing/hanging
OVL_10/L00000004 ???
OVL_10/L00001618: play music 0x10E=270 (Crystal.gmf)
OVL_10/L0000162E (CUST 0x1C) ???
(crystal_Jaffar_proc = 29CF:15A8h)
(no offset yet) If there is only one false prince left, and the kid is alive, the false prince will disappear by itself, and then appears in room 8.
(no offset yet) If kid stands near a false prince, he will turn around many times.
(no offset yet) If kid turns his back towards a false prince, and runs of steps, then that false prince will (try to) stab him.
(no offset yet) If a false prince kills kid, all other false princes disappear (except those who are not standing), and this one laughs.

level 14 room 7: Jaffar left
seg000:0BF0 [VERIFIED] if (modifier[0] & 0x10) animate
seg003:01C8 [VERIFIED] room 0 is wall
seg003:173C [VERIFIED] don't clip kid when he's climbing/hanging
seg006:1659 ???
seg011:088E ??? bounds check?
seg011:0D22 don't redraw some tile when jumping up?
seg030:11F9 ???
seg030:120E ???
seg031:034F [VERIFIED] Jaffar laughs when shadow dies, if kid's body is in this room
seg032:13C4 [VERIFIED] jump up as if there was nothing above, except in row 2, column 2 or 6
seg032:19B2 [VERIFIED] if kid is flame: ctrl throws flame
OVL_10/L00000025 ???
OVL_10/L000015E6 ??? load other palette? + play music 0x107=263 (Escher.gmf)
OVL_10/L00001854 ???
OVL_10/L00001836 (CUST 0x1D) ???
(crystal_Jaffar_proc = 29CF:15A8h)

level 14 room 8: Jaffar right
seg000:0BF6 [VERIFIED] if (modifier[0] & 0x10) animate
seg003:01CF [VERIFIED] room 0 is wall
seg003:1743 [VERIFIED] don't clip kid when he's climbing/hanging
seg006:1660 ???
seg011:0895 ??? bounds check?
seg011:0D29 don't redraw some tile when jumping up?
seg030:1200 ???
seg030:1215 ???
seg031:0355 [VERIFIED] Jaffar laughs when shadow dies, if kid's body is in this room
seg032:13E7 [VERIFIED] jump up as if there was nothing above, except in row 2, but not in column 3 or 4
seg032:19B9 [VERIFIED] if kid is flame: ctrl throws flame
OVL_10/L0000002C ???
OVL_10/L00001606 ??? load other palette? + play music 0x107=263 (Escher.gmf)
OVL_10/L00001864 ???
OVL_10/L0000183C (CUST 0x1E) ???
(crystal_Jaffar_proc = 29CF:15A8h)

(no offset yet) If kid approaches Jaffar with sword, Jaffar takes kid's sword.
	OVL_10/L000010C2 Music: 0x109=265 (LoseSwd.gmf)
(no offset yet) Jaffar's moves (if kid is flame: escape, if kid is shadow: attack)
(no offset yet) If flame hits Jaffar: ending

---- Not in IR, only in 1.0:
level 13: In some rooms, guards may fall out of the screen when they die. (Just like on level 1, rooms 16/19)
I don't know if this is activated by certain room numbers, or the special pillars below the floor.
Attachments
pop2_special_events.txt
(19.62 KiB) Downloaded 31 times

realXCV
Sheikh
Sheikh
Posts: 26
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Documentation (Prince of Persia 2 Special Events)

Post by realXCV » June 30th, 2014, 9:50 pm

My list. It comes from the Mac version but I suppose most of them should be good for the DOS version too.

0. When entering a level, all tunnels are automatically closed. Also true for exit doors.
1. Rooms on the ground level use a different palette.
1.1 The prince starts with a running jump but skips 9 frames before displaying one.
2. If the level in a a desert level, the prince will start laying down on the ground. Also, the prince can't go engarde in this level.
2.2 The first time the prince enters this room, the symbol and its location will be randomly selected.
5.1 Uses a different palette.
6.1 If the prince starts in this room, its horizontal location will be hardcoded to a specific value.
7 If the player has left level 6 using a door that is in one of the first six tiles of a row, he will starts this level in room 32, cell 24. Otherwise, he will starts in room 4, cell 25.
8.1 Uses a different palette.
9.1 The custom music is played if the room is entered from the left.
9.2 The prince must leave the room at a very specfic frame to trigger the cutscene.
9.3 (Room 16). A custom music is played in this room.
10.1 If the prince starts in this room, its horizontal location will be hardcoded to a specific value.
13.1 Is the only custom room (based on its custom id) that displays the right part of the rightmost cell of the bottom row from the room on the left.
14. Every room is drawn using custom graphics. The prince can't go engarde if he's in room 1 or 2. There's one palette for the tower rooms, one for the spider and chessboard rooms and another one for the last three rooms.
14.1 If the prince starts in this room, its horizontal location will be hardcoded to a specific value.
14.2 After being transfered to room 4, the prince will always look right.
14.6 Every time the prince enters this room, the facing of the false princes are randomized.
14.7 When escaping the flaming prince, Jaffar will use 4 locations where he'll run to and then wait for the prince to come close enough, run to the next location, ...

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3281
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Documentation (Prince of Persia 2 Special Events)

Post by Norbert » July 1st, 2014, 2:28 pm

David, realXCV, is it okay if I paste your literal texts into the PoP2 Special Events document?
Under the correct headings and giving you credits at the end of the document, obviously.

By the way, David, I've also added your text inside your post.
Hope you don't mind. (If you do, sorry, feel free to remove it again.)

realXCV
Sheikh
Sheikh
Posts: 26
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Documentation (Prince of Persia 2 Special Events)

Post by realXCV » July 2nd, 2014, 1:07 am

Sure. You can also modify them for a better integration into the existing text.

Some precisions (or guesses) on a few ??? in David's list:
Lvl2, Rm1: OVL_05/L0000038B: (CUST 0x06) ??? -> Same as 2.2 in my list
Lvl5: seg011:0F7E ??? -> Not exactly an event. Just initializing the variables for the breaking of the bridge.
Lvl5, Rm3: seg003:1B60 ??? -> A (mostly) useless check for when the prince hit the bars at the top of the room.
Lvl8, Rm9: seg032:0E70 something about turning around? -> Move back a little when turning around when you're behind the gate on the right.
Lvl14, Rm1: seg006:0650 ??? cust? -> Fill background with blue.

[Edit: Dynamic guard information moved to another thread.]

David
The Prince of Persia
The Prince of Persia
Posts: 1548
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 2 Special Events)

Post by David » July 4th, 2014, 10:33 am

Of course you can add my texts. As realXCV said, you may need to modify them though.

About the list by realXCV:

Some events are not in the DOS version, namely:
(level 2) Also, the prince can't go engarde in this level.
(level 5 room 3) Uses a different palette.

And some events are not in IR, only 1.0, namely:
(level 14) The prince can't go engarde if he's in room 1 or 2.
(level 14 room 6) Every time the prince enters this room, the facing of the false princes are randomized.

realXCV
Sheikh
Sheikh
Posts: 26
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Documentation (Prince of Persia 2 Special Events)

Post by realXCV » July 4th, 2014, 9:47 pm

One more:
OVL_12/L00001209 room 22,23,28 ? -> Actually it's 22,24-28. The skeletons in these rooms will chase you when the exit door is opened.

David
The Prince of Persia
The Prince of Persia
Posts: 1548
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 2 Special Events)

Post by David » July 5th, 2014, 10:06 am

realXCV wrote:OVL_12/L00001209 room 22,23,28 ? -> Actually it's 22,24-28. The skeletons in these rooms will chase you when the exit door is opened.
Erm, yes, I overlooked the types of the conditional jumps.
(More precisely, the condition is: room>=22 && room<=28 && room!=23)

I thought that the behavior of those skeletons is caused by the subtype of the guards.

realXCV
Sheikh
Sheikh
Posts: 26
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Documentation (Prince of Persia 2 Special Events)

Post by realXCV » July 6th, 2014, 7:24 am

David wrote:I thought that the behavior of those skeletons is caused by the subtype of the guards.
Assusming I'm looking at the correct variable, when it comes to waking up skeletons, the subtype is only used to check if a skeleton can move at all.

David
The Prince of Persia
The Prince of Persia
Posts: 1548
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Documentation (Prince of Persia 2 Special Events)

Post by David » July 6th, 2014, 9:12 am

Actually, there are two variables that can be called "subtype".
(Offsets are meant within the static_guard_type structure.)

One of them is a word at offset 0x11, and that does what you wrote.
It was described here: viewtopic.php?p=14164#p14164
It has a different effect for snakes, see here: viewtopic.php?p=14177#p14177
Perhaps this could be called "behavior"?

The other is a byte at offset 0x09.
For regular guards, it is the color.
It is 1 for most other guards, but 0 for those skeletons on level 4, rooms 26,27,28.
I thought that this causes them to behave specially, but it looks like I was wrong.
By the way, that same byte can be used to color the hair of the flying heads. :)
So it should be called "color" instead.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3281
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Documentation (Prince of Persia 2 Special Events)

Post by Norbert » July 6th, 2014, 11:25 am

David wrote:One of them is a word at offset 0x11, and that does what you wrote.
Yes, 0x11 and 0x12 are "act1" and "act2" in this XLS:
viewtopic.php?p=14937#p14937
David wrote:The other is a byte at offset 0x09.
That column is called "color" in the XLS.

(As is known, the dynamic guards also have their own XLS; latest version here.)

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3281
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Documentation (Prince of Persia 2 Special Events)

Post by Norbert » July 10th, 2014, 3:21 pm

I've added your findings to this updated version of the document:
http://www.popot.org/documentation/docu ... Events.pdf
Also updated the first post of this thread (and the on-topic page at popot.org).

Post Reply