Mods API¶
Model osu! mods as a ruleset-bound set, the classic legacy bitfield, or ruleset-agnostic (intermode) identities.
Core types¶
- class parsecore.Mods.GameMode(*values)[source]¶
Bases:
IntEnumOne of the four osu! rulesets (osu!, taiko, catch, mania).
- Osu = 0¶
- Taiko = 1¶
- Catch = 2¶
- Mania = 3¶
- classmethod from_str(s)[source]¶
Return the
GameModefor a short ruleset name.- Parameters:
s (
str) – The ruleset name (e.g.osuorfruits).- Return type:
- Returns:
The matching ruleset.
- Raises:
ValueError – If the name is not recognised.
- class parsecore.Mods.GameModKind(*values)[source]¶
Bases:
EnumThe category of a mod (difficulty reduction/increase, conversion, automation, …).
- DifficultyReduction = 'DifficultyReduction'¶
- DifficultyIncrease = 'DifficultyIncrease'¶
- Conversion = 'Conversion'¶
- Automation = 'Automation'¶
- Fun = 'Fun'¶
- System = 'System'¶
- class parsecore.Mods.Acronym(s)[source]¶
Bases:
objectA validated mod acronym: two to four uppercase letters or digits.
- Parameters:
s (str)
- classmethod from_str(s)[source]¶
Parse an acronym from a string.
- Parameters:
s (
str) – The acronym text.- Return type:
- Returns:
The parsed acronym.
- Raises:
ValueError – If the text is not a valid acronym.
Single mod¶
- class parsecore.Mods.GameMod(inner)[source]¶
Bases:
objectA single mod with its settings, tied to one ruleset.
Wraps a concrete generated mod (see
generated_mods) and forwards its acronym, kind, legacy bit and incompatibilities.- property inner¶
Return the wrapped concrete mod instance.
- into_simple()[source]¶
Return the settings-only
GameModSimpleform of this mod.
- to_dict()[source]¶
Serialise the mod to a plain dict.
- Return type:
- Returns:
A dict with the acronym and any non-default settings.
- classmethod from_dict(data, mode=None, deny_unknown_fields=False)[source]¶
Deserialise a mod from a dict.
- classmethod from_json(s, mode=None, deny_unknown_fields=False)[source]¶
Deserialise a mod from a JSON string.
- static AccuracyChallengeCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static AccuracyChallengeMania(**kwargs)¶
Construct this mod for the given ruleset.
- static AccuracyChallengeOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static AccuracyChallengeTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static AdaptiveSpeedMania(**kwargs)¶
Construct this mod for the given ruleset.
- static AdaptiveSpeedOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static AdaptiveSpeedTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static AlternateOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static ApproachDifferentOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static AutopilotOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static AutoplayCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static AutoplayMania(**kwargs)¶
Construct this mod for the given ruleset.
- static AutoplayOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static AutoplayTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static BarrelRollOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static BlindsOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static BloomOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static BubblesOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static CinemaCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static CinemaMania(**kwargs)¶
Construct this mod for the given ruleset.
- static CinemaOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static CinemaTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static ClassicCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static ClassicMania(**kwargs)¶
Construct this mod for the given ruleset.
- static ClassicOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static ClassicTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static ConstantSpeedMania(**kwargs)¶
Construct this mod for the given ruleset.
- static ConstantSpeedTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static CoverMania(**kwargs)¶
Construct this mod for the given ruleset.
- static DaycoreCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static DaycoreMania(**kwargs)¶
Construct this mod for the given ruleset.
- static DaycoreOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static DaycoreTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static DeflateOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static DepthOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static DifficultyAdjustCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static DifficultyAdjustMania(**kwargs)¶
Construct this mod for the given ruleset.
- static DifficultyAdjustOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static DifficultyAdjustTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static DoubleTimeCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static DoubleTimeMania(**kwargs)¶
Construct this mod for the given ruleset.
- static DoubleTimeOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static DoubleTimeTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static DualStagesMania(**kwargs)¶
Construct this mod for the given ruleset.
- static EasyCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static EasyMania(**kwargs)¶
Construct this mod for the given ruleset.
- static EasyOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static EasyTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static EightKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static FadeInMania(**kwargs)¶
Construct this mod for the given ruleset.
- static FiveKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static FlashlightCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static FlashlightMania(**kwargs)¶
Construct this mod for the given ruleset.
- static FlashlightOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static FlashlightTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static FloatingFruitsCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static FourKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static FreezeFrameOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static GrowOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static HalfTimeCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static HalfTimeMania(**kwargs)¶
Construct this mod for the given ruleset.
- static HalfTimeOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static HalfTimeTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static HardRockCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static HardRockMania(**kwargs)¶
Construct this mod for the given ruleset.
- static HardRockOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static HardRockTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static HiddenCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static HiddenMania(**kwargs)¶
Construct this mod for the given ruleset.
- static HiddenOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static HiddenTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static HoldOffMania(**kwargs)¶
Construct this mod for the given ruleset.
- static InvertMania(**kwargs)¶
Construct this mod for the given ruleset.
- static MagnetisedOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static MirrorCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static MirrorMania(**kwargs)¶
Construct this mod for the given ruleset.
- static MirrorOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static MovingFastCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static MutedCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static MutedMania(**kwargs)¶
Construct this mod for the given ruleset.
- static MutedOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static MutedTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static NightcoreCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static NightcoreMania(**kwargs)¶
Construct this mod for the given ruleset.
- static NightcoreOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static NightcoreTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static NineKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static NoFailCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static NoFailMania(**kwargs)¶
Construct this mod for the given ruleset.
- static NoFailOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static NoFailTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static NoReleaseMania(**kwargs)¶
Construct this mod for the given ruleset.
- static NoScopeCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static NoScopeOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static OneKeyMania(**kwargs)¶
Construct this mod for the given ruleset.
- static PerfectCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static PerfectMania(**kwargs)¶
Construct this mod for the given ruleset.
- static PerfectOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static PerfectTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static RandomMania(**kwargs)¶
Construct this mod for the given ruleset.
- static RandomOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static RandomTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static RelaxCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static RelaxOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static RelaxTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static RepelOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static ScoreV2Catch(**kwargs)¶
Construct this mod for the given ruleset.
- static ScoreV2Mania(**kwargs)¶
Construct this mod for the given ruleset.
- static ScoreV2Osu(**kwargs)¶
Construct this mod for the given ruleset.
- static ScoreV2Taiko(**kwargs)¶
Construct this mod for the given ruleset.
- static SevenKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static SimplifiedRhythmTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static SingleTapOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static SingleTapTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static SixKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static SpinInOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static SpunOutOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static StrictTrackingOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static SuddenDeathCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static SuddenDeathMania(**kwargs)¶
Construct this mod for the given ruleset.
- static SuddenDeathOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static SuddenDeathTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static SwapTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static SynesthesiaOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static TargetPracticeOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static TenKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static ThreeKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static TouchDeviceOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static TraceableOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static TransformOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static TwoKeysMania(**kwargs)¶
Construct this mod for the given ruleset.
- static UnknownCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static UnknownMania(**kwargs)¶
Construct this mod for the given ruleset.
- static UnknownMod(**kwargs)¶
Construct this mod for the given ruleset.
- static UnknownOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static UnknownTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static WiggleOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static WindDownCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static WindDownMania(**kwargs)¶
Construct this mod for the given ruleset.
- static WindDownOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static WindDownTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- static WindUpCatch(**kwargs)¶
Construct this mod for the given ruleset.
- static WindUpMania(**kwargs)¶
Construct this mod for the given ruleset.
- static WindUpOsu(**kwargs)¶
Construct this mod for the given ruleset.
- static WindUpTaiko(**kwargs)¶
Construct this mod for the given ruleset.
- class parsecore.Mods.GameModIntermode(*values)[source]¶
Bases:
EnumEvery known mod as a ruleset-agnostic identity.
Each member carries the acronym, legacy bit and kind shared by that mod across all rulesets.
- AccuracyChallenge = 'AccuracyChallenge'¶
- AdaptiveSpeed = 'AdaptiveSpeed'¶
- Alternate = 'Alternate'¶
- ApproachDifferent = 'ApproachDifferent'¶
- Autopilot = 'Autopilot'¶
- Autoplay = 'Autoplay'¶
- BarrelRoll = 'BarrelRoll'¶
- Blinds = 'Blinds'¶
- Bloom = 'Bloom'¶
- Bubbles = 'Bubbles'¶
- Cinema = 'Cinema'¶
- Classic = 'Classic'¶
- ConstantSpeed = 'ConstantSpeed'¶
- Cover = 'Cover'¶
- Daycore = 'Daycore'¶
- Deflate = 'Deflate'¶
- Depth = 'Depth'¶
- DifficultyAdjust = 'DifficultyAdjust'¶
- DoubleTime = 'DoubleTime'¶
- DualStages = 'DualStages'¶
- Easy = 'Easy'¶
- EightKeys = 'EightKeys'¶
- FadeIn = 'FadeIn'¶
- FiveKeys = 'FiveKeys'¶
- Flashlight = 'Flashlight'¶
- FloatingFruits = 'FloatingFruits'¶
- FourKeys = 'FourKeys'¶
- FreezeFrame = 'FreezeFrame'¶
- Grow = 'Grow'¶
- HalfTime = 'HalfTime'¶
- HardRock = 'HardRock'¶
- Hidden = 'Hidden'¶
- HoldOff = 'HoldOff'¶
- Invert = 'Invert'¶
- Magnetised = 'Magnetised'¶
- Mirror = 'Mirror'¶
- MovingFast = 'MovingFast'¶
- Muted = 'Muted'¶
- Nightcore = 'Nightcore'¶
- NineKeys = 'NineKeys'¶
- NoFail = 'NoFail'¶
- NoRelease = 'NoRelease'¶
- NoScope = 'NoScope'¶
- OneKey = 'OneKey'¶
- Perfect = 'Perfect'¶
- Random = 'Random'¶
- Relax = 'Relax'¶
- Repel = 'Repel'¶
- ScoreV2 = 'ScoreV2'¶
- SevenKeys = 'SevenKeys'¶
- SimplifiedRhythm = 'SimplifiedRhythm'¶
- SingleTap = 'SingleTap'¶
- SixKeys = 'SixKeys'¶
- SpinIn = 'SpinIn'¶
- SpunOut = 'SpunOut'¶
- StrictTracking = 'StrictTracking'¶
- SuddenDeath = 'SuddenDeath'¶
- Swap = 'Swap'¶
- Synesthesia = 'Synesthesia'¶
- TargetPractice = 'TargetPractice'¶
- TenKeys = 'TenKeys'¶
- ThreeKeys = 'ThreeKeys'¶
- TouchDevice = 'TouchDevice'¶
- Traceable = 'Traceable'¶
- Transform = 'Transform'¶
- TwoKeys = 'TwoKeys'¶
- Wiggle = 'Wiggle'¶
- WindDown = 'WindDown'¶
- WindUp = 'WindUp'¶
- Unknown = 'Unknown'¶
- classmethod from_acronym(acronym)[source]¶
Return the mod for an acronym, or an unknown mod.
- Parameters:
acronym – The acronym to resolve.
- Return type:
GameModIntermode|UnknownGameMod- Returns:
The matching
GameModIntermode, or anUnknownGameMod.
- classmethod try_from_bits(bits)[source]¶
Return the single mod matching a legacy bit, if any.
- Parameters:
bits (
int) – A single legacy mod bit.- Return type:
- Returns:
The matching mod, or
Noneif the bit is unknown.
- as_simple()¶
Return the settings-free
GameModSimpleform of the mod.
- class parsecore.Mods.GameModSimple(acronym, settings=<factory>)[source]¶
Bases:
objectA mod identified only by acronym and free-form settings, without a ruleset.
- Parameters:
acronym (Acronym)
settings (dict[str, SettingSimple])
- settings: dict[str, SettingSimple]¶
Mod collections¶
- class parsecore.Mods.GameMods(mods=())[source]¶
Bases:
objectAn ordered, de-duplicated collection of mods for a single ruleset.
- Parameters:
mods (Iterable[GameMod])
- as_legacy()¶
Return the mods as a
GameModsLegacybitfield.
- clock_rate()¶
Return the effective clock rate of the mods, or
Noneif indeterminate.
- contains_any(mods)¶
- contains_intermode(m)¶
- static from_acronyms(mode=None)¶
Parse a ruleset-bound collection from an acronym string.
- static from_intermode(mode)¶
Resolve intermode mods to a ruleset-bound collection.
- Return type:
- classmethod from_json(s, mode=None, deny_unknown_fields=False)¶
Parse ruleset-bound mods from a JSON string.
- intersection(other)¶
Return the mods present in both collections.
- intersects(other)¶
Return whether the two collections share any mod.
- remove_all(mods)¶
- remove_all_intermode(mods)¶
- remove_intermode(m)¶
- try_as_legacy()¶
Return the legacy bitfield form, or
Noneif not representable.
- class parsecore.Mods.GameModsIntermode(mods=())[source]¶
Bases:
objectAn ordered set of ruleset-agnostic mods (identified by acronym only).
- Parameters:
mods (Iterable[GameModIntermode])
- insert(gamemod)[source]¶
Add a mod, ignoring duplicates by acronym.
- Return type:
- Parameters:
gamemod (GameModIntermode)
- remove(gamemod)[source]¶
Remove a mod; return whether it was present.
- Return type:
- Parameters:
gamemod (GameModIntermode)
- extend(mods)[source]¶
Add every mod from an iterable.
- Return type:
- Parameters:
mods (Iterable[GameModIntermode])
- contains(gamemod)[source]¶
Return whether a specific mod is present.
- Return type:
- Parameters:
gamemod (GameModIntermode | str)
- intersection(other)[source]¶
Return the mods present in both collections.
- Return type:
- Parameters:
other (GameModsIntermode)
- union(other)[source]¶
Return the union with another collection.
- Return type:
- Parameters:
other (GameModsIntermode)
- difference(other)[source]¶
Return the mods in this collection but not the other.
- Return type:
- Parameters:
other (GameModsIntermode)
- classmethod from_bits(bits)[source]¶
Create the collection from a legacy bitfield.
- Parameters:
bits (
int) – The legacy mod bitfield.- Return type:
- Returns:
The parsed collection (NC implies DT, PF implies SD, etc.).
- classmethod from_acronyms(acronyms)[source]¶
Create the collection from an iterable of acronyms.
- classmethod parse(s)[source]¶
Parse the collection from a concatenated acronym string.
- Parameters:
s (
str) – The acronyms (e.g.HDNC).- Return type:
- Returns:
The parsed collection.
- as_legacy()¶
Return the mods as a legacy bitfield.
- Return type:
GameModsLegacy
- classmethod from_acronyms_iter(acronyms)¶
Parse intermode mods from an iterable of acronyms.
- Return type:
- classmethod from_acronyms_str(s)¶
Parse intermode mods from a concatenated acronym string.
- Return type:
- Parameters:
s (str)
- try_as_legacy()¶
Return the legacy bitfield, or
Noneif not representable.
- classmethod try_from_acronyms(s)¶
Parse acronyms leniently, returning
Noneon failure.- Parameters:
s (str)
- try_with_mode(mode)¶
Resolve to a ruleset, or
Noneon failure.
- with_mode(mode)¶
Resolve these intermode mods to the given ruleset.
- class parsecore.Mods.GameModsLegacy(bits=0)[source]¶
Bases:
objectThe classic osu! mod bitfield (NF=1, EZ=2, HD=8, HR=16, DT=64, …).
- Parameters:
bits (int)
- NoMod: GameModsLegacy = GameModsLegacy(0)¶
- NoFail: GameModsLegacy = GameModsLegacy(1)¶
- Easy: GameModsLegacy = GameModsLegacy(2)¶
- TouchDevice: GameModsLegacy = GameModsLegacy(4)¶
- Hidden: GameModsLegacy = GameModsLegacy(8)¶
- HardRock: GameModsLegacy = GameModsLegacy(16)¶
- SuddenDeath: GameModsLegacy = GameModsLegacy(32)¶
- DoubleTime: GameModsLegacy = GameModsLegacy(64)¶
- Relax: GameModsLegacy = GameModsLegacy(128)¶
- HalfTime: GameModsLegacy = GameModsLegacy(256)¶
- Nightcore: GameModsLegacy = GameModsLegacy(576)¶
- Flashlight: GameModsLegacy = GameModsLegacy(1024)¶
- Autoplay: GameModsLegacy = GameModsLegacy(2048)¶
- SpunOut: GameModsLegacy = GameModsLegacy(4096)¶
- Autopilot: GameModsLegacy = GameModsLegacy(8192)¶
- Perfect: GameModsLegacy = GameModsLegacy(16416)¶
- Key4: GameModsLegacy = GameModsLegacy(32768)¶
- Key5: GameModsLegacy = GameModsLegacy(65536)¶
- Key6: GameModsLegacy = GameModsLegacy(131072)¶
- Key7: GameModsLegacy = GameModsLegacy(262144)¶
- Key8: GameModsLegacy = GameModsLegacy(524288)¶
- FadeIn: GameModsLegacy = GameModsLegacy(1048576)¶
- Random: GameModsLegacy = GameModsLegacy(2097152)¶
- Cinema: GameModsLegacy = GameModsLegacy(4194304)¶
- Target: GameModsLegacy = GameModsLegacy(8388608)¶
- Key9: GameModsLegacy = GameModsLegacy(16777216)¶
- KeyCoop: GameModsLegacy = GameModsLegacy(33554432)¶
- Key1: GameModsLegacy = GameModsLegacy(67108864)¶
- Key3: GameModsLegacy = GameModsLegacy(134217728)¶
- Key2: GameModsLegacy = GameModsLegacy(268435456)¶
- ScoreV2: GameModsLegacy = GameModsLegacy(536870912)¶
- Mirror: GameModsLegacy = GameModsLegacy(1073741824)¶
- classmethod from_bits(bits)[source]¶
Create the bitfield from an integer value.
- Return type:
- Parameters:
bits (int)
- classmethod parse(s)[source]¶
Parse the bitfield from a concatenated acronym string (lenient).
- Return type:
- Parameters:
s (str)
- classmethod parse_strict(s)[source]¶
Parse the bitfield from acronyms, rejecting unknown ones.
- Raises:
ValueError – If an acronym is not a valid legacy mod.
- Return type:
- Parameters:
s (str)
- contains(other)[source]¶
Return whether all of
other’s bits are set.- Return type:
- Parameters:
other (GameModsLegacy)
- intersects(other)[source]¶
Return whether any of
other’s bits are set.- Return type:
- Parameters:
other (GameModsLegacy)
- difference(other)¶
Return this bitfield with the other’s bits cleared.
- Return type:
GameModsLegacy
- Parameters:
other (GameModsLegacy)
- intersection(other)¶
Return the bitwise intersection.
- Return type:
GameModsLegacy
- Parameters:
other (GameModsLegacy)
- remove(other)¶
Clear the given bits in place.
- Return type:
None
- Parameters:
other (GameModsLegacy)
- symmetric_difference(other)¶
Return the bitwise symmetric difference.
- Return type:
GameModsLegacy
- Parameters:
other (GameModsLegacy)
- to_intermode()¶
Return the intermode form of the legacy bitfield.
- static try_from_bits_strict(bits)¶
Parse bits, returning
Noneif any bit is unknown.- Parameters:
bits (int)
- union(other)¶
Return the bitwise union.
- Return type:
GameModsLegacy
- Parameters:
other (GameModsLegacy)
All concrete mods¶
Every mod has a concrete, ruleset-specific class. They share the interface of
_ModBase (acronym, description, kind, legacy bit).
|
The EZ mod for osu! (difficulty reduction). |
|
The NF mod for osu! (difficulty reduction). |
|
The HT mod for osu! (difficulty reduction). |
|
The HR mod for osu! (difficulty increase). |
|
The SD mod for osu! (difficulty increase). |
|
The PF mod for osu! (difficulty increase). |
|
The DT mod for osu! (difficulty increase). |
|
The NC mod for osu! (difficulty increase). |
|
The HD mod for osu! (difficulty increase). |
|
The FL mod for osu! (difficulty increase). |
|
The RX mod for osu! (automation). |
|
The AP mod for osu! (automation). |
|
The SO mod for osu! (automation). |
|
The CL mod for osu! (conversion). |
Tip
The catch, taiko and mania variants follow the same naming pattern, e.g.
DoubleTimeCatch, HardRockMania, HiddenTaiko.