Page 1 of 1

I need help with exit doors

Posted: June 11th, 2020, 4:47 am
by Emiliano
First, I don't know if this should be here or with the Other Tools and Hex Editing, you can move it if you want
Hi everyone, there's a frustrating situation in one executable file I have, I would like to stop doors in the exit room from auto-opening every time I start a new game. It frustrates me and made me add more doors, I guess it does not depend from exit room number, because in old prototypes I swapped room 9 with room 23 and it simply didn't stop happening
I hope you can help me fixing it
Watch the video to understand what I'm talking about

Re: I need help with exit doors

Posted: June 11th, 2020, 7:13 am
by atrueprincefanfrom18
Hex Editing is not the problem. It's the Special Event. Level 1, Room 5, Top Row, 3rd Tile is what triggers everytime you start the Level 1. Simply replace that tile to normal one and it won't happen. In the original game it's the drop tile which closes Room 5, Top Row, Last Tile Door to make you feel that you are pushed into dungeon and the gate is closed.

Hope you got it?

P.S: It's a good idea to read special event page when creating particular level, so as either to allow them or not use them completely.

Re: I need help with exit doors

Posted: June 13th, 2020, 3:26 pm
by David
atrueprincefanfrom18 wrote: June 11th, 2020, 7:13 am Hex Editing is not the problem. It's the Special Event. Level 1, Room 5, Top Row, 3rd Tile is what triggers everytime you start the Level 1. Simply replace that tile to normal one and it won't happen. In the original game it's the drop tile which closes Room 5, Top Row, Last Tile Door to make you feel that you are pushed into dungeon and the gate is closed.
You're mostly right.
However, it's not enough if you place a non-button tile at that place.
The game will treat it as a closer button, and those can open exit doors as well.

Instead you need to make sure that the modifier of that tile does not point to any valid door event.
For example, if that tile has modifier 0, then event #0 (#1 in Apoplexy) should point to a non-triggerable tile.



Alternatively, you can disable this trigger altogether by hex-editing PRINCE.EXE:

Search: 83 3E 9E 0F 01 75 22 B8 05 00
Change: B8 05 to EB 1B

It changes this part:

Code: Select all

seg003:0243 83 3E 9E 0F 01           cmp   current_level, 1 ; Special event: press tile + falling entry
seg003:0248 75 22                    jnz   loc_4A5C
seg003:024A B8 05 00                 mov   ax, 5 ; <-- we change this to jmp 0267
seg003:024D 50                       push  ax      ; room
seg003:024E B8 02 00                 mov   ax, 2
seg003:0251 50                       push  ax      ; col
seg003:0252 2B C0                    sub   ax, ax
seg003:0254 50                       push  ax      ; row
seg003:0255 9A 06 00 CB 06           call  get_tile
seg003:025A 2B C0                    sub   ax, ax
seg003:025C 50                       push  ax      ; playsound
seg003:025D 50                       push  ax      ; tile
seg003:025E B8 FF FF                 mov   ax, 0FFFFh
seg003:0261 50                       push  ax      ; modifier
seg003:0262 9A 53 0C 55 08           call  trigger
seg003:0267 B8 07 00                 mov   ax, 7      ; fall
seg003:026A EB 0F                    jmp   short loc_4A6B

Re: I need help with exit doors

Posted: June 17th, 2020, 7:47 pm
by atrueprincefanfrom18
When is your next mod coming?

Re: I need help with exit doors

Posted: June 17th, 2020, 7:49 pm
by Emiliano
atrueprincefanfrom18 wrote: June 17th, 2020, 7:47 pm When is your next mod coming?
Maybe late June or something, you will be surprised with the result ;)

Re: I need help with exit doors

Posted: June 17th, 2020, 9:11 pm
by atrueprincefanfrom18
Emiliano Fierro wrote: June 17th, 2020, 7:49 pm
atrueprincefanfrom18 wrote: June 17th, 2020, 7:47 pm When is your next mod coming?
Maybe late June or something, you will be surprised with the result ;)
Check 5 times to remove all shortcuts :)

Re: I need help with exit doors

Posted: June 17th, 2020, 9:16 pm
by Emiliano
My next mod does not use broken rooms, I don't know if this is harder or easier, players will decide