2022-01-23 20:34:30 +00:00
|
|
|
import typing
|
2024-03-26 13:29:25 +00:00
|
|
|
from dataclasses import dataclass
|
2024-11-29 00:45:26 +00:00
|
|
|
from Options import DefaultOnToggle, Range, Toggle, DeathLink, Choice, PerGameCommonOptions, OptionSet, OptionGroup
|
2024-02-13 05:14:21 +00:00
|
|
|
from .Items import action_item_table
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2024-12-12 13:50:48 +00:00
|
|
|
class EnableCoinStars(Choice):
|
|
|
|
"""
|
|
|
|
Determine logic for 100 Coin Stars.
|
|
|
|
|
|
|
|
Off - Removed from pool. You can still collect them, but they don't do anything.
|
|
|
|
Optimal for ignoring 100 Coin Stars entirely. Removes 15 locations from the pool.
|
|
|
|
|
|
|
|
On - Kept in pool, potentially randomized.
|
|
|
|
|
|
|
|
Vanilla - Kept in pool, but NOT randomized.
|
|
|
|
"""
|
2022-02-02 15:29:29 +00:00
|
|
|
display_name = "Enable 100 Coin Stars"
|
2024-12-12 13:50:48 +00:00
|
|
|
option_off = 0
|
|
|
|
option_on = 1
|
|
|
|
option_vanilla = 2
|
2022-01-23 20:34:30 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-01-23 20:34:30 +00:00
|
|
|
class StrictCapRequirements(DefaultOnToggle):
|
|
|
|
"""If disabled, Stars that expect special caps may have to be acquired without the caps"""
|
2022-02-02 15:29:29 +00:00
|
|
|
display_name = "Strict Cap Requirements"
|
2022-01-23 20:34:30 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-02-15 18:56:10 +00:00
|
|
|
class StrictCannonRequirements(DefaultOnToggle):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""If disabled, Stars that expect cannons may have to be acquired without them.
|
|
|
|
Has no effect if Buddy Checks and Move Randomizer are disabled"""
|
2022-02-15 18:56:10 +00:00
|
|
|
display_name = "Strict Cannon Requirements"
|
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-07-14 16:37:14 +00:00
|
|
|
class FirstBowserStarDoorCost(Range):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""What percent of the total stars are required at the Star Door to Bowser in the Dark World"""
|
|
|
|
display_name = "First Star Door Cost %"
|
2022-07-14 16:37:14 +00:00
|
|
|
range_start = 0
|
2024-02-13 05:14:21 +00:00
|
|
|
range_end = 40
|
|
|
|
default = 7
|
2022-07-14 16:37:14 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-07-14 16:37:14 +00:00
|
|
|
class BasementStarDoorCost(Range):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""What percent of the total stars are required at the Star Door in the Basement"""
|
|
|
|
display_name = "Basement Star Door %"
|
2022-07-14 16:37:14 +00:00
|
|
|
range_start = 0
|
2024-02-13 05:14:21 +00:00
|
|
|
range_end = 50
|
|
|
|
default = 25
|
2022-07-14 16:37:14 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-07-14 16:37:14 +00:00
|
|
|
class SecondFloorStarDoorCost(Range):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""What percent of the total stars are required to access the third floor"""
|
|
|
|
display_name = 'Second Floor Star Door %'
|
2022-07-14 16:37:14 +00:00
|
|
|
range_start = 0
|
2024-02-13 05:14:21 +00:00
|
|
|
range_end = 70
|
|
|
|
default = 42
|
2022-07-25 16:39:31 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-07-25 16:39:31 +00:00
|
|
|
class MIPS1Cost(Range):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""What percent of the total stars are required to spawn MIPS the first time"""
|
|
|
|
display_name = "MIPS 1 Star %"
|
2022-07-25 16:39:31 +00:00
|
|
|
range_start = 0
|
2024-02-13 05:14:21 +00:00
|
|
|
range_end = 35
|
|
|
|
default = 12
|
2022-07-25 16:39:31 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-07-25 16:39:31 +00:00
|
|
|
class MIPS2Cost(Range):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""What percent of the total stars are required to spawn MIPS the second time."""
|
|
|
|
display_name = "MIPS 2 Star %"
|
2022-07-25 16:39:31 +00:00
|
|
|
range_start = 0
|
2024-02-13 05:14:21 +00:00
|
|
|
range_end = 70
|
|
|
|
default = 42
|
2022-07-14 16:37:14 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-01-23 20:34:30 +00:00
|
|
|
class StarsToFinish(Range):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""What percent of the total stars are required at the infinite stairs"""
|
|
|
|
display_name = "Endless Stairs Star %"
|
2022-07-14 16:37:14 +00:00
|
|
|
range_start = 0
|
2024-02-13 05:14:21 +00:00
|
|
|
range_end = 90
|
|
|
|
default = 58
|
2022-01-23 20:34:30 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-07-25 16:39:31 +00:00
|
|
|
class AmountOfStars(Range):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""How many stars exist.
|
|
|
|
If there aren't enough locations to hold the given total, the total will be reduced."""
|
|
|
|
display_name = "Total Power Stars"
|
2022-07-25 16:39:31 +00:00
|
|
|
range_start = 35
|
|
|
|
range_end = 120
|
|
|
|
default = 120
|
2022-01-30 18:12:52 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-07-25 16:39:31 +00:00
|
|
|
class AreaRandomizer(Choice):
|
|
|
|
"""Randomize Entrances"""
|
|
|
|
display_name = "Entrance Randomizer"
|
|
|
|
option_Off = 0
|
|
|
|
option_Courses_Only = 1
|
2022-10-27 23:43:02 +00:00
|
|
|
option_Courses_and_Secrets_Separate = 2
|
|
|
|
option_Courses_and_Secrets = 3
|
2022-02-09 19:57:38 +00:00
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-02-15 18:56:10 +00:00
|
|
|
class BuddyChecks(Toggle):
|
|
|
|
"""Bob-omb Buddies are checks, Cannon Unlocks are items"""
|
|
|
|
display_name = "Bob-omb Buddy Checks"
|
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2024-11-07 09:34:41 +00:00
|
|
|
class ExclamationBoxes(Toggle):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""Include 1Up Exclamation Boxes during randomization.
|
|
|
|
Adds 29 locations to the pool."""
|
2022-08-21 18:45:39 +00:00
|
|
|
display_name = "Randomize 1Up !-Blocks"
|
2024-11-07 09:34:41 +00:00
|
|
|
alias_1Ups_Only = 1
|
2022-08-21 18:45:39 +00:00
|
|
|
|
2024-02-13 05:14:21 +00:00
|
|
|
|
2023-10-28 19:44:16 +00:00
|
|
|
class CompletionType(Choice):
|
|
|
|
"""Set goal for game completion"""
|
|
|
|
display_name = "Completion Goal"
|
|
|
|
option_Last_Bowser_Stage = 0
|
|
|
|
option_All_Bowser_Stages = 1
|
|
|
|
|
2022-09-15 22:32:30 +00:00
|
|
|
|
2022-02-09 19:57:38 +00:00
|
|
|
class ProgressiveKeys(DefaultOnToggle):
|
2024-02-13 05:14:21 +00:00
|
|
|
"""Keys will first grant you access to the Basement, then to the Second Floor"""
|
2022-02-09 19:57:38 +00:00
|
|
|
display_name = "Progressive Keys"
|
|
|
|
|
2024-02-13 05:14:21 +00:00
|
|
|
class StrictMoveRequirements(DefaultOnToggle):
|
|
|
|
"""If disabled, Stars that expect certain moves may have to be acquired without them. Only makes a difference
|
|
|
|
if Move Randomization is enabled"""
|
|
|
|
display_name = "Strict Move Requirements"
|
|
|
|
|
2024-03-26 13:29:25 +00:00
|
|
|
class EnableMoveRandomizer(Toggle):
|
|
|
|
"""Mario is unable to perform some actions until a corresponding item is picked up.
|
|
|
|
This option is incompatible with builds using a 'nomoverando' branch.
|
|
|
|
Specific actions to randomize can be specified in the YAML."""
|
|
|
|
display_name = "Enable Move Randomizer"
|
|
|
|
|
|
|
|
class MoveRandomizerActions(OptionSet):
|
|
|
|
"""Which actions to randomize when Move Randomizer is enabled"""
|
|
|
|
display_name = "Randomized Moves"
|
|
|
|
# HACK: Disable randomization for double jump
|
|
|
|
valid_keys = [action for action in action_item_table if action != 'Double Jump']
|
|
|
|
default = valid_keys
|
|
|
|
|
2024-11-29 00:45:26 +00:00
|
|
|
sm64_options_groups = [
|
|
|
|
OptionGroup("Logic Options", [
|
|
|
|
AreaRandomizer,
|
|
|
|
BuddyChecks,
|
|
|
|
ExclamationBoxes,
|
|
|
|
ProgressiveKeys,
|
|
|
|
EnableCoinStars,
|
|
|
|
StrictCapRequirements,
|
|
|
|
StrictCannonRequirements,
|
|
|
|
]),
|
|
|
|
OptionGroup("Ability Options", [
|
|
|
|
EnableMoveRandomizer,
|
|
|
|
MoveRandomizerActions,
|
|
|
|
StrictMoveRequirements,
|
|
|
|
]),
|
|
|
|
OptionGroup("Star Options", [
|
|
|
|
AmountOfStars,
|
|
|
|
FirstBowserStarDoorCost,
|
|
|
|
BasementStarDoorCost,
|
|
|
|
SecondFloorStarDoorCost,
|
|
|
|
MIPS1Cost,
|
|
|
|
MIPS2Cost,
|
|
|
|
StarsToFinish,
|
|
|
|
]),
|
|
|
|
]
|
|
|
|
|
2024-03-26 13:29:25 +00:00
|
|
|
@dataclass
|
|
|
|
class SM64Options(PerGameCommonOptions):
|
|
|
|
area_rando: AreaRandomizer
|
|
|
|
buddy_checks: BuddyChecks
|
|
|
|
exclamation_boxes: ExclamationBoxes
|
|
|
|
progressive_keys: ProgressiveKeys
|
|
|
|
enable_coin_stars: EnableCoinStars
|
|
|
|
enable_move_rando: EnableMoveRandomizer
|
|
|
|
move_rando_actions: MoveRandomizerActions
|
|
|
|
strict_cap_requirements: StrictCapRequirements
|
|
|
|
strict_cannon_requirements: StrictCannonRequirements
|
|
|
|
strict_move_requirements: StrictMoveRequirements
|
|
|
|
amount_of_stars: AmountOfStars
|
|
|
|
first_bowser_star_door_cost: FirstBowserStarDoorCost
|
|
|
|
basement_star_door_cost: BasementStarDoorCost
|
|
|
|
second_floor_star_door_cost: SecondFloorStarDoorCost
|
|
|
|
mips1_cost: MIPS1Cost
|
|
|
|
mips2_cost: MIPS2Cost
|
|
|
|
stars_to_finish: StarsToFinish
|
|
|
|
death_link: DeathLink
|
|
|
|
completion_type: CompletionType
|