The Witness: Allow setting the puzzle randomization seed yourself (#4196)
* Allow setting the puzzle randomization seed yourself * longer tooltip * Oh * Also actually have the correct values that the client will accept (lol, thanks Medic) * Update worlds/witness/options.py Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> --------- Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
This commit is contained in:
parent
75e18e3cc9
commit
9c102da901
|
@ -80,7 +80,7 @@ class WitnessWorld(World):
|
||||||
|
|
||||||
def _get_slot_data(self) -> Dict[str, Any]:
|
def _get_slot_data(self) -> Dict[str, Any]:
|
||||||
return {
|
return {
|
||||||
"seed": self.random.randrange(0, 1000000),
|
"seed": self.options.puzzle_randomization_seed.value,
|
||||||
"victory_location": int(self.player_logic.VICTORY_LOCATION, 16),
|
"victory_location": int(self.player_logic.VICTORY_LOCATION, 16),
|
||||||
"panelhex_to_id": self.player_locations.CHECK_PANELHEX_TO_ID,
|
"panelhex_to_id": self.player_locations.CHECK_PANELHEX_TO_ID,
|
||||||
"item_id_to_door_hexes": static_witness_items.get_item_to_door_mappings(),
|
"item_id_to_door_hexes": static_witness_items.get_item_to_door_mappings(),
|
||||||
|
|
|
@ -401,6 +401,16 @@ class DeathLinkAmnesty(Range):
|
||||||
default = 1
|
default = 1
|
||||||
|
|
||||||
|
|
||||||
|
class PuzzleRandomizationSeed(Range):
|
||||||
|
"""
|
||||||
|
Sigma Rando, which is the basis for all puzzle randomization in this randomizer, uses a seed from 1 to 9999999 for the puzzle randomization.
|
||||||
|
This option lets you set this seed yourself.
|
||||||
|
"""
|
||||||
|
range_start = 1
|
||||||
|
range_end = 9999999
|
||||||
|
default = "random"
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class TheWitnessOptions(PerGameCommonOptions):
|
class TheWitnessOptions(PerGameCommonOptions):
|
||||||
puzzle_randomization: PuzzleRandomization
|
puzzle_randomization: PuzzleRandomization
|
||||||
|
@ -435,6 +445,7 @@ class TheWitnessOptions(PerGameCommonOptions):
|
||||||
laser_hints: LaserHints
|
laser_hints: LaserHints
|
||||||
death_link: DeathLink
|
death_link: DeathLink
|
||||||
death_link_amnesty: DeathLinkAmnesty
|
death_link_amnesty: DeathLinkAmnesty
|
||||||
|
puzzle_randomization_seed: PuzzleRandomizationSeed
|
||||||
shuffle_dog: ShuffleDog
|
shuffle_dog: ShuffleDog
|
||||||
|
|
||||||
|
|
||||||
|
@ -483,6 +494,7 @@ witness_option_groups = [
|
||||||
ElevatorsComeToYou,
|
ElevatorsComeToYou,
|
||||||
DeathLink,
|
DeathLink,
|
||||||
DeathLinkAmnesty,
|
DeathLinkAmnesty,
|
||||||
|
PuzzleRandomizationSeed,
|
||||||
]),
|
]),
|
||||||
OptionGroup("Silly Options", [
|
OptionGroup("Silly Options", [
|
||||||
ShuffleDog,
|
ShuffleDog,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Defines progression, junk and event items for The Witness
|
Defines progression, junk and event items for The Witness
|
||||||
"""
|
"""
|
||||||
import copy
|
import copy
|
||||||
from typing import TYPE_CHECKING, Dict, List, Set, cast
|
from typing import TYPE_CHECKING, Dict, List, Set
|
||||||
|
|
||||||
from BaseClasses import Item, ItemClassification, MultiWorld
|
from BaseClasses import Item, ItemClassification, MultiWorld
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue