The Witness: Option Groups & Tooltip formatting (#3342)
* Add option groups * Option tooltip formatting * eof * reindent, apparently I'm stupid * lint * oops indent
This commit is contained in:
parent
e7544d835c
commit
61be79b7ea
|
@ -16,7 +16,7 @@ from .data.item_definition_classes import DoorItemDefinition, ItemData
|
||||||
from .data.utils import get_audio_logs
|
from .data.utils import get_audio_logs
|
||||||
from .hints import CompactItemData, create_all_hints, make_compact_hint_data, make_laser_hints
|
from .hints import CompactItemData, create_all_hints, make_compact_hint_data, make_laser_hints
|
||||||
from .locations import WitnessPlayerLocations, static_witness_locations
|
from .locations import WitnessPlayerLocations, static_witness_locations
|
||||||
from .options import TheWitnessOptions
|
from .options import TheWitnessOptions, witness_option_groups
|
||||||
from .player_items import WitnessItem, WitnessPlayerItems
|
from .player_items import WitnessItem, WitnessPlayerItems
|
||||||
from .player_logic import WitnessPlayerLogic
|
from .player_logic import WitnessPlayerLogic
|
||||||
from .presets import witness_option_presets
|
from .presets import witness_option_presets
|
||||||
|
@ -36,6 +36,7 @@ class WitnessWebWorld(WebWorld):
|
||||||
)]
|
)]
|
||||||
|
|
||||||
options_presets = witness_option_presets
|
options_presets = witness_option_presets
|
||||||
|
option_groups = witness_option_groups
|
||||||
|
|
||||||
|
|
||||||
class WitnessWorld(World):
|
class WitnessWorld(World):
|
||||||
|
|
|
@ -2,7 +2,7 @@ from dataclasses import dataclass
|
||||||
|
|
||||||
from schema import And, Schema
|
from schema import And, Schema
|
||||||
|
|
||||||
from Options import Choice, DefaultOnToggle, OptionDict, PerGameCommonOptions, Range, Toggle
|
from Options import Choice, DefaultOnToggle, OptionDict, OptionGroup, PerGameCommonOptions, Range, Toggle
|
||||||
|
|
||||||
from .data import static_logic as static_witness_logic
|
from .data import static_logic as static_witness_logic
|
||||||
from .data.item_definition_classes import ItemCategory, WeightedItemDefinition
|
from .data.item_definition_classes import ItemCategory, WeightedItemDefinition
|
||||||
|
@ -61,9 +61,9 @@ class ShuffleLasers(Choice):
|
||||||
class ShuffleDoors(Choice):
|
class ShuffleDoors(Choice):
|
||||||
"""
|
"""
|
||||||
If on, opening doors, moving bridges etc. will require a "key".
|
If on, opening doors, moving bridges etc. will require a "key".
|
||||||
If set to "panels", the panel on the door will be locked until receiving its corresponding key.
|
- Panels: The panel on the door will be locked until receiving its corresponding key.
|
||||||
If set to "doors", the door will open immediately upon receiving its key. Door panels are added as location checks.
|
- Doors: The door will open immediately upon receiving its key. Door panels are added as location checks.
|
||||||
"Mixed" includes all doors from "doors", and all control panels (bridges, elevators etc.) from "panels".
|
- Mixed: Includes all doors from "doors", and all control panels (bridges, elevators etc.) from "panels".
|
||||||
"""
|
"""
|
||||||
display_name = "Shuffle Doors"
|
display_name = "Shuffle Doors"
|
||||||
option_off = 0
|
option_off = 0
|
||||||
|
@ -74,8 +74,10 @@ class ShuffleDoors(Choice):
|
||||||
|
|
||||||
class DoorGroupings(Choice):
|
class DoorGroupings(Choice):
|
||||||
"""
|
"""
|
||||||
If set to "none", there will be one key for each door, potentially resulting in upwards of 120 keys being added to the item pool.
|
Controls how door items are grouped.
|
||||||
If set to "regional", all doors in the same general region will open at once with a single key, reducing the amount of door items and complexity.
|
|
||||||
|
- None: There will be one key for each door, potentially resulting in upwards of 120 keys being added to the item pool.
|
||||||
|
- Regional: - All doors in the same general region will open at once with a single key, reducing the amount of door items and complexity.
|
||||||
"""
|
"""
|
||||||
display_name = "Door Groupings"
|
display_name = "Door Groupings"
|
||||||
option_off = 0
|
option_off = 0
|
||||||
|
@ -108,8 +110,8 @@ class ShuffleVaultBoxes(Toggle):
|
||||||
class ShuffleEnvironmentalPuzzles(Choice):
|
class ShuffleEnvironmentalPuzzles(Choice):
|
||||||
"""
|
"""
|
||||||
Adds Environmental/Obelisk Puzzles into the location pool.
|
Adds Environmental/Obelisk Puzzles into the location pool.
|
||||||
If set to "individual", every Environmental Puzzle sends an item.
|
- Individual: Every Environmental Puzzle sends an item.
|
||||||
If set to "Obelisk Sides", completing every puzzle on one side of an Obelisk sends an item.
|
- Obelisk Sides: Completing every puzzle on one side of an Obelisk sends an item.
|
||||||
|
|
||||||
Note: In Obelisk Sides, any EPs excluded through another option will be pre-completed on their Obelisk.
|
Note: In Obelisk Sides, any EPs excluded through another option will be pre-completed on their Obelisk.
|
||||||
"""
|
"""
|
||||||
|
@ -129,9 +131,9 @@ class ShuffleDog(Toggle):
|
||||||
class EnvironmentalPuzzlesDifficulty(Choice):
|
class EnvironmentalPuzzlesDifficulty(Choice):
|
||||||
"""
|
"""
|
||||||
When "Shuffle Environmental Puzzles" is on, this setting governs which EPs are eligible for the location pool.
|
When "Shuffle Environmental Puzzles" is on, this setting governs which EPs are eligible for the location pool.
|
||||||
If set to "eclipse", every EP in the game is eligible, including the 1-hour-long "Theater Eclipse EP".
|
- Eclipse: Every EP in the game is eligible, including the 1-hour-long "Theater Eclipse EP".
|
||||||
If set to "tedious", Theater Eclipse EP is excluded from the location pool.
|
- Tedious Theater Eclipse EP is excluded from the location pool.
|
||||||
If set to "normal", several other difficult or long EPs are excluded as well.
|
- Normal: several other difficult or long EPs are excluded as well.
|
||||||
"""
|
"""
|
||||||
display_name = "Environmental Puzzles Difficulty"
|
display_name = "Environmental Puzzles Difficulty"
|
||||||
option_normal = 0
|
option_normal = 0
|
||||||
|
@ -159,10 +161,10 @@ class ShufflePostgame(Toggle):
|
||||||
class VictoryCondition(Choice):
|
class VictoryCondition(Choice):
|
||||||
"""
|
"""
|
||||||
Set the victory condition for this world.
|
Set the victory condition for this world.
|
||||||
Elevator: Start the elevator at the bottom of the mountain (requires Mountain Lasers).
|
- Elevator: Start the elevator at the bottom of the mountain (requires Mountain Lasers).
|
||||||
Challenge: Beat the secret Challenge (requires Challenge Lasers).
|
- Challenge: Beat the secret Challenge (requires Challenge Lasers).
|
||||||
Mountain Box Short: Input the short solution to the Mountaintop Box (requires Mountain Lasers).
|
- Mountain Box Short: Input the short solution to the Mountaintop Box (requires Mountain Lasers).
|
||||||
Mountain Box Long: Input the long solution to the Mountaintop Box (requires Challenge Lasers).
|
- Mountain Box Long: Input the long solution to the Mountaintop Box (requires Challenge Lasers).
|
||||||
|
|
||||||
It is important to note that while the Mountain Box requires Desert Laser to be redirected in Town for that laser
|
It is important to note that while the Mountain Box requires Desert Laser to be redirected in Town for that laser
|
||||||
to count, the laser locks on the Elevator and Challenge Timer panels do not.
|
to count, the laser locks on the Elevator and Challenge Timer panels do not.
|
||||||
|
@ -332,3 +334,45 @@ class TheWitnessOptions(PerGameCommonOptions):
|
||||||
laser_hints: LaserHints
|
laser_hints: LaserHints
|
||||||
death_link: DeathLink
|
death_link: DeathLink
|
||||||
death_link_amnesty: DeathLinkAmnesty
|
death_link_amnesty: DeathLinkAmnesty
|
||||||
|
|
||||||
|
|
||||||
|
witness_option_groups = [
|
||||||
|
OptionGroup("Puzzles & Goal", [
|
||||||
|
PuzzleRandomization,
|
||||||
|
VictoryCondition,
|
||||||
|
MountainLasers,
|
||||||
|
ChallengeLasers,
|
||||||
|
]),
|
||||||
|
OptionGroup("Locations", [
|
||||||
|
ShuffleDiscardedPanels,
|
||||||
|
ShuffleVaultBoxes,
|
||||||
|
ShuffleEnvironmentalPuzzles,
|
||||||
|
EnvironmentalPuzzlesDifficulty,
|
||||||
|
ShufflePostgame,
|
||||||
|
DisableNonRandomizedPuzzles,
|
||||||
|
]),
|
||||||
|
OptionGroup("Progression Items", [
|
||||||
|
ShuffleSymbols,
|
||||||
|
ShuffleDoors,
|
||||||
|
DoorGroupings,
|
||||||
|
ShuffleLasers,
|
||||||
|
ShuffleBoat,
|
||||||
|
ObeliskKeys,
|
||||||
|
]),
|
||||||
|
OptionGroup("Filler Items", [
|
||||||
|
PuzzleSkipAmount,
|
||||||
|
TrapPercentage,
|
||||||
|
TrapWeights
|
||||||
|
]),
|
||||||
|
OptionGroup("Hints", [
|
||||||
|
HintAmount,
|
||||||
|
AreaHintPercentage,
|
||||||
|
LaserHints
|
||||||
|
]),
|
||||||
|
OptionGroup("Misc", [
|
||||||
|
EarlyCaves,
|
||||||
|
ElevatorsComeToYou,
|
||||||
|
DeathLink,
|
||||||
|
DeathLinkAmnesty,
|
||||||
|
])
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue