Ellendar / Z2Randomizer

Fork of the main Zelda 2 Randomizer by Digshake
9 stars 6 forks source link

Drops Rework #171

Closed Ellendar closed 5 months ago

Ellendar commented 7 months ago

Drops are currently an absolute mess. How they are handled really needs to be reworked to fix all the following issues:

  1. The logic assumes drops always go down. This is both blatantly untrue, and also is the source of a bunch of other hacks that need to be added.
  2. The logic assumes a room can only have one drop exit. This is true not only because pits could cover multiple pages, but also because there could be multiple distinct drops in a room. The room data needs to track whether each of the 4 exits from a room is (or could be) a drop. This probably needs a limitation that a room can't have a drop and non-drop exit from the same exit, but maybe it works.
  3. IsUpDownReversed is an awful hack that exists only to facilitate the idea that palaces are euclidean (false) and the idea that drops should always go down (also false). Ideally this entire concept, along with the properties that support it, should be removed. A consideration needs to be made for how this interacts with euclidean palace development.
  4. Drop chains establish a length, but then don't enforce it. They just select random drop zones and if that ends the chain early it ends early. This means there is a floating bias in the length of drop chains as new rooms are added. The new system needs to understand drop linkers vs starters vs enders and build a chain appropriately.
  5. Drops into linked rooms that are not drop rooms but have a linked room that is a drop room (looking at you L7 and reverse L7) are very messy. The exact semantics of this scenario need to be figured out and explicitly codified.
  6. Drops interactions with item rooms are lame. There is currently no way to handle a drop zone item room, and the drop chain item room always links to itself because it isn't part of the drop chain generation. Both of these should be reasonably supported by a new drop system.
Ellendar commented 5 months ago

Now that we're moving onto new palace types, I'm less interested in fixing reconstructed. The plan at this point is for reconstructed to exist as is (a horrible mess) and just make new better systems. Maybe this comes back later if there's some new tech.