[+] Support official quick retry (3456) in UX/QuickSkip

Merge pull request #60

* Official quick retry
pull/58/head^2
Menci 2024-10-13 21:45:14 +08:00 committed by GitHub
parent 81e0232712
commit cdfb86e021
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 233 additions and 202 deletions

View File

@ -1,202 +1,203 @@
# =================================== # ===================================
# Cheat: You control the buttons you press # Cheat: You control the buttons you press
[Cheat] [Cheat]
# Unlock normally event-only tickets # Unlock normally event-only tickets
TicketUnlock=true TicketUnlock=true
# Unlock maps that are not in this version # Unlock maps that are not in this version
MapUnlock=true MapUnlock=true
# Unlock Utage without the need of DXRating 10000 # Unlock Utage without the need of DXRating 10000
UnlockUtage=true UnlockUtage=true
# =================================== # ===================================
# UX: User Experience Improvements # UX: User Experience Improvements
[UX] [UX]
# Single player: Show 1P only, at the center of the screen # Single player: Show 1P only, at the center of the screen
SinglePlayer=true SinglePlayer=true
# Remove the circle mask in the game # Remove the circle mask in the game
HideMask=true HideMask=true
# Set the version string displayed at the top-right corner of the screen # Set the version string displayed at the top-right corner of the screen
CustomVersionString="" CustomVersionString=""
# Deprecated: Use `LoadAssetsPng` instead # Deprecated: Use `LoadAssetsPng` instead
# LoadJacketPng=true # LoadJacketPng=true
# Load Jacket image from folder "LocalAssets" and filename "{MusicID}.png" for self-made charts # Load Jacket image from folder "LocalAssets" and filename "{MusicID}.png" for self-made charts
LoadAssetsPng=true LoadAssetsPng=true
# Use the png jacket above as BGA if BGA is not found for self-made charts # Use the png jacket above as BGA if BGA is not found for self-made charts
# Use together with `LoadJacketPng` # Use together with `LoadJacketPng`
LoadLocalBga=true LoadLocalBga=true
# Press key "7" for 1 second to skip to next step or restart current song # Press key "7" for 1 second to skip to next step or restart current song
QuickSkip=true # Hold the bottom four buttons (3456) for official quick retry (non-utage only)
# Add ".ab" image resources without the need of rebuilding a manifest QuickSkip=true
LoadAssetBundleWithoutManifest=true # Add ".ab" image resources without the need of rebuilding a manifest
# Random BGM, put Mai2Cue.{acb,awb} of old version of the game in `LocalAssets\Mai2Cue` and rename them LoadAssetBundleWithoutManifest=true
# Do not enable when SinglePlayer is off # Random BGM, put Mai2Cue.{acb,awb} of old version of the game in `LocalAssets\Mai2Cue` and rename them
RandomBgm=false # Do not enable when SinglePlayer is off
# Play "Master" difficulty on Demo screen RandomBgm=false
DemoMaster=true # Play "Master" difficulty on Demo screen
# Execute some command on game idle or on game start DemoMaster=true
ExecOnIdle="" # Execute some command on game idle or on game start
ExecOnEntry="" ExecOnIdle=""
# Disable timers ExecOnEntry=""
# Not recommand to enable when SinglePlayer is off # Disable timers
ExtendTimer=true # Not recommand to enable when SinglePlayer is off
# Save immediate after playing a song ExtendTimer=true
ImmediateSave=true # Save immediate after playing a song
# Prevent accidental touch of the Test button ImmediateSave=true
TestProof=false # Prevent accidental touch of the Test button
# Custom shop name in photo TestProof=false
# Also enable shop name display in SDGA # Custom shop name in photo
CustomPlaceName="" # Also enable shop name display in SDGA
# In the song selection screen, press the Service button or the "7" key (the round button in the middle of the arrow keys in the default ADX firmware) to toggle the display of self-made charts. CustomPlaceName=""
# A directory is considered to contain self-made charts if it does not have DataConfig.xml or OfficialChartsMark.txt in the Axxx directory. # In the song selection screen, press the Service button or the "7" key (the round button in the middle of the arrow keys in the default ADX firmware) to toggle the display of self-made charts.
HideSelfMadeCharts=true # A directory is considered to contain self-made charts if it does not have DataConfig.xml or OfficialChartsMark.txt in the Axxx directory.
# Place font.ttf in the LocalAssets directory to replace the game's global font HideSelfMadeCharts=true
# Cannot be used together with FontFix # Place font.ttf in the LocalAssets directory to replace the game's global font
CustomFont=false # Cannot be used together with FontFix
# Provide the ability to use custom note skins (advanced feature) CustomFont=false
CustomNoteSkin=false # Provide the ability to use custom note skins (advanced feature)
# Delayed the animation of the song start screen CustomNoteSkin=false
# Hide "TRACK X" text and DX/Standard chart display box # Delayed the animation of the song start screen
# For recording chart confirmation # Hide "TRACK X" text and DX/Standard chart display box
TrackStartProcessTweak=false # For recording chart confirmation
# Cannot be used together with HanabiFix TrackStartProcessTweak=false
HideHanabi=false # Cannot be used together with HanabiFix
HideHanabi=false
[Fix]
# Allow login with higher data version [Fix]
SkipVersionCheck=true # Allow login with higher data version
RemoveEncryption=true SkipVersionCheck=true
ForceAsServer=true RemoveEncryption=true
# Force the game to be in FreePlay mode ForceAsServer=true
ForceFreePlay=true # Force the game to be in FreePlay mode
# Force the game to be in PaidPlay mode with 24 coins locked, conflicts with ForceFreePlay ForceFreePlay=true
ForcePaidPlay=false # Force the game to be in PaidPlay mode with 24 coins locked, conflicts with ForceFreePlay
# Add notes sprite to the pool to prevent use up ForcePaidPlay=false
ExtendNotesPool=128 # Add notes sprite to the pool to prevent use up
# Force the frame rate limit to 60 FPS and disable vSync. Do not use if your game has no issues ExtendNotesPool=128
FrameRateLock=false # Force the frame rate limit to 60 FPS and disable vSync. Do not use if your game has no issues
# Use Microsoft YaHei Bold to display characters not in the font library FrameRateLock=false
# Cannot be used together with CustomFont # Use Microsoft YaHei Bold to display characters not in the font library
FontFix=true # Cannot be used together with CustomFont
# Make the Critical judgment of BreakSlide flash like BreakTap FontFix=true
# Align the judgment display of arc-shaped Slide with the judgment line accurately (it was slightly off before) # Make the Critical judgment of BreakSlide flash like BreakTap
SlideJudgeTweak=true # Align the judgment display of arc-shaped Slide with the judgment line accurately (it was slightly off before)
# Cannot be used together with HideHanabi SlideJudgeTweak=true
HanabiFix=false # Cannot be used together with HideHanabi
HanabiFix=false
[Utils]
# Log user ID on login [Utils]
LogUserId=false # Log user ID on login
# Globally increase A judgment, unit is the same as in the game LogUserId=false
JudgeAdjustA=0.0 # Globally increase A judgment, unit is the same as in the game
# Globally increase B judgment, unit is the same as in the game JudgeAdjustA=0.0
JudgeAdjustB=0.0 # Globally increase B judgment, unit is the same as in the game
# Touch screen delay, unit is milliseconds, one second = 1000 milliseconds. Must be an integer JudgeAdjustB=0.0
TouchDelay=0 # Touch screen delay, unit is milliseconds, one second = 1000 milliseconds. Must be an integer
# Show detail of selected song in music selection screen TouchDelay=0
SelectionDetail=true # Show detail of selected song in music selection screen
# Display framerate SelectionDetail=true
FrameRateDisplay=false # Display framerate
# Practice mode, activated by pressing Test in the game FrameRateDisplay=false
# Must be used together with TestProof # Practice mode, activated by pressing Test in the game
PractiseMode=true # Must be used together with TestProof
PractiseMode=true
# ===================================
# Save some potentially unnecessary time # ===================================
[TimeSaving] # Save some potentially unnecessary time
# Skip the warning screen and logo shown after the POST sequence [TimeSaving]
SkipWarningScreen=true # Skip the warning screen and logo shown after the POST sequence
# Disable some useless delays to speed up the game boot process SkipWarningScreen=true
ImproveLoadSpeed=true # Disable some useless delays to speed up the game boot process
# Directly enter the song selection screen after login ImproveLoadSpeed=true
SkipToMusicSelection=false # Directly enter the song selection screen after login
# Skip possible prompts like "New area discovered", "New songs added", "There are events" during game login/registration SkipToMusicSelection=false
SkipEventInfo=true # Skip possible prompts like "New area discovered", "New songs added", "There are events" during game login/registration
# Skip the "Do not tap or slide vigorously" screen, immediately proceed to the next screen once data is loaded SkipEventInfo=true
IWontTapOrSlideVigorously=true # Skip the "Do not tap or slide vigorously" screen, immediately proceed to the next screen once data is loaded
# Skip the "Goodbye" screen at the end of the game IWontTapOrSlideVigorously=true
SkipGameOverScreen=true # Skip the "Goodbye" screen at the end of the game
# Skip TrackStart screen SkipGameOverScreen=true
SkipTrackStart=true # Skip TrackStart screen
# Show reason when net icon is gray SkipTrackStart=true
ShowNetErrorDetail=true # Show reason when net icon is gray
ShowNetErrorDetail=true
[WindowState]
# If not enabled, no operations will be performed on the game window [WindowState]
Enable=false # If not enabled, no operations will be performed on the game window
# Window the game Enable=false
Windowed=false # Window the game
# Width and height for windowed mode, rendering resolution for fullscreen mode Windowed=false
# If set to 0, windowed mode will remember the user-set size, fullscreen mode will use the current display resolution # Width and height for windowed mode, rendering resolution for fullscreen mode
Width=0 # If set to 0, windowed mode will remember the user-set size, fullscreen mode will use the current display resolution
Height=0 Width=0
Height=0
[TouchSensitivity]
# Enable custom sensitivity [TouchSensitivity]
# When enabled, the settings in Test mode will not take effect # Enable custom sensitivity
# When disabled, the settings in Test mode can still be used # When enabled, the settings in Test mode will not take effect
Enable=false # When disabled, the settings in Test mode can still be used
# Sensitivity adjustments in Test mode are not linear Enable=false
# Default sensitivity in area A: 90, 80, 70, 60, 50, 40, 30, 26, 23, 20, 10 # Sensitivity adjustments in Test mode are not linear
# Default sensitivity in other areas: 70, 60, 50, 40, 30, 20, 15, 10, 5, 1, 1 # Default sensitivity in area A: 90, 80, 70, 60, 50, 40, 30, 26, 23, 20, 10
# A setting of 0 in Test mode corresponds to 40, 20 here, -5 corresponds to 90, 70, +5 corresponds to 10, 1 # Default sensitivity in other areas: 70, 60, 50, 40, 30, 20, 15, 10, 5, 1, 1
# The higher the number in Test mode, the lower the number here, resulting in higher sensitivity for official machines # A setting of 0 in Test mode corresponds to 40, 20 here, -5 corresponds to 90, 70, +5 corresponds to 10, 1
# For ADX, the sensitivity is reversed, so the higher the number here, the higher the sensitivity # The higher the number in Test mode, the lower the number here, resulting in higher sensitivity for official machines
A1=40 # For ADX, the sensitivity is reversed, so the higher the number here, the higher the sensitivity
A2=40 A1=40
A3=40 A2=40
A4=40 A3=40
A5=40 A4=40
A6=40 A5=40
A7=40 A6=40
A8=40 A7=40
B1=20 A8=40
B2=20 B1=20
B3=20 B2=20
B4=20 B3=20
B5=20 B4=20
B6=20 B5=20
B7=20 B6=20
B8=20 B7=20
C1=20 B8=20
C2=20 C1=20
D1=20 C2=20
D2=20 D1=20
D3=20 D2=20
D4=20 D3=20
D5=20 D4=20
D6=20 D5=20
D7=20 D6=20
D8=20 D7=20
E1=20 D8=20
E2=20 E1=20
E3=20 E2=20
E4=20 E3=20
E5=20 E4=20
E6=20 E5=20
E7=20 E6=20
E8=20 E7=20
E8=20
[CustomKeyMap]
Enable = false [CustomKeyMap]
# These settings will work regardless of whether you have enabled segatools' io4 emulation Enable = false
Test = "ScrollLock" # These settings will work regardless of whether you have enabled segatools' io4 emulation
Service = "Pause" Test = "ScrollLock"
Button1_1P = "W" Service = "Pause"
Button2_1P = "E" Button1_1P = "W"
Button3_1P = "D" Button2_1P = "E"
Button4_1P = "C" Button3_1P = "D"
Button5_1P = "X" Button4_1P = "C"
Button6_1P = "Z" Button5_1P = "X"
Button7_1P = "A" Button6_1P = "Z"
Button8_1P = "Q" Button7_1P = "A"
Select_1P = "Alpha3" Button8_1P = "Q"
Button1_2P = "Keypad8" Select_1P = "Alpha3"
Button2_2P = "Keypad9" Button1_2P = "Keypad8"
Button3_2P = "Keypad6" Button2_2P = "Keypad9"
Button4_2P = "Keypad3" Button3_2P = "Keypad6"
Button5_2P = "Keypad2" Button4_2P = "Keypad3"
Button6_2P = "Keypad1" Button5_2P = "Keypad2"
Button7_2P = "Keypad4" Button6_2P = "Keypad1"
Button8_2P = "Keypad7" Button7_2P = "Keypad4"
Select_2P = "KeypadMultiply" Button8_2P = "Keypad7"
Select_2P = "KeypadMultiply"

