Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

[987]NMEs->Secret Breaking Tiered Secrets/Inherent Flags

1 replies · 718 views · Started 25 April 2009

This one's probably a nice find, and a pretty crippling bug for quests using loads of tiered secrets and inherent flags. I've been messing around with a lot of secret-heavy dungeon rooms in the last couple days for my one-map quest contest entry over at PZC, and managed to stumble upon this one several times, which has had me frustrated and almost banging my head on the keyboard until I tried different things. I've even had to redesign 5 or 6 dungeon rooms because of it already, one of which was a block puzzle that took me over 2 hours to put together the first time due to its insane complexity (it was using all 16 secret tile flags), which is now much simpler due to this bug. :banghead:

Here's the test quest: http://www.questwizard.net/misccrap/nmes-secbug1.qst

Basically, tiered secrets + inherent flags are working just fine without Enemies->Secret starting the chain. However, if Enemies->Secret triggers the first set of secrets, only the second set can be triggered, and after that, everything breaks and no more secrets seem to trigger. There are 2 different scenarios in the test quest.

The first uses an arrow trigger to pop a chest on the screen, which should be openable of course, and has 5 rupees. You'll see that the chests and arrow secrets work just fine without Enemies->Secret, but with it, you can make the arrow trigger show up just fine, but triggering it does absolutely nothing afterwards, even though its supposed to pop the chest. :angry:
The chest combos are using inherent flags (Armos/Chest->Item in this case).

The second involves multiple arrow triggers in a row. For the test without Enemies->Secret, I have Link bombing a block to start off the chain and open the first arrow trigger's eye. Shooting it opens the second just fine, which can then be triggered as well. However, using Enemies->Secret instead of that bomb trigger causes only the first eye to open. If you shoot it, the second one never opens, causing the whole thing to fail miserably again. :angry:
The arrow triggers also have in inherent flag attached (5 in this case, so any arrow can trigger it).

All 5 test scenarios work just fine in ZQ's preview mode, so I'm about 99% sure all the flags are set properly.

Got any ideas on this one?

Hello!

I worked on this for a few hours, and it quickly became a bit of a frustration for me. Eventually, I realised something was up with the secrets code, and I cross-referenced with the 2.10 version of the codebase, where I discovered this comment that was strikingly absent from the current version, even though the referred logic remains:

    // if it's an enemies->secret screen, only do the high 16 if told to
// that way you can have secret and burn/bomb entrance separately

What this means:
* If the screen flag "Enemies->Secret" is set...
* ...and EVEN IF the Enemies->Secret event has already occured...
* ...then Trigger Combo Flags (such as "Arrow 1"😉 can't flip the Secret Tile (16-32) combo flags.

So, yeah. Thanks, anonymous ZC dev. We're all appreciative. I'll just add another paragraph of explanation to the wiki page... *breaks down into uncontrollable whimpering*

[size="1"](Not a bug)[/size]

EDIT: The other dev was forethoughtful enough to add an escape hatch at some point, however: set the "Permanent Enemies->Secret" screen flag as well and this behaviour is disabled. Let's just do that and move on with our lives.