mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00

* Alpha 1 Muse dash stuff. * Add in an option to limit to only base game songs. * Make all items progression instead of progression_skip_balancing. * Add in extra_goal_song_items to help make runs less about completing every song. * Change ID range to be in a more open area, and add some comments. * Add in Streamer Mode and difficulty range options. Rearrange data files so its easier to get all data at once. * Fix generation issues. * Fix up the maximum and remove old option. * Remove empty items and the option to make filler songs empty. * Support emerald hunt mode. Make difficulties an option rather than 2 sliders. * Fix DLC Song option being inverted. * Fix item counting being broken if there was more than 1 world. * Make compatible with .apworld specification. * Make All item names ASCII compatible. * Add in the additional_item_percentage option. * Add a test to ensure the item names are within the normal ascii range. * Add in death link. * Remove the album from the item name. Not really needed anymore. * Add the 2 budget is burning albums under the free songs heading. Adds a couple more songs without dlc. * Sanitise Album names. * Added the grade needed choice. * Update songs to v3.1.0 * Adjust difficulty ranges. Add Expert and Master. * Fix setup_en.md being out of date. * Add a manual override. * Add testing for diff ranges. Fix bugs introduced there. Limit option to 11 to not generate an impossible seed. * Remove regions from Muse Dash. * Some Oops... * Attempt to make tests happy. * Remove supports weighting false to stop webhost test failing. * Adjusted settings * Adjust music sheets to use percentages. Various cleanups. * Fixes to new code. * Add Ola Dash Album. Add support for overriding song difficulty. Other stylisation changes. * Attempt fix tests. * Ooops missed one. * flake8 suggestions. * Remove FM 17314 SUGAR RADIO as that song is a bit weird. * Update document pages. * Add trap support * Lower additional song count by 10. * Tests broke on my end. Using github to test this. * Looks like I was accidentally adding ~. * Fix the one song that crashes OoT hint generation * Various documentation changes. * Website documents fixup. * Doc updates part 2. * Oops. Doc updates part 3. * Add Muse Dash to the apworld list. * Add trailing comma. * Add a couple plando options. * Set data_version to 1. * Add in some handling incase someone decides a song is both starter and included. * Remove brackets around ifs. * Oops. Accidentally removed a necessary bracket. * Fix filtering crash due to me mixing up c# and python .remove(). * Add Happy Otaku Pack Vol.17. Also increment data version. * Update links to melon loader to be the latest. * Clean up song selection code by shuffling once then popping. * Add UID to the Data text file, so the same file can be used client and server. * Increment Data Version because some names have changed. * Correct some names. * Update data to v3.4.0 (Addition of Muse Radio FM104) * Add support for SFX traps. Adjusted how traps were setup a bit. * Update the docs to include a troubleshooting section. * Small fixes. * Remove unnecessary brackets. * Add .net downloads to docs. * Avoid failing generation if strict difficulty settings are applied with no dlc songs and streamer mode. * Forgot to add the worst starting song count. * Make minimum song count be Starting Songs + 11 instead of Starting Songs * 2 + 1. * Fix up several issues where song count could mismatch the requested amount. * Add a test to ensure world size doesn't grow. * Fix some oversights. * Remove unnecessary brackets. * Fix up passing the tuple out when just the key would suffice. * Adjust typing based on Phar's suggestions. * Apply the rest of Phar's suggestions with minor tweaks to other parts to suit suggestions. * Adjust some more stuff to fit 120 characters. * Some more pep8 stuff and fix tests. * Some pep8 in tests.
180 lines
5.9 KiB
Python
180 lines
5.9 KiB
Python
from typing import Dict
|
|
from Options import Toggle, Option, Range, Choice, DeathLink, ItemSet
|
|
|
|
|
|
class AllowJustAsPlannedDLCSongs(Toggle):
|
|
"""Whether 'Just as Planned DLC' songs, and all the DLCs along with it, will be included in the randomizer."""
|
|
display_name = "Allow Just As Planned DLC Songs"
|
|
|
|
|
|
class StreamerModeEnabled(Toggle):
|
|
"""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."""
|
|
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):
|
|
"""The total number of songs that will be placed in the randomization pool.
|
|
- 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
|
|
range_end = 500 # Note will probably not reach this high if any other settings are done.
|
|
default = 40
|
|
display_name = "Additional Song Count"
|
|
|
|
|
|
class DifficultyMode(Choice):
|
|
"""Ensures that at any chosen song has at least 1 value falling within these values.
|
|
- 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):
|
|
"""Ensures that 1 difficulty has at least 1 this value or higher per song.
|
|
- Difficulty Mode must be set to Manual."""
|
|
display_name = "Manual Difficulty Min"
|
|
range_start = 1
|
|
range_end = 11
|
|
default = 4
|
|
|
|
|
|
# Todo: Investigate options to make this non randomizable
|
|
class DifficultyModeOverrideMax(Range):
|
|
"""Ensures that 1 difficulty has at least 1 this value or lower per song.
|
|
- Difficulty Mode must be set to Manual."""
|
|
display_name = "Manual Difficulty Max"
|
|
range_start = 1
|
|
range_end = 11
|
|
default = 8
|
|
|
|
|
|
class GradeNeeded(Choice):
|
|
"""Completing a song will require a grade of this value or higher in order to unlock items.
|
|
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 AdditionalItemPercentage(Range):
|
|
"""The percentage of songs that will have 2 items instead of 1 when completing them.
|
|
- Starting Songs will always have 2 items.
|
|
- Locations will be filled with duplicate songs if there are not enough items.
|
|
"""
|
|
display_name = "Additional Item %"
|
|
range_start = 50
|
|
default = 80
|
|
range_end = 100
|
|
|
|
|
|
class MusicSheetCountPercentage(Range):
|
|
"""Collecting enough Music Sheets will unlock the goal song needed for completion.
|
|
This option controls how many are in the item pool, based on the total number of songs."""
|
|
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"
|
|
|
|
|
|
class TrapTypes(Choice):
|
|
"""This controls the types of traps that can be added to the pool.
|
|
- 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.
|
|
Traps last the length of a song, or until you die.
|
|
Note: SFX traps are only available with Just As Planned dlc songs.
|
|
"""
|
|
display_name = "Available Trap Types"
|
|
option_None = 0
|
|
option_VFX = 1
|
|
option_SFX = 2
|
|
option_All = 3
|
|
default = 3
|
|
|
|
|
|
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):
|
|
"""Any song listed here will be guaranteed to be included as part of the seed.
|
|
- Difficulty options will be skipped for these songs.
|
|
- If there being too many included songs, songs will be randomly chosen without regard for difficulty.
|
|
- If you want these songs immediately, use start_inventory instead.
|
|
"""
|
|
verify_item_name = True
|
|
display_name = "Include Songs"
|
|
|
|
|
|
class ExcludeSongs(ItemSet):
|
|
"""Any song listed here will be excluded from being a part of the seed."""
|
|
verify_item_name = True
|
|
display_name = "Exclude Songs"
|
|
|
|
|
|
musedash_options: Dict[str, type(Option)] = {
|
|
"allow_just_as_planned_dlc_songs": AllowJustAsPlannedDLCSongs,
|
|
"streamer_mode_enabled": StreamerModeEnabled,
|
|
"starting_song_count": StartingSongs,
|
|
"additional_song_count": AdditionalSongs,
|
|
"additional_item_percentage": AdditionalItemPercentage,
|
|
"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,
|
|
"available_trap_types": TrapTypes,
|
|
"trap_count_percentage": TrapCountPercentage,
|
|
"death_link": DeathLink,
|
|
"include_songs": IncludeSongs,
|
|
"exclude_songs": ExcludeSongs
|
|
}
|