View File

@ -33,6 +33,7 @@ LoadLocalBga=true
# - 在选歌界面直接结束游戏 # - 在选歌界面直接结束游戏
# 在游玩界面,按一下 “7” 或者 Service 键重开当前的歌,按 1P 的“选择”键立即结束当前乐曲 # 在游玩界面,按一下 “7” 或者 Service 键重开当前的歌,按 1P 的“选择”键立即结束当前乐曲
# 打完最后一个音符之后也可以 # 打完最后一个音符之后也可以
# 按住下方四个按钮3456使用官方快速重开仅对非宴谱有效
QuickSkip=true QuickSkip=true
# 优化图片资源的加载,就算没有 AssetBundleImages.manifest 也可以正常加载 ab 格式的图片资源 # 优化图片资源的加载,就算没有 AssetBundleImages.manifest 也可以正常加载 ab 格式的图片资源
# 导入了删除曲包之类的话,应该需要开启这个 # 导入了删除曲包之类的话,应该需要开启这个

View File

@ -6,6 +6,7 @@ using MAI2.Util;
using Main; using Main;
using Manager; using Manager;
using MelonLoader; using MelonLoader;
using Monitor;
using Process; using Process;
using UnityEngine; using UnityEngine;
@ -84,5 +85,33 @@ namespace AquaMai.UX
Singleton<GamePlayManager>.Instance.SetQuickRetryFrag(flag: true); Singleton<GamePlayManager>.Instance.SetQuickRetryFrag(flag: true);
} }
} }
[HarmonyPrefix]
[HarmonyPatch(typeof(QuickRetry), "IsQuickRetryEnable")]
public static bool OnQuickRetryIsQuickRetryEnable(ref bool __result)
{
var isUtageProperty = Traverse.Create(typeof(GameManager)).Property("IsUtage");
__result = !isUtageProperty.PropertyExists() || !isUtageProperty.GetValue<bool>();
return false;
}
// Fix for the game not resetting Fast and Late counts when quick retrying
// For game version < 1.35.0
[HarmonyPostfix]
[HarmonyPatch(typeof(GamePlayManager), "SetQuickRetryFrag")]
public static void PostGamePlayManagerSetQuickRetryFrag(GamePlayManager __instance, bool flag)
{
// Since 1.35.0, `GameScoreList.Initialize()` resets the Fast and Late counts
if (flag && !Traverse.Create(typeof(GameScoreList)).Methods().Contains("Initialize"))
{
for (int i = 0; i < 4; i++)
{
var gameScoreList = __instance.GetGameScore(i);
var traverse = Traverse.Create(gameScoreList);
traverse.Property("Fast").SetValue((uint)0);
traverse.Property("Late").SetValue((uint)0);
}
}
}
} }
} }