Skip to content

Commit f30f2d3

Browse files
authored
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
1 parent ee1b13f commit f30f2d3

File tree

4 files changed

+50
-7
lines changed

4 files changed

+50
-7
lines changed

worlds/ror2/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
environment_sotv_orderedstages_table, environment_sotv_table, collapse_dict_list_vertical, shift_by_offset
88

99
from BaseClasses import Item, ItemClassification, Tutorial
10-
from .options import ItemWeights, ROR2Options
10+
from .options import ItemWeights, ROR2Options, ror2_option_groups
1111
from worlds.AutoWorld import World, WebWorld
1212
from .regions import create_explore_regions, create_classic_regions
1313
from typing import List, Dict, Any
@@ -23,6 +23,8 @@ class RiskOfWeb(WebWorld):
2323
["Ijwu", "Kindasneaki"]
2424
)]
2525

26+
option_groups = ror2_option_groups
27+
2628

2729
class RiskOfRainWorld(World):
2830
"""
@@ -44,7 +46,7 @@ class RiskOfRainWorld(World):
4446
}
4547
location_name_to_id = item_pickups
4648

47-
required_client_version = (0, 4, 5)
49+
required_client_version = (0, 5, 0)
4850
web = RiskOfWeb()
4951
total_revivals: int
5052

worlds/ror2/options.py

+42-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from dataclasses import dataclass
2-
from Options import Toggle, DefaultOnToggle, DeathLink, Range, Choice, PerGameCommonOptions
2+
from Options import Toggle, DefaultOnToggle, DeathLink, Range, Choice, PerGameCommonOptions, OptionGroup
33

44

55
# 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):
350350

351351

352352
class ItemWeights(Choice):
353-
"""Set item_pool_presets to true if you want to use one of these presets.
353+
"""Set Use Item Weight Presets to yes if you want to use one of these presets.
354354
Preset choices for determining the weights of the item pool.
355355
- New is a test for a potential adjustment to the default weights.
356356
- Uncommon puts a large number of uncommon items in the pool.
@@ -375,6 +375,44 @@ class ItemWeights(Choice):
375375
option_void = 9
376376

377377

378+
ror2_option_groups = [
379+
OptionGroup("Explore Mode Options", [
380+
ChestsPerEnvironment,
381+
ShrinesPerEnvironment,
382+
ScavengersPerEnvironment,
383+
ScannersPerEnvironment,
384+
AltarsPerEnvironment,
385+
RequireStages,
386+
ProgressiveStages,
387+
]),
388+
OptionGroup("Classic Mode Options", [
389+
TotalLocations,
390+
], start_collapsed=True),
391+
OptionGroup("Weighted Choices", [
392+
ItemWeights,
393+
ItemPoolPresetToggle,
394+
WhiteScrap,
395+
GreenScrap,
396+
YellowScrap,
397+
RedScrap,
398+
CommonItem,
399+
UncommonItem,
400+
LegendaryItem,
401+
BossItem,
402+
LunarItem,
403+
VoidItem,
404+
Equipment,
405+
Money,
406+
LunarCoin,
407+
Experience,
408+
MountainTrap,
409+
TimeWarpTrap,
410+
CombatTrap,
411+
TeleportTrap,
412+
]),
413+
]
414+
415+
378416
@dataclass
379417
class ROR2Options(PerGameCommonOptions):
380418
goal: Goal
@@ -399,10 +437,10 @@ class ROR2Options(PerGameCommonOptions):
399437
item_weights: ItemWeights
400438
item_pool_presets: ItemPoolPresetToggle
401439
# define the weights of the generated item pool.
440+
white_scrap: WhiteScrap
402441
green_scrap: GreenScrap
403-
red_scrap: RedScrap
404442
yellow_scrap: YellowScrap
405-
white_scrap: WhiteScrap
443+
red_scrap: RedScrap
406444
common_item: CommonItem
407445
uncommon_item: UncommonItem
408446
legendary_item: LegendaryItem

worlds/ror2/regions.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ def create_explore_regions(ror2_world: "RiskOfRainWorld") -> None:
1919
# Default Locations
2020
non_dlc_regions: Dict[str, RoRRegionData] = {
2121
"Menu": RoRRegionData(None, ["Distant Roost", "Distant Roost (2)",
22-
"Titanic Plains", "Titanic Plains (2)"]),
22+
"Titanic Plains", "Titanic Plains (2)",
23+
"Verdant Falls"]),
2324
"Distant Roost": RoRRegionData([], ["OrderedStage_1"]),
2425
"Distant Roost (2)": RoRRegionData([], ["OrderedStage_1"]),
2526
"Titanic Plains": RoRRegionData([], ["OrderedStage_1"]),
2627
"Titanic Plains (2)": RoRRegionData([], ["OrderedStage_1"]),
28+
"Verdant Falls": RoRRegionData([], ["OrderedStage_1"]),
2729
"Abandoned Aqueduct": RoRRegionData([], ["OrderedStage_2"]),
2830
"Wetland Aspect": RoRRegionData([], ["OrderedStage_2"]),
2931
"Rallypoint Delta": RoRRegionData([], ["OrderedStage_3"]),

worlds/ror2/ror2environments.py

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"Distant Roost (2)": 8, # blackbeach2
88
"Titanic Plains": 15, # golemplains
99
"Titanic Plains (2)": 16, # golemplains2
10+
"Verdant Falls": 28, # lakes
1011
}
1112
environment_vanilla_orderedstage_2_table: Dict[str, int] = {
1213
"Abandoned Aqueduct": 17, # goolake

0 commit comments

Comments
 (0)