Skip to content

Instantly share code, notes, and snippets.

@apple1417
Last active May 13, 2023 06:03
Show Gist options
  • Save apple1417/8f1664daa3b2fca3d8705d964a3ce603 to your computer and use it in GitHub Desktop.
Save apple1417/8f1664daa3b2fca3d8705d964a3ce603 to your computer and use it in GitHub Desktop.
simulate bl3 black market locations/pools
import struct
from datetime import datetime, timedelta
# See this sheet for what locations these actually line up to
# https://docs.google.com/spreadsheets/d/1RFsSUkvAmFWdS_b5Umfl9hDRUfcTLcRcA3kBUAN1nFY/edit#gid=0
SPAWNERS = (
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Prologue/Prologue_SubmapPatch.Prologue_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Prologue/Prologue_SubmapPatch.Prologue_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Prologue/Prologue_SubmapPatch.Prologue_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Sacrifice/Sacrifice_SubmapPatch.Sacrifice_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Sacrifice/Sacrifice_SubmapPatch.Sacrifice_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Sacrifice/Sacrifice_SubmapPatch.Sacrifice_SubmapPatch:PersistentLevel.OakSpawner_2",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/AtlasHQ/AtlasHQ_SubmapPatch.AtlasHQ_SubmapPatch:PersistentLevel.OakSpawner_3",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/AtlasHQ/AtlasHQ_SubmapPatch.AtlasHQ_SubmapPatch:PersistentLevel.OakSpawner_4",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/AtlasHQ/AtlasHQ_SubmapPatch.AtlasHQ_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/City/City_SubmapPatch.City_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/City/City_SubmapPatch.City_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/City/City_SubmapPatch.City_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/CityVault/CityVault_SubmapPatch.CityVault_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/CityVault/CityVault_SubmapPatch.CityVault_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Monastery/Monastery_SubmapPatch.Monastery_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Monastery/Monastery_SubmapPatch.Monastery_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Monastery/Monastery_SubmapPatch.Monastery_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/OrbitalPlatform/OrbitalPlatform_SubmapPatch.OrbitalPlatform_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/OrbitalPlatform/OrbitalPlatform_SubmapPatch.OrbitalPlatform_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/OrbitalPlatform/OrbitalPlatform_SubmapPatch.OrbitalPlatform_SubmapPatch:PersistentLevel.OakSpawner_2",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Outskirts/Outskirts_SubmapPatch.Outskirts_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Outskirts/Outskirts_SubmapPatch.Outskirts_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Outskirts/Outskirts_SubmapPatch.Outskirts_SubmapPatch:PersistentLevel.OakSpawner_2",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Towers/Towers_SubmapPatch.Towers_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Towers/Towers_SubmapPatch.Towers_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_1/Towers/Towers_SubmapPatch.Towers_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Mansion/Mansion_SubmapPatch.Mansion_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Mansion/Mansion_SubmapPatch.Mansion_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Mansion/Mansion_SubmapPatch.Mansion_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Marshfields/Marshfields_SubmapPatch.Marshfields_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Marshfields/Marshfields_SubmapPatch.Marshfields_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Marshfields/Marshfields_SubmapPatch.Marshfields_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Prison/Prison_SubmapPatch.Prison_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Prison/Prison_SubmapPatch.Prison_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Prison/Prison_SubmapPatch.Prison_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Watership/Watership_SubmapPatch.Watership_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Watership/Watership_SubmapPatch.Watership_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Watership/Watership_SubmapPatch.Watership_SubmapPatch:PersistentLevel.OakSpawner_2",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Wetlands/Wetlands_SubmapPatch.Wetlands_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Wetlands/Wetlands_SubmapPatch.Wetlands_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/Wetlands/Wetlands_SubmapPatch.Wetlands_SubmapPatch:PersistentLevel.OakSpawner_2",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/WetlandsVault/WetlandsVault_SubmapPatch.WetlandsVault_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/WetlandsVault/WetlandsVault_SubmapPatch.WetlandsVault_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_2/WetlandsVault/WetlandsVault_SubmapPatch.WetlandsVault_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Desert/Desert_SubmapPatch.Desert_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Desert/Desert_SubmapPatch.Desert_SubmapPatch:PersistentLevel.OakSpawner_2",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Desert/Desert_SubmapPatch.Desert_SubmapPatch:PersistentLevel.OakSpawner_3",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/DesertVault/DesertVault_SubmapPatch.DesertVault_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/DesertVault/DesertVault_SubmapPatch.DesertVault_SubmapPatch:PersistentLevel.OakSpawner_2",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/DesertVault/DesertVault_SubmapPatch.DesertVault_SubmapPatch:PersistentLevel.OakSpawner_3",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Mine/Mine_SubmapPatch.Mine_SubmapPatch:PersistentLevel.OakSpawner_5",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Mine/Mine_SubmapPatch.Mine_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Mine/Mine_SubmapPatch.Mine_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Motorcade/Motorcade_SubmapPatch.Motorcade_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Motorcade/Motorcade_SubmapPatch.Motorcade_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/Motorcade/Motorcade_SubmapPatch.Motorcade_SubmapPatch:PersistentLevel.OakSpawner_3",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/MotorcadeFestival/MotorcadeFestival_SubmapPatch.MotorcadeFestival_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_3/MotorcadeFestival/MotorcadeFestival_SubmapPatch.MotorcadeFestival_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_4/Beach/Beach_SubmapPatch.Beach_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_4/Beach/Beach_SubmapPatch.Beach_SubmapPatch:PersistentLevel.OakSpawner_2",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_4/Beach/Beach_SubmapPatch.Beach_SubmapPatch:PersistentLevel.OakSpawner_3",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_4/Crypt/Crypt_SubmapPatch.Crypt_SubmapPatch:PersistentLevel.OakSpawner_3",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_4/Crypt/Crypt_SubmapPatch.Crypt_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_4/Desolate/Desolate_SubmapPatch.Desolate_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_4/Desolate/Desolate_SubmapPatch.Desolate_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_4/Desolate/Desolate_SubmapPatch.Desolate_SubmapPatch:PersistentLevel.OakSpawner_3",
)
POOLS = (
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week1.ItemPool_BMV_Week1",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week2.ItemPool_BMV_Week2",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week3.ItemPool_BMV_Week3",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week4.ItemPool_BMV_Week4",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week5.ItemPool_BMV_Week5",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week6.ItemPool_BMV_Week6",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week7.ItemPool_BMV_Week7",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week8.ItemPool_BMV_Week8",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week9.ItemPool_BMV_Week9",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week10.ItemPool_BMV_Week10",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week11.ItemPool_BMV_Week11",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week12.ItemPool_BMV_Week12",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week13.ItemPool_BMV_Week13",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week14.ItemPool_BMV_Week14",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week15.ItemPool_BMV_Week15",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week16.ItemPool_BMV_Week16",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week17.ItemPool_BMV_Week17",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week18.ItemPool_BMV_Week18",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week19.ItemPool_BMV_Week19",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week20.ItemPool_BMV_Week20",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week21.ItemPool_BMV_Week21",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week22.ItemPool_BMV_Week22",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week23.ItemPool_BMV_Week23",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week24.ItemPool_BMV_Week24",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week25.ItemPool_BMV_Week25",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week26.ItemPool_BMV_Week26",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week27.ItemPool_BMV_Week27",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week28.ItemPool_BMV_Week28",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week29.ItemPool_BMV_Week29",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week30.ItemPool_BMV_Week30",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week31.ItemPool_BMV_Week31",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week32.ItemPool_BMV_Week32",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week33.ItemPool_BMV_Week33",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week34.ItemPool_BMV_Week34",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week35.ItemPool_BMV_Week35",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week36.ItemPool_BMV_Week36",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week37.ItemPool_BMV_Week37",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week38.ItemPool_BMV_Week38",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week39.ItemPool_BMV_Week39",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week40.ItemPool_BMV_Week40",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week41.ItemPool_BMV_Week41",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week42.ItemPool_BMV_Week42",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week43.ItemPool_BMV_Week43",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week44.ItemPool_BMV_Week44",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week45.ItemPool_BMV_Week45",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week46.ItemPool_BMV_Week46",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week47.ItemPool_BMV_Week47",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week48.ItemPool_BMV_Week48",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week49.ItemPool_BMV_Week49",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week50.ItemPool_BMV_Week50",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week51.ItemPool_BMV_Week51",
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week52.ItemPool_BMV_Week52",
)
POOL_CONTENTS: dict[str, tuple[str, ...]] = {
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week1.ItemPool_BMV_Week1": ("Breath of the Dying", "Kyb's Worth", "Redline"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week2.ItemPool_BMV_Week2": ("Hex", "Kaos", "Lyuda"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week3.ItemPool_BMV_Week3": ("Bangarang", "Bitch", "Faisor"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week4.ItemPool_BMV_Week4": ("Black Hole", "Krakatoa", "Trevonator"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week5.ItemPool_BMV_Week5": ("AutoAimè", "Hellshock", "Night Hawkin"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week6.ItemPool_BMV_Week6": ("Boom Sickle / Sickle", "Conference Call", "The Flood"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week7.ItemPool_BMV_Week7": ("Flakker", "Laser-Sploder", "Mutant"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week8.ItemPool_BMV_Week8": ("Light Show", "Nemesis", "Projectile Recursion"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week9.ItemPool_BMV_Week9": ("Masterwork Crossbow", "Plus Ultra", "The Garcia"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week10.ItemPool_BMV_Week10": ("Cutsman", "King's Call / Queen's Call", "Madcap"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week11.ItemPool_BMV_Week11": ("Brainstormer", "Free Radical", "Ogre"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week12.ItemPool_BMV_Week12": ("AAA", "Lucian's Call", "Nagata"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week13.ItemPool_BMV_Week13": ("Carrier", "Hornet", "Infinity"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week14.ItemPool_BMV_Week14": ("Face-puncher", "Moxxi's Bouncing Pair", "Sawbar"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week15.ItemPool_BMV_Week15": ("Impaler", "Maggie", "Scourge"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week16.ItemPool_BMV_Week16": ("Bone Shredder", "Crossroad", "Rowan's Call"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week17.ItemPool_BMV_Week17": ("Predatory Lending", "Tankman's Shield", "The Butcher"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week18.ItemPool_BMV_Week18": ("Ripper", "The Flood", "Tiggs' Boom"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week19.ItemPool_BMV_Week19": ("Frozen Snowshoe", "Headsplosion", "Magnificent"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week20.ItemPool_BMV_Week20": ("Bearcat", "D.N.A.", "Fastball"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week21.ItemPool_BMV_Week21": ("Monocle", "Oldridian", "The Lob"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week22.ItemPool_BMV_Week22": ("Hellfire", "Lead Sprinkler", "Messy Breakup"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week23.ItemPool_BMV_Week23": ("Handsome Jackhammer", "King's Call / Queen's Call", "Sledge's Shotgun / Sledge's Super Shotgun"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week24.ItemPool_BMV_Week24": ("ASMD", "Barrage", "Moonfire"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week25.ItemPool_BMV_Week25": ("Damned", "Reflux", "Smart-Gun"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week26.ItemPool_BMV_Week26": ("Ruby's Wrath", "T.K's Heatwave / T.K's Shockwave / T.K's Wave / The Tidal Wave", "The Horizon"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week27.ItemPool_BMV_Week27": ("Mongol", "Surge", "Warlord"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week28.ItemPool_BMV_Week28": ("Juliet's Dazzle", "Plaguebearer", "Woodblocker"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week29.ItemPool_BMV_Week29": ("Firestorm (Sniper) / Storm", "Kaoson", "The Dictator"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week30.ItemPool_BMV_Week30": ("Firestorm (Grenade)", "Hellwalker", "Shrike (Zane Skill Screen)"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week31.ItemPool_BMV_Week31": ("Embrace the Pain / Pain is Power", "Red Queen", "Sand Hawk"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week32.ItemPool_BMV_Week32": ("Brainstormer", "Hyperfocus XZ41", "The Duc"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week33.ItemPool_BMV_Week33": ("Good Juju", "Nimble Jack", "Rebel Yell"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week34.ItemPool_BMV_Week34": ("Hive", "One Pump Chump", "Whiskey Tango Foxtrot"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week35.ItemPool_BMV_Week35": ("Cloud Kill", "Devastator ", "EMP"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week36.ItemPool_BMV_Week36": ("Destructo Spinner", "Re-Router", "Scorpio"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week37.ItemPool_BMV_Week37": ("Mind-Killer", "Superball", "T.K's Heatwave / T.K's Shockwave / T.K's Wave / The Tidal Wave"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week38.ItemPool_BMV_Week38": ("Gunerang", "Malak's Bane", "The Monarch"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week39.ItemPool_BMV_Week39": ("Backburner", "Night Flyer", "Rectifier"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week40.ItemPool_BMV_Week40": ("Scoville", "Ten Gallon", "Widowmaker"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week41.ItemPool_BMV_Week41": ("Alchemist", "Clairvoyance", "Devils Foursum"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week42.ItemPool_BMV_Week42": ("Blood-Starved Beast", "Tran-fusion", "Vanquisher"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week43.ItemPool_BMV_Week43": ("Gatling Gun", "Light Show", "Long Musket"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week44.ItemPool_BMV_Week44": ("Dark Army / Exceptional Dark Army / Exceptional Dark Army +", "Freeman", "Sellout"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week45.ItemPool_BMV_Week45": ("Atlas Replay", "Phebert", "Psycho Stabber"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week46.ItemPool_BMV_Week46": ("Quadomizer", "The Boring Gun", "The Transformer"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week47.ItemPool_BMV_Week47": ("Roisen's Thorns", "Sleeping Giant", "Tunguska"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week48.ItemPool_BMV_Week48": ("Linoge", "Star Helix", "Tsunami"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week49.ItemPool_BMV_Week49": ("9-Volt", "Epicenter", "The Companion"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week50.ItemPool_BMV_Week50": ("Embrace the Pain / Pain is Power", "Front Loader", "Jericho"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week51.ItemPool_BMV_Week51": ("P.A.T. Mk. III", "Re-Charge Berner", "Try-Bolt"),
"/Game/PatchDLC/Ixora2/Loot/VendingMachines/WeeklyPools/ItemPool_BMV_Week52.ItemPool_BMV_Week52": ("Baby Maker", "Bekah", "Quasar"),
}
EPOCH = datetime(1999, 2, 18, 12)
def get_week_seed(date: datetime | None = None) -> int:
"""
Gets the weekly seed for the given date, or for today if none is specified.
Args:
date: The UTC datetime to get the seed at, or None if to use the current time.
Returns:
The weekly seed.
"""
if date is None:
date = datetime.utcnow()
date -= timedelta(hours=17)
if ((date.month - 3) % 0xFFFFFFFF) > 8:
date += timedelta(hours=1)
return (date - EPOCH).days // 7
def srand_once(seed: int) -> float:
"""
Equivalent to seeding SRand, then calling it once.
Args:
seed: What value to seed the randomness with.
Returns:
A random float from 0-1.
"""
x = (seed * 0xbb38435 + 0x3619636b) & 0xFFFFFFFF
x = x & 0x7fffff | 0x3f800000
f = struct.unpack(">f", struct.pack(">I", x))[0]
return f - int(f)
def _pick_from_arr(week: int, arr: tuple) -> str:
arr_copy = list(arr)
for i in range(week - (week % len(arr)), week):
arr_copy.pop(int(srand_once(i) * len(arr_copy)))
return arr_copy[int(srand_once(week) * len(arr_copy))]
def pick_location(week_seed: int) -> str:
"""
Picks the location the black market will be at, given the weekly seed.
Args:
week_seed: The weekly seed.
Returns:
The spawner the black market will spawn at.
"""
return _pick_from_arr(week_seed, SPAWNERS)
def pick_pool(week_seed: int) -> str:
"""
Picks the pool the black market will be using, given the weekly seed.
Args:
week_seed: The weekly seed.
Returns:
The itempool the black market will contain.
"""
return _pick_from_arr(week_seed, POOLS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment