Page 1 of 1

Weird open level doors

Posted: August 14th, 2020, 6:42 pm
by Emiliano
Hi there, recently I noticed the custom modifier in RoomShaker and did some experiments with different tiles.
When I set exit level door modifier to 255 it remains open, but open in a strange and different mode.
This door is treated as closed until you open other level door.
I tested if I can leave using it by multiple exit level doors, because triggering itself does not do anything
Maybe I can use them in my 7th mod (Save the red seeds), NOT in the 6th (Lihinghntom's Twisty Levelset) ;)

I hope you can explain me what happens :)

Re: Weird open level doors

Posted: August 17th, 2020, 7:09 am
by atrueprincefanfrom18
In theory, I know these are the modifiers which are mainly used for testing purposes (as stated in Apoplexy screen). Some of their functionalities are taken away, for example, the loose tile won't fall by price or any other guard. It can only fall when triggered with a button or when another tile falls on it.

Similarly, the door's functionality of triggering opening it is taken away. You can go through it, if any other level exit door is open and exit through any level exit door (except the starting one) is enabled.

With chompers, you can add the blood into them, even though they haven't chopped anything.

I don't know why that happens, so I believe the explanation is still pending, maybe Norbert and/or David can help in this. There should be a topic already in the forum, but I haven't got through the search, so if merging is required, moderator, please merge it.

Re: Weird open level doors

Posted: August 20th, 2020, 12:02 pm
by David
Emiliano Fierro wrote: August 14th, 2020, 6:42 pm When I set exit level door modifier to 255 it remains open, but open in a strange and different mode.
This door is treated as closed until you open other level door.
By default, the game lets you enter exit doors only if an exit door was opened by a button.

There is a hack which changes this, you can find it here: viewtopic.php?p=13128#p13128
With this hack the game will check if the exit door at the prince is actually open.

One change is needed in that hack: 7C should be changed to 72 to work with modifiers > 127.
(That compares the modifier byte with 42 using an unsigned comparison instead of a signed one.)

Search: 3B 06 9E 40 74 0D 83 3E 9C 40 00 74 06
Replace: 8B 36 88 5F 8A 00 3C 2A 72 09 90 90 90

Details:

Code: Select all

This part of up_pressed() is changed:
seg005:04A2 3B 06 9E 40              cmp  ax, drawn_room
seg005:04A6 74 0D                    jz   loc_6295
seg005:04A8 83 3E 9C 40 00           cmp  leveldoor_open, 0 ; can't enter a closed level door
seg005:04AD 74 06                    jz   loc_6295

into this:
00007B32:i8B36885F                       mov       si,[+5F88] ; curr_room_modif
00007B36:i8A00                           mov       al,[bx+si]               ; Get the modifier of the level door.
00007B38:i3C2A                           cmp       al,2A                    ; Compare with 42 (0x2A).
00007B3A:i7209                           jc        file:00007B45 ; loc_6295 ; If the modifier is below that (the exit is not open enough) then don't enter the exit door.
00007B3C:i90                             nop
00007B3D:i90                             nop
00007B3E:i90                             nop