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 __future__ import annotations
from dataclasses import dataclass , field
2025-04-20 10:17:22 -04:00
from typing import Iterable , Set , Any , Mapping , Type , Tuple , Union
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
2025-04-08 12:37:45 -04:00
from . feature import booksanity , cropsanity , fishsanity , friendsanity , skill_progression , building_progression , tool_progression
2025-04-20 10:17:22 -04:00
from . . data . animal import Animal
2025-04-08 12:37:45 -04:00
from . . data . building import Building
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 . fish_data import FishItem
2025-04-08 12:37:45 -04:00
from . . data . game_item import GameItem , Source , ItemTag
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 . skill import Skill
from . . data . villagers_data import Villager
@dataclass ( frozen = True )
class StardewContent :
features : StardewFeatures
registered_packs : Set [ str ] = field ( default_factory = set )
# regions -> To be used with can reach rule
2025-04-20 10:17:22 -04:00
game_items : dict [ str , GameItem ] = field ( default_factory = dict )
fishes : dict [ str , FishItem ] = field ( default_factory = dict )
villagers : dict [ str , Villager ] = field ( default_factory = dict )
farm_buildings : dict [ str , Building ] = field ( default_factory = dict )
animals : dict [ str , Animal ] = field ( default_factory = dict )
skills : dict [ str , Skill ] = field ( default_factory = dict )
quests : dict [ str , Any ] = field ( default_factory = dict )
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
2025-04-08 12:37:45 -04:00
def find_sources_of_type ( self , types : Union [ Type [ Source ] , Tuple [ Type [ Source ] ] ] ) - > Iterable [ Source ] :
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 item in self . game_items . values ( ) :
for source in item . sources :
if isinstance ( source , types ) :
yield source
2025-04-08 12:37:45 -04:00
def source_item ( self , item_name : str , * sources : Source ) :
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
item = self . game_items . setdefault ( item_name , GameItem ( item_name ) )
item . add_sources ( sources )
def tag_item ( self , item_name : str , * tags : ItemTag ) :
item = self . game_items . setdefault ( item_name , GameItem ( item_name ) )
item . add_tags ( tags )
def untag_item ( self , item_name : str , tag : ItemTag ) :
self . game_items [ item_name ] . tags . remove ( tag )
def find_tagged_items ( self , tag : ItemTag ) - > Iterable [ GameItem ] :
# TODO might be worth caching this, but it need to only be cached once the content is finalized...
for item in self . game_items . values ( ) :
if tag in item . tags :
yield item
@dataclass ( frozen = True )
class StardewFeatures :
booksanity : booksanity . BooksanityFeature
2025-04-08 12:37:45 -04:00
building_progression : building_progression . BuildingProgressionFeature
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
cropsanity : cropsanity . CropsanityFeature
fishsanity : fishsanity . FishsanityFeature
friendsanity : friendsanity . FriendsanityFeature
2024-11-30 21:52:07 -05:00
skill_progression : skill_progression . SkillProgressionFeature
2025-03-08 11:19:29 -05:00
tool_progression : tool_progression . ToolProgressionFeature
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
@dataclass ( frozen = True )
class ContentPack :
name : str
dependencies : Iterable [ str ] = ( )
""" Hard requirement, generation will fail if it ' s missing. """
weak_dependencies : Iterable [ str ] = ( )
""" Not a strict dependency, only used only for ordering the packs to make sure hooks are applied correctly. """
# items
# def item_hook
# ...
2025-04-08 12:37:45 -04:00
harvest_sources : Mapping [ str , Iterable [ Source ] ] = field ( default_factory = dict )
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
""" Harvest sources contains both crops and forageables, but also fruits from trees, the cave farm and stuff harvested from tapping like maple syrup. """
def harvest_source_hook ( self , content : StardewContent ) :
. . .
2025-04-08 12:37:45 -04:00
shop_sources : Mapping [ str , Iterable [ Source ] ] = field ( default_factory = dict )
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 shop_source_hook ( self , content : StardewContent ) :
. . .
fishes : Iterable [ FishItem ] = ( )
def fish_hook ( self , content : StardewContent ) :
. . .
2025-04-08 12:37:45 -04:00
crafting_sources : Mapping [ str , Iterable [ Source ] ] = field ( default_factory = dict )
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 crafting_hook ( self , content : StardewContent ) :
. . .
2025-04-08 12:37:45 -04:00
artisan_good_sources : Mapping [ str , Iterable [ Source ] ] = field ( default_factory = dict )
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 artisan_good_hook ( self , content : StardewContent ) :
. . .
villagers : Iterable [ Villager ] = ( )
def villager_hook ( self , content : StardewContent ) :
. . .
2025-04-08 12:37:45 -04:00
farm_buildings : Iterable [ Building ] = ( )
def farm_building_hook ( self , content : StardewContent ) :
. . .
2025-04-20 10:17:22 -04:00
animals : Iterable [ Animal ] = ( )
def animal_hook ( self , content : StardewContent ) :
. . .
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
skills : Iterable [ Skill ] = ( )
def skill_hook ( self , content : StardewContent ) :
. . .
quests : Iterable [ Any ] = ( )
def quest_hook ( self , content : StardewContent ) :
. . .
def finalize_hook ( self , content : StardewContent ) :
""" Last hook called on the pack, once all other content packs have been registered.
This is the place to do any final adjustments to the content , like adding rules based on tags applied by other packs .
"""
. . .