Generate new item and location, and region tables #5

Merged
emakman merged 9 commits from new_logic into main 2025-07-14 02:42:20 +00:00
Owner

This commit adds new computer-generated files LocationTable.py and
ItemTable.py as well as replacing Regions.py with a corresponding
computer-generated version.

The goals of the update are to:

  • Remove unnecessary requirements on scarabs with a scripting bug -
    those scarabs now simply forbid the items that cannot appear in
    those locations rather than treating them as prerequisite.
  • Add all possible locations to the randomizer. This is not yet
    compatible with the mod, but I wanted it in the APWorld so I could
    make and test the corresponding updates to the mod.
  • Forbid fruit from appearing in place of Wickerling 64 because it
    triggers an in-game bug.
  • Make the item classification change based on game mode. (So
    trackers are not treated as progression items unless you are in
    normal mode.) Addresses the same problem as #4.
This commit adds new computer-generated files `LocationTable.py` and `ItemTable.py` as well as replacing `Regions.py` with a corresponding computer-generated version. The goals of the update are to: - Remove unnecessary requirements on scarabs with a scripting bug - those scarabs now simply forbid the items that cannot appear in those locations rather than treating them as prerequisite. - Add all possible locations to the randomizer. This is not yet compatible with the mod, but I wanted it in the APWorld so I could make and test the corresponding updates to the mod. - Forbid fruit from appearing in place of Wickerling 64 because it triggers an in-game bug. - Make the item classification change based on game mode. (So trackers are not treated as progression items unless you are in normal mode.) Addresses the same problem as #4.
This commit adds new computer-generated files `LocationTable.py` and
`ItemTable.py` as well as replacing `Regions.py` with a corresponding
computer-generated version.

The goals of the update are to:
    * Remove unnecessary requirements on scarabs with a scripting bug -
      those scarabs now simply forbid the items that cannot appear in
      those locations rather than treating them as prerequisite.

    * Add all possible locations to the randomizer. This is not yet
      compatible with the mod, but I wanted it in the APWorld so I could
      make and test the corresponding updates to the mod.

    * Forbid fruit from appearing in place of Wickerling 64 because it
      triggers an in-game bug.

    * Make the item classification change based on game mode. (So
      trackers are not treated as progression items unless you are in
      normal mode.) Addresses the same problem as #4.

    * Item classification should now correctly differentiate between
      progression/non-progression items in all modes.
The regenerated item table assigned item ids in a matter that was inconsistent
with the table used by the first version of the APWorld. This had some
upsides (`reward_fruit`, `reward_fruit_medium` and `reward_fruit_big`)
had consecutive ids, but it made the list incompatible with the mod.
Rather than make a new version of the mod that doesn't work with the old
APWorld; it seems more worthwhile to patch these item IDs.
This commit adds a test suite to verify that the logic is as generated
in the current version. This meets two important goals:
1) To check that the logic (at least mostly) matches that of the
   previous version of the code where possible so that this branch
   of the code can be released.
2) To allow future rewrites of the logic for more human-understandable
   regions without logic regressions.
Combines region `peak_crystal_cavern_4` into `peak_crystal_cavern_2` and
renumbers the subsequent regions.

Fixes #6
The new generator's source had a few logic regressions relative to the
main branch (and some improvements). These corrections should bring our
logic and test suite up to a definitive (for now) understanding of our
desired game logic; addressing all discovered discrepancies with the
main branch's logic by choosing one or the other.

We keep the updated logic for the following discrepancies:
    * The updated logic (correctly) does not require all scripted items
      (Dive Fish, Skvader, Slug Vacuum and Underbelly Key) to reach the
      bugged Scarabs (40, 41, 42, 43, 53, 64, and 65). Instead these
      items are blacklisted from the corresponding scarabs.
    * The updated logic adds some requirements for `Tracker: Gorilla
      Woods` in normal mode. This has no practical effect since the
      tracker is in the starting inventory in this mode.
    * Some chests in Gorilla Woods no longer require the TreasureMap in
      normal mode logic. In particular these are `Fruit 31` and `Chest:
      Tower`.
    * fix: NPC: Liquorice now requires the slug vac in very hard mode
    * fix: NPC: Nim requires the Dive Fish if you do not have the Nim
      Key in very hard mode

We revert to the former logic for the following discrepancies:
    * New logic was requiring the Treasure Map to reach Wickerlings 40,
      60, and 77 as well as Sootling 6 in normal mode. Each of these
      should require _either_ the treasure map or the corresponding
      tracker as in the old logic.
    * New logic was requiring the trackers for the statue pieces in
      normal mode. These should not be requirements in logic since the
      quest makes them visible on the map.
    * New logic had dropped the requirements for the trackers to reach
      `NPC: Nim`, `Wl. 37`, and `Wl. 27`. We are reverting to requiring
      all trackers for these locations.
    * New logic required the Slug Vacuum, Dive Fish, or Sootling Leash
      to reach `Chest: Willo`, `Statue Piece: Obt. Isles`, and `Statue
      Piece: Ivory` in very hard mode. These are unnecessary.
emakman changed title from WIP: Generate new item and location, and region tables to Generate new item and location, and region tables 2025-07-14 02:39:43 +00:00
emakman changed title from WIP: Generate new item and location, and region tables to Generate new item and location, and region tables 2025-07-14 02:39:43 +00:00
emakman deleted branch new_logic 2025-07-14 02:42:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Archipelago/YokuAPWorld#5
No description provided.