Archipelago/worlds
Spineraks 703e3393a6
Yacht Dice: Fix logic (again) so that score doesn't drop when receiving item (#4044)
* 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.

* Revert "Textual fixes and changes"

This reverts commit e9432f92454979fcd5a31f8517586585362a7ab7.

* Remove Victory item and make it an event instead

* Yacht Dice logic fix, no decreasing score when obtain item

take 2

* Logic fix: Revert max_tries and mults, change ordering

* Remove spaces :^)

* Updated weights that are stochastically ordered by dice/roll

In the trimming of the weights, sometimes it having 4 rolls would be better than having 5 rolls.
I did a check that this does not happen for any dice increment or roll increment

* Swap for-loops to increase performance

This method is faster if the first for-loop contains fewer items.
Since the function is called with, typically, `dist2` having less items, let's loop over `dist2` first. This makes the entire program 10% faster.

* Remove options with 0 chance from list

---------

Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
2024-10-22 21:07:44 +02:00
..
_bizhawk BizHawkClient: Fix typing mistake (#3938) 2024-09-28 22:49:11 +02:00
_sc2common SC2: don't close all SC2 instances when one quits (#3507) 2024-06-12 02:14:30 +02:00
adventure Various worlds: Fix more absolute world imports (#3510) 2024-06-27 08:51:27 +02:00
ahit AHIT: Fix Death Wish option check typo (#3978) 2024-09-22 16:22:11 +02:00
alttp ALTTP: Plando (#2904) fixes (#3834) 2024-09-09 15:56:15 +02:00
apsudoku APSudoku: Update setup guide, remove extraneous options page link (#3849) 2024-08-29 08:12:58 +02:00
aquaria [Aquaria] Adds Poptracker Pack to the Aquaria Setup Guides (#4037) 2024-10-17 03:34:10 +02:00
archipidle ArchipIDLE 2024 (#3079) 2024-04-12 00:32:10 -04:00
blasphemous Blasphemous: Move pre_fill to create_items #3901 2024-09-17 15:08:15 +02:00
bomb_rush_cyberfunk Bomb Rush Cyberfunk: Fix Coil quest being in glitched logic too early (#3720) 2024-07-31 17:32:51 +02:00
bumpstik bumpstik: add hazard bumpers to completion (#3991) 2024-09-26 20:47:03 +02:00
celeste64 Celeste 64: Typo #3840 2024-08-24 02:05:42 +02:00
checksfinder ChecksFinder: itempool naming/typing (#3797) 2024-08-29 08:43:13 +02:00
clique Clique: Update to new options API (#3759) 2024-08-11 14:47:17 +02:00
cv64 Core: Rework accessibility (#1481) 2024-07-31 12:13:14 +02:00
dark_souls_3 DS3: Make your own region cache (#4040) 2024-10-11 03:02:31 +02:00
dkc3 Various worlds: Fix more absolute world imports (#3510) 2024-06-27 08:51:27 +02:00
dlcquest DLC Quest: Add options presets to DLC Quest (#3676) 2024-07-24 13:49:28 +02:00
doom_1993 Doom 1993 (auto-generated files): Update E4 logic (#3957) 2024-09-21 23:06:31 +02:00
doom_ii DOOM II: Fix sector 95 assignment in DOOM II MAP17 to correctly flag the BFG9000 location as in the Yellow Key area (#3705) 2024-09-18 00:08:18 +02:00
factorio Factorio: update API use (#3760) 2024-09-18 00:18:17 +02:00
ff1 Core: Remove Universally Unique ID Requirements (Per-Game Data Packages) (#1933) 2024-06-01 06:07:13 -05:00
ffmq Docs: Add FFMQ French Setup Guide + Minor fixes to English Guide (#3590) 2024-07-31 17:40:45 +02:00
generic Adjusts Whitespaces in the Plando Doc to be able to be copied directly (#3902) 2024-09-27 01:30:23 +02:00
heretic Doom 2, Heretic: fix missing items (Doom2 Megasphere, Heretic Torch) (#3561) 2024-06-19 12:59:10 +02:00
hk Hollow Knight: Clean outdated slot data code and comments #3988 2024-09-27 01:27:22 +02:00
hylics2 Core: Remove Universally Unique ID Requirements (Per-Game Data Packages) (#1933) 2024-06-01 06:07:13 -05:00
kdl3 KDL3: Fix webhost not giving a patch #4023 2024-10-04 21:27:23 +02:00
kh1 Kingdom Hearts: Fix Hint Spam and Add Setting Queries #3899 2024-09-19 22:32:47 +02:00
kh2 [KH2] Adds more options to slot data #4031 2024-10-05 02:13:04 +02:00
ladx LADX: ghost fills ammo to initial max (#4005) 2024-10-01 21:09:23 +02:00
landstalker Landstalker: Fixed rare generation issues (#3353) 2024-06-01 06:39:57 -05:00
lingo Lingo: Added missing connection from The Tenacious -> Hub Room (#3947) 2024-09-16 18:06:20 +02:00
lufia2ac 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
meritous Core: Remove Universally Unique ID Requirements (Per-Game Data Packages) (#1933) 2024-06-01 06:07:13 -05:00
messenger The Messenger: fix missing money wrench rule (#4041) 2024-10-11 03:05:21 +02:00
minecraft Minecraft: Fix plando connections #4048 2024-10-14 00:22:37 +02:00
mlss MLSS: Various bugfixes and QoL updates (#3744) 2024-09-18 19:33:02 +02:00
mm2 MM2: fix Air Shooter minimum damage #3922 2024-09-17 14:42:19 +02:00
mmbn3 MMBN3: Add missing indirect conditions (#3931) 2024-09-17 14:41:56 +02:00
musedash Muse Dash: Update to 4.7.0 - Let's Rhythm Jam! (#3837) 2024-08-24 18:19:42 +02:00
noita Noita: Add the useful classification to important perks, making them progression + useful #4030 2024-10-17 03:31:53 +02:00
oot OoT: Add aliases for Progressive Hookshot (#4052) 2024-10-14 00:17:53 +02:00
osrs [OSRS] Adds display names to Options #3954 2024-09-20 16:15:30 +02:00
overcooked2 Various worlds: Fix more absolute world imports (#3510) 2024-06-27 08:51:27 +02:00
pokemon_emerald Pokemon Emerald: Add flag for shoal cave to bounces (#4021) 2024-10-17 03:37:41 +02:00
pokemon_rb Pokemon R/B: Version 5 Update (#3566) 2024-09-18 20:37:17 +02:00
raft Raft: Move to new Options API (#3587) 2024-07-15 15:09:02 +02:00
rogue_legacy Rogue Legacy: Split Additional Names into two option classes #3908 2024-09-08 19:57:09 +02:00
ror2 RoR2: Remove recursion from explore mode access rules (#3681) 2024-08-07 23:57:07 +02:00
sa2b Fix Incorrect Link Syntax in SA2B Linux Setup (#3524) 2024-06-13 06:53:01 +02:00
sc2 SC2: Fix item origins, so including/excluding NCO/BW/EXT items works properly (#3990) 2024-09-27 00:57:21 +02:00
shivers Shivers: Add collect behavior option. (#3854) 2024-08-31 13:30:42 +02:00
shorthike A Short Hike: Fix Boat Rental purchase being incorrectly calculated (#3639) 2024-07-22 01:47:46 +02:00
sm SM and SMZ3 option_definitions deprecation fix (#3372) 2024-08-31 13:49:33 +02:00
sm64ex SM64: Remove outdated information on save bugs from setup guide (#3879) 2024-09-27 01:29:26 +02:00
smw Various worlds: Fix more absolute world imports (#3510) 2024-06-27 08:51:27 +02:00
smz3 SM and SMZ3 option_definitions deprecation fix (#3372) 2024-08-31 13:49:33 +02:00
soe SoE: fix determinism (#3745) 2024-08-10 13:08:24 +02:00
spire Spire: Convert options, clean up random calls, and add DeathLink (#3704) 2024-07-31 18:27:35 +02:00
stardew_valley Stardew Valley: Add Cinder Shard resource pack (#4001) 2024-09-27 01:26:06 +02:00
subnautica Core: Region handling customization (#3682) 2024-09-05 16:32:45 +02:00
terraria Core: Remove Universally Unique ID Requirements (Per-Game Data Packages) (#1933) 2024-06-01 06:07:13 -05:00
timespinner Timespinner: Make hidden options pickleables (#4050) 2024-10-16 23:06:14 +02:00
tloz TLOZ: Fix non-deterministic item pool generation (#3779) 2024-08-16 20:57:04 +02:00
tunic TUNIC: Add forgotten Laurels rule for Beneath the Vault Boxes #3981 2024-09-22 16:21:10 +02:00
undertale Undertale: Fix slot_data and options.as_dict() (#3774) 2024-08-12 01:53:40 +02:00
v6 VVVVVV: Make unnecessary Trinkets filler (#3806) 2024-08-18 23:03:57 +02:00
wargroove Wargroove: Switched to options API. (#3306) 2024-05-16 18:46:13 +02:00
witness The Witness: Small code refactor (cast_not_none) (#3798) 2024-10-02 00:02:17 +02:00
yachtdice Yacht Dice: Fix logic (again) so that score doesn't drop when receiving item (#4044) 2024-10-22 21:07:44 +02:00
yoshisisland Yoshi's Island: Fix client giving victory randomly (#3586) 2024-06-26 13:19:16 +02:00
yugioh06 YGO06: slotdata fix (#3953) 2024-09-17 15:13:19 +02:00
zillion Zillion: fix logic cache (#3719) 2024-09-18 21:09:47 +02:00
zork_grand_inquisitor Zork Grand Inquisitor: Fix Determinism Issues on Fixed Seeds (#3134) 2024-04-18 18:47:27 +02:00
AutoSNIClient.py SNIClient: dynamically generate patch file identifier (#2870) 2024-03-07 10:18:22 +01:00
AutoWorld.py Core: update World method comment (#3866) 2024-09-28 22:37:42 +02:00
Files.py APProcedurePatch: fix RLE/COPY incorrect sizing (#3006) 2024-03-22 09:02:38 +01:00
LauncherComponents.py Launcher: explicitly handle cli arguments to be passed to the Component (#3714) 2024-09-08 18:13:01 +02:00
__init__.py Core: fix invalid __package__ of zipped worlds (#3686) 2024-08-10 13:49:32 +02:00