RoR2: Add Support for New Stage (#3436)
* add support for the new stage added to RoR2 * Fix stage being unreachable * add option groups * reorder option groups
This commit is contained in:
parent
ee1b13f219
commit
f30f2d3a3f
|
@ -7,7 +7,7 @@ from .ror2environments import environment_vanilla_table, environment_vanilla_ord
|
|||
environment_sotv_orderedstages_table, environment_sotv_table, collapse_dict_list_vertical, shift_by_offset
|
||||
|
||||
from BaseClasses import Item, ItemClassification, Tutorial
|
||||
from .options import ItemWeights, ROR2Options
|
||||
from .options import ItemWeights, ROR2Options, ror2_option_groups
|
||||
from worlds.AutoWorld import World, WebWorld
|
||||
from .regions import create_explore_regions, create_classic_regions
|
||||
from typing import List, Dict, Any
|
||||
|
@ -23,6 +23,8 @@ class RiskOfWeb(WebWorld):
|
|||
["Ijwu", "Kindasneaki"]
|
||||
)]
|
||||
|
||||
option_groups = ror2_option_groups
|
||||
|
||||
|
||||
class RiskOfRainWorld(World):
|
||||
"""
|
||||
|
@ -44,7 +46,7 @@ class RiskOfRainWorld(World):
|
|||
}
|
||||
location_name_to_id = item_pickups
|
||||
|
||||
required_client_version = (0, 4, 5)
|
||||
required_client_version = (0, 5, 0)
|
||||
web = RiskOfWeb()
|
||||
total_revivals: int
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from dataclasses import dataclass
|
||||
from Options import Toggle, DefaultOnToggle, DeathLink, Range, Choice, PerGameCommonOptions
|
||||
from Options import Toggle, DefaultOnToggle, DeathLink, Range, Choice, PerGameCommonOptions, OptionGroup
|
||||
|
||||
|
||||
# NOTE be aware that since the range of item ids that RoR2 uses is based off of the maximums of checks
|
||||
|
@ -350,7 +350,7 @@ class ItemPoolPresetToggle(Toggle):
|
|||
|
||||
|
||||
class ItemWeights(Choice):
|
||||
"""Set item_pool_presets to true if you want to use one of these presets.
|
||||
"""Set Use Item Weight Presets to yes if you want to use one of these presets.
|
||||
Preset choices for determining the weights of the item pool.
|
||||
- New is a test for a potential adjustment to the default weights.
|
||||
- Uncommon puts a large number of uncommon items in the pool.
|
||||
|
@ -375,6 +375,44 @@ class ItemWeights(Choice):
|
|||
option_void = 9
|
||||
|
||||
|
||||
ror2_option_groups = [
|
||||
OptionGroup("Explore Mode Options", [
|
||||
ChestsPerEnvironment,
|
||||
ShrinesPerEnvironment,
|
||||
ScavengersPerEnvironment,
|
||||
ScannersPerEnvironment,
|
||||
AltarsPerEnvironment,
|
||||
RequireStages,
|
||||
ProgressiveStages,
|
||||
]),
|
||||
OptionGroup("Classic Mode Options", [
|
||||
TotalLocations,
|
||||
], start_collapsed=True),
|
||||
OptionGroup("Weighted Choices", [
|
||||
ItemWeights,
|
||||
ItemPoolPresetToggle,
|
||||
WhiteScrap,
|
||||
GreenScrap,
|
||||
YellowScrap,
|
||||
RedScrap,
|
||||
CommonItem,
|
||||
UncommonItem,
|
||||
LegendaryItem,
|
||||
BossItem,
|
||||
LunarItem,
|
||||
VoidItem,
|
||||
Equipment,
|
||||
Money,
|
||||
LunarCoin,
|
||||
Experience,
|
||||
MountainTrap,
|
||||
TimeWarpTrap,
|
||||
CombatTrap,
|
||||
TeleportTrap,
|
||||
]),
|
||||
]
|
||||
|
||||
|
||||
@dataclass
|
||||
class ROR2Options(PerGameCommonOptions):
|
||||
goal: Goal
|
||||
|
@ -399,10 +437,10 @@ class ROR2Options(PerGameCommonOptions):
|
|||
item_weights: ItemWeights
|
||||
item_pool_presets: ItemPoolPresetToggle
|
||||
# define the weights of the generated item pool.
|
||||
green_scrap: GreenScrap
|
||||
red_scrap: RedScrap
|
||||
yellow_scrap: YellowScrap
|
||||
white_scrap: WhiteScrap
|
||||
green_scrap: GreenScrap
|
||||
yellow_scrap: YellowScrap
|
||||
red_scrap: RedScrap
|
||||
common_item: CommonItem
|
||||
uncommon_item: UncommonItem
|
||||
legendary_item: LegendaryItem
|
||||
|
|
|
@ -19,11 +19,13 @@ def create_explore_regions(ror2_world: "RiskOfRainWorld") -> None:
|
|||
# Default Locations
|
||||
non_dlc_regions: Dict[str, RoRRegionData] = {
|
||||
"Menu": RoRRegionData(None, ["Distant Roost", "Distant Roost (2)",
|
||||
"Titanic Plains", "Titanic Plains (2)"]),
|
||||
"Titanic Plains", "Titanic Plains (2)",
|
||||
"Verdant Falls"]),
|
||||
"Distant Roost": RoRRegionData([], ["OrderedStage_1"]),
|
||||
"Distant Roost (2)": RoRRegionData([], ["OrderedStage_1"]),
|
||||
"Titanic Plains": RoRRegionData([], ["OrderedStage_1"]),
|
||||
"Titanic Plains (2)": RoRRegionData([], ["OrderedStage_1"]),
|
||||
"Verdant Falls": RoRRegionData([], ["OrderedStage_1"]),
|
||||
"Abandoned Aqueduct": RoRRegionData([], ["OrderedStage_2"]),
|
||||
"Wetland Aspect": RoRRegionData([], ["OrderedStage_2"]),
|
||||
"Rallypoint Delta": RoRRegionData([], ["OrderedStage_3"]),
|
||||
|
|
|
@ -7,6 +7,7 @@ environment_vanilla_orderedstage_1_table: Dict[str, int] = {
|
|||
"Distant Roost (2)": 8, # blackbeach2
|
||||
"Titanic Plains": 15, # golemplains
|
||||
"Titanic Plains (2)": 16, # golemplains2
|
||||
"Verdant Falls": 28, # lakes
|
||||
}
|
||||
environment_vanilla_orderedstage_2_table: Dict[str, int] = {
|
||||
"Abandoned Aqueduct": 17, # goolake
|
||||
|
|
Loading…
Reference in New Issue