OSRS: Implement New Game (#1976)
* MMBN3: Press program now has proper color index when received remotely
* Initial commit of OSRS untangled from MMBN3 branch
* Fixes some broken region connections
* Removes some locations
* Rearranges locations to fill in slots left by removed locations
* Adds starting area rando
* Moves Oak and Willow trees to resource regions
* Fixes various PEP8 violations
* Refactor of regions
* Fixes variable capture issue with region rules
* Partial completion of brutal grind logic
* Finishes can_reach_skill function
* Adds skill requirements to location rules, fixes regions rules
* Adds documentation for OSRS
* Removes match statement
* Updates Data Version to test mode to prevent item name caching
* Fixes starting spawn logic for east varrock
* Fixes river lum crossing logic to not assume you can phase across water
* Prevents equipping items when you haven't unlocked them
* Changes canoe logic to not require huge levels
* Skeletoning out some data I'll need for variable task system
* Adds csvs and parser for logic
* Adds Items parsing
* Fixes the spawning logic to not default to Chunksanity when you didn't pick it
* Begins adding generation rules for data-driven logic
* Moves region handling and location creating to different methods
* Adds logic limits to Options
* Begun the location generation has
* Randomly generates tasks for each skill until populated
* Mopping up improper names, adding custom logic, and fixes location rolling
* Drastically cleans up the location rolling loop
* Modifies generation to properly use local variables and pass unit tests
* Game is now generating, but rules don't seem to work
* Lambda capture, my old nemesis. We meet again
* Fixes issue with Corsair Cove item requirement causing logic loop
* Okay one more fix, another variable capture
* On second thought lets not have skull sceptre tasks. 'Tis a silly place
* Removes QP from item pool (they're events not items)
* Removes Stronghold floor tasks, no varbit to track them
* Loads CSV with pkutil so it can be used in apworld
* Fixes logic of skill tasks and adds QP requirements to long grinds
* Fixes pathing in pkgutil call
* Better handling for empty task categories, no longer throws errors
* Fixes order for progressive tasks, removes un-checkable spider task
* Fixes logic issues related to stew and the Blurite caves
* Fixes issues generating causing tests to sporadically fail
* Adds missing task that caused off-by-one error
* Updates to new Options API
* Updates generation to function properly with the Universal Tracker (Thanks Faris)
* Replaces runtime CSV parsing with pre-made python files generated from CSVs
* Switches to self.random and uses random.choice instead of doing it manually
* Fixes to typing, variable names, iterators, and continue conditions
* Replaces Name classes with Enums
* Fixes parse error on region special rules
* Skill requirements check now returns an accessrule instead of being one that checks options
* Updates documentation and setup guide
* Adjusts maximum numbers for combat and general tasks
* Fixes region names so dictionary lookup works for chunksanity
* Update worlds/osrs/docs/en_Old School Runescape.md
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
* Update worlds/osrs/docs/en_Old School Runescape.md
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
* Updates readme.md and codeowners doc
* Removes erroneous East Varrock -> Al Kharid connection
* Changes to canoe logic to account for woodcutting level options
* Fixes embarassing typo on 'Edgeville'
* Moves Logic CSVs to separate repository, addresses suggested changes on PR
* Fixes logic error in east/west lumbridge regions. Fixes incorrect List typing in main
* Removes task types with weight 0 from the list of rollable tasks
* Missed another place that the task type had to be removed if 0 weight
* Prevents adding an empty task weight if levels are too restrictive for tasks to be added
* Removes giant blank space in error message
* Adds player name to error for not having enough available tasks
---------
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2024-08-06 21:13:11 +00:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
|
|
|
class RegionNames(str, Enum):
|
|
|
|
Lumbridge = "Lumbridge"
|
|
|
|
Lumbridge_Swamp = "Lumbridge Swamp"
|
|
|
|
Lumbridge_Farms_East = "Lumbridge Farms East"
|
|
|
|
Lumbridge_Farms_West = "Lumbridge Farms West"
|
|
|
|
HAM_Hideout = "HAM Hideout"
|
|
|
|
Draynor_Village = "Draynor Village"
|
|
|
|
Draynor_Manor = "Draynor Manor"
|
|
|
|
Wizards_Tower = "Wizard Tower"
|
|
|
|
Al_Kharid = "Al Kharid"
|
|
|
|
Citharede_Abbey = "Citharede Abbey"
|
|
|
|
South_Of_Varrock = "South of Varrock"
|
|
|
|
Central_Varrock = "Central Varrock"
|
|
|
|
Varrock_Palace = "Varrock Palace"
|
|
|
|
East_Of_Varrock = "East Varrock"
|
|
|
|
West_Varrock = "West Varrock"
|
|
|
|
Edgeville = "Edgeville"
|
|
|
|
Barbarian_Village = "Barbarian Village"
|
|
|
|
Monastery = "Monastery"
|
|
|
|
Ice_Mountain = "Ice Mountain"
|
|
|
|
Dwarven_Mines = "Dwarven Mines"
|
|
|
|
Falador = "Falador"
|
|
|
|
Falador_Farm = "Falador Farms"
|
|
|
|
Crafting_Guild = "Crafting Guild"
|
|
|
|
Cooks_Guild = "Cook's Guild"
|
|
|
|
Rimmington = "Rimmington"
|
|
|
|
Port_Sarim = "Port Sarim"
|
|
|
|
Mudskipper_Point = "Mudskipper Point"
|
|
|
|
Karamja = "Karamja"
|
|
|
|
Corsair_Cove = "Corsair Cove"
|
|
|
|
Wilderness = "The Wilderness"
|
|
|
|
Crandor = "Crandor"
|
|
|
|
# Resource Regions
|
|
|
|
Egg = "Egg"
|
|
|
|
Sheep = "Sheep"
|
|
|
|
Milk = "Milk"
|
|
|
|
Wheat = "Wheat"
|
|
|
|
Windmill = "Windmill"
|
|
|
|
Spinning_Wheel = "Spinning Wheel"
|
|
|
|
Imp = "Imp"
|
|
|
|
Bronze_Ores = "Bronze Ores"
|
|
|
|
Clay_Rock = "Clay Ore"
|
|
|
|
Coal_Rock = "Coal Ore"
|
|
|
|
Iron_Rock = "Iron Ore"
|
|
|
|
Silver_Rock = "Silver Ore"
|
|
|
|
Gold_Rock = "Gold Ore"
|
|
|
|
Furnace = "Furnace"
|
|
|
|
Anvil = "Anvil"
|
|
|
|
Oak_Tree = "Oak Tree"
|
|
|
|
Willow_Tree = "Willow Tree"
|
|
|
|
Shrimp = "Shrimp Spot"
|
|
|
|
Fly_Fish = "Fly Fishing Spot"
|
|
|
|
Lobster = "Lobster Spot"
|
|
|
|
Mind_Runes = "Mind Runes"
|
|
|
|
Canoe_Tree = "Canoe Tree"
|
|
|
|
|
|
|
|
__str__ = str.__str__
|
|
|
|
|
|
|
|
|
|
|
|
class ItemNames(str, Enum):
|
|
|
|
Lumbridge = "Area: Lumbridge"
|
|
|
|
Lumbridge_Swamp = "Area: Lumbridge Swamp"
|
|
|
|
Lumbridge_Farms = "Area: Lumbridge Farms"
|
|
|
|
HAM_Hideout = "Area: HAM Hideout"
|
|
|
|
Draynor_Village = "Area: Draynor Village"
|
|
|
|
Draynor_Manor = "Area: Draynor Manor"
|
|
|
|
Wizards_Tower = "Area: Wizard Tower"
|
|
|
|
Al_Kharid = "Area: Al Kharid"
|
|
|
|
Citharede_Abbey = "Area: Citharede Abbey"
|
|
|
|
South_Of_Varrock = "Area: South of Varrock"
|
|
|
|
Central_Varrock = "Area: Central Varrock"
|
|
|
|
Varrock_Palace = "Area: Varrock Palace"
|
|
|
|
East_Of_Varrock = "Area: East Varrock"
|
|
|
|
West_Varrock = "Area: West Varrock"
|
|
|
|
Edgeville = "Area: Edgeville"
|
|
|
|
Barbarian_Village = "Area: Barbarian Village"
|
|
|
|
Monastery = "Area: Monastery"
|
|
|
|
Ice_Mountain = "Area: Ice Mountain"
|
|
|
|
Dwarven_Mines = "Area: Dwarven Mines"
|
|
|
|
Falador = "Area: Falador"
|
|
|
|
Falador_Farm = "Area: Falador Farms"
|
|
|
|
Crafting_Guild = "Area: Crafting Guild"
|
|
|
|
Rimmington = "Area: Rimmington"
|
|
|
|
Port_Sarim = "Area: Port Sarim"
|
|
|
|
Mudskipper_Point = "Area: Mudskipper Point"
|
|
|
|
Karamja = "Area: Karamja"
|
|
|
|
Crandor = "Area: Crandor"
|
|
|
|
Corsair_Cove = "Area: Corsair Cove"
|
|
|
|
Wilderness = "Area: Wilderness"
|
|
|
|
Progressive_Armor = "Progressive Armor"
|
|
|
|
Progressive_Weapons = "Progressive Weapons"
|
|
|
|
Progressive_Tools = "Progressive Tools"
|
2024-08-16 20:10:30 +00:00
|
|
|
Progressive_Range_Armor = "Progressive Ranged Armor"
|
|
|
|
Progressive_Range_Weapon = "Progressive Ranged Weapons"
|
|
|
|
Progressive_Magic = "Progressive Magic"
|
OSRS: Implement New Game (#1976)
* MMBN3: Press program now has proper color index when received remotely
* Initial commit of OSRS untangled from MMBN3 branch
* Fixes some broken region connections
* Removes some locations
* Rearranges locations to fill in slots left by removed locations
* Adds starting area rando
* Moves Oak and Willow trees to resource regions
* Fixes various PEP8 violations
* Refactor of regions
* Fixes variable capture issue with region rules
* Partial completion of brutal grind logic
* Finishes can_reach_skill function
* Adds skill requirements to location rules, fixes regions rules
* Adds documentation for OSRS
* Removes match statement
* Updates Data Version to test mode to prevent item name caching
* Fixes starting spawn logic for east varrock
* Fixes river lum crossing logic to not assume you can phase across water
* Prevents equipping items when you haven't unlocked them
* Changes canoe logic to not require huge levels
* Skeletoning out some data I'll need for variable task system
* Adds csvs and parser for logic
* Adds Items parsing
* Fixes the spawning logic to not default to Chunksanity when you didn't pick it
* Begins adding generation rules for data-driven logic
* Moves region handling and location creating to different methods
* Adds logic limits to Options
* Begun the location generation has
* Randomly generates tasks for each skill until populated
* Mopping up improper names, adding custom logic, and fixes location rolling
* Drastically cleans up the location rolling loop
* Modifies generation to properly use local variables and pass unit tests
* Game is now generating, but rules don't seem to work
* Lambda capture, my old nemesis. We meet again
* Fixes issue with Corsair Cove item requirement causing logic loop
* Okay one more fix, another variable capture
* On second thought lets not have skull sceptre tasks. 'Tis a silly place
* Removes QP from item pool (they're events not items)
* Removes Stronghold floor tasks, no varbit to track them
* Loads CSV with pkutil so it can be used in apworld
* Fixes logic of skill tasks and adds QP requirements to long grinds
* Fixes pathing in pkgutil call
* Better handling for empty task categories, no longer throws errors
* Fixes order for progressive tasks, removes un-checkable spider task
* Fixes logic issues related to stew and the Blurite caves
* Fixes issues generating causing tests to sporadically fail
* Adds missing task that caused off-by-one error
* Updates to new Options API
* Updates generation to function properly with the Universal Tracker (Thanks Faris)
* Replaces runtime CSV parsing with pre-made python files generated from CSVs
* Switches to self.random and uses random.choice instead of doing it manually
* Fixes to typing, variable names, iterators, and continue conditions
* Replaces Name classes with Enums
* Fixes parse error on region special rules
* Skill requirements check now returns an accessrule instead of being one that checks options
* Updates documentation and setup guide
* Adjusts maximum numbers for combat and general tasks
* Fixes region names so dictionary lookup works for chunksanity
* Update worlds/osrs/docs/en_Old School Runescape.md
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
* Update worlds/osrs/docs/en_Old School Runescape.md
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
* Updates readme.md and codeowners doc
* Removes erroneous East Varrock -> Al Kharid connection
* Changes to canoe logic to account for woodcutting level options
* Fixes embarassing typo on 'Edgeville'
* Moves Logic CSVs to separate repository, addresses suggested changes on PR
* Fixes logic error in east/west lumbridge regions. Fixes incorrect List typing in main
* Removes task types with weight 0 from the list of rollable tasks
* Missed another place that the task type had to be removed if 0 weight
* Prevents adding an empty task weight if levels are too restrictive for tasks to be added
* Removes giant blank space in error message
* Adds player name to error for not having enough available tasks
---------
Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com>
2024-08-06 21:13:11 +00:00
|
|
|
Lobsters = "10 Lobsters"
|
|
|
|
Swordfish = "5 Swordfish"
|
|
|
|
Energy_Potions = "10 Energy Potions"
|
|
|
|
Coins = "5,000 Coins"
|
|
|
|
Mind_Runes = "50 Mind Runes"
|
|
|
|
Chaos_Runes = "25 Chaos Runes"
|
|
|
|
Death_Runes = "10 Death Runes"
|
|
|
|
Law_Runes = "10 Law Runes"
|
|
|
|
QP_Cooks_Assistant = "1 QP (Cook's Assistant)"
|
|
|
|
QP_Demon_Slayer = "3 QP (Demon Slayer)"
|
|
|
|
QP_Restless_Ghost = "1 QP (The Restless Ghost)"
|
|
|
|
QP_Romeo_Juliet = "5 QP (Romeo & Juliet)"
|
|
|
|
QP_Sheep_Shearer = "1 QP (Sheep Shearer)"
|
|
|
|
QP_Shield_of_Arrav = "1 QP (Shield of Arrav)"
|
|
|
|
QP_Ernest_the_Chicken = "4 QP (Ernest the Chicken)"
|
|
|
|
QP_Vampyre_Slayer = "3 QP (Vampyre Slayer)"
|
|
|
|
QP_Imp_Catcher = "1 QP (Imp Catcher)"
|
|
|
|
QP_Prince_Ali_Rescue = "3 QP (Prince Ali Rescue)"
|
|
|
|
QP_Dorics_Quest = "1 QP (Doric's Quest)"
|
|
|
|
QP_Black_Knights_Fortress = "3 QP (Black Knights' Fortress)"
|
|
|
|
QP_Witchs_Potion = "1 QP (Witch's Potion)"
|
|
|
|
QP_Knights_Sword = "1 QP (The Knight's Sword)"
|
|
|
|
QP_Goblin_Diplomacy = "5 QP (Goblin Diplomacy)"
|
|
|
|
QP_Pirates_Treasure = "2 QP (Pirate's Treasure)"
|
|
|
|
QP_Rune_Mysteries = "1 QP (Rune Mysteries)"
|
|
|
|
QP_Misthalin_Mystery = "1 QP (Misthalin Mystery)"
|
|
|
|
QP_Corsair_Curse = "2 QP (The Corsair Curse)"
|
|
|
|
QP_X_Marks_the_Spot = "1 QP (X Marks The Spot)"
|
|
|
|
QP_Below_Ice_Mountain = "1 QP (Below Ice Mountain)"
|
|
|
|
|
|
|
|
__str__ = str.__str__
|
|
|
|
|
|
|
|
|
|
|
|
class LocationNames(str, Enum):
|
|
|
|
Q_Cooks_Assistant = "Quest: Cook's Assistant"
|
|
|
|
Q_Demon_Slayer = "Quest: Demon Slayer"
|
|
|
|
Q_Restless_Ghost = "Quest: The Restless Ghost"
|
|
|
|
Q_Romeo_Juliet = "Quest: Romeo & Juliet"
|
|
|
|
Q_Sheep_Shearer = "Quest: Sheep Shearer"
|
|
|
|
Q_Shield_of_Arrav = "Quest: Shield of Arrav"
|
|
|
|
Q_Ernest_the_Chicken = "Quest: Ernest the Chicken"
|
|
|
|
Q_Vampyre_Slayer = "Quest: Vampyre Slayer"
|
|
|
|
Q_Imp_Catcher = "Quest: Imp Catcher"
|
|
|
|
Q_Prince_Ali_Rescue = "Quest: Prince Ali Rescue"
|
|
|
|
Q_Dorics_Quest = "Quest: Doric's Quest"
|
|
|
|
Q_Black_Knights_Fortress = "Quest: Black Knights' Fortress"
|
|
|
|
Q_Witchs_Potion = "Quest: Witch's Potion"
|
|
|
|
Q_Knights_Sword = "Quest: The Knight's Sword"
|
|
|
|
Q_Goblin_Diplomacy = "Quest: Goblin Diplomacy"
|
|
|
|
Q_Pirates_Treasure = "Quest: Pirate's Treasure"
|
|
|
|
Q_Rune_Mysteries = "Quest: Rune Mysteries"
|
|
|
|
Q_Misthalin_Mystery = "Quest: Misthalin Mystery"
|
|
|
|
Q_Corsair_Curse = "Quest: The Corsair Curse"
|
|
|
|
Q_X_Marks_the_Spot = "Quest: X Marks the Spot"
|
|
|
|
Q_Below_Ice_Mountain = "Quest: Below Ice Mountain"
|
|
|
|
QP_Cooks_Assistant = "Points: Cook's Assistant"
|
|
|
|
QP_Demon_Slayer = "Points: Demon Slayer"
|
|
|
|
QP_Restless_Ghost = "Points: The Restless Ghost"
|
|
|
|
QP_Romeo_Juliet = "Points: Romeo & Juliet"
|
|
|
|
QP_Sheep_Shearer = "Points: Sheep Shearer"
|
|
|
|
QP_Shield_of_Arrav = "Points: Shield of Arrav"
|
|
|
|
QP_Ernest_the_Chicken = "Points: Ernest the Chicken"
|
|
|
|
QP_Vampyre_Slayer = "Points: Vampyre Slayer"
|
|
|
|
QP_Imp_Catcher = "Points: Imp Catcher"
|
|
|
|
QP_Prince_Ali_Rescue = "Points: Prince Ali Rescue"
|
|
|
|
QP_Dorics_Quest = "Points: Doric's Quest"
|
|
|
|
QP_Black_Knights_Fortress = "Points: Black Knights' Fortress"
|
|
|
|
QP_Witchs_Potion = "Points: Witch's Potion"
|
|
|
|
QP_Knights_Sword = "Points: The Knight's Sword"
|
|
|
|
QP_Goblin_Diplomacy = "Points: Goblin Diplomacy"
|
|
|
|
QP_Pirates_Treasure = "Points: Pirate's Treasure"
|
|
|
|
QP_Rune_Mysteries = "Points: Rune Mysteries"
|
|
|
|
QP_Misthalin_Mystery = "Points: Misthalin Mystery"
|
|
|
|
QP_Corsair_Curse = "Points: The Corsair Curse"
|
|
|
|
QP_X_Marks_the_Spot = "Points: X Marks the Spot"
|
|
|
|
QP_Below_Ice_Mountain = "Points: Below Ice Mountain"
|
|
|
|
Guppy = "Prepare a Guppy"
|
|
|
|
Cavefish = "Prepare a Cavefish"
|
|
|
|
Tetra = "Prepare a Tetra"
|
|
|
|
Barronite_Deposit = "Crush a Barronite Deposit"
|
|
|
|
Oak_Log = "Cut an Oak Log"
|
|
|
|
Willow_Log = "Cut a Willow Log"
|
|
|
|
Catch_Lobster = "Catch a Lobster"
|
|
|
|
Mine_Silver = "Mine Silver"
|
|
|
|
Mine_Coal = "Mine Coal"
|
|
|
|
Mine_Gold = "Mine Gold"
|
|
|
|
Smelt_Silver = "Smelt a Silver Bar"
|
|
|
|
Smelt_Steel = "Smelt a Steel Bar"
|
|
|
|
Smelt_Gold = "Smelt a Gold Bar"
|
|
|
|
Cut_Sapphire = "Cut a Sapphire"
|
|
|
|
Cut_Emerald = "Cut an Emerald"
|
|
|
|
Cut_Ruby = "Cut a Ruby"
|
|
|
|
Cut_Diamond = "Cut a Diamond"
|
|
|
|
K_Lesser_Demon = "Kill a Lesser Demon"
|
|
|
|
K_Ogress_Shaman = "Kill an Ogress Shaman"
|
|
|
|
Bake_Apple_Pie = "Bake an Apple Pie"
|
|
|
|
Bake_Cake = "Bake a Cake"
|
|
|
|
Bake_Meat_Pizza = "Bake a Meat Pizza"
|
|
|
|
Total_XP_5000 = "5,000 Total XP"
|
|
|
|
Total_XP_10000 = "10,000 Total XP"
|
|
|
|
Total_XP_25000 = "25,000 Total XP"
|
|
|
|
Total_XP_50000 = "50,000 Total XP"
|
|
|
|
Total_XP_100000 = "100,000 Total XP"
|
|
|
|
Total_Level_50 = "Total Level 50"
|
|
|
|
Total_Level_100 = "Total Level 100"
|
|
|
|
Total_Level_150 = "Total Level 150"
|
|
|
|
Total_Level_200 = "Total Level 200"
|
|
|
|
Combat_Level_5 = "Combat Level 5"
|
|
|
|
Combat_Level_15 = "Combat Level 15"
|
|
|
|
Combat_Level_25 = "Combat Level 25"
|
|
|
|
Travel_on_a_Canoe = "Travel on a Canoe"
|
|
|
|
Q_Dragon_Slayer = "Quest: Dragon Slayer"
|
|
|
|
|
|
|
|
__str__ = str.__str__
|