Commit Graph

402 Commits

Author SHA1 Message Date
Fabian Dill 30b414429f
LTTP: sort of use new options system (#3764)
* LttP: switch to dataclass options definition

* LttP: write old options onto multiworld
LttP: use World.random
2024-11-29 05:02:26 +01:00
Lolo a07ddb4371
Docs: (Re)write french alttp setup guide and game page (#2296) 2024-11-28 17:13:14 +01:00
Mysteryem 7449bf6b99
ALttP: Use auto indirect conditions (#4153)
ALttP makes common use of entrances with access rules that require
another entrance to be accessible. This results in requiring an indirect
condition to be registered for the other entrance's `.parent_region`,
but this indirect condition is often missing.

There are so many missing indirect conditions, and due to the complexity
of some of the chained rules, it is simply not realistic to add all the
missing indirect conditions.

This patch changes ALttP to use automatic indirect conditions instead of
explicit indirect conditions and removes the places that were
registering indirect conditions.

Without this patch, the missing indirect conditions almost never have an
effect on generating with default options, but enabling certain options,
such as `glitches_required` or `entrance_shuffle` can result in
frequently checking entrances that are missing indirect conditions.

Examples of complex chained rules:
`get_rule_to_add()` in `Rules.set_bunny_rules()` can create
rules on entrances that require access to any of a number of different
other entrances, which should require the parent regions of all of those
other entrances to be registered as indirect conditions.

There are entrance access rules that check
`StateHelpers.can_kill_most_things()` (e.g. `Turtle Rock Second Section
Bomb Wall`), which can check `can_extend_magic()`, which checks for
being able to buy unlimited `Blue Potion`, which checks for being able
to reach a shop that sells unlimited `Blue Potion`. This is usually
`Potion Shop`, but there is a yaml option that shuffles shop
inventories, so the shop that sells unlimited `Blue Potion` can be
randomized, meaning that the region that should be registered as an
indirect condition can also be randomized.

Example of many missing indirect conditions:
With `small_key_shuffle: universal`, every single
`ALttPLogic._lttp_has_key()` checks for being able to reach shops that
sell an unlimited number of universal Small Keys. Meaning that every
entrance access rule that uses `_lttp_has_key()` should register all
shop regions that sell unlimited universal small keys as indirect
conditions.
2024-11-07 09:29:47 +01:00
Nicholas Saylor 6d0f0d2f4a
LTTP: Update tests to use bases.py #4140 2024-11-04 08:38:47 +01:00
Silvris 4aab317665
ALTTP: Plando (#2904) fixes (#3834) 2024-09-09 15:56:15 +02:00
Exempt-Medic 456b4adaa1
ALttP/Docs: Correcting the plando docs (#3835)
* Correcting some text

* Reword sentence
2024-08-31 23:36:29 +02:00
Aaron Wagener dddffa1660
LTTP: fix own_dungeon setting from not being placed in the player's own world (#3816) 2024-08-24 10:54:33 +02:00
Exempt-Medic 83367c6946
ALttP: Fix accessibility (locations -> full) (#3801) 2024-08-24 10:53:56 +02:00
NewSoupVi 64b654d42e
Core, some worlds: Rename sweep_for_events to sweep_for_advancements (#3571)
* Rename sweep_for_events to sweep_for_advancements

* more event->advancement renames

* oops accidentally deleted the deprecation thing in the force push

* Update TestDungeon.py

* Update BaseClasses.py

* Update BaseClasses.py

* oops

* utils.deprecate

* treble, you had no idea how right you were

* Update test_panel_hunt.py

* Update BaseClasses.py

Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>

---------

Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
2024-08-23 01:15:05 +02:00
Kappatechy 31852801c9
LTTP: Fix a bug in Triforce Pieces Mode: Extra (#3784)
When triforce_pieces_mode is set to "extra", the number of Triforce pieces in the pool should be equal to the number required plus the number extra. The number available was being used in this calculation, instead of the number required.
2024-08-22 23:35:29 +02:00
Aaron Wagener 96d48a923a
Core: recontextualize `CollectionState.collect` (#3723)
* Core: renamed `CollectionState.collect` arg from `event` to `prevent_sweep` and remove forced collection

* Update TestDungeon.py

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-08-13 22:28:05 +02:00
Aaron Wagener a05dbac55f
Core: Rework accessibility (#1481)
* rename locations accessibility to "full" and make old locations accessibility debug only

* fix a bug in oot

* reorder lttp tests to not override its overrides

* changed the wrong word in the dict

* :forehead:

* update the manual lttp yaml

* use __debug__

* update pokemon and messenger

* fix conflicts from 993

* fix stardew presets

* add that locations may be inaccessible to description

* use reST format and make the items description one line so that it renders correctly on webhost

* forgot i renamed that

* add aliases for back compat

* some cleanup

* fix imports

* fix test failure

* only check "items" players when the item is progression

* Revert "only check "items" players when the item is progression"

This reverts commit ecbf986145e6194aa99a39c481d8ecd0736d5a4c.

* remove some unnecessary diffs

* CV64: Add ItemsAccessibility

* put items description at the bottom of the docstring since that's it's visual order

* :

* rename accessibility reference in pokemon rb dexsanity

* make the rendered tooltips look nicer
2024-07-31 12:13:14 +02:00
Fabian Dill b77805e5ee
Fill: remove sweep_for_events(key_only=True) (#2239) 2024-07-28 01:32:25 +02:00
Alchav 8c86139066
ALTTP: Bombable Wall to Crystaroller Room Logic (#3627) 2024-07-10 17:15:29 +02:00
black-sliver 5882ce7380
Various worlds: Fix more absolute world imports (#3510)
* Adventure: remove absolute imports

* Alttp: remove absolute imports (all but tests)

* Aquaria: remove absolute imports in tests

running tests from apworld may fail (on 3.8 and maybe in the future) otherwise

* DKC3: remove absolute imports

* LADX: remove absolute imports

* Overcooked 2: remove absolute imports in tests

running tests from apworld may fail otherwise

* Rogue Legacy: remove absolute imports in tests

running tests from apworld may fail otherwise

* SC2: remove absolute imports

* SMW: remove absolute imports

* Subnautica: remove absolute imports in tests

running tests from apworld may fail otherwise

* Zillion: remove absolute imports in tests

running tests from apworld may fail otherwise
2024-06-27 08:51:27 +02:00
Alchav 07dd8f0671
LTTP: Add Missing Blind's Cell rule (#3589) 2024-06-25 20:15:51 +02:00
Zach Parks 1f685b4272
CommonClient: Use lookup_in_game instead of lookup_in_slot in case of own-game name lookup when disconnected from server. (#3514) 2024-06-16 05:37:05 -05:00
Fabian Dill df94271d30
LttP: fix single-player no-logic generation (#3454) 2024-06-15 19:18:26 +02:00
Fabian Dill bbc79a5b99
LttP: allow Triforce Piece as start inventory item (#3292) 2024-06-01 14:38:45 +02:00
Silvris 4e5b6bb3d2
Core: move PlandoConnections and PlandoTexts to the options system (#2904)
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: Scipio Wright <scipiowright@gmail.com>
Co-authored-by: beauxq <beauxq@yahoo.com>
Co-authored-by: alwaysintreble <mmmcheese158@gmail.com>
2024-06-01 06:34:41 -05:00
Zach Parks 5aa6ad63ca
Core: Remove Universally Unique ID Requirements (Per-Game Data Packages) (#1933) 2024-06-01 06:07:13 -05:00
Alchav e0b6889634
ALTTP: Second attempt to fix Swamp Palace boss logic (#3315) 2024-05-19 22:18:41 +02:00
Chris Wilson 5e3c5dedf3
WebHost: Massive overhaul of options pages (#2614)
* Implement support for option groups. WebHost options pages still need to be updated.

* Remove debug output

* In-progress conversion of player-options to Jinja rendering

* Support "Randomize" button without JS, transpile SCSS to CSS, include map file for later editors

* Un-alphabetize options, add default group name for item/location Option classes, implement more option types

* Re-flow UI generation to avoid printing rows with unsupported or invalid option types, add support for TextChoice options

* Support all remaining option types

* Rendering improvements and CSS fixes for prettiness

* Wrap options in a form, update button styles, fix labels, disable inputs where the default is random, nuke the JS

* Minor CSS tweaks, as recommended by the designer

* Hide JS-required elements in noscript tag. Add JS reactivity to range, named-range, and randomize buttons.

* Fix labels, add JS handling for TextChoice

* Make option groups collapsable

* PEP8 current option_groups progress (#2604)

* Make the python more PEP8 and remove unneeded imports

* remove LocationSet from `Item & Location Options` group

* It's ugly, but YAML generation is working

* Stop generating JSON files for player-options pages

* Do not include ItemDict entries whose values are zero

* Properly format yaml output

* Save options when form is submitted, load options on page load

* Fix options being omitted from the page if a group has an even number of options

* Implement generate-game, escape option descriptions

* Fix "randomize" checkboxes not properly setting YAML options to "random"

* Add a separator between item/location groups and items/locations in their respective lists

* Implement option presets

* Fix docs to detail what actually ended up happening

* implement option groups on webworld to allow dev sorting (#2616)

* Force extremely long item/location/option names with no spaces to text-wrap

* Fix "randomize" button being too wide in single-column display, change page header to include game name

* Update preset select to read "custom" when updating form inputs. Show error message if the user doesn't input a name

* Un-break weighted-options, add option group names to weighted options

* Nuke weighted-options. Set up framework to rebuild it in Jinja.

* Generate styles with scss, remove styles which will be replaced, add placeholders for worlds

* Support Toggle, DefaultOnToggle, and Choice options in weighted-options

* Implement expand/collapse without JS for worlds and option groups

* Properly style set options

* Implement Range and NamedRange. Also, CSS is hard.

* Add support for remaining option types. JS and backend still forthcoming.

* Add JS functionality for collapsing game divs, populating span values on range updates. Add <noscript> tag to warn users with JS disabled.

* Support showing/hiding game divs based on range value for game

* Add support for adding/deleting range rows

* Save settings to localStorage on form submission

* Save deleted options on form submission

* Break weighted-options into a per-game page.

- Break weighted-options into a per-game page
- Add "advanced options" links to supported games page
- Use details/summary tags on supported games, player-options, and weighted-options
- Fix bug preventing previously deleted rows from being removed on page load if JS is enabled
- Move route handling for options pages to options.py
- Remove world handling from weighted-options

* Implement loading previous settings from localStorage on page load if JS is enabled

* Weighted options can now generate YAML files and single-player games

* options pages now respect option visibility settings for simple and complex pages

* Remove `/weighted-settings` redirect, fix weighted-options link on player-options page

* Fix instance of AutoWorld not having access to proper `random`

* Catch instances of frozenset along with set

* Restore word-wrap in tooltips

* Fix word wrap in player-options labels

* Add `dedent` filter to help with formatting tooltips in player-options

* Do not change the ordering of keys when printing yaml files

* Move necessary import out of conditional statement

* Expand only the first option group by default on both options pages

* Respect option visibility when generating yaml template files

* Swap to double quotes

* Replace instances of `/weighted-settings` with `/weighted-options`, swap out incomplete links

* Strip newlines and spaces after applying dedent filter

* Fix documentation for option groups

* Update site map

* Update various docs

* Sort OptionSet lists alphabetically

* Minor style tweak

* Fix extremely long text overflowing tooltips

* Convert player-options to use CSS grid instead of tables

* Do not display link to weighted-options page on supported games if the options page is an external link

* Update worlds/AutoWorld.py

Bugfix by @alwaysintreble

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

* Fix NamedRange options not being properly set if a preset it loaded

* Move option-presets route into options.py

* Include preset name in YAML if not "default" and not "custom"

* Removed macros for PlandoBosses and DefaultOnToggle, as they were handled by their parent classes

* Fix not disabling custom inputs when the randomize button is clicked

* Only sort OptionList and OptionSet valid_keys if they are unordered

* Quick style fixes for player-settings to give `select` elements `text-overflow: ellipsis` and increase base size of left-column

* Prevent showing a horizontal scroll bar on player-options if the browser width was beneath a certain threshold

* Fix a bug in weighted-options which prevented inputting a negative value for new range inputs

---------

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
2024-05-18 00:11:57 -04:00
Doug Hoskisson 280b67f996
some worlds: some typing in `LocalRom` (#3090)
* some worlds: some typing in `LocalRom`

### `read_bytes`

It's not safe to return `bytearray` when we think it's `bytes`
```python
a = rom.read_bytes(8, 3)
hash(a)  # This won't crash, right?
```

### `write_bytes`

`Iterable[SupportsIndex]` is what's required for `bytearray.__setitem__(slice, values)`
We need to add `__len__` for the `len(values)` in this function.

* remove `object` inheritance
2024-05-17 21:41:57 +02:00
Alchav 1a563a14fc
LTTP: Yet more LTTP logic fixes (#3270) 2024-05-06 09:36:08 +02:00
Aaron Wagener 005fc4e864
Fill: allow for single player fill restrictive placement and sweeping (#2415)
* Core: allow for single player state sweeping

* Fill: have distribute items use single_player fill when it can

* oop

* pass locations to sweep_for_events instead of the player

* finally found the diff that was breaking swap

* LTTP fills everyone's dungeons at once, not just a single player's

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-05-04 12:42:36 +02:00
Alchav 9afe45166c
ALTTP: 0.4.6 fixes (#3215)
* Fix randomizer room logic

* Fix Triforce Hunt HUD always present

* Fix Circle of Pots enemy byte

* treasure_hunt_total for Murahdala text
2024-04-28 01:48:59 +02:00
Fabian Dill 2f78860d8c
Core/SNIClient/LttP/Factorio: switch to get_settings (#3208) 2024-04-24 06:24:44 +02:00
Fabian Dill 7a004de9a0
LttP: remove glitch triforce setting (#3174) 2024-04-19 23:10:29 +02:00
Silvris 8021ec744f
LttP: fix percentage Triforce Pieces and missed cleanup from #3160 (#3178) 2024-04-19 23:10:10 +02:00
Alchav b372b9da20
LTTP: ToH Crystal Switch Logic (#3172) 2024-04-18 21:33:41 +02:00
Fabian Dill 6e56f31398
LttP/Core: more ripping and tearing (#3160) 2024-04-18 18:33:16 +02:00
Alchav f19a84222e
ALTTP: Triforce Pieces and Condense Items fixes (#3166) 2024-04-17 19:29:32 +02:00
Alchav 801d1223ac
LTTP: Thieves Town KDS key fix (#3145) 2024-04-17 19:22:03 +02:00
Fabian Dill 09abc5beaa
Core: add visibility attribute to Option (#3125) 2024-04-14 20:49:43 +02:00
Fabian Dill fb1cf26118
SNIClient/LttP: modern SNI prevents payload overflow (#2523) 2024-04-14 20:40:09 +02:00
Aaron Wagener 842a15fd3c
Core: replace `Location.event` with `advancement` property (#2871) 2024-04-14 20:37:48 +02:00
Fabian Dill 19f1b265b1
LttP: deprioritize locked locations for ingame hints (#3127) 2024-04-14 20:36:36 +02:00
Alchav d4ec4d32f0
ALTTP: Bomb Walls Logic Fixes (#3130) 2024-04-14 17:30:40 +02:00
Nicholas Saylor 569c37cb8e
Core, Webhost, Docs: Replace all usages of player settings (#3067)
* Replace all usages of player settings

* Fixed line break error

* Attempt to fix line break again

* Finally figure out what Pycharm did to this file

* Pycharm search failed me

* Remove duplicate s

* Update ArchipIdle

* Revert random newline changes from Pycharm

* Remove player settings from fstrings and rename --samesettings to --sameoptions

* Finally get PyCharm to not auto-format my commits, randomly inserting the newlines

* Removing player-settings

* Missed one

* Remove final line break error
Co-authored-by: Exempt-Medic <60412657+exempt-medic@users.noreply.github.com>

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
Co-authored-by: Exempt-Medic <ExemptMedic@Gmail.com>
2024-04-06 19:25:26 -04:00
Alchav 8d9bd0135e
LTTP: Fix Bug With Custom Resource Spending (#3105) 2024-04-06 19:53:20 +02:00
Fabian Dill 885fb4aabe LttP: fix fix fake world always applying 2024-04-06 17:40:52 +02:00
CaitSith2 9aeeeb077a
ALttP: Re-mark light/dark world regions after applying plando connections (#2964) 2024-04-01 15:07:56 +02:00
Alchav 4ac1866689
ALTTP: Skull Woods Inverted fix (#2980) 2024-04-01 15:06:31 +02:00
Alchav bdd498db23
ALTTP: Fix #2290's crashes (#2973) 2024-03-22 21:36:27 +01:00
Danaël V 11b32f17ab
Docs: replacing "setting" to "option" in world docs (#2622)
* Update contributing.md

* Update contributing.md

* Update contributing.md

* Update contributing.md

* Update contributing.md

* Update contributing.md

Added non-AP World specific information

* Update contributing.md

Fixed broken link

* Some minor touchups

* Update Contributing.md

Draft for version with picture

* Update contributing.md

Small word change

* Minor updates for conciseness, mostly

* Changed all instances of settings to options in info and setup guides

I combed through all world docs and swapped "setting" to "option" when this was refering to yaml options.
I also changed a leftover "setting" in option.py

* Update contributing.md

* Update contributing.md

* Update setup_en.md

Woops I forgot one

* Update Options.py

Reverted changes regarding options.py

* Update worlds/noita/docs/en_Noita.md

Co-authored-by: Scipio Wright <scipiowright@gmail.com>

* Update worlds/sc2wol/docs/en_Starcraft 2 Wings of Liberty.md

revert change waiting for that page to be updated

* Update worlds/witness/docs/setup_en.md

* Update worlds/witness/docs/en_The Witness.md

* Update worlds/soe/docs/multiworld_en.md

Fixed Typo

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>

* Update worlds/witness/docs/en_The Witness.md

* Update worlds/adventure/docs/en_Adventure.md

* Update worlds/witness/docs/setup_en.md

* Updated Stardew valley to hopefully get rid of the merge conflicts

* Didn't work :dismay:

* Delete worlds/sc2wol/docs/setup_en.md

I think this will fix the merge issue

* Now it should work

* Woops

---------

Co-authored-by: Scipio Wright <scipiowright@gmail.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2024-03-22 17:46:14 +01:00
CubeSoldier 3d56f3c096
Docs: Added snes9x-nwa as recommended emulator to the setup guides for SNES games (#1778)
* Added snes9x-nwa as recommended emulator to the setup guides

* Removed snes9x-nwa from the setup guides of DKC3 and SMW

* Update worlds/alttp/docs/multiworld_en.md

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>

* Removed duplicate text
Minor grammar and spelling fixes

* Unified required software for SM, SMZ3 and SoE with ALTTP

* Added instructions for usage of BSNES-Plus for ALTTP, SM and SMZ3

---------

Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
2024-03-12 00:42:56 +01:00
Aaron Wagener 5fecb7f043
LTTP: fix some hashed string comparisons (#2927) 2024-03-11 10:00:28 +01:00
Zach Parks 8c11c385f3
ALTTP: Fix NotImplemented error when using non-`none` values for `timer`. (#2924) 2024-03-10 01:56:57 -06:00
Aaron Wagener 939a5ec959
LTTP: remove multiworld = None (#2290) 2024-03-10 08:18:25 +01:00