Commit Graph

7204 Commits

Author SHA1 Message Date
Fabian Dill f3413e9cef
Factorio: support 2.0 update (#4110)
- removed tutorialization (Craft/Do X to unlock tech)
- start with  everything needed for power, electric mining drills, science lab and automation science already unlocked
- updated world gen
- updated mod api use
   - updated fluid boxes (CaitSith2)
- new option: free sample quality (needs quality mod)
- removed old gruft, faster gen speed, faster load time
- lists space age as explicitly not supported, so it prevents the game from trying to load both
- fixes Y offset of traps being wrong (way higher than intended)
- client now has a 5 second timeout to communicate with the bound factorio server, so it aborts actions if the server died
- savegames are now stored  in write_data_directory -> saves -> Archipelago
- add cargo-landing-pad  handling
- starting rocket silo and cargo landing pad respect free sample quality 
- supports Factorio 2.0

---------

Co-authored-by: CaitSith2 <d_good@caitsith2.com>
2024-11-11 11:43:16 +01:00
black-sliver b3e5ef876a
WebHost: update werkzeug (#4167) 2024-11-10 01:40:29 +01:00
black-sliver 9be996ba0e
Core: downgrade websockets and minor fixes (#4166)
* Core: downgrade websockets to 13.x

14.x currently doesn't work for MultiServer.
14.x is not supported with py3.8, so updating to 14.x should be scheduled for AP 0.6.0.

* CI: 5min timeout for hosting test

* MultiServer: properly shutdown even if ctx is invalid

* CI: increase hosting test timeout to 10min

this is 4x expected time, just to be safe.
2024-11-10 01:23:29 +01:00
NewSoupVi fa93bc5d1e
The Witness: Get rid of Menu region, prepare for other worlds to change theirs (hints) #3888 2024-11-09 21:10:54 +01:00
Justus Lind 6b4f6ebc1e
Update to Muse Dash v4.9.0 [Ensemble Arcanum] (#4095)
* Update to Muse Dash v4.9.0

* Add trailing newline

* I've forgotten to adjust this for a while. Lets increase it by a decent chunk.
2024-11-09 20:14:34 +01:00
Nicholas Saylor 930529e211
DS3: Update tests to use bases.py (#4138) 2024-11-09 19:29:51 +01:00
LiquidCat64 aae8b16073
CV64: Remove multiworld random usage #4156 2024-11-08 18:57:44 +01:00
Mysteryem f4072833f3
TUNIC: Add Shop indirect condition (#4160)
* TUNIC: Add Shop indirect condition

The `Overworld -> Cube Cave Entrance Region` Entrance checks
`can_shop()` which checks for being able to reach the "Shop" Region, so
the Entrance requires an indirect condition of reaching the "Shop"
Region.

* Rename entrance variable to cube_entrance

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

---------

Co-authored-by: Scipio Wright <scipiowright@gmail.com>
2024-11-08 18:57:11 +01:00
Mysteryem f52d65a141
Pokemon RB: make stage_post_fill deterministic (#4008)
stage_post_fill iterates sets of locations, so the iteration order is
non-deterministic, resulting in different items being converted from
Progression to Useful when generating with the same seed.

This patch makes stage_post_fill deterministic by sorting the duplicate
pokemon locations in each sphere before choosing which of the duplicates
should remain as progression.
2024-11-08 12:11:41 +01:00
SunCat 2bdc1e0fc5
Checksfinder: clean up setup guide intro and change ownership #4147 2024-11-07 10:35:12 +01:00
Remy Jette 639b9598bd
sm64ex: Make the Exclamation Boxes option a Toggle (#4152) 2024-11-07 10:34:41 +01:00
NewSoupVi a29205b547
Core: Add Item.excludable helper function (#4080)
Some worlds might want to check for "Item is junk", i.e. an excludable item.

Because this is both `filler` and `trap`, and because `filler` is `0`, there are many "wrong ways" to do this. So I think we should provide a helper function for it.
2024-11-07 09:59:08 +01:00
black-sliver 345d5154a9
WebHost: fix missing timezone in tracker if-modified-since handling (#4125)
* WebHost: fix missing timezone in tracker if-modified-since handling

and add a test for it

* WebHost, Test: fix running test_tracker in parallel
2024-11-07 09:51:40 +01:00
black-sliver a0207e0286
Setup: exclude zstandard (#4155)
This is quite the big dependency (~20MB) that is unused.
For non-webhost it is an optional dependency to requests.
2024-11-07 09:41:42 +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 1cba694b78
Bumper Stickers: Update tests to bases.py #4137 2024-11-06 09:37:36 +01:00
Nicholas Saylor 9082ce74df
Pokemon Emerald: Update tests to use bases.py #4142 2024-11-06 09:37:14 +01:00
Nicholas Saylor 5dfb2c514f
DLC Quest: Update tests to use bases.py #4141 2024-11-06 09:36:49 +01:00
Zach "Phar" Parks e2e5c5102b
Rogue Legacy: Remove item/location id overlap rejection code. (#3893)
* Rogue Legacy: Remove item/location id overlap rejection code.

RL has been updated to support id overlaps.

* Update __init__.py

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-11-05 08:33:41 +00:00
Nicholas Saylor 08b99b8c33
LADX: Update tests to use bases.py #4139 2024-11-04 08:40:08 +01:00
Nicholas Saylor 72d2a33c0b
Lufia 2: Update tests to bases.py #4136 2024-11-04 08:39:12 +01:00
Nicholas Saylor 6d0f0d2f4a
LTTP: Update tests to use bases.py #4140 2024-11-04 08:38:47 +01:00
SunCat a64548a4c6
ChecksFinder: Update description (#4145)
* edit checksfinder description

* Remove trailing whitespace in docstring

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2024-11-04 08:19:34 +01:00
Nicholas Saylor d1dee226bf
Launcher: Add link to the official site #4091 2024-11-03 15:48:52 +01:00
Bryce Wilson 504eceaf4f
Pokemon Emerald: Prevent evolution fanfare from being replaced with flute (#4113)
* Pokemon Emerald: Prevent evolution fanfare from being replaced with flute

* Pokemon Emerald: Update Changelog
2024-11-03 15:36:39 +01:00
Ziktofel 96abc32f7d
SC2: Small bugfix for SC2 logic #4126 2024-11-03 15:27:04 +01:00
NewSoupVi 048658955b
Core: The Item Links fix to end them all (for now, hopefully) (#4096)
* Core: The Item Links fix to end them all

This puts the bandaid that was holding Item Links together for years back on.

It's a bad solution
But it's what we had previously, and the change away from this is what broke them

So in the interest of 0.5.1 releasing this century, maybe we should just go with this.

* Update AutoWorld.py
2024-11-03 15:22:10 +01:00
Nicholas Saylor 931e335155
Generate: Prevent ini Files from Being Included in YAML Discovery (#4127)
* Prevent ini files from being included in YAML discovery

* Update Generate.py

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

---------

Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2024-11-01 21:07:43 +01:00
Nicholas Saylor 1323474a52
Tests: Update test_fill.py to use Options API (#4128)
* Update test_fill.py::TestDistributeItemsRestrictive::test_non_excluded_local_items

* Update test_fill.py:TestBalanceMultiworldProgression
2024-11-01 12:43:28 +01:00
black-sliver f7b9ac990b
WebHost: improve image asset loading performance (#4123)
* WebHost: Scale image assets

* WebHost: convert images to webp
2024-10-30 23:56:39 -04:00
Doug Hoskisson 085b655ad9
SNIClient: log exceptions and keep task alive (#3911)
* SNIClient: log exceptions and keep task alive

* also log errors in `get_handler`
and disconnect if error in `game_watcher`
2024-10-31 00:16:02 +01:00
qwint 0b5c7fe8a9
HK: fix grubhunt required grubs count (#4094)
* somehow this mixup got into the final grubhunt PR

* catch a case I didn't test before

* Update worlds/hk/__init__.py

Co-authored-by: Mysteryem <Mysteryem@users.noreply.github.com>

* first pass at adding grub count tests

* add tests to explicitly show counting/not counting of player2s grubs

* forgot a test rename

---------

Co-authored-by: Mysteryem <Mysteryem@users.noreply.github.com>
2024-10-30 23:58:40 +01:00
Aaron Wagener aaf25f8c6f
Tests: add test that option classes aren't reused (#3530) 2024-10-30 23:32:38 +01:00
Aaron Wagener f00975c73d
Tests: Add a test that weights file generates different results per player correctly (#3392)
* Tests: Add a test that weights file generates different results per player correctly

* Update test/programs/test_generate.py

* Generate.main() return and accessibility options were changed
2024-10-30 23:18:30 +01:00
Star Rauchenberger ad40acd392
Lingo: Mark Eight Room -> The Incomparable as a warp (#4119) 2024-10-29 23:09:31 +01:00
Nicholas Saylor 4503ba75b6
Pokemon Emerald: Link to Rom Changes in Game Page (#4090)
* Added rematch information to game page

* Better wording

* Actually correct the language

* Update worlds/pokemon_emerald/docs/en_Pokemon Emerald.md

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Linked to rom_changes_en.md rather than adding to the game page

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-10-29 13:37:42 +01:00
Bryce Wilson 14c7b22fea
Pokemon Emerald: Update changelog (#4112) 2024-10-29 13:36:02 +01:00
Benjamin S Wolf 1541f46d44
oc2: Reduce calls to meets_requirements (#4060) 2024-10-29 11:07:49 +01:00
Scipio Wright b6c58c5c24
TUNIC: Minor revision to IG and LS option descriptions #4115 2024-10-29 02:43:03 +01:00
Natalie Weizenbaum 4dde3a2191
[DS3] Remind players to remove the old dinput8.dll (#4034)
This is a common mistake when players are getting set up with the new DS3 version.
2024-10-28 23:30:07 +01:00
Mysteryem edacc07808
OSRS: Add missing indirect conditions (#4029)
All entrances to Cooks_Guild and Crafting_Guild and all entrances using
special logic for canoes were missing indirect conditions for the
regions that the cooking, crafting and woodcutting skill rules require
access to.
2024-10-28 23:26:08 +01:00
Star Rauchenberger f3c59818b1
Lingo: Update documentation for panel shuffle (#4086) 2024-10-28 23:21:13 +01:00
Scipio Wright 594a8321c4
TUNIC: Add link to logic tricks doc (#4087)
* Add link to logic tricks doc

* Update worlds/tunic/docs/en_TUNIC.md

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-10-28 23:19:57 +01:00
Bryce Wilson f10eb850dc
Pokemon Emerald: Add some warnings to option descriptions (#4114) 2024-10-28 23:17:25 +01:00
Nicholas Saylor 3f6754d7f2
Docs: Update Information about Running Unittests (#4093)
* Expanded information in docs

* Revert run.xml changes

* Update docs/tests.md

Co-authored-by: qwint <qwint.42@gmail.com>

* Remove newline

* Apply suggestions from code review

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

* Added suggestsions from code review

---------

Co-authored-by: qwint <qwint.42@gmail.com>
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
2024-10-28 19:47:08 +01:00
black-sliver 382a5df1d8
macos: fix crash when 'Open Patch' is used (#4108)
* macos: fix crash when 'Open Patch' is used

* Utils: fix error message in open_directory
2024-10-28 08:41:36 +01:00
palex00 9b5a2bedac
[KH2] Add new Poptracker Pack to the KH2 Setup Guide (#4104)
* Add new Poptracker Pack to the KH2 Setup Guide

* Match Order in description

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Make it say PopTracker with a capital T everywhere

---------

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-10-28 02:38:05 +01:00
Spineraks d15fa57151
Yacht Dice: Textual fixes and changes (Docs / yaml description) (#3967)
* Add the yacht dice (from other git) world to the yacht dice fork

* Update .gitignore

* Removed zillion because it doesn't work

* Update .gitignore

* added zillion again...

* Now you can have 0 extra fragments

* Added alt categories, also options

* Added item categories

* Extra categories are now working! 🐶

* changed options and added exceptions

* Testing if I change the generate.py

* Revert "Testing if I change the generate.py"

This reverts commit 7c2b3df6170dcf8d8f36a1de9fcbc9dccdec81f8.

* ignore gitignore

* Delete .gitignore

* Update .gitignore

* Update .gitignore

* Update logic, added multiplicative categories

* Changed difficulties

* Update offline mode so that it works again

* Adjusted difficulty

* New version of the apworld, with 1000 as final score, always

Will still need to check difficulty and weights of adding items.
Website is not ready yet, so this version is not usable yet :)

* Changed yaml and small bug fixes

Fix when goal and max are same
Options: changed chance to weight

* no changes, just whitespaces

* changed how logic works

Now you put an array of mults and the cpu gets a couple of tries

* Changed logic, tweaked a bit too

* Preparation for 2.0

* logic tweak

* Logic for alt categories properly now

* Update setup_en.md

* Update en_YachtDice.md

* Improve performance of add_distributions

* Formatting style

* restore gitignore to APMW

* Tweaked generation parameters and methods

* Version 2.0.3

manual input option
max score in logic always 2.0.3
faster gen

* Comments and editing

* Renamed setup guide

* Improved create_items code

* init of locations: remove self.event line

* Moved setting early items to generate_early

* Add my name to CODEOWNERS

* Added Yacht Dice to the readme in list of games

* Improve performance of Yacht Dice

* newline

* Improve typing

* This is actually just slower lol

* Update worlds/yachtdice/Items.py

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>

* Update Options.py

* Styling

* finished text whichstory option

* removed roll and rollfragments; not used

* import; worlds not world :)

* Option groups!

* ruff styling, fix

* ruff format styling!

* styling and capitalization of options

* small comment

* Cleaned up the "state_is_a_list" a little bit

* RUFF 🐶

* Changed filling the itempool for efficiency

Now, we start with 17 extra items in the item pool, it's quite likely you need at least 17 items (~80%?).
And then afterwards, we delete items if we overshoot the target of 1000, and add items if we haven't reached an achievable score of 1000 yet. Also, no need to recompute the entire logic when adding points.

* 🐶

* Removed plando "fix"

* Changed indent of score multiplier

* faster location function

* Comments to docstrings

* fixed making location closest to goal_score be goal_score

* options format

* iterate keys and values of a dict together

* small optimization ListState

* faster collection of categories

* return arguments instead of making a list (will 🐶 later)

* Instead of turning it into a tuple, you can just make a tuple literal

* remove .keys()

* change .random and used enumerate

* some readability improvements

* Remove location "0", we don't use that one

* Remove lookup_id_to_name entirely

I for sure don't use it, and as far as I know it's not one of the mandatory functions for AP, these are item_name_to_id and location_name_to_id.

* .append instead of += for single items, percentile function changed

Also an extra comment for location ids.

* remove ) too many

* Removed sorted from category list

* Hash categories (which makes it slower :( )

Maybe I messed up or misunderstood...
I'll revert this right away since it is 2x slower, probably because of sorted instead of sort?

* Revert "Hash categories (which makes it slower :( )"

This reverts commit 34f2c1aed8c8813b2d9c58896650b82a810d3578.

* temporary push: 40% faster generation test

Small changes in logic make the generation 40% faster.
I'll have to think about how big the changes are. I suspect they are rather limited.
If this is the way to go, I'll remove the temp file and redo the YachtWeights file, I'll remove the functions there and just put the new weights here.

* Add Points item category

* Reverse changes of bad idea :)

* ruff 🐶

* Use numpy and pmf function to speed up gen

Numpy has a built-in way to sum probability mass functions (pmf).
This shaves of 60% of the generation time :D

* Revert "Use numpy and pmf function to speed up gen"

This reverts commit 9290191cb323ae92321d6c2cfcfe8c27370f439b.

* Step inbetween to change the weights

* Changed the weights to make it faster

135 -> 81 seconds on 100 random yamls

* Adjusted max_dist, split dice_simulation function

* Removed nonlocal and pass arguments instead

* Change "weight-lists" to Dict[str, float]

* Removed the return from ini_locations.

Also added explanations to cat_weights

* Choice options; dont'use .value (will ruff later)

* Only put important options in slotdata

* 🐶

* Add Dict import

* Split the cache per player, limit size to 400.

* 🐶

* added , because of style

* Update apworld version to 2.0.6

2.0.5 is the apworld I released on github to be tested
I never separately released 2.0.4.

* Multiple smaller code improvements

- changed names in YachtWeights so we don't need to translate them in Rules anymore
- we now remember which categories are present in the game, and also put this in slotdata. This we do because only one of two categories is present in a game. If for some reason both are present (plando/getitem/startinventory), we now know which category to ignore
-

* 🐶 ruff

* Mostly minimize_extra_items improvements

- Change logic, generation is now even faster (0.6s per default yaml).
- Made the option 'minimize_extra_items' do a lot more, hopefully this makes the impact of Yacht Dice a little bit less, if you want that. Here's what is also does now:
 - you start with 2 dice and 2 rolls
 - there will be less locations/items at the start of you game

* ruff 🐶

* Removed printing options

* Reworded some option descriptions

* Yacht Dice: setup: change release-link to latest

On the installation page, link to the latest release, instead of the page with all releases

* Several fixes and changes

-change apworld version
-Removed the extra roll (this was not intended)
-change extra_points_added to a mutable list to that it actually does something
-removed variables multipliers_added and items_added
-Rules, don't order by quantity, just by mean_score
-Changed the weights in general to make it faster

* 🐶

* Revert setup to what it was (latest, without S)

* remove temp weights file, shouldn't be here

* Made sure that there is not too many step score multipliers.

Too many step score multipliers lead to gen fails too, probably because you need many categories for them to actually help a lot. So it's hard to use them at the start of the game.

* add filler item name

* Textual fixes and changes

* Remove Victory item and use event instead.

* Revert "Remove Victory item and use event instead."

This reverts commit c2f7d674d392a3acbc1db8614411164ba3b28bff.

* Changed order of options

Also changed 'both options' to 'the website'

* Rephrase the offline-play part

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-10-28 02:37:21 +01:00
PoryGone b27f667a15
Core: Add Version string to Launcher title (#4107) 2024-10-28 01:53:11 +01:00
Natalie Weizenbaum 579abb33c0
Properly fall back to a world's `rich_text_options_doc` (#4109)
Previously, because `default(..., true)` only checks if the
left-hand-side is falsey, not just `None`, this always forced options
to render in non-rich mode if they were explicitly set to
`rich_text_doc = None`. Now it matches the intended and documented
behavior, where `None` falls back to the world's
`rich_text_options_doc` setting.
2024-10-28 00:01:41 +01:00