| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  | from Options import Toggle, Range, Choice, DeathLink, ItemSet, OptionSet, PerGameCommonOptions, OptionGroup, Removed | 
					
						
							| 
									
										
										
										
											2023-10-20 10:13:17 +10:00
										 |  |  | from dataclasses import dataclass | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-20 10:13:17 +10:00
										 |  |  | from .MuseDashCollection import MuseDashCollections | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-15 04:23:13 +10:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-20 10:13:17 +10:00
										 |  |  | class DLCMusicPacks(OptionSet): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Choose which DLC Packs will be included in the pool of chooseable songs. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Note: The [Just As Planned] DLC contains all [Muse Plus] songs. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-10-20 10:13:17 +10:00
										 |  |  |     display_name = "DLC Packs" | 
					
						
							|  |  |  |     default = {} | 
					
						
							|  |  |  |     valid_keys = [dlc for dlc in MuseDashCollections.DLC] | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class StreamerModeEnabled(Toggle): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     In Muse Dash, an option named 'Streamer Mode' removes songs which may trigger copyright issues when streaming. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     If this is enabled, only songs available under Streamer Mode will be available for randomization. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     display_name = "Streamer Mode Only Songs" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class StartingSongs(Range): | 
					
						
							|  |  |  |     """The number of songs that will be automatically unlocked at the start of a run.""" | 
					
						
							|  |  |  |     range_start = 3 | 
					
						
							|  |  |  |     range_end = 10 | 
					
						
							|  |  |  |     default = 5 | 
					
						
							|  |  |  |     display_name = "Starting Song Count" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class AdditionalSongs(Range): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     The total number of songs that will be placed in the randomization pool. | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     - This does not count any starting songs or the goal song. | 
					
						
							|  |  |  |     - The final song count may be lower due to other settings. | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     range_start = 15 | 
					
						
							| 
									
										
										
										
											2024-05-27 10:27:43 +10:00
										 |  |  |     range_end = 534  # Note will probably not reach this high if any other settings are done. | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     default = 40 | 
					
						
							|  |  |  |     display_name = "Additional Song Count" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class DifficultyMode(Choice): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Ensures that at any chosen song has at least 1 value falling within these values. | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     - Any: All songs are available | 
					
						
							|  |  |  |     - Easy: 1, 2 or 3 | 
					
						
							|  |  |  |     - Medium: 4, 5 | 
					
						
							|  |  |  |     - Hard: 6, 7 | 
					
						
							|  |  |  |     - Expert: 8, 9 | 
					
						
							|  |  |  |     - Master: 10+ | 
					
						
							|  |  |  |     - Manual: Uses the provided minimum and maximum range. | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     display_name = "Song Difficulty" | 
					
						
							|  |  |  |     option_Any = 0 | 
					
						
							|  |  |  |     option_Easy = 1 | 
					
						
							|  |  |  |     option_Medium = 2 | 
					
						
							|  |  |  |     option_Hard = 3 | 
					
						
							|  |  |  |     option_Expert = 4 | 
					
						
							|  |  |  |     option_Master = 5 | 
					
						
							|  |  |  |     option_Manual = 6 | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Todo: Investigate options to make this non randomizable | 
					
						
							|  |  |  | class DifficultyModeOverrideMin(Range): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Ensures that 1 difficulty has at least 1 this value or higher per song. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Note: Difficulty Mode must be set to Manual. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     display_name = "Manual Difficulty Min" | 
					
						
							|  |  |  |     range_start = 1 | 
					
						
							|  |  |  |     range_end = 11 | 
					
						
							|  |  |  |     default = 4 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Todo: Investigate options to make this non randomizable | 
					
						
							|  |  |  | class DifficultyModeOverrideMax(Range): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Ensures that 1 difficulty has at least 1 this value or lower per song. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Note: Difficulty Mode must be set to Manual. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     display_name = "Manual Difficulty Max" | 
					
						
							|  |  |  |     range_start = 1 | 
					
						
							|  |  |  |     range_end = 11 | 
					
						
							|  |  |  |     default = 8 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class GradeNeeded(Choice): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Completing a song will require a grade of this value or higher in order to unlock items. | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     The grades are as follows: | 
					
						
							|  |  |  |     - Silver S (SS): >= 95% accuracy | 
					
						
							|  |  |  |     - Pink S (S): >= 90% accuracy | 
					
						
							|  |  |  |     - A: >= 80% or a Full Combo | 
					
						
							|  |  |  |     - B: >= 70% | 
					
						
							|  |  |  |     - C: >= 60% | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     display_name = "Grade Needed" | 
					
						
							|  |  |  |     option_Any = 0 | 
					
						
							|  |  |  |     option_C = 1 | 
					
						
							|  |  |  |     option_B = 2 | 
					
						
							|  |  |  |     option_A = 3 | 
					
						
							|  |  |  |     option_PinkS = 4 | 
					
						
							|  |  |  |     option_SilverS = 5 | 
					
						
							|  |  |  |     default = 0 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class MusicSheetCountPercentage(Range): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     Controls how many music sheets are added to the pool based on the number of songs, including starting songs. | 
					
						
							|  |  |  |      | 
					
						
							| 
									
										
										
										
											2024-04-15 04:23:13 +10:00
										 |  |  |     Higher numbers leads to more consistent game lengths, but will cause individual music sheets to be less important. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     range_start = 10 | 
					
						
							|  |  |  |     range_end = 40 | 
					
						
							|  |  |  |     default = 20 | 
					
						
							|  |  |  |     display_name = "Music Sheet Percentage" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class MusicSheetWinCountPercentage(Range): | 
					
						
							|  |  |  |     """The percentage of Music Sheets in the item pool that are needed to unlock the winning song.""" | 
					
						
							|  |  |  |     range_start = 50 | 
					
						
							|  |  |  |     range_end = 100 | 
					
						
							|  |  |  |     default = 80 | 
					
						
							|  |  |  |     display_name = "Music Sheets Needed to Win" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  | class ChosenTraps(OptionSet): | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     This controls the types of traps that can be added to the pool. | 
					
						
							|  |  |  |     - Traps last the length of a song, or until you die. | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     - VFX Traps consist of visual effects that play over the song. (i.e. Grayscale.) | 
					
						
							|  |  |  |     - SFX Traps consist of changing your sfx setting to one possibly more annoying sfx. | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |      | 
					
						
							| 
									
										
										
										
											2023-09-26 12:21:09 +10:00
										 |  |  |     Note: SFX traps are only available if [Just as Planned] DLC songs are enabled. | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     display_name = "Chosen Traps" | 
					
						
							|  |  |  |     default = {} | 
					
						
							|  |  |  |     valid_keys = {trap for trap in MuseDashCollections.trap_items.keys()} | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TrapCountPercentage(Range): | 
					
						
							|  |  |  |     """This controls how many traps to add into the pool, based the total number of songs.""" | 
					
						
							|  |  |  |     range_start = 0 | 
					
						
							|  |  |  |     range_end = 35 | 
					
						
							|  |  |  |     default = 15 | 
					
						
							|  |  |  |     display_name = "Trap Percentage" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class IncludeSongs(ItemSet): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     These songs will be guaranteed to show up within the seed. | 
					
						
							|  |  |  |     - You must have the DLC enabled to play these songs. | 
					
						
							|  |  |  |     - Difficulty options will not affect these songs. | 
					
						
							|  |  |  |     - If there are too many included songs, this will act as a whitelist ignoring song difficulty. | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     verify_item_name = True | 
					
						
							|  |  |  |     display_name = "Include Songs" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ExcludeSongs(ItemSet): | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     """
 | 
					
						
							|  |  |  |     These songs will be guaranteed to not show up within the seed. | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     Note: Does not affect songs within the "Include Songs" list. | 
					
						
							|  |  |  |     """
 | 
					
						
							| 
									
										
										
										
											2023-06-29 22:36:39 +10:00
										 |  |  |     verify_item_name = True | 
					
						
							|  |  |  |     display_name = "Exclude Songs" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  | md_option_groups = [ | 
					
						
							|  |  |  |     OptionGroup("Song Choice", [ | 
					
						
							|  |  |  |         DLCMusicPacks, | 
					
						
							|  |  |  |         StreamerModeEnabled, | 
					
						
							|  |  |  |         IncludeSongs, | 
					
						
							|  |  |  |         ExcludeSongs, | 
					
						
							|  |  |  |     ]), | 
					
						
							|  |  |  |     OptionGroup("Difficulty", [ | 
					
						
							|  |  |  |         GradeNeeded, | 
					
						
							|  |  |  |         DifficultyMode, | 
					
						
							|  |  |  |         DifficultyModeOverrideMin, | 
					
						
							|  |  |  |         DifficultyModeOverrideMax, | 
					
						
							|  |  |  |         DeathLink, | 
					
						
							|  |  |  |     ]), | 
					
						
							|  |  |  |     OptionGroup("Traps", [ | 
					
						
							|  |  |  |         ChosenTraps, | 
					
						
							|  |  |  |         TrapCountPercentage, | 
					
						
							|  |  |  |     ]), | 
					
						
							|  |  |  | ] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-20 10:13:17 +10:00
										 |  |  | @dataclass | 
					
						
							|  |  |  | class MuseDashOptions(PerGameCommonOptions): | 
					
						
							|  |  |  |     dlc_packs: DLCMusicPacks | 
					
						
							|  |  |  |     streamer_mode_enabled: StreamerModeEnabled | 
					
						
							|  |  |  |     starting_song_count: StartingSongs | 
					
						
							|  |  |  |     additional_song_count: AdditionalSongs | 
					
						
							|  |  |  |     song_difficulty_mode: DifficultyMode | 
					
						
							|  |  |  |     song_difficulty_min: DifficultyModeOverrideMin | 
					
						
							|  |  |  |     song_difficulty_max: DifficultyModeOverrideMax | 
					
						
							|  |  |  |     grade_needed: GradeNeeded | 
					
						
							|  |  |  |     music_sheet_count_percentage: MusicSheetCountPercentage | 
					
						
							|  |  |  |     music_sheet_win_count_percentage: MusicSheetWinCountPercentage | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |     chosen_traps: ChosenTraps | 
					
						
							| 
									
										
										
										
											2023-10-20 10:13:17 +10:00
										 |  |  |     trap_count_percentage: TrapCountPercentage | 
					
						
							|  |  |  |     death_link: DeathLink | 
					
						
							|  |  |  |     include_songs: IncludeSongs | 
					
						
							|  |  |  |     exclude_songs: ExcludeSongs | 
					
						
							| 
									
										
										
										
											2024-06-05 05:45:26 +10:00
										 |  |  |      | 
					
						
							|  |  |  |     # Removed | 
					
						
							|  |  |  |     allow_just_as_planned_dlc_songs: Removed | 
					
						
							|  |  |  |     available_trap_types: Removed |