Skip to content

Commit

Permalink
add SLM to the early_key_item option, and make 'any' depend on spawn …
Browse files Browse the repository at this point in the history
…so it always chooses an actually key item
  • Loading branch information
Ixrec committed Sep 21, 2024
1 parent 24275be commit 84dbad6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
8 changes: 7 additions & 1 deletion worlds/outer_wilds/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,17 @@ def create_items(world: "OuterWildsWorld") -> None:
if options.early_key_item:
key_item = None
if options.early_key_item == EarlyKeyItem.option_any:
key_item = random.choice(["Translator", "Nomai Warp Codes", "Launch Codes"])
if options.spawn == Spawn.option_stranger:
key_item = random.choice(["Launch Codes", "Stranger Light Modulator"])
else:
key_item = random.choice(["Translator", "Nomai Warp Codes", "Launch Codes"])
elif options.early_key_item == EarlyKeyItem.option_translator:
key_item = "Translator"
elif options.early_key_item == EarlyKeyItem.option_nomai_warp_codes:
key_item = "Nomai Warp Codes"
elif options.early_key_item == EarlyKeyItem.option_launch_codes:
key_item = "Launch Codes"
elif options.early_key_item == EarlyKeyItem.option_stranger_light_modulator:
key_item = "Stranger Light Modulator"
assert key_item is not None
multiworld.local_early_items[player][key_item] = 1
9 changes: 6 additions & 3 deletions worlds/outer_wilds/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ class Spawn(Choice):

class EarlyKeyItem(Choice):
"""
Ensure that either Translator, Nomai Warp Codes, or Launch Codes will be somewhere in sphere 1 and
in your own world, guaranteeing you can find it without waiting on other players.
`any` randomly selects one of these items to place early.
Ensure that one of Translator, Nomai Warp Codes, Launch Codes, or Stranger Light Modulator will be somewhere
in sphere 1 and in your own world, guaranteeing you can find it without waiting on other players.
`any` will randomly select one of these items that's relevant to your spawn (especially useful with `spawn: random`).
For base game spawns it will choose Translator, NWC or LC, and for stranger spawns it will choose LC or SLM.
Recommended for games with non-vanilla spawns, especially async games.
In addition, without this AP seems to almost always put Launch Codes in sphere 1, so `any` also helps increase variety.
Expand All @@ -145,6 +147,7 @@ class EarlyKeyItem(Choice):
option_translator = 2
option_nomai_warp_codes = 3
option_launch_codes = 4
option_stranger_light_modulator = 5


class RandomizeWarpPlatforms(Toggle):
Expand Down
8 changes: 8 additions & 0 deletions worlds/outer_wilds/test/test_spawns_and_warps.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@ class TestHGTSpawnRandomWarpEKI(OuterWildsTestBase):
"early_key_item": EarlyKeyItem.option_nomai_warp_codes,
}


class TestStrangerSpawnSLMEKI(OuterWildsTestBase):
options = {
"enable_eote_dlc": True,
"spawn": Spawn.option_stranger,
"early_key_item": EarlyKeyItem.option_stranger_light_modulator,
}

0 comments on commit 84dbad6

Please sign in to comment.