Questions from an Apoplexy newbie

Windows and Linux editor of PoP1 (for DOS and SNES) and PoP2 (for DOS).
Post Reply
Bizzen2702
Efendi
Efendi
Posts: 9
Joined: August 25th, 2021, 11:25 am

Questions from an Apoplexy newbie

Post by Bizzen2702 »

Hi everyone,

I'm new to the forum, but have been playing PoP since I was a boy. I'm a bit late to the party, but I have been experimenting with modding PoP1 using Apoplexy over the last month-or-so. I have three small issues, that I was hoping will have a straight forward solutions and that someone on here would be able to guide me, as I've not been able to find an answer online.

The first issue is on Level 1 when the prince enters the dungeon and the gate closes behind him. I have been modding this level and I want to keep this entrance intact. However going backwards and forwards with different ideas has now left me with having to re-create this layout, which cosmetically looks identical to the original. The prince enters as he should and has the delayed crouch as the intro theme plays. However no gate slams behind him. There is a gate there, that I selected as the closed gate in Apoplexy. Any ideas?

The second question I have is with open and close buttons. On occasions, I am finding that when I add them in to my mod all looks well and good, but when I go to actually play this section, although the button IS there and activates the correct gate, the button does not show up. Any ideas?

Thirdly; is there also a way that I can copy just the file containing the original Level 1 from an original, unmodded 'prince' folder into my mod folder?

Any help is greatly appreciated. Thank you.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Questions from an Apoplexy newbie

Post by Norbert »

Hi Bizzen, welcome on the forum.

The gate closing in level 1 is triggered by a special event: "When level 1 begins, in room 5, the 3rd tile from the upper left is automatically being activated. The result of that trigger depends on the tile. [...] Drop and raise tiles are being pushed." So, you could place a drop button there, that points to whatever open gate you want to close on-start. (I'm guessing with this information, you now no longer need to copy around levels. If you still do, make a backup of your work, then check this.)

Button(s) not showing up doesn't sound familiar to me. You could PM me your LEVELS.DAT file (or ZIP if you also modified PRINCE.EXE), and I could investigate.
Bizzen2702
Efendi
Efendi
Posts: 9
Joined: August 25th, 2021, 11:25 am

Re: Questions from an Apoplexy newbie

Post by Bizzen2702 »

Thank you for the response, Norbert. I'll look into the Special Events in more detail.

PM sent as requested.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Questions from an Apoplexy newbie

Post by Norbert »

Bizzen2702 wrote: August 25th, 2021, 9:57 pmPM sent as requested.
Thanks.
Right, having inspected your LEVELS.DAT file, I can now more or less explain to you what is happening.

First, some things you need to know to understand my explanation:
- Technically, event numbers start at 0. The apoplexy editor adds 1 to all these numbers to make things more natural for its users, given that humans generally start counting at 1, i.e. the first event.
- Technically, all tiles are identified by a combination of their group (foreground) and variant (modifier). The combo for a basic floor is group 1 (0x01) with variant 0 (0x00).
- In apoplexy, it is possible to view the combos by pressing "i" for tile information. A basic floor will display "0N1/0", with the "1/0" portion being group/variant.

So... At the special event location (room 5, top floor, 3rd tile), you have a basic floor. When the level starts, the event triggers the variant of the tile, which is 0. The strange button you noticed says "E:1" (event 1), and therefore actually triggers event 0. The combination of these two things (2x 0) makes the button invisible. The button becomes visible if you either a) change its event (e.g. to 2) or b) change the tile at the special event location (e.g. to a raise button with "E:2"). As for why the combination has the aforementioned result: this is complicated technically, but similar to the special blue potion effect, which is explained here and here.

[Edit: I wonder if modders run into this issue often. Maybe the application should display a warning. But when... Perhaps if the variant of the tile at the special event location matches the variant of a button that is in the starting room? David, any thoughts?]
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Questions from an Apoplexy newbie

Post by David »

Norbert wrote: August 26th, 2021, 12:13 am I wonder if modders run into this issue often.
In the past, I have found stuck buttons in some mods I played.

Arabian Nightmares: level 1, room 7
Revolution: level 1, room 18
Jaffar24's Levels: level 1, room 7

Mods not yet on PoPOT:
• arjak_LEVELS.DAT: level 1, room 21
• CLOCK.rar: level 1, room 14
Norbert wrote: August 26th, 2021, 12:13 am Maybe the application should display a warning. But when... Perhaps if the variant of the tile at the special event location matches the variant of a button that is in the starting room? David, any thoughts?
That sounds like a good idea.

The "that is in the starting room" part is not needed.
A button with a matching modifier will get stuck no matter what room is it in.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Questions from an Apoplexy newbie

Post by Norbert »

David wrote: August 26th, 2021, 12:21 pmThat sounds like a good idea.
The "that is in the starting room" part is not needed.
Okay, thanks. I've added it to my to-do list for the program.
Bizzen2702
Efendi
Efendi
Posts: 9
Joined: August 25th, 2021, 11:25 am

Re: Questions from an Apoplexy newbie

Post by Bizzen2702 »

Thank you both.

That was really helpful, Norbert. I've successfully managed to address the button visibility issue. I still seem to be having the gate closing problem on L1, but I'm sure I just need to re-read your advice when I'm less tired and there will be one crucial step I've missed. Thanks again. :)
dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: Questions from an Apoplexy newbie

Post by dmitry_s »

A similar thing with disappearing buttons can happen if you the same event number on multiple opening/closing tiles and then a guard dies or a loose tile falls on one of them. Therefore, it is a good idea to use a different event for each button unless you are intentionally trying to create that effect.

It would be nice if Apoplexy would warn that the event number is already being used as I have done this unintentionally.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Questions from an Apoplexy newbie

Post by atrueprincefanfrom18 »

dmitry_s wrote: August 27th, 2021, 4:32 am It would be nice if Apoplexy would warn that the event number is already being used as I have done this unintentionally.
A way I overcome this problem is to using event numbers starting with 60. That way I know any event number that is below than 60 are not mine. But it would be good if Apoplexy editor warns us (And one more good thing might be to warn if the next event should be triggered or not in case the next event is not pointing to anything).
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Questions from an Apoplexy newbie

Post by David »

atrueprincefanfrom18 wrote: August 27th, 2021, 12:19 pm A way I overcome this problem is to using event numbers starting with 60. That way I know any event number that is below than 60 are not mine.
I'm a bit confused: Do you not clear the level before editing it?
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Questions from an Apoplexy newbie

Post by atrueprincefanfrom18 »

David wrote: August 28th, 2021, 10:43 am
atrueprincefanfrom18 wrote: August 27th, 2021, 12:19 pm A way I overcome this problem is to using event numbers starting with 60. That way I know any event number that is below than 60 are not mine.
I'm a bit confused: Do you not clear the level before editing it?
I do of course, but the event point to the same location. And once I start editing the level, I don't know if the location where the event is pointing is really needed for the mod or is just there by default.
So basically there should be some way where Apoplexy should tell me if the event is set by me or it's just stuck by default.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Questions from an Apoplexy newbie

Post by David »

David wrote: August 26th, 2021, 12:21 pm In the past, I have found stuck buttons in some mods I played.
I recently found another another stuck button (in a video walkthrough for this mod):
Prince of Venus: level 1, room 17
Post Reply