HK's `get_filler_item_name` was writing lists into a ClassVar[dict] on
the `HKWorld` class. This dict would not be cleaned out between
generations on the same process, leaving behind cached data from
previous generations.
I confirmed the issue when running single-slot generations on a local
webhost, where `self.cached_filler_items` could be already populated
during `HKWorld.__init__()`.
This has been fixed by putting an individual cache list on each HKWorld
instance, instead of a shared cached on the class.
`music_table` was initialized on the `SavingPrincessWorld` *class*, so
was being shared by each Saving Princess slot in the multiworld.
This has been fixed by initializing the `music_table` attribute on each
`SavingPrincessWorld` *instance* in `generate_early()` instead.
### Logic Fixes:
- Old Site A
- Logic now allows for going backwards from the `Awake` checkpoint
- Golden Ridge A
- `Golden Strawberry` now requires `Moving Platforms` as it should
- Mirror Temple A
- `Room b-01c Strawberry` and `Room b-10 Strawberry` no longer erroneously require `Red Boosters`
- `Golden Strawberry` now requires `Dash Refills` as it should
- Reflection A
- Logic now allows for going backwards from the `Reflection` checkpoint
- Reflection B
- Logic now allows for going backwards from the `Reflection` checkpoint
- Farewell
- `Power Source Key 2` now logically requires `Dash Switches` and `Double Dash Refills` as it should
First, there is one check that has been added. The location is "Sitting on the throne before the cathedral with the crest on it" and the item is the "Opening of the Cathedral door". In Vanilla, sitting on the crested throne open the door to the cathedral.
Now for the options added:
- infinite_hot_soup: Make the game impossible to run out of hot soup once you got it as an item.
- open_body_tongue: The body level (the ending level) is blocked by a big tongue. This option remove the tongue without having to go to the Sunken City (where it is normally removed)
- maximum_ingredient_amount: In the Vanilla game, the ingredients and dishes count is limited to 8. This option make this count configurable.
- skip_final_boss_3rd_form: The final boss has 5 forms. The 3rd one is long and not really challenging. So, this option is used to skip this form.
- save_healing: Normally, the save points heal the player. There is also beds in the game that can heal the player. This option removed the healing from the save point and forced the player to heal using beds (or healing monsters or healing items)
- no_progression_(whatever): Make this "whatever" (generally regions) exempt of progression items. Note that this is not using the exclusion-feature of AP, as these locations may still contain 'Useful' items. It is only guaranteed that no 'Progression' and 'Progression_Skip_Balancing'-items will appear in these regions. This option does not remove locations. I did not exclude or completely remove the regions because I don't have enough location to put every useful item in the game.
There is also 2 new goals:
- Four gods: The goal is obtained when the player beat the four gods (this is something like half the game). Useful to have quicker runs
- Gods and Creator: Like the Four Gods run, but when the four gods are obtained, that open a transportation turtle to the final boss (the Creator) and the player have to beat the final boss to obtain the goal.
Note that for the 2 new goals, all locations from the last 4 areas (Abyss, Frozen Veil, Sunken City and The Body) are completely removed (not just excluded).
Major Content update for Stardew Valley
### Features
- New BundleRandomization Value: Meme Bundles - Over 100 custom bundles, designed to be jokes, references, trolls, etc
- New Setting: Bundles Per Room modifier
- New Setting: Backpack Size
- New Setting: Secretsanity - Checks for triggering easter eggs and secrets
- New Setting: Moviesanity - Checks for watching movies and sharing snacks with Villagers
- New Setting: Eatsanity - Checks for eating items
- New Setting: Hatsanity - Checks for wearing Hats
- New Setting: Start Without - Allows you to select any combination of various "starting" items, that you will actually not start with. Notably, tools, backpack slots, Day5 unlocks, etc.
- New Setting: Allowed Filler Items - Allows you to customize the filler items you'll get
- New Setting: Endgame Locations - Checks for various expensive endgame tasks and purchases
- New Shipsanity value: Crops and Fish
- New Settings: Jojapocalypse and settings to customize it
- Bundle Plando: Replaced with BundleWhitelist and BundleBlacklist, for more customization freedom
- Added a couple of Host.yaml settings to help hosts allow or ban specific difficult settings that could cause problems if the people don't know what they are signing up for.
Plus a truckload of improvements on the mod side, not seen in this PR.
### Removed features
- Integration for Stardew Valley Expanded. It is simply disabled, the code is all still there, but I'm extremely tired of providing tech support for it, plus Stardew Valley 1.7 was announced and that will break it again, so I'm done. When a maintainer steps up, it can be re-enabled.
* initial commit of rules engine
* implement most of the stuff
* add docs and fill out rest of the functionality
* add in explain functions
* dedupe items and add more docs
* pr feedback and optimization updates
* Self is not in typing on 3.10
* fix test
* Update docs/rule builder.md
Co-authored-by: BadMagic100 <dempsey.sean@outlook.com>
* pr feedback
* love it when CI gives me different results than local
* add composition with bitwise and and or
* strongly typed option filtering
* skip resolving location parent region
* update docs
* update typing and add decorator
* add string explains
* move simplify code to world
* add wrapper rule
* I may need to abandon the generic typing
* missing space for faris
* fix hashing for resolved rules
* thank u typing extensions ilu
* remove bad cacheable check
* add decorator to assign hash and rule name
* more type crimes...
* region access rules are now cached
* break compatibility so new features work
* update docs
* replace decorators with __init_subclass__
* ok now the frozen dataclass is automatic
* one more type fix for the road
* small fixes and caching tests
* play nicer with tests
* ok actually fix the tests
* add item_mapping for faris
* add more state helpers as rules
* fix has from list rules
* fix can reach location caching and add set completion condition
* fix can reach entrance caching
* implement HasGroup and HasGroupUnique
* add more tests and fix some bugs
* Add name arg to create_entrance
Co-authored-by: roseasromeo <11944660+roseasromeo@users.noreply.github.com>
* fix json dumping option filters
* restructure and test serialization
* add prop to disable caching
* switch to __call__ and revert access_rule changes
* update docs and make edge cases match
* ruff has lured me into a false sense of security
* also unused
* fix disabling caching
* move filter function to filter class
* add more docs
* tests for explain functions
* Update docs/rule builder.md
Co-authored-by: roseasromeo <11944660+roseasromeo@users.noreply.github.com>
* chore: Strip out uses of TYPE_CHECKING as much as possible
* chore: add empty webworld for test
* chore: optimize rule evaluations
* remove getattr from hot code paths
* testing new cache flags
* only clear cache for rules cached as false in collect
* update test for new behaviour
* do not have rules inherit from each other
* update docs on caching
* fix name of attribute
* make explain messages more colorful
* fix issue with combining rules with different options
* add convenience functions for filtering
* use an operator with higher precedence
* name conflicts less with optionfilter
* move simplify and instance caching code
* update docs
* kill resolve_rule
* kill true_rule and false_rule
* move helpers to base classes
* update docs
* I really should finish all of my
* fix test
* rename mixin
* fix typos
* refactor rule builder into folder for better imports
* update docs
* do not dupe collectionrule
* docs review feedback
* missed a file
* remove rule_caching_enabled from base World
* update docs on caching
* shuffle around some docs
* use option instead of option.value
* add in operator and more testing
* rm World = object
* test fixes
* move cache to logic mixin
* keep test rule builder world out of global registry
* todone
* call register_dependencies automatically
* move register deps call to call_single
* add filtered_resolution
* allow bool opts on filters
* fix serialization tests
* allow reverse operations
---------
Co-authored-by: BadMagic100 <dempsey.sean@outlook.com>
Co-authored-by: roseasromeo <11944660+roseasromeo@users.noreply.github.com>
* KH2: casual bounties option
* Casual Bounty: Adjust level bounty logic to correspond with max level check setting
* Bugfix: We have one less possible bounty with corresponding level bounty logic
* Casual Bounty: Move option to better spot
* Bugfix: Prevent possible .remove() crash
* Revert "Bugfix: We have one less possible bounty with corresponding level bounty logic"
This reverts commit 3c929e00db.
* Bugfix: Typo in conditional
* Casual Bounties: Remove Scar, add MCP
I knew I was missing one second visit fight and Scar shouldn't be there he's a first visit
* Casual Bounties: Add some clarity to the CasualBounty setting
* Docs: Update docs to reflect new CasualBounty setting
* KH2: Add bounty locations as location groups
Feedback on this needed, trying to do this to make it work with the code above the additions made it so the game generated 1 less item than locations, despite linking properly
It does function as intended though
* KH2: Update docs
* Remove outdated header change for ROM verification
* Update Connections to be compatible with python ver. 3.8
* Update inno_setup.iss
* Update inno_setup.iss
* Merge branch 'main' of https://github.com/jamesbrq/ArchipelagoMainMLSS
* Add Manifest + Minor Bugfixes
* Even further safeguards for Oho Oasis Temples
* Update basepatch.bsdiff
It is no longer possible to connect to a multiworld game on a version of the client with this bug, as all versions with this bug report AP v0.3.5 or less
* Replace pymem with PyMemoryEditor (nonworking)
* Add back pymem for faster windows address searching.
* Replace other uses of pymem, parameterize executable names.
* Updated to add linux and potential MacOS support to launching gk and … (#84)
* Updated to add linux and potential MacOS support to launching gk and goalc. Still needs tested on MacOS.
* Switched to using x-terminal-emulator instead of trying to find gnome-terminal or konsole
Made argument building for suprocessing goalc easier to read
Fixed OS X support to use osascript instead of attempting to run Terminal directly
* Changed Terminal usage to use Archipelago's Launh utility, which handles terminal launching for me for both linux and OS X
* Added try/except to re-connect the memory process. The process file/id changes over time on linux, and this works to re-connect without needing to restart
* Removed Unsetting env var in favor of reporting to the source authors
* Putting PyMemoryEditor local. (#85)
* Putting PyMemoryEditor local
---------
Co-authored-by: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com>
* Fixing minor problems (#87)
* Refactor away circular launcher import.
* Push latest PyMemoryEditor scan utility (#91)
Co-authored-by: Louis M <Louis M>
* Remove Pymem, rely solely on PyMemoryEditor. Add konsole support.
* Jak 1: Remove vendored copy of PME, update imports, requirements, and manifest.
* Jak 1: Prevent server connect until game is properly setup.
* Jak 1: reduce REPL/Compiler confusion, small updates to setup guide.
* Write hack for Konsole on AppImage to avoid OpenSSL error.
* Refactor LD_LIBRARY_PATH hack.
* Update worlds/jakanddaxter/agents/memory_reader.py
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Update worlds/jakanddaxter/agents/memory_reader.py
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
---------
Co-authored-by: Morgan <morgan07kelley@gmail.com>
Co-authored-by: Louis M <prog@tioui.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* Docs (DS3): Fix the documentation for the Simple Early Bosses option
This option changed in the client a while ago, but we forgot to update
the server.
* Update Options.py
* APQuest: Explain game_name and supports_uri more in components.py
Hopefully this can lead to more games implementing support for the "click on slot name -> everything launches automatically" functionality.
* Update components.py
* Update components.py
* sc2: Fixing a discrepancy between slot data and logic
where story tech would not be granted for supreme if zerg was not a selected race.
* sc2: Fixed an issue where Kinetic Blast was not listed as a vanilla Kerrigan ability
* sc2: Fixing some functions that could force Kerrigan items into the pool when playing Kerriganless
* sc2: excluding zerg excludes hots for vanilla-like mission order
* Preprocessing options
* Moving general empty selection handling to option preprocessing
* Adding a unit test for empty race/campaign selection
* sc2: Properly handling non-raceswapped campaigns when excluding campaigns based on race exclusions
* sc2: Adding an explicit error message if a user excludes all missions in a way with no obvious resolution
In single-player multiworlds with small item pools, Noita was manually
placing some items into Shop Item locations, but was only setting
location.item, and not also setting item.location so that the item and
location refer to one another.
This has been fixed by using the MultiWorld.push_item() helper method to
place the items instead of manually placing the items.
`goofy_pre_fill` and `donald_pre_fill` would pick a random `Item` from a
`list[Item]` and then use `list.remove()` to remove the picked `Item`,
but the lists (at least `donald_weapon_abilities`) could contain
multiple items with the same name, so `list.remove()` could remove a
different `Item` to the picked `Item`, allowing an `Item` in the list to
be picked and placed more than once.
This happens because `Item.__eq__` only compares the item's `.name` and
`.player`, and `list.remove()` compares by equality, meaning it can
remove a different, but equal, instance from the list.
This results in `old_location.item` not being cleared, so
`old_location.item` and `new_location.item` would refer to the same
item.
* Fix Piece of Luigi not goaling until reset
* Update .gitignore
* fix logic thing that one guy said
* fix platform being missing from chomp rock zone rules
* add json file
* added the wrong one
* remove extraneous lnk
* Update archipelago.json
---------
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
The `trap_selection_override` option is an `OptionSet` subclass, so its `.value` is a `set`.
Sets have nondeterministic iteration order (the iteration order depends on the hashes of the objects within the set, which can change depending on the random hashseed of the Python process).
This `.enabled_traps` is used in `Items.get_filler_item_name()` with `random.choice(self.enabled_traps)`, which is called as part of creating the item pool in `Items.build_item_pool()` (for clarity, this `random` is the world's `Random` instance passed as an argument, so no problems there). So, with `self.enabled_traps` being in a nondeterministic order, the picked trap to add to the item pool through `random.choice(self.enabled_traps)` would be nondeterministic.
Sorting the `trap_selection_override.value` before converting to a `tuple` ensures that the names in `.enabled_traps` are always in a deterministic order.
This issue was identified by merging the main branch into the PR branch for https://github.com/ArchipelagoMW/Archipelago/pull/4410 and seeing Satisfactory fail the tests for hash-determinism. With this fix applied, the tests in that PR pass.