| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | import itertools | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | import logging | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from typing import List, Dict, Set | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from BaseClasses import MultiWorld, CollectionState | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  | from worlds.generic.Rules import set_rule | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from . import locations | 
					
						
							|  |  |  | from .bundles.bundle_room import BundleRoom | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from .content import StardewContent | 
					
						
							|  |  |  | from .content.feature import friendsanity | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from .data.craftable_data import all_crafting_recipes_by_name | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from .data.game_item import ItemTag | 
					
						
							|  |  |  | from .data.harvest import HarvestCropSource, HarvestFruitTreeSource | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from .data.museum_data import all_museum_items, dwarf_scrolls, skeleton_front, skeleton_middle, skeleton_back, all_museum_items_by_name, all_museum_minerals, \ | 
					
						
							|  |  |  |     all_museum_artifacts, Artifact | 
					
						
							|  |  |  | from .data.recipe_data import all_cooking_recipes_by_name | 
					
						
							|  |  |  | from .locations import LocationTags | 
					
						
							|  |  |  | from .logic.logic import StardewLogic | 
					
						
							|  |  |  | from .logic.time_logic import MAX_MONTHS | 
					
						
							|  |  |  | from .logic.tool_logic import tool_upgrade_prices | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | from .mods.mod_data import ModNames | 
					
						
							| 
									
										
										
										
											2025-04-08 12:37:45 -04:00
										 |  |  | from .options import ExcludeGingerIsland, SpecialOrderLocations, Museumsanity, BackpackProgression, Shipsanity, \ | 
					
						
							| 
									
										
										
										
											2025-03-08 11:19:29 -05:00
										 |  |  |     Monstersanity, Chefsanity, Craftsanity, ArcadeMachineLocations, Cooksanity, StardewValleyOptions, Walnutsanity | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from .stardew_rule import And, StardewRule, true_ | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from .stardew_rule.indirect_connection import look_for_indirect_connection | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from .stardew_rule.rule_explain import explain | 
					
						
							| 
									
										
										
										
											2024-12-08 21:00:30 -05:00
										 |  |  | from .strings.ap_names.ap_option_names import WalnutsanityOptionName | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from .strings.ap_names.community_upgrade_names import CommunityUpgrade | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from .strings.ap_names.mods.mod_items import SVEQuestItem, SVERunes | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | from .strings.ap_names.transport_names import Transportation | 
					
						
							|  |  |  | from .strings.artisan_good_names import ArtisanGood | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from .strings.building_names import Building | 
					
						
							|  |  |  | from .strings.bundle_names import CCRoom | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | from .strings.calendar_names import Weekday | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from .strings.craftable_names import Bomb, Furniture | 
					
						
							|  |  |  | from .strings.crop_names import Fruit, Vegetable | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from .strings.entrance_names import dig_to_mines_floor, dig_to_skull_floor, Entrance, move_to_woods_depth, DeepWoodsEntrance, AlecEntrance, \ | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     SVEEntrance, LaceyEntrance, BoardingHouseEntrance, LogicEntrance | 
					
						
							|  |  |  | from .strings.forageable_names import Forageable | 
					
						
							| 
									
										
										
										
											2024-09-18 01:03:33 +03:00
										 |  |  | from .strings.generic_names import Generic | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from .strings.geode_names import Geode | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | from .strings.material_names import Material | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | from .strings.metal_names import MetalBar, Mineral | 
					
						
							|  |  |  | from .strings.monster_names import Monster | 
					
						
							| 
									
										
										
										
											2024-03-15 19:31:01 +03:00
										 |  |  | from .strings.performance_names import Performance | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from .strings.quest_names import Quest | 
					
						
							|  |  |  | from .strings.region_names import Region | 
					
						
							|  |  |  | from .strings.season_names import Season | 
					
						
							| 
									
										
										
										
											2024-11-30 21:52:07 -05:00
										 |  |  | from .strings.skill_names import Skill | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | from .strings.tool_names import Tool, ToolMaterial | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | from .strings.tv_channel_names import Channel | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | from .strings.villager_names import NPC, ModNPC | 
					
						
							|  |  |  | from .strings.wallet_item_names import Wallet | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | logger = logging.getLogger(__name__) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_rules(world): | 
					
						
							|  |  |  |     multiworld = world.multiworld | 
					
						
							|  |  |  |     world_options = world.options | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     world_content = world.content | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     player = world.player | 
					
						
							|  |  |  |     logic = world.logic | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     bundle_rooms: List[BundleRoom] = world.modified_bundles | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     all_location_names = set(location.name for location in multiworld.get_locations(player)) | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rules(logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     set_ginger_island_rules(logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-08 11:19:29 -05:00
										 |  |  |     set_tool_rules(logic, multiworld, player, world_content) | 
					
						
							| 
									
										
										
										
											2024-11-30 21:52:07 -05:00
										 |  |  |     set_skills_rules(logic, multiworld, player, world_content) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_bundle_rules(bundle_rooms, logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
										
											2025-04-08 12:37:45 -04:00
										 |  |  |     set_building_rules(logic, multiworld, player, world_content) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_cropsanity_rules(logic, multiworld, player, world_content) | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     set_story_quests_rules(all_location_names, logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_special_order_rules(all_location_names, logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_help_wanted_quests_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_fishsanity_rules(all_location_names, logic, multiworld, player) | 
					
						
							|  |  |  |     set_museumsanity_rules(all_location_names, logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_friendsanity_rules(logic, multiworld, player, world_content) | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     set_backpack_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_festival_rules(all_location_names, logic, multiworld, player) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_monstersanity_rules(all_location_names, logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_shipsanity_rules(all_location_names, logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_cooksanity_rules(all_location_names, logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_chefsanity_rules(all_location_names, logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_craftsanity_rules(all_location_names, logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_booksanity_rules(logic, multiworld, player, world_content) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_isolated_locations_rules(logic, multiworld, player) | 
					
						
							|  |  |  |     set_traveling_merchant_day_rules(logic, multiworld, player) | 
					
						
							|  |  |  |     set_arcade_machine_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     set_deepwoods_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_magic_spell_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_sve_rules(logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | def set_isolated_locations_rules(logic: StardewLogic, multiworld, player): | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Old Master Cannoli", player), | 
					
						
							|  |  |  |              logic.has(Fruit.sweet_gem_berry)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Galaxy Sword Shrine", player), | 
					
						
							|  |  |  |              logic.has("Prismatic Shard")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Krobus Stardrop", player), | 
					
						
							|  |  |  |              logic.money.can_spend(20000)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Demetrius's Breakthrough", player), | 
					
						
							|  |  |  |              logic.money.can_have_earned_total(25000)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Pot Of Gold", player), | 
					
						
							|  |  |  |              logic.season.has(Season.spring)) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-08 11:19:29 -05:00
										 |  |  | def set_tool_rules(logic: StardewLogic, multiworld, player, content: StardewContent): | 
					
						
							|  |  |  |     if not content.features.tool_progression.is_progressive: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Purchase Fiberglass Rod", player), | 
					
						
							|  |  |  |              (logic.skill.has_level(Skill.fishing, 2) & logic.money.can_spend(1800))) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Purchase Iridium Rod", player), | 
					
						
							|  |  |  |              (logic.skill.has_level(Skill.fishing, 6) & logic.money.can_spend(7500))) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Copper Pan Cutscene", player), logic.received("Glittering Boulder Removed")) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     materials = [None, "Copper", "Iron", "Gold", "Iridium"] | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     tool = [Tool.hoe, Tool.pickaxe, Tool.axe, Tool.watering_can, Tool.trash_can, Tool.pan] | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     for (previous, material), tool in itertools.product(zip(materials[:4], materials[1:]), tool): | 
					
						
							|  |  |  |         if previous is None: | 
					
						
							|  |  |  |             continue | 
					
						
							|  |  |  |         tool_upgrade_location = multiworld.get_location(f"{material} {tool} Upgrade", player) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(tool_upgrade_location, logic.tool.has_tool(tool, previous)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-08 12:37:45 -04:00
										 |  |  | def set_building_rules(logic: StardewLogic, multiworld, player, content: StardewContent): | 
					
						
							|  |  |  |     building_progression = content.features.building_progression | 
					
						
							|  |  |  |     if not building_progression.is_progressive: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-08 12:37:45 -04:00
										 |  |  |     for building in content.farm_buildings.values(): | 
					
						
							|  |  |  |         if building.name in building_progression.starting_buildings: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |             continue | 
					
						
							| 
									
										
										
										
											2025-04-08 12:37:45 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |         location_name = building_progression.to_location_name(building.name) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(location_name, player), | 
					
						
							|  |  |  |                  logic.building.can_build(building.name)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | def set_bundle_rules(bundle_rooms: List[BundleRoom], logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     for bundle_room in bundle_rooms: | 
					
						
							|  |  |  |         room_rules = [] | 
					
						
							|  |  |  |         for bundle in bundle_room.bundles: | 
					
						
							|  |  |  |             location = multiworld.get_location(bundle.name, player) | 
					
						
							|  |  |  |             bundle_rules = logic.bundle.can_complete_bundle(bundle) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |             if bundle_room.name == CCRoom.raccoon_requests: | 
					
						
							|  |  |  |                 num = int(bundle.name[-1]) | 
					
						
							| 
									
										
										
										
											2025-03-10 18:39:35 +03:00
										 |  |  |                 extra_raccoons = 1 if world_options.quest_locations.has_story_quests() else 0 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |                 extra_raccoons = extra_raccoons + num | 
					
						
							|  |  |  |                 bundle_rules = logic.received(CommunityUpgrade.raccoon, extra_raccoons) & bundle_rules | 
					
						
							|  |  |  |                 if num > 1: | 
					
						
							| 
									
										
										
										
											2024-09-08 12:46:58 -04:00
										 |  |  |                     previous_bundle_name = f"Raccoon Request {num - 1}" | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |                     bundle_rules = bundle_rules & logic.region.can_reach_location(previous_bundle_name) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |             room_rules.append(bundle_rules) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(location, bundle_rules) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |         if bundle_room.name == CCRoom.abandoned_joja_mart or bundle_room.name == CCRoom.raccoon_requests: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |             continue | 
					
						
							|  |  |  |         room_location = f"Complete {bundle_room.name}" | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(room_location, player), And(*room_rules)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-30 21:52:07 -05:00
										 |  |  | def set_skills_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, content: StardewContent): | 
					
						
							|  |  |  |     skill_progression = content.features.skill_progression | 
					
						
							|  |  |  |     if not skill_progression.is_progressive: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         return | 
					
						
							| 
									
										
										
										
											2024-09-08 12:46:58 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-30 21:52:07 -05:00
										 |  |  |     for skill in content.skills.values(): | 
					
						
							|  |  |  |         for level, level_name in skill_progression.get_randomized_level_names_by_level(skill): | 
					
						
							|  |  |  |             rule = logic.skill.can_earn_level(skill.name, level) | 
					
						
							|  |  |  |             location = multiworld.get_location(level_name, player) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(location, rule) | 
					
						
							| 
									
										
										
										
											2024-09-08 12:46:58 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-30 21:52:07 -05:00
										 |  |  |         if skill_progression.is_mastery_randomized(skill): | 
					
						
							|  |  |  |             rule = logic.skill.can_earn_mastery(skill.name) | 
					
						
							|  |  |  |             location = multiworld.get_location(skill.mastery_name, player) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(location, rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_entrance_rules(logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     set_mines_floor_entrance_rules(logic, multiworld, player) | 
					
						
							|  |  |  |     set_skull_cavern_floor_entrance_rules(logic, multiworld, player) | 
					
						
							|  |  |  |     set_blacksmith_entrance_rules(logic, multiworld, player) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_skill_entrance_rules(logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_traveling_merchant_day_rules(logic, multiworld, player) | 
					
						
							|  |  |  |     set_dangerous_mine_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_tide_pools, logic.received("Beach Bridge") | (logic.mod.magic.can_blink())) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_quarry, logic.received("Bridge Repair") | (logic.mod.magic.can_blink())) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_secret_woods, logic.tool.has_tool(Tool.axe, "Iron") | (logic.mod.magic.can_blink())) | 
					
						
							| 
									
										
										
										
											2025-05-31 07:57:42 -04:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.forest_to_wizard_tower, logic.region.can_reach(Region.community_center)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.forest_to_sewer, logic.wallet.has_rusty_key()) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.town_to_sewer, logic.wallet.has_rusty_key()) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_abandoned_jojamart, logic.has_abandoned_jojamart()) | 
					
						
							|  |  |  |     movie_theater_rule = logic.has_movie_theater() | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_movie_theater, movie_theater_rule) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.purchase_movie_ticket, movie_theater_rule) | 
					
						
							| 
									
										
										
										
											2025-04-20 08:21:02 -04:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.take_bus_to_desert, logic.received("Bus Repair") & logic.money.can_spend(500)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_skull_cavern, logic.received(Wallet.skull_key)) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.talk_to_mines_dwarf, | 
					
						
							|  |  |  |                       logic.wallet.can_speak_dwarf() & logic.tool.has_tool(Tool.pickaxe, ToolMaterial.iron)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.buy_from_traveling_merchant, logic.traveling_merchant.has_days()) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.buy_from_raccoon, logic.quest.has_raccoon_shop()) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.fish_in_waterfall, | 
					
						
							|  |  |  |                       logic.skill.has_level(Skill.fishing, 5) & logic.tool.has_fishing_rod(2)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     set_farm_buildings_entrance_rules(logic, multiworld, player) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.mountain_to_railroad, logic.received("Railroad Boulder Removed")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_witch_warp_cave, logic.quest.has_dark_talisman() | (logic.mod.magic.can_blink())) | 
					
						
							| 
									
										
										
										
											2025-05-04 10:28:38 -04:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_witch_hut, (logic.quest.can_complete_quest(Quest.goblin_problem) | logic.mod.magic.can_blink())) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_mutant_bug_lair, | 
					
						
							| 
									
										
										
										
											2024-11-29 14:41:26 -05:00
										 |  |  |                       (logic.wallet.has_rusty_key() & logic.region.can_reach(Region.railroad) & logic.relationship.can_meet( | 
					
						
							|  |  |  |                           NPC.krobus)) | logic.mod.magic.can_blink()) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_casino, logic.quest.has_club_card()) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     set_bedroom_entrance_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_festival_entrance_rules(logic, multiworld, player) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_island_entrance_rule(multiworld, player, LogicEntrance.island_cooking, logic.cooking.can_cook_in_kitchen, world_options) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.farmhouse_cooking, logic.cooking.can_cook_in_kitchen) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.shipping, logic.shipping.can_use_shipping_bin) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.watch_queen_of_sauce, logic.action.can_watch(Channel.queen_of_sauce)) | 
					
						
							| 
									
										
										
										
											2024-09-08 12:46:58 -04:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.forest_to_mastery_cave, logic.skill.can_enter_mastery_cave) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.buy_experience_books, logic.time.has_lived_months(2)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.buy_year1_books, logic.time.has_year_two) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.buy_year3_books, logic.time.has_year_three) | 
					
						
							| 
									
										
										
										
											2024-09-18 01:03:33 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.adventurer_guild_to_bedroom, logic.monster.can_kill_max(Generic.any)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_dangerous_mine_rules(logic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if world_options.exclude_ginger_island == ExcludeGingerIsland.option_true: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |     dangerous_mine_rule = logic.mine.has_mine_elevator_to_floor(120) & logic.region.can_reach(Region.qi_walnut_room) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.dig_to_dangerous_mines_20, dangerous_mine_rule) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.dig_to_dangerous_mines_60, dangerous_mine_rule) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.dig_to_dangerous_mines_100, dangerous_mine_rule) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_dangerous_skull_cavern, | 
					
						
							|  |  |  |                       (logic.received(Wallet.skull_key) & logic.region.can_reach(Region.qi_walnut_room))) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_farm_buildings_entrance_rules(logic, multiworld, player): | 
					
						
							| 
									
										
										
										
											2025-04-08 12:37:45 -04:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.downstairs_to_cellar, logic.building.has_building(Building.cellar)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.use_desert_obelisk, logic.can_use_obelisk(Transportation.desert_obelisk)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_greenhouse, logic.received("Greenhouse")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_coop, logic.building.has_building(Building.coop)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_barn, logic.building.has_building(Building.barn)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_shed, logic.building.has_building(Building.shed)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_slime_hutch, logic.building.has_building(Building.slime_hutch)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_bedroom_entrance_rules(logic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_harvey_room, logic.relationship.has_hearts(NPC.harvey, 2)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.mountain_to_maru_room, logic.relationship.has_hearts(NPC.maru, 2)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_sebastian_room, (logic.relationship.has_hearts(NPC.sebastian, 2) | logic.mod.magic.can_blink())) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.forest_to_leah_cottage, logic.relationship.has_hearts(NPC.leah, 2)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_elliott_house, logic.relationship.has_hearts(NPC.elliott, 2)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_sunroom, logic.relationship.has_hearts(NPC.caroline, 2)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.enter_wizard_basement, logic.relationship.has_hearts(NPC.wizard, 4)) | 
					
						
							|  |  |  |     if ModNames.alec in world_options.mods: | 
					
						
							|  |  |  |         set_entrance_rule(multiworld, player, AlecEntrance.petshop_to_bedroom, (logic.relationship.has_hearts(ModNPC.alec, 2) | logic.mod.magic.can_blink())) | 
					
						
							|  |  |  |     if ModNames.lacey in world_options.mods: | 
					
						
							|  |  |  |         set_entrance_rule(multiworld, player, LaceyEntrance.forest_to_hat_house, logic.relationship.has_hearts(ModNPC.lacey, 2)) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_mines_floor_entrance_rules(logic, multiworld, player): | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |     for floor in range(5, 120 + 5, 5): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = logic.mine.has_mine_elevator_to_floor(floor - 10) | 
					
						
							|  |  |  |         if floor == 5 or floor == 45 or floor == 85: | 
					
						
							|  |  |  |             rule = rule & logic.mine.can_progress_in_the_mines_from_floor(floor) | 
					
						
							| 
									
										
										
										
											2024-11-29 14:41:26 -05:00
										 |  |  |         set_entrance_rule(multiworld, player, dig_to_mines_floor(floor), rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_skull_cavern_floor_entrance_rules(logic, multiworld, player): | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |     for floor in range(25, 200 + 25, 25): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = logic.mod.elevator.has_skull_cavern_elevator_to_floor(floor - 25) | 
					
						
							|  |  |  |         if floor == 25 or floor == 75 or floor == 125: | 
					
						
							|  |  |  |             rule = rule & logic.mine.can_progress_in_the_skull_cavern_from_floor(floor) | 
					
						
							| 
									
										
										
										
											2024-11-29 14:41:26 -05:00
										 |  |  |         set_entrance_rule(multiworld, player, dig_to_skull_floor(floor), rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-17 09:20:53 -04:00
										 |  |  | def set_skill_entrance_rules(logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_spring_crops, logic.farming.has_farming_tools & logic.season.has_spring) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_summer_crops, logic.farming.has_farming_tools & logic.season.has_summer) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_fall_crops, logic.farming.has_farming_tools & logic.season.has_fall) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_spring_crops_in_greenhouse, logic.farming.has_farming_tools) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_summer_crops_in_greenhouse, logic.farming.has_farming_tools) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_fall_crops_in_greenhouse, logic.farming.has_farming_tools) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_indoor_crops_in_greenhouse, logic.farming.has_farming_tools) | 
					
						
							|  |  |  |     set_island_entrance_rule(multiworld, player, LogicEntrance.grow_spring_crops_on_island, logic.farming.has_farming_tools, world_options) | 
					
						
							|  |  |  |     set_island_entrance_rule(multiworld, player, LogicEntrance.grow_summer_crops_on_island, logic.farming.has_farming_tools, world_options) | 
					
						
							|  |  |  |     set_island_entrance_rule(multiworld, player, LogicEntrance.grow_fall_crops_on_island, logic.farming.has_farming_tools, world_options) | 
					
						
							|  |  |  |     set_island_entrance_rule(multiworld, player, LogicEntrance.grow_indoor_crops_on_island, logic.farming.has_farming_tools, world_options) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_summer_fall_crops_in_summer, true_) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.grow_summer_fall_crops_in_fall, true_) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-17 09:20:53 -04:00
										 |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.fishing, logic.fishing.can_fish_anywhere()) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-08 11:19:29 -05:00
										 |  |  | def set_blacksmith_entrance_rules(logic, multiworld, player): | 
					
						
							|  |  |  |     set_blacksmith_upgrade_rule(logic, multiworld, player, LogicEntrance.blacksmith_copper, MetalBar.copper, ToolMaterial.copper) | 
					
						
							|  |  |  |     set_blacksmith_upgrade_rule(logic, multiworld, player, LogicEntrance.blacksmith_iron, MetalBar.iron, ToolMaterial.iron) | 
					
						
							|  |  |  |     set_blacksmith_upgrade_rule(logic, multiworld, player, LogicEntrance.blacksmith_gold, MetalBar.gold, ToolMaterial.gold) | 
					
						
							|  |  |  |     set_blacksmith_upgrade_rule(logic, multiworld, player, LogicEntrance.blacksmith_iridium, MetalBar.iridium, ToolMaterial.iridium) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_blacksmith_upgrade_rule(logic, multiworld, player, entrance_name: str, item_name: str, tool_material: str): | 
					
						
							|  |  |  |     upgrade_rule = logic.has(item_name) & logic.money.can_spend(tool_upgrade_prices[tool_material]) | 
					
						
							| 
									
										
										
										
											2024-11-29 14:41:26 -05:00
										 |  |  |     set_entrance_rule(multiworld, player, entrance_name, upgrade_rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_festival_entrance_rules(logic, multiworld, player): | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_egg_festival, logic.season.has(Season.spring)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_desert_festival, logic.season.has(Season.spring) & logic.received("Bus Repair")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_flower_dance, logic.season.has(Season.spring)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_luau, logic.season.has(Season.summer)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_trout_derby, logic.season.has(Season.summer)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_moonlight_jellies, logic.season.has(Season.summer)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_fair, logic.season.has(Season.fall)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_spirit_eve, logic.season.has(Season.fall)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_festival_of_ice, logic.season.has(Season.winter)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_squidfest, logic.season.has(Season.winter)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_night_market, logic.season.has(Season.winter)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, LogicEntrance.attend_winter_star, logic.season.has(Season.winter)) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_ginger_island_rules(logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_island_entrances_rules(logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     if world_options.exclude_ginger_island == ExcludeGingerIsland.option_true: | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     set_boat_repair_rules(logic, multiworld, player) | 
					
						
							|  |  |  |     set_island_parrot_rules(logic, multiworld, player) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Open Professor Snail Cave", player), | 
					
						
							|  |  |  |              logic.has(Bomb.cherry_bomb)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Complete Island Field Office", player), | 
					
						
							|  |  |  |              logic.walnut.can_complete_field_office()) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_walnut_rules(logic, multiworld, player, world_options) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_boat_repair_rules(logic: StardewLogic, multiworld, player): | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Repair Boat Hull", player), | 
					
						
							|  |  |  |              logic.has(Material.hardwood)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Repair Boat Anchor", player), | 
					
						
							|  |  |  |              logic.has(MetalBar.iridium)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Repair Ticket Machine", player), | 
					
						
							|  |  |  |              logic.has(ArtisanGood.battery_pack)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_island_entrances_rules(logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     boat_repaired = logic.received(Transportation.boat_repair) | 
					
						
							|  |  |  |     dig_site_rule = logic.received("Dig Site Bridge") | 
					
						
							|  |  |  |     entrance_rules = { | 
					
						
							|  |  |  |         Entrance.use_island_obelisk: logic.can_use_obelisk(Transportation.island_obelisk), | 
					
						
							|  |  |  |         Entrance.use_farm_obelisk: logic.can_use_obelisk(Transportation.farm_obelisk), | 
					
						
							|  |  |  |         Entrance.fish_shop_to_boat_tunnel: boat_repaired, | 
					
						
							| 
									
										
										
										
											2025-04-20 08:21:02 -04:00
										 |  |  |         Entrance.boat_to_ginger_island: boat_repaired & logic.money.can_spend(1000), | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         Entrance.island_south_to_west: logic.received("Island West Turtle"), | 
					
						
							|  |  |  |         Entrance.island_south_to_north: logic.received("Island North Turtle"), | 
					
						
							|  |  |  |         Entrance.island_west_to_islandfarmhouse: logic.received("Island Farmhouse"), | 
					
						
							|  |  |  |         Entrance.island_west_to_gourmand_cave: logic.received("Island Farmhouse"), | 
					
						
							|  |  |  |         Entrance.island_north_to_dig_site: dig_site_rule, | 
					
						
							|  |  |  |         Entrance.dig_site_to_professor_snail_cave: logic.received("Open Professor Snail Cave"), | 
					
						
							|  |  |  |         Entrance.talk_to_island_trader: logic.received("Island Trader"), | 
					
						
							|  |  |  |         Entrance.island_south_to_southeast: logic.received("Island Resort"), | 
					
						
							|  |  |  |         Entrance.use_island_resort: logic.received("Island Resort"), | 
					
						
							|  |  |  |         Entrance.island_west_to_qi_walnut_room: logic.received("Qi Walnut Room"), | 
					
						
							|  |  |  |         Entrance.island_north_to_volcano: logic.tool.can_water(0) | logic.received("Volcano Bridge") | logic.mod.magic.can_blink(), | 
					
						
							|  |  |  |         Entrance.volcano_to_secret_beach: logic.tool.can_water(2), | 
					
						
							|  |  |  |         Entrance.climb_to_volcano_5: logic.ability.can_mine_perfectly() & logic.tool.can_water(1), | 
					
						
							|  |  |  |         Entrance.talk_to_volcano_dwarf: logic.wallet.can_speak_dwarf(), | 
					
						
							|  |  |  |         Entrance.climb_to_volcano_10: logic.ability.can_mine_perfectly() & logic.tool.can_water(1), | 
					
						
							|  |  |  |         Entrance.mountain_to_leo_treehouse: logic.received("Treehouse"), | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |     parrots = [Entrance.parrot_express_docks_to_volcano, Entrance.parrot_express_jungle_to_volcano, | 
					
						
							|  |  |  |                Entrance.parrot_express_dig_site_to_volcano, Entrance.parrot_express_docks_to_dig_site, | 
					
						
							|  |  |  |                Entrance.parrot_express_jungle_to_dig_site, Entrance.parrot_express_volcano_to_dig_site, | 
					
						
							|  |  |  |                Entrance.parrot_express_docks_to_jungle, Entrance.parrot_express_dig_site_to_jungle, | 
					
						
							|  |  |  |                Entrance.parrot_express_volcano_to_jungle, Entrance.parrot_express_jungle_to_docks, | 
					
						
							|  |  |  |                Entrance.parrot_express_dig_site_to_docks, Entrance.parrot_express_volcano_to_docks] | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     parrot_express_rule = logic.received(Transportation.parrot_express) | 
					
						
							|  |  |  |     parrot_express_to_dig_site_rule = dig_site_rule & parrot_express_rule | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |     for parrot in parrots: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         if "Dig Site" in parrot: | 
					
						
							|  |  |  |             entrance_rules[parrot] = parrot_express_to_dig_site_rule | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             entrance_rules[parrot] = parrot_express_rule | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     set_many_island_entrances_rules(multiworld, player, entrance_rules, world_options) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_island_parrot_rules(logic: StardewLogic, multiworld, player): | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     # Logic rules require more walnuts than in reality, to allow the player to spend them "wrong" | 
					
						
							| 
									
										
										
										
											2024-07-23 01:36:42 +03:00
										 |  |  |     has_walnut = logic.walnut.has_walnut(5) | 
					
						
							|  |  |  |     has_5_walnut = logic.walnut.has_walnut(15) | 
					
						
							|  |  |  |     has_10_walnut = logic.walnut.has_walnut(40) | 
					
						
							|  |  |  |     has_20_walnut = logic.walnut.has_walnut(60) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Leo's Parrot", player), | 
					
						
							|  |  |  |              has_walnut) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Island West Turtle", player), | 
					
						
							|  |  |  |              has_10_walnut & logic.received("Island North Turtle")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Island Farmhouse", player), | 
					
						
							|  |  |  |              has_20_walnut) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Island Mailbox", player), | 
					
						
							|  |  |  |              has_5_walnut & logic.received("Island Farmhouse")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location(Transportation.farm_obelisk, player), | 
					
						
							|  |  |  |              has_20_walnut & logic.received("Island Mailbox")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Dig Site Bridge", player), | 
					
						
							|  |  |  |              has_10_walnut & logic.received("Island West Turtle")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Island Trader", player), | 
					
						
							|  |  |  |              has_10_walnut & logic.received("Island Farmhouse")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Volcano Bridge", player), | 
					
						
							|  |  |  |              has_5_walnut & logic.received("Island West Turtle") & | 
					
						
							|  |  |  |              logic.region.can_reach(Region.volcano_floor_10)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Volcano Exit Shortcut", player), | 
					
						
							|  |  |  |              has_5_walnut & logic.received("Island West Turtle")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Island Resort", player), | 
					
						
							|  |  |  |              has_20_walnut & logic.received("Island Farmhouse")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location(Transportation.parrot_express, player), | 
					
						
							|  |  |  |              has_10_walnut) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | def set_walnut_rules(logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if world_options.walnutsanity == Walnutsanity.preset_none: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     set_walnut_puzzle_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_walnut_bushes_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_walnut_dig_spot_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_walnut_repeatable_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-23 01:36:42 +03:00
										 |  |  | def set_walnut_puzzle_rules(logic: StardewLogic, multiworld, player, world_options): | 
					
						
							| 
									
										
										
										
											2024-12-08 21:00:30 -05:00
										 |  |  |     if WalnutsanityOptionName.puzzles not in world_options.walnutsanity: | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Open Golden Coconut", player), logic.has(Geode.golden_coconut)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Banana Altar", player), logic.has(Fruit.banana)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Leo's Tree", player), logic.tool.has_tool(Tool.axe)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Gem Birds Shrine", player), logic.has(Mineral.amethyst) & logic.has(Mineral.aquamarine) & | 
					
						
							|  |  |  |              logic.has(Mineral.emerald) & logic.has(Mineral.ruby) & logic.has(Mineral.topaz) & | 
					
						
							|  |  |  |              logic.region.can_reach_all((Region.island_north, Region.island_west, Region.island_east, Region.island_south))) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Gourmand Frog Melon", player), logic.has(Fruit.melon) & logic.region.can_reach(Region.island_west)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Gourmand Frog Wheat", player), logic.has(Vegetable.wheat) & | 
					
						
							|  |  |  |              logic.region.can_reach(Region.island_west) & logic.region.can_reach_location("Gourmand Frog Melon")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Gourmand Frog Garlic", player), logic.has(Vegetable.garlic) & | 
					
						
							|  |  |  |              logic.region.can_reach(Region.island_west) & logic.region.can_reach_location("Gourmand Frog Wheat")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Whack A Mole", player), logic.tool.has_tool(Tool.watering_can, ToolMaterial.iridium)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Complete Large Animal Collection", player), logic.walnut.can_complete_large_animal_collection()) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Complete Snake Collection", player), logic.walnut.can_complete_snake_collection()) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Complete Mummified Frog Collection", player), logic.walnut.can_complete_frog_collection()) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Complete Mummified Bat Collection", player), logic.walnut.can_complete_bat_collection()) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Purple Flowers Island Survey", player), logic.walnut.can_start_field_office) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Purple Starfish Island Survey", player), logic.walnut.can_start_field_office) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Protruding Tree Walnut", player), logic.combat.has_slingshot) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Starfish Tide Pool", player), logic.tool.has_fishing_rod(1)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Mermaid Song", player), logic.has(Furniture.flute_block)) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_walnut_bushes_rules(logic, multiworld, player, world_options): | 
					
						
							| 
									
										
										
										
											2024-12-08 21:00:30 -05:00
										 |  |  |     if WalnutsanityOptionName.bushes not in world_options.walnutsanity: | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |         return | 
					
						
							|  |  |  |     # I don't think any of the bushes require something special, but that might change with ER | 
					
						
							|  |  |  |     return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_walnut_dig_spot_rules(logic, multiworld, player, world_options): | 
					
						
							| 
									
										
										
										
											2024-12-08 21:00:30 -05:00
										 |  |  |     if WalnutsanityOptionName.dig_spots not in world_options.walnutsanity: | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     for dig_spot_walnut in locations.locations_by_tag[LocationTags.WALNUTSANITY_DIG]: | 
					
						
							|  |  |  |         rule = logic.tool.has_tool(Tool.hoe) | 
					
						
							|  |  |  |         if "Journal Scrap" in dig_spot_walnut.name: | 
					
						
							|  |  |  |             rule = rule & logic.has(Forageable.journal_scrap) | 
					
						
							|  |  |  |         if "Starfish Diamond" in dig_spot_walnut.name: | 
					
						
							|  |  |  |             rule = rule & logic.tool.has_tool(Tool.pickaxe, ToolMaterial.iron) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(dig_spot_walnut.name, player), rule) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_walnut_repeatable_rules(logic, multiworld, player, world_options): | 
					
						
							| 
									
										
										
										
											2024-12-08 21:00:30 -05:00
										 |  |  |     if WalnutsanityOptionName.repeatables not in world_options.walnutsanity: | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |         return | 
					
						
							|  |  |  |     for i in range(1, 6): | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(f"Fishing Walnut {i}", player), logic.tool.has_fishing_rod(1)) | 
					
						
							|  |  |  |         set_rule(multiworld.get_location(f"Harvesting Walnut {i}", player), logic.skill.can_get_farming_xp) | 
					
						
							|  |  |  |         set_rule(multiworld.get_location(f"Mussel Node Walnut {i}", player), logic.tool.has_tool(Tool.pickaxe)) | 
					
						
							|  |  |  |         set_rule(multiworld.get_location(f"Volcano Rocks Walnut {i}", player), logic.tool.has_tool(Tool.pickaxe)) | 
					
						
							|  |  |  |         set_rule(multiworld.get_location(f"Volcano Monsters Walnut {i}", player), logic.combat.has_galaxy_weapon) | 
					
						
							|  |  |  |         set_rule(multiworld.get_location(f"Volcano Crates Walnut {i}", player), logic.combat.has_any_weapon) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location(f"Tiger Slime Walnut", player), logic.monster.can_kill(Monster.tiger_slime)) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_cropsanity_rules(logic: StardewLogic, multiworld, player, world_content: StardewContent): | 
					
						
							|  |  |  |     if not world_content.features.cropsanity.is_enabled: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     for item in world_content.find_tagged_items(ItemTag.CROPSANITY): | 
					
						
							|  |  |  |         location = world_content.features.cropsanity.to_location_name(item.name) | 
					
						
							|  |  |  |         harvest_sources = (source for source in item.sources if isinstance(source, (HarvestFruitTreeSource, HarvestCropSource))) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(location, player), logic.source.has_access_to_any(harvest_sources)) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_story_quests_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							| 
									
										
										
										
											2025-03-10 18:39:35 +03:00
										 |  |  |     if world_options.quest_locations.has_no_story_quests(): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         return | 
					
						
							|  |  |  |     for quest in locations.locations_by_tag[LocationTags.STORY_QUEST]: | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |         if quest.name in all_location_names and (quest.mod_name is None or quest.mod_name in world_options.mods): | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(multiworld.get_location(quest.name, player), | 
					
						
							|  |  |  |                      logic.registry.quest_rules[quest.name]) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_special_order_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |                             world_options: StardewValleyOptions): | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     if world_options.special_order_locations & SpecialOrderLocations.option_board: | 
					
						
							|  |  |  |         board_rule = logic.received("Special Order Board") & logic.time.has_lived_months(4) | 
					
						
							|  |  |  |         for board_order in locations.locations_by_tag[LocationTags.SPECIAL_ORDER_BOARD]: | 
					
						
							|  |  |  |             if board_order.name in all_location_names: | 
					
						
							|  |  |  |                 order_rule = board_rule & logic.registry.special_order_rules[board_order.name] | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |                 set_rule(multiworld.get_location(board_order.name, player), order_rule) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     if world_options.exclude_ginger_island == ExcludeGingerIsland.option_true: | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |         return | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     if world_options.special_order_locations & SpecialOrderLocations.value_qi: | 
					
						
							|  |  |  |         qi_rule = logic.region.can_reach(Region.qi_walnut_room) & logic.time.has_lived_months(8) | 
					
						
							|  |  |  |         for qi_order in locations.locations_by_tag[LocationTags.SPECIAL_ORDER_QI]: | 
					
						
							|  |  |  |             if qi_order.name in all_location_names: | 
					
						
							|  |  |  |                 order_rule = qi_rule & logic.registry.special_order_rules[qi_order.name] | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |                 set_rule(multiworld.get_location(qi_order.name, player), order_rule) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  | help_wanted_prefix = "Help Wanted:" | 
					
						
							|  |  |  | item_delivery = "Item Delivery" | 
					
						
							|  |  |  | gathering = "Gathering" | 
					
						
							|  |  |  | fishing = "Fishing" | 
					
						
							|  |  |  | slay_monsters = "Slay Monsters" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_help_wanted_quests_rules(logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							| 
									
										
										
										
											2025-03-10 18:39:35 +03:00
										 |  |  |     if world_options.quest_locations.has_no_story_quests(): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         return | 
					
						
							| 
									
										
										
										
											2025-03-10 18:39:35 +03:00
										 |  |  |     help_wanted_number = world_options.quest_locations.value | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |     for i in range(0, help_wanted_number): | 
					
						
							|  |  |  |         set_number = i // 7 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         month_rule = logic.time.has_lived_months(set_number) | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |         quest_number = set_number + 1 | 
					
						
							|  |  |  |         quest_number_in_set = i % 7 | 
					
						
							|  |  |  |         if quest_number_in_set < 4: | 
					
						
							|  |  |  |             quest_number = set_number * 4 + quest_number_in_set + 1 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |             set_help_wanted_delivery_rule(multiworld, player, month_rule, quest_number) | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |         elif quest_number_in_set == 4: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |             set_help_wanted_fishing_rule(multiworld, player, month_rule, quest_number) | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |         elif quest_number_in_set == 5: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |             set_help_wanted_slay_monsters_rule(multiworld, player, month_rule, quest_number) | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |         elif quest_number_in_set == 6: | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |             set_help_wanted_gathering_rule(multiworld, player, month_rule, quest_number) | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_help_wanted_delivery_rule(multiworld, player, month_rule, quest_number): | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |     location_name = f"{help_wanted_prefix} {item_delivery} {quest_number}" | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location(location_name, player), month_rule) | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_help_wanted_gathering_rule(multiworld, player, month_rule, quest_number): | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |     location_name = f"{help_wanted_prefix} {gathering} {quest_number}" | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location(location_name, player), month_rule) | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_help_wanted_fishing_rule(multiworld, player, month_rule, quest_number): | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |     location_name = f"{help_wanted_prefix} {fishing} {quest_number}" | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location(location_name, player), month_rule) | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_help_wanted_slay_monsters_rule(multiworld, player, month_rule, quest_number): | 
					
						
							| 
									
										
										
										
											2023-08-11 04:58:27 -04:00
										 |  |  |     location_name = f"{help_wanted_prefix} {slay_monsters} {quest_number}" | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location(location_name, player), month_rule) | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_fishsanity_rules(all_location_names: Set[str], logic: StardewLogic, multiworld: MultiWorld, player: int): | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  |     fish_prefix = "Fishsanity: " | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     for fish_location in locations.locations_by_tag[LocationTags.FISHSANITY]: | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  |         if fish_location.name in all_location_names: | 
					
						
							|  |  |  |             fish_name = fish_location.name[len(fish_prefix):] | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(multiworld.get_location(fish_location.name, player), | 
					
						
							|  |  |  |                      logic.has(fish_name)) | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_museumsanity_rules(all_location_names: Set[str], logic: StardewLogic, multiworld: MultiWorld, player: int, | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |                            world_options: StardewValleyOptions): | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     museum_prefix = "Museumsanity: " | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     if world_options.museumsanity == Museumsanity.option_milestones: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         for museum_milestone in locations.locations_by_tag[LocationTags.MUSEUM_MILESTONES]: | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |             set_museum_milestone_rule(logic, multiworld, museum_milestone, museum_prefix, player) | 
					
						
							|  |  |  |     elif world_options.museumsanity != Museumsanity.option_none: | 
					
						
							|  |  |  |         set_museum_individual_donations_rules(all_location_names, logic, multiworld, museum_prefix, player) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_museum_individual_donations_rules(all_location_names, logic: StardewLogic, multiworld, museum_prefix, player): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     all_donations = sorted(locations.locations_by_tag[LocationTags.MUSEUM_DONATIONS], | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |                            key=lambda x: all_museum_items_by_name[x.name[len(museum_prefix):]].difficulty, reverse=True) | 
					
						
							|  |  |  |     counter = 0 | 
					
						
							|  |  |  |     number_donations = len(all_donations) | 
					
						
							|  |  |  |     for museum_location in all_donations: | 
					
						
							|  |  |  |         if museum_location.name in all_location_names: | 
					
						
							|  |  |  |             donation_name = museum_location.name[len(museum_prefix):] | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |             required_detectors = counter * 3 // number_donations | 
					
						
							|  |  |  |             rule = logic.museum.can_find_museum_item(all_museum_items_by_name[donation_name]) & logic.received(Wallet.metal_detector, required_detectors) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(multiworld.get_location(museum_location.name, player), | 
					
						
							|  |  |  |                      rule) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |         counter += 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_museum_milestone_rule(logic: StardewLogic, multiworld: MultiWorld, museum_milestone, museum_prefix: str, | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |                               player: int): | 
					
						
							|  |  |  |     milestone_name = museum_milestone.name[len(museum_prefix):] | 
					
						
							|  |  |  |     donations_suffix = " Donations" | 
					
						
							|  |  |  |     minerals_suffix = " Minerals" | 
					
						
							|  |  |  |     artifacts_suffix = " Artifacts" | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     metal_detector = Wallet.metal_detector | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     rule = None | 
					
						
							|  |  |  |     if milestone_name.endswith(donations_suffix): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = get_museum_item_count_rule(logic, donations_suffix, milestone_name, all_museum_items, logic.museum.can_find_museum_items) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     elif milestone_name.endswith(minerals_suffix): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = get_museum_item_count_rule(logic, minerals_suffix, milestone_name, all_museum_minerals, logic.museum.can_find_museum_minerals) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     elif milestone_name.endswith(artifacts_suffix): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = get_museum_item_count_rule(logic, artifacts_suffix, milestone_name, all_museum_artifacts, logic.museum.can_find_museum_artifacts) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     elif milestone_name == "Dwarf Scrolls": | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = And(*(logic.museum.can_find_museum_item(item) for item in dwarf_scrolls)) & logic.received(metal_detector, 2) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     elif milestone_name == "Skeleton Front": | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = And(*(logic.museum.can_find_museum_item(item) for item in skeleton_front)) & logic.received(metal_detector, 2) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     elif milestone_name == "Skeleton Middle": | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = And(*(logic.museum.can_find_museum_item(item) for item in skeleton_middle)) & logic.received(metal_detector, 2) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     elif milestone_name == "Skeleton Back": | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = And(*(logic.museum.can_find_museum_item(item) for item in skeleton_back)) & logic.received(metal_detector, 2) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     elif milestone_name == "Ancient Seed": | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         rule = logic.museum.can_find_museum_item(Artifact.ancient_seed) & logic.received(metal_detector, 2) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     if rule is None: | 
					
						
							|  |  |  |         return | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location(museum_milestone.name, player), rule) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-16 10:18:50 -04:00
										 |  |  | def get_museum_item_count_rule(logic: StardewLogic, suffix, milestone_name, accepted_items, donation_func): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     metal_detector = Wallet.metal_detector | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     num = int(milestone_name[:milestone_name.index(suffix)]) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     required_detectors = (num - 1) * 3 // len(accepted_items) | 
					
						
							| 
									
										
										
										
											2023-08-16 10:18:50 -04:00
										 |  |  |     rule = donation_func(num) & logic.received(metal_detector, required_detectors) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  |     return rule | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_backpack_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if world_options.backpack_progression != BackpackProgression.option_vanilla: | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location("Large Pack", player), | 
					
						
							|  |  |  |                  logic.money.can_spend(2000)) | 
					
						
							|  |  |  |         set_rule(multiworld.get_location("Deluxe Pack", player), | 
					
						
							|  |  |  |                  (logic.money.can_spend(10000) & logic.received("Progressive Backpack"))) | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |         if ModNames.big_backpack in world_options.mods: | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(multiworld.get_location("Premium Pack", player), | 
					
						
							|  |  |  |                      (logic.money.can_spend(150000) & | 
					
						
							|  |  |  |                       logic.received("Progressive Backpack", 2))) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_festival_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player): | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |     festival_locations = [] | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     festival_locations.extend(locations.locations_by_tag[LocationTags.FESTIVAL]) | 
					
						
							|  |  |  |     festival_locations.extend(locations.locations_by_tag[LocationTags.FESTIVAL_HARD]) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |     for festival in festival_locations: | 
					
						
							|  |  |  |         if festival.name in all_location_names: | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(multiworld.get_location(festival.name, player), | 
					
						
							|  |  |  |                      logic.registry.festival_rules[festival.name]) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | monster_eradication_prefix = "Monster Eradication: " | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_monstersanity_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     monstersanity_option = world_options.monstersanity | 
					
						
							|  |  |  |     if monstersanity_option == Monstersanity.option_none: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if monstersanity_option == Monstersanity.option_one_per_monster or monstersanity_option == Monstersanity.option_split_goals: | 
					
						
							|  |  |  |         set_monstersanity_monster_rules(all_location_names, logic, multiworld, player, monstersanity_option) | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if monstersanity_option == Monstersanity.option_progressive_goals: | 
					
						
							|  |  |  |         set_monstersanity_progressive_category_rules(all_location_names, logic, multiworld, player) | 
					
						
							|  |  |  |         return | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_monstersanity_category_rules(all_location_names, logic, multiworld, player, monstersanity_option) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_monstersanity_monster_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, monstersanity_option): | 
					
						
							|  |  |  |     for monster_name in logic.monster.all_monsters_by_name: | 
					
						
							|  |  |  |         location_name = f"{monster_eradication_prefix}{monster_name}" | 
					
						
							|  |  |  |         if location_name not in all_location_names: | 
					
						
							|  |  |  |             continue | 
					
						
							|  |  |  |         location = multiworld.get_location(location_name, player) | 
					
						
							|  |  |  |         if monstersanity_option == Monstersanity.option_split_goals: | 
					
						
							|  |  |  |             rule = logic.monster.can_kill_many(logic.monster.all_monsters_by_name[monster_name]) | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             rule = logic.monster.can_kill(logic.monster.all_monsters_by_name[monster_name]) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(location, rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_monstersanity_progressive_category_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player): | 
					
						
							|  |  |  |     for monster_category in logic.monster.all_monsters_by_category: | 
					
						
							|  |  |  |         set_monstersanity_progressive_single_category_rules(all_location_names, logic, multiworld, player, monster_category) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_monstersanity_progressive_single_category_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, monster_category: str): | 
					
						
							|  |  |  |     location_names = [name for name in all_location_names if name.startswith(monster_eradication_prefix) and name.endswith(monster_category)] | 
					
						
							|  |  |  |     if not location_names: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |     location_names = sorted(location_names, key=lambda name: get_monster_eradication_number(name, monster_category)) | 
					
						
							|  |  |  |     for i in range(5): | 
					
						
							|  |  |  |         location_name = location_names[i] | 
					
						
							|  |  |  |         set_monstersanity_progressive_category_rule(all_location_names, logic, multiworld, player, monster_category, location_name, i) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_monstersanity_progressive_category_rule(all_location_names: Set[str], logic: StardewLogic, multiworld, player, | 
					
						
							|  |  |  |                                                 monster_category: str, location_name: str, goal_index): | 
					
						
							|  |  |  |     if location_name not in all_location_names: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |     location = multiworld.get_location(location_name, player) | 
					
						
							|  |  |  |     if goal_index < 3: | 
					
						
							|  |  |  |         rule = logic.monster.can_kill_any(logic.monster.all_monsters_by_category[monster_category], goal_index + 1) | 
					
						
							|  |  |  |     else: | 
					
						
							|  |  |  |         rule = logic.monster.can_kill_any(logic.monster.all_monsters_by_category[monster_category], goal_index * 2) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(location, rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def get_monster_eradication_number(location_name, monster_category) -> int: | 
					
						
							|  |  |  |     number = location_name[len(monster_eradication_prefix):-len(monster_category)] | 
					
						
							|  |  |  |     number = number.strip() | 
					
						
							|  |  |  |     if number.isdigit(): | 
					
						
							|  |  |  |         return int(number) | 
					
						
							|  |  |  |     return 1000 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_monstersanity_category_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, monstersanity_option): | 
					
						
							|  |  |  |     for monster_category in logic.monster.all_monsters_by_category: | 
					
						
							|  |  |  |         location_name = f"{monster_eradication_prefix}{monster_category}" | 
					
						
							|  |  |  |         if location_name not in all_location_names: | 
					
						
							|  |  |  |             continue | 
					
						
							|  |  |  |         location = multiworld.get_location(location_name, player) | 
					
						
							|  |  |  |         if monstersanity_option == Monstersanity.option_one_per_category: | 
					
						
							|  |  |  |             rule = logic.monster.can_kill_any(logic.monster.all_monsters_by_category[monster_category]) | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             rule = logic.monster.can_kill_any(logic.monster.all_monsters_by_category[monster_category], MAX_MONTHS) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(location, rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_shipsanity_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     shipsanity_option = world_options.shipsanity | 
					
						
							|  |  |  |     if shipsanity_option == Shipsanity.option_none: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     shipsanity_prefix = "Shipsanity: " | 
					
						
							|  |  |  |     for location in locations.locations_by_tag[LocationTags.SHIPSANITY]: | 
					
						
							|  |  |  |         if location.name not in all_location_names: | 
					
						
							|  |  |  |             continue | 
					
						
							|  |  |  |         item_to_ship = location.name[len(shipsanity_prefix):] | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(location.name, player), logic.shipping.can_ship(item_to_ship)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_cooksanity_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     cooksanity_option = world_options.cooksanity | 
					
						
							|  |  |  |     if cooksanity_option == Cooksanity.option_none: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     cooksanity_prefix = "Cook " | 
					
						
							|  |  |  |     for location in locations.locations_by_tag[LocationTags.COOKSANITY]: | 
					
						
							|  |  |  |         if location.name not in all_location_names: | 
					
						
							|  |  |  |             continue | 
					
						
							|  |  |  |         recipe_name = location.name[len(cooksanity_prefix):] | 
					
						
							|  |  |  |         recipe = all_cooking_recipes_by_name[recipe_name] | 
					
						
							|  |  |  |         cook_rule = logic.cooking.can_cook(recipe) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(location.name, player), cook_rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_chefsanity_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     chefsanity_option = world_options.chefsanity | 
					
						
							|  |  |  |     if chefsanity_option == Chefsanity.option_none: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     chefsanity_suffix = " Recipe" | 
					
						
							|  |  |  |     for location in locations.locations_by_tag[LocationTags.CHEFSANITY]: | 
					
						
							|  |  |  |         if location.name not in all_location_names: | 
					
						
							|  |  |  |             continue | 
					
						
							|  |  |  |         recipe_name = location.name[:-len(chefsanity_suffix)] | 
					
						
							|  |  |  |         recipe = all_cooking_recipes_by_name[recipe_name] | 
					
						
							|  |  |  |         learn_rule = logic.cooking.can_learn_recipe(recipe.source) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(location.name, player), learn_rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_craftsanity_rules(all_location_names: Set[str], logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     craftsanity_option = world_options.craftsanity | 
					
						
							|  |  |  |     if craftsanity_option == Craftsanity.option_none: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     craft_prefix = "Craft " | 
					
						
							|  |  |  |     craft_suffix = " Recipe" | 
					
						
							|  |  |  |     for location in locations.locations_by_tag[LocationTags.CRAFTSANITY]: | 
					
						
							|  |  |  |         if location.name not in all_location_names: | 
					
						
							|  |  |  |             continue | 
					
						
							|  |  |  |         if location.name.endswith(craft_suffix): | 
					
						
							|  |  |  |             recipe_name = location.name[:-len(craft_suffix)] | 
					
						
							|  |  |  |             recipe = all_crafting_recipes_by_name[recipe_name] | 
					
						
							|  |  |  |             craft_rule = logic.crafting.can_learn_recipe(recipe) | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             recipe_name = location.name[len(craft_prefix):] | 
					
						
							|  |  |  |             recipe = all_crafting_recipes_by_name[recipe_name] | 
					
						
							|  |  |  |             craft_rule = logic.crafting.can_craft(recipe) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(location.name, player), craft_rule) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | def set_booksanity_rules(logic: StardewLogic, multiworld, player, content: StardewContent): | 
					
						
							|  |  |  |     booksanity = content.features.booksanity | 
					
						
							|  |  |  |     if not booksanity.is_enabled: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     for book in content.find_tagged_items(ItemTag.BOOK): | 
					
						
							|  |  |  |         if booksanity.is_included(book): | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(multiworld.get_location(booksanity.to_location_name(book.name), player), logic.has(book.name)) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     for i, book in enumerate(booksanity.get_randomized_lost_books()): | 
					
						
							|  |  |  |         if i <= 0: | 
					
						
							|  |  |  |             continue | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(booksanity.to_location_name(book), player), logic.received(booksanity.progressive_lost_book, i)) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | def set_traveling_merchant_day_rules(logic: StardewLogic, multiworld: MultiWorld, player: int): | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |     for day in Weekday.all_days: | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  |         item_for_day = f"Traveling Merchant: {day}" | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         entrance_name = f"Buy from Traveling Merchant {day}" | 
					
						
							|  |  |  |         set_entrance_rule(multiworld, player, entrance_name, logic.received(item_for_day)) | 
					
						
							| 
									
										
										
										
											2023-02-26 19:19:15 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_arcade_machine_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, world_options: StardewValleyOptions): | 
					
						
							| 
									
										
										
										
											2024-11-29 14:41:26 -05:00
										 |  |  |     play_junimo_kart_rule = logic.received(Wallet.skull_key) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  |     if world_options.arcade_machine_locations != ArcadeMachineLocations.option_full_shuffling: | 
					
						
							| 
									
										
										
										
											2024-11-29 14:41:26 -05:00
										 |  |  |         set_entrance_rule(multiworld, player, Entrance.play_junimo_kart, play_junimo_kart_rule) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-29 14:41:26 -05:00
										 |  |  |     set_entrance_rule(multiworld, player, Entrance.play_junimo_kart, play_junimo_kart_rule & logic.has("Junimo Kart Small Buff")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.reach_junimo_kart_2, logic.has("Junimo Kart Medium Buff")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.reach_junimo_kart_3, logic.has("Junimo Kart Big Buff")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.reach_junimo_kart_4, logic.has("Junimo Kart Max Buff")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.play_journey_of_the_prairie_king, logic.has("JotPK Small Buff")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.reach_jotpk_world_2, logic.has("JotPK Medium Buff")) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, Entrance.reach_jotpk_world_3, logic.has("JotPK Big Buff")) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Journey of the Prairie King Victory", player), | 
					
						
							|  |  |  |              logic.has("JotPK Max Buff")) | 
					
						
							| 
									
										
										
										
											2023-04-10 19:44:59 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | def set_friendsanity_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, content: StardewContent): | 
					
						
							|  |  |  |     if not content.features.friendsanity.is_enabled: | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         return | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Spouse Stardrop", player), | 
					
						
							| 
									
										
										
										
											2025-05-14 07:27:15 -04:00
										 |  |  |              logic.relationship.has_hearts_with_any_bachelor(13) & logic.relationship.can_get_married()) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Have a Baby", player), | 
					
						
							|  |  |  |              logic.relationship.can_reproduce(1)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Have Another Baby", player), | 
					
						
							|  |  |  |              logic.relationship.can_reproduce(2)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     for villager in content.villagers.values(): | 
					
						
							|  |  |  |         for heart in content.features.friendsanity.get_randomized_hearts(villager): | 
					
						
							|  |  |  |             rule = logic.relationship.can_earn_relationship(villager.name, heart) | 
					
						
							|  |  |  |             location_name = friendsanity.to_location_name(villager.name, heart) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |             set_rule(multiworld.get_location(location_name, player), rule) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     for heart in content.features.friendsanity.get_pet_randomized_hearts(): | 
					
						
							|  |  |  |         rule = logic.pet.can_befriend_pet(heart) | 
					
						
							|  |  |  |         location_name = friendsanity.to_location_name(NPC.pet, heart) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(location_name, player), rule) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_deepwoods_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if ModNames.deepwoods in world_options.mods: | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location("Breaking Up Deep Woods Gingerbread House", player), | 
					
						
							|  |  |  |                  logic.tool.has_tool(Tool.axe, "Gold")) | 
					
						
							|  |  |  |         set_rule(multiworld.get_location("Chop Down a Deep Woods Iridium Tree", player), | 
					
						
							|  |  |  |                  logic.tool.has_tool(Tool.axe, "Iridium")) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |         set_entrance_rule(multiworld, player, DeepWoodsEntrance.use_woods_obelisk, logic.received("Woods Obelisk")) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |         for depth in range(10, 100 + 10, 10): | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |             set_entrance_rule(multiworld, player, move_to_woods_depth(depth), logic.mod.deepwoods.can_chop_to_depth(depth)) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location("The Sword in the Stone", player), | 
					
						
							|  |  |  |                  logic.mod.deepwoods.can_pull_sword() & logic.mod.deepwoods.can_chop_to_depth(100)) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-10 15:30:20 -05:00
										 |  |  | def set_magic_spell_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if ModNames.magic not in world_options.mods: | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |         return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Analyze: Clear Debris", player), | 
					
						
							|  |  |  |              (logic.tool.has_tool("Axe", "Basic") | logic.tool.has_tool("Pickaxe", "Basic"))) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Till", player), | 
					
						
							|  |  |  |              logic.tool.has_tool("Hoe", "Basic")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Water", player), | 
					
						
							|  |  |  |              logic.tool.has_tool("Watering Can", "Basic")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze All Toil School Locations", player), | 
					
						
							|  |  |  |              (logic.tool.has_tool("Watering Can", "Basic") & logic.tool.has_tool("Hoe", "Basic") | 
					
						
							|  |  |  |               & (logic.tool.has_tool("Axe", "Basic") | logic.tool.has_tool("Pickaxe", "Basic")))) | 
					
						
							| 
									
										
										
										
											2023-07-19 14:26:38 -04:00
										 |  |  |     # Do I *want* to add boots into logic when you get them even in vanilla without effort?  idk | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Analyze: Evac", player), | 
					
						
							|  |  |  |              logic.ability.can_mine_perfectly()) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Haste", player), | 
					
						
							|  |  |  |              logic.has("Coffee")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Heal", player), | 
					
						
							|  |  |  |              logic.has("Life Elixir")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze All Life School Locations", player), | 
					
						
							|  |  |  |              (logic.has("Coffee") & logic.has("Life Elixir") | 
					
						
							|  |  |  |               & logic.ability.can_mine_perfectly())) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Descend", player), | 
					
						
							|  |  |  |              logic.region.can_reach(Region.mines)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Fireball", player), | 
					
						
							|  |  |  |              logic.has("Fire Quartz")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Frostbolt", player), | 
					
						
							| 
									
										
										
										
											2025-05-04 10:28:38 -04:00
										 |  |  |              logic.region.can_reach(Region.mines_floor_60) & logic.fishing.can_fish(85)) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     set_rule(multiworld.get_location("Analyze All Elemental School Locations", player), | 
					
						
							| 
									
										
										
										
											2025-05-04 10:28:38 -04:00
										 |  |  |              logic.has("Fire Quartz") & logic.region.can_reach(Region.mines_floor_60) & logic.fishing.can_fish(85)) | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |     # set_rule(multiworld.get_location("Analyze: Lantern", player),) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Tendrils", player), | 
					
						
							|  |  |  |              logic.region.can_reach(Region.farm)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Shockwave", player), | 
					
						
							|  |  |  |              logic.has("Earth Crystal")) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze All Nature School Locations", player), | 
					
						
							|  |  |  |              (logic.has("Earth Crystal") & logic.region.can_reach("Farm"))), | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Meteor", player), | 
					
						
							|  |  |  |              (logic.region.can_reach(Region.farm) & logic.time.has_lived_months(12))), | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Lucksteal", player), | 
					
						
							|  |  |  |              logic.region.can_reach(Region.witch_hut)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze: Bloodmana", player), | 
					
						
							|  |  |  |              logic.region.can_reach(Region.mines_floor_100)) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze All Eldritch School Locations", player), | 
					
						
							|  |  |  |              (logic.region.can_reach(Region.witch_hut) & | 
					
						
							|  |  |  |               logic.region.can_reach(Region.mines_floor_100) & | 
					
						
							|  |  |  |               logic.region.can_reach(Region.farm) & logic.time.has_lived_months(12))) | 
					
						
							|  |  |  |     set_rule(multiworld.get_location("Analyze Every Magic School Location", player), | 
					
						
							|  |  |  |              (logic.tool.has_tool("Watering Can", "Basic") & logic.tool.has_tool("Hoe", "Basic") | 
					
						
							|  |  |  |               & (logic.tool.has_tool("Axe", "Basic") | logic.tool.has_tool("Pickaxe", "Basic")) & | 
					
						
							|  |  |  |               logic.has("Coffee") & logic.has("Life Elixir") | 
					
						
							|  |  |  |               & logic.ability.can_mine_perfectly() & logic.has("Earth Crystal") & | 
					
						
							| 
									
										
										
										
											2025-05-04 10:28:38 -04:00
										 |  |  |               logic.has("Fire Quartz") & logic.fishing.can_fish(85) & | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |               logic.region.can_reach(Region.witch_hut) & | 
					
						
							|  |  |  |               logic.region.can_reach(Region.mines_floor_100) & | 
					
						
							|  |  |  |               logic.region.can_reach(Region.farm) & logic.time.has_lived_months(12))) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_sve_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if ModNames.sve not in world_options.mods: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.forest_to_lost_woods, logic.bundle.can_complete_community_center) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.enter_summit, logic.mod.sve.has_iridium_bomb()) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.backwoods_to_grove, logic.mod.sve.has_any_rune()) | 
					
						
							| 
									
										
										
										
											2024-03-15 19:31:01 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.badlands_to_cave, logic.has("Aegis Elixir") | logic.combat.can_fight_at_level(Performance.maximum)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.forest_west_to_spring, logic.quest.can_complete_quest(Quest.magic_ink)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.railroad_to_grampleton_station, logic.received(SVEQuestItem.scarlett_job_offer)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.secret_woods_to_west, logic.tool.has_tool(Tool.axe, ToolMaterial.iron)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.grandpa_shed_to_interior, logic.tool.has_tool(Tool.axe, ToolMaterial.iron)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.aurora_warp_to_aurora, logic.received(SVERunes.nexus_aurora)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.farm_warp_to_farm, logic.received(SVERunes.nexus_farm)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.guild_warp_to_guild, logic.received(SVERunes.nexus_guild)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.junimo_warp_to_junimo, logic.received(SVERunes.nexus_junimo)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.spring_warp_to_spring, logic.received(SVERunes.nexus_spring)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.outpost_warp_to_outpost, logic.received(SVERunes.nexus_outpost)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.wizard_warp_to_wizard, logic.received(SVERunes.nexus_wizard)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.use_purple_junimo, logic.relationship.has_hearts(ModNPC.apples, 10)) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.grandpa_interior_to_upstairs, logic.mod.sve.has_grandpa_shed_repaired()) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.use_bear_shop, (logic.mod.sve.can_buy_bear_recipe())) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.railroad_to_grampleton_station, logic.received(SVEQuestItem.scarlett_job_offer)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.museum_to_gunther_bedroom, logic.relationship.has_hearts(ModNPC.gunther, 2)) | 
					
						
							| 
									
										
										
										
											2025-03-10 18:39:35 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.to_aurora_basement, logic.mod.quest.has_completed_aurora_vineyard_bundle()) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     logic.mod.sve.initialize_rules() | 
					
						
							|  |  |  |     for location in logic.registry.sve_location_rules: | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_location(location, player), | 
					
						
							|  |  |  |                  logic.registry.sve_location_rules[location]) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_sve_ginger_island_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  |     set_boarding_house_rules(logic, multiworld, player, world_options) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_sve_ginger_island_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if world_options.exclude_ginger_island == ExcludeGingerIsland.option_true: | 
					
						
							|  |  |  |         return | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.summit_to_highlands, logic.mod.sve.has_marlon_boat()) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.wizard_to_fable_reef, logic.received(SVEQuestItem.fable_reef_portal)) | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.highlands_to_cave, | 
					
						
							|  |  |  |                       logic.tool.has_tool(Tool.pickaxe, ToolMaterial.iron) & logic.tool.has_tool(Tool.axe, ToolMaterial.iron)) | 
					
						
							| 
									
										
										
										
											2024-07-25 02:22:46 -05:00
										 |  |  |     set_entrance_rule(multiworld, player, SVEEntrance.highlands_to_pond, logic.tool.has_tool(Tool.axe, ToolMaterial.iron)) | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_boarding_house_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if ModNames.boarding_house not in world_options.mods: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, BoardingHouseEntrance.the_lost_valley_to_lost_valley_ruins, logic.tool.has_tool(Tool.axe, ToolMaterial.iron)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_entrance_rule(multiworld, player, entrance: str, rule: StardewRule): | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     try: | 
					
						
							|  |  |  |         potentially_required_regions = look_for_indirect_connection(rule) | 
					
						
							|  |  |  |         if potentially_required_regions: | 
					
						
							|  |  |  |             for region in potentially_required_regions: | 
					
						
							| 
									
										
										
										
											2024-11-29 14:41:26 -05:00
										 |  |  |                 logger.debug(f"Registering indirect condition for {region} -> {entrance}") | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |                 multiworld.register_indirect_condition(multiworld.get_region(region, player), multiworld.get_entrance(entrance, player)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-24 17:36:25 -04:00
										 |  |  |         set_rule(multiworld.get_entrance(entrance, player), rule) | 
					
						
							| 
									
										
										
											
												Stardew Valley 6.x.x: The Content Update (#3478)
Focus of the Update: Compatibility with Stardew Valley 1.6 Released on March 19th 2024
This includes randomization for pretty much all of the new content, including but not limited to
- Raccoon Bundles
- Booksanity
- Skill Masteries
- New Recipes, Craftables, Fish, Maps, Farm Type, Festivals and Quests
This also includes a significant reorganisation of the code into "Content Packs", to allow for easier modularity of various game mechanics between the settings and the supported mods. This improves maintainability quite a bit.
In addition to that, a few **very** requested new features have been introduced, although they weren't the focus of this update
- Walnutsanity
- Player Buffs
- More customizability in settings, such as shorter special orders, ER without farmhouse
- New Remixed Bundles
											
										 
											2024-07-07 16:04:25 +03:00
										 |  |  |     except KeyError as ex: | 
					
						
							|  |  |  |         logger.error(f"""Failed to evaluate indirect connection in: {explain(rule, CollectionState(multiworld))}""") | 
					
						
							|  |  |  |         raise ex | 
					
						
							| 
									
										
										
										
											2024-03-15 15:05:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_island_entrance_rule(multiworld, player, entrance: str, rule: StardewRule, world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if world_options.exclude_ginger_island == ExcludeGingerIsland.option_true: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |     set_entrance_rule(multiworld, player, entrance, rule) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def set_many_island_entrances_rules(multiworld, player, entrance_rules: Dict[str, StardewRule], world_options: StardewValleyOptions): | 
					
						
							|  |  |  |     if world_options.exclude_ginger_island == ExcludeGingerIsland.option_true: | 
					
						
							|  |  |  |         return | 
					
						
							|  |  |  |     for entrance, rule in entrance_rules.items(): | 
					
						
							|  |  |  |         set_entrance_rule(multiworld, player, entrance, rule) |