Two implementations exist here:
-
BundleGenerator.Generate(int seed)- the debug generator, basically a clone of SDV's implementation with some reduced ops/cutting extra stuff to speed things up. This will return a similar structured result to the existing python bundle scripts. It's a bit slower, and it's a bit slower to test if it satifies your requirements. -
RemixedBundles.Generate(int seed)- the faster generator, this computes a bitmask representation of the complete bundle state that makes checking if your requirements are satisfied significantly easier.
The basis for this is the CompressedFlags field, which is a mask of all the different fields you could have in a bundle (full listing is below and visible in CompressedFlags.cs). The CompressedRemixBundles class is a wrapper around the generated bitmask that provides some helper methods for checking if a bundle satisfies your requirements and backing out the original dictionary representation of the bundles.
An example method to check if a bundle satisfies your requirements is as follows:
ulong DesiredBundles = (
CompressedFlags.CRAFTS_CONSTRUCTION |
CompressedFlags.CRAFTS_EXOTIC |
CompressedFlags.PANTRY_RARE |
CompressedFlags.FISH_QUALITY
);
bool valid = RemixedBundles.Generate(int seed).Satisfies(DesiredBundles);CRAFTS_CONSTRUCTIONorCRAFTS_STICKYCRAFTS_EXOTICorCRAFTS_WILD_MEDICINE
CRAFTS_SPRING_FORAGE_WILD_HORSERADISHCRAFTS_SPRING_FORAGE_DAFFODILCRAFTS_SPRING_FORAGE_LEEKCRAFTS_SPRING_FORAGE_DANDELIONCRAFTS_SPRING_FORAGE_SPRING_ONION
CRAFTS_WINTER_FORAGE_WINTER_ROOTCRAFTS_WINTER_FORAGE_CRYSTAL_FRUITCRAFTS_WINTER_FORAGE_SNOW_YAMCRAFTS_WINTER_FORAGE_CROCUSCRAFTS_WINTER_FORAGE_HOLLY
PANTRY_QUALITYorPANTRY_RAREPANTRY_ARTISANorPANTRY_BREWERPANTRY_ANIMALorPANTRY_FISH_FARMERorPANTRY_GARDEN
Quality Specific flags (dont set these if you don't choose the Quality bundle, if you don't care between the options, don't set either flag)
PANTRY_QUALITY_PARSNIPorPANTRY_QUALITY_GREEN_BEANorPANTRY_QUALITY_POTATOorPANTRY_QUALITY_CAULIFLOWERPANTRY_QUALITY_MELONorPANTRY_QUALITY_BLUEBERRYorPANTRY_QUALITY_HOT_PEPPERPANTRY_QUALITY_PUMPKINorPANTRY_QUALITY_YAMorPANTRY_QUALITY_EGGPLANT
FISH_SPECIALITYorFISH_QUALITYorFISH_MASTER
BOILER_BLACKSMITHBOILER_GEOLOGISTBOILER_ADVENTURERBOILER_TREASURE_HUNTERBOILER_ENGINEER
BOILER_ADVENTURER_SLIMEBOILER_ADVENTURER_BAT_WINGBOILER_ADVENTURER_SOLAR_ESSENCEBOILER_ADVENTURER_VOID_ESSENCEBOILER_ADVENTURER_BONE_FRAGMENTS
BULLETIN_CHEFBULLETIN_DYEBULLETIN_FIELD_RESEARCHBULLETIN_FODDERBULLETIN_ENCHANTERBULLETIN_CHILDRENBULLETIN_FORAGERBULLETIN_HOME_COOK
Dye Specific flags (only set if you choose the Dye bundle, if you don't care between the options, don't set either flag)
BULLETIN_DYE_RED_MUSHROOMorBULLETIN_DYE_BEETBULLETIN_DYE_SEA_URCHINorBULLETIN_DYE_AMARANTHBULLETIN_DYE_SUNFLOWERorBULLETIN_DYE_STARFRUITBULLETIN_DYE_DUCK_FEATHERorBULLETIN_DYE_CACTUS_FRUITBULLETIN_DYE_AQUAMARINEorBULLETIN_DYE_BLUEBERRYBULLETIN_DYE_RED_CABBAGEorBULLETIN_DYE_IRIDIUM_BAR