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

View File

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

View File

@ -6,6 +6,7 @@ using MAI2.Util;
using Main;
using Manager;
using MelonLoader;
using Monitor;
using Process;
using UnityEngine;
@ -84,5 +85,33 @@ namespace AquaMai.UX
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);
}
}
}
}
}