more_items #10

Merged
emakman merged 14 commits from more_items into main 2025-12-06 06:19:12 +00:00
Owner

This update reworks the mod so that it depends on the archipelago server to determine which locations are handled by the randomizer.

This makes fruit_salad mode work (mostly) correctly with the following caveats:

  • bubbles that are loaded before the randomizer is checked on game creation will have the wrong items in them.
  • there are a couple of changes pending on the APWorld to make the fruit_salad code more correct.
This update reworks the mod so that it depends on the archipelago server to determine which locations are handled by the randomizer. This makes `fruit_salad` mode work (mostly) correctly with the following caveats: * bubbles that are loaded before the randomizer is checked on game creation will have the wrong items in them. * there are a couple of changes pending on the APWorld to make the `fruit_salad` code more correct.
This currently comes with the following drawbacks:

    1) The randomized items are placed incorrectly because the ids on the
       `randomizer_items` array are ignored and the array we create does not
       sync them with the ids archipelago will be using. In an ideal
       world, we could side-step this by adding a menu option for
       archipelago games which uses the longer list to generate in the
       first place.

    2) Some items appear to come out incorrectly placed. (I'm not sure what
       causes this, but it makes some of the bubbles inaccessible).

    3) Changing the number of items the randomizer is aware of will
       introduce an incompatibility with the APWorld. Fixing that is
       going to require updates to both projects. Ideally, we will have
       the APWorld report the number of locations to the mod so that the
       mod does not wait for location checks that are never going to
       come in (with a fallback to the current 248 if there is no
       report).

All of these issues MUST be fixed before this branch can be merged into
main.
Changes how we wait for location scouts on first load to use the list of
locations given by the server in the Connect packet. This allows the
server's local list of locations to be ordered based on their order in
the CSV rather than sorted (as we no longer need to regularly look up
IDs in it).
Update the code so that archipelago games show their type as
"Archipelago" instead of "Very Hard".

This update also changes the `set_string` method so that when the name
of the string being set begins with `ui_` it gets added to the ui
strings table rather than the dialog strings table.
If this branch gets to a point where it can be added back to mainline,
it is time for a version bump. I've decided I will bump the minor
version because:
    1) The plan involves big changes to the interface.
        It has already changed in a relatively small way; the save file
        is recognized as belonging to an archipelago run.
        The tracking is also affected by the change.
    2) The network protocol has already changed.
        This is not particularly noticible to the apworld when using
        the same settings, but it changes the compatibility because the
        apworld can now freely change the locations that are randomized
        without causing trouble.
Adds an `Archipelago` option under randomizer difficulty and makes it
selectable.

TODO:
    * Add a description for the `Archipelago` mode.
    * Change the mod code to activate on `Archipelago` mode games
      instead of `veryhard` mode games.
    * Determine whether bubbles leading up to Fosfor can be changed on
      the fly (it seems that the game doesn't do this correctly even
      when starting off with the correct csv, so we're going to have to
      fix the game's bug to do this).
    * Clean up the code caves so that they can share more variable
      names.
This commit connects the mod's "new save" code to `Archipelago` mode, as
well as adding a description for the `Archipelago` mode in the menu and
cleaning up the code cave variables a bit.

    TODO:
        * Fix up the randomizer population code so that non-randomized
          locations contain their default items.
        * Determine whether bubbles leading up to Fosfor can be changed on
          the fly (it seems that the game doesn't do this correctly even
          when starting off with the correct csv, so we're going to have to
          fix the game's bug to do this).
This commit fixes the items in non-randomized locations so that the
in-game randomizer doesn't shuffle items into locations Archipelago is
unaware of.

TODO:
    * Figure out how to make fruit sources work consistently when they
      are not randomized.
    * Figure out how to adjust the visible tracker locations based on
      randomizer mode. This is most likely as simple as turning
      tracking off when items are not randomized.
    * Determine whether bubbles leading up to Fosfor can be changed on
      the fly (it seems that the game doesn't do this correctly even
      when starting off with the correct csv, so we're going to have to
      fix the game's bug to do this).
This reverses the changes from commit 141cdc36 in favor of an alternate
solution to the variable location problem.

Instead of changing the randomizer's items back to default on
non-archipelago locations, We now filter the list returned by the
`load_randomizer_csv` function so that only the archipelago locations
are returned.

This fixes:
    * the non-randomized locations problem that was previously fixed by
      commit 141cdc36,
    * the problems with non-randomized fruit sources, and
    * some of the adjustments to visible tracker locations.

TODO:
    * Fix the visible tracker locations in the CSV to match hard mode,
      and choose a behavior for the fruit trackers.
    * Determine whether bubbles leading up to Fosfor can be changed on
      the fly (it seems that the game doesn't do this correctly even
      when starting off with the correct csv, so we're going to have to
      fix the game's bug to do this).
emakman left a comment
Author
Owner

Commenting to add that commit bbb553862b is adding the missing item id for reward_fruit.

Commenting to add that commit bbb553862b is adding the missing item id for `reward_fruit`.
Sign in to join this conversation.
No reviewers
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/YokuArchipelagoMod#10
No description provided.