(semi-tested) ManMan JA translation, config inis replacing templates, downgrade DivaSound and upgrade DivaMovie, fixes

This commit is contained in:
nastys
2021-11-10 22:44:23 +01:00
parent ab1b2f88c7
commit 332a5324ae
58 changed files with 40875 additions and 67165 deletions
@@ -118,13 +118,11 @@
<ClInclude Include="Patches\patches.h" />
<ClInclude Include="Render\render-framework.h" />
<ClInclude Include="Render\render.h" />
<ClInclude Include="templates.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="Patches\patches.cpp" />
<ClCompile Include="Render\render.cpp" />
<ClCompile Include="templates.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="x64.def" />
@@ -24,9 +24,6 @@
<ClInclude Include="exception.hpp">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="templates.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Patches\PatchApplier.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -59,9 +56,6 @@
<ClCompile Include="Patches\patches.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="templates.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="x64.def">
@@ -179,15 +179,6 @@ class PatchApplier710 : public PatchApplier {
InjectCode((void*)0x00000001403BABEA, { 0x75 });
printf("[Patches] Show FREE PLAY instead of CREDIT(S)\n");
if (nPDLoaderText && !nHideFreeplay)
{
InjectCode((void*)0x00000001409F61F0, { 0x50, 0x44, 0x20 });
InjectCode((void*)0x00000001409F61F3, { 0x4C, 0x6F, 0x61 });
InjectCode((void*)0x00000001409F61F6, { 0x64, 0x65, 0x72 });
InjectCode((void*)0x00000001409F61F9, { 0x20, 0x00 });
printf("[Patches] Show PD Loader text\n");
}
}
@@ -300,36 +300,4 @@ void ApplyExPatches() {
InjectCode((void*)0x0000000140578E9D, { 0xC7, 0x47, 0x68, 0x28, 0x00, 0x00, 0x00 }); // skip back button error
}
}
// modpack redirection
{
wchar_t* mpstr = NULL;
mpstr = (wchar_t*)malloc(256);
memset(mpstr, 0, 256);
GetPrivateProfileStringW(L"Mods", L"Modpack", L"", mpstr, 256, CONFIG_FILE_NAME);
std::string modpack_name(std::filesystem::path(mpstr).string());
free(mpstr);
std::cout << "[Patches] Modpack name: " << modpack_name << std::endl;
if (modpack_name != "")
{
// ram
std::string modpack_path = "modpacks\\" + modpack_name;
std::cout << "[Patches] New ram path: " << modpack_path << std::endl;
char* mpstr_path = (char*)malloc(modpack_path.size());
memcpy(mpstr_path, modpack_path.c_str(), modpack_path.size());
InjectLong((void*)0x0000000014096C120, (long)mpstr_path);
// mdata
std::string modpack_mdata = "modpacks\\" + modpack_name + "\\mdata";
std::cout << "[Patches] New mdata path: " << modpack_mdata << std::endl;
char* mpstr_mdata = (char*)malloc(modpack_mdata.size());
memcpy(mpstr_mdata, modpack_mdata.c_str(), modpack_mdata.size());
InjectCode((void*)0x000000014066CEA0, { 0x48, 0xC7, 0xC2 });
InjectInt((void*)0x000000014066CEA3, (int)mpstr_mdata);
InjectCode((void*)0x000000014066CE9C, { (unsigned char)modpack_mdata.size() });
InjectCode((void*)0x000000014066CEAE, { (unsigned char)modpack_mdata.size() });
}
}
}
@@ -67,7 +67,7 @@ void InjectLong(void* address, const long data)
VirtualProtect(address, byteCount, oldProtect, nullptr);
}
const LPCWSTR CONFIG_FILE = L"plugins\\config.ini";
const LPCWSTR CONFIG_FILE = L"plugins_config\\config.ini";
const LPCWSTR CONFIG_FILE_NAME = L".\\config.ini";
@@ -238,6 +238,17 @@ void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING)
fileStream.close();
}
void ApplyVerText()
{
if (nFreeplay && !nHideFreeplay && nPDLoaderText)
{
InjectCode((void*)0x00000001409F61F0, { 0x50, 0x44, 0x20 });
InjectCode((void*)0x00000001409F61F3, { 0x4C, 0x6F, 0x61 });
InjectCode((void*)0x00000001409F61F6, { 0x64, 0x65, 0x72 });
InjectCode((void*)0x00000001409F61F9, { 0x20, 0x00 });
printf("[Patches] Show PD Loader text\n");
}
}
/*using namespace PluginConfig;
@@ -3,3 +3,4 @@ void InjectCode(void* address, const std::vector<uint8_t> data);
void ApplyPatches();
void ApplyAllCustomPatches();
void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING);
void ApplyVerText();
@@ -29,7 +29,7 @@ wstring DirPath() {
return wstring(buffer).substr(0, pos);
}
wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins\\config.ini";
wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins_config\\config.ini";
LPCWSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();
int nDisplay = GetPrivateProfileIntW(L"resolution", L"display", 0, CONFIG_FILE);
+63 -43
View File
@@ -2,7 +2,6 @@
#include "exception.hpp"
#include "Patches\patches.h"
#include "Render\render.h"
#include "templates.h"
#include <VersionHelpers.h>
#include <Shlwapi.h>
#pragma comment(lib, "Shlwapi.lib")
@@ -17,6 +16,7 @@ HMODULE hm;
std::vector<std::wstring> iniPaths;
unsigned short game_version = 710;
bool allowcustomfreeplay = false;
bool iequals(std::wstring_view s1, std::wstring_view s2)
{
@@ -274,7 +274,15 @@ void LoadPlugins()
}
}
ApplyPatches();
if (allowcustomfreeplay) ApplyVerText();
if (SetCurrentDirectoryW(szSelfPath.c_str())) ApplyAllCustomPatches();
if (!allowcustomfreeplay)
{
// we want to prevent both patches and plugins from changing it, not just patches
InjectCode((void*)0x1409F61F0, { 0x46, 0x52, 0x45, 0x45, 0x20, 0x50, 0x4C, 0x41, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x28, 0x53, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 });
ApplyVerText();
}
ApplyRender(hm);
}
@@ -754,72 +762,84 @@ void Init()
modulePath.resize(modulePath.find_last_of(L"/\\") + 1);
iniPaths.emplace_back(modulePath + moduleName + L".ini");
const auto CONFIG_FILE = L"plugins\\config.ini";
const auto CONFIG_FILE = L"plugins_config\\config.ini";
iniPaths.emplace_back(modulePath + CONFIG_FILE);
// move old configuration files
// should probably be handled by the yet-to-be unified config manager
MoveFileW(L"plugins\\config.ini", CONFIG_FILE);
MoveFileW(L"plugins\\components.ini", L"plugins_config\\components.ini");
MoveFileW(L"plugins\\keyconfig.ini", L"plugins_config\\keyconfig.ini");
MoveFileW(L"plugins\\playerdata.ini", L"plugins_config\\playerdata.ini");
MoveFileW(L"plugins\\CustoMixer.ini", L"plugins_config\\CustoMixer.ini");
MoveFileW(L"plugins\\DivaWig.ini", L"plugins_config\\DivaWig.ini");
MoveFileW(L"plugins\\DSCRemote.ini", L"plugins_config\\DSCRemote.ini");
MoveFileW(L"plugins\\DivaMovie.ini", L"plugins_config\\DivaMovie.ini");
MoveFileW(L"plugins\\EnhancedStageManager.ini", L"plugins_config\\EnhancedStageManager.ini");
MoveFileW(L"plugins\\DivaSound.ini", L"plugins_config\\DivaSound.ini");
MoveFileW(L"plugins\\Novidia.ini", L"plugins_config\\Novidia.ini");
MoveFileW(L"plugins\\ShaderPatchConfig.ini", L"plugins_config\\ShaderPatchConfig.ini");
MoveFileW(L"plugins\\pv_equip\\", L"plugins_config\\pv_equip\\");
// initialize configuration files.
DeleteFileW(L"plugins\\config_template.bin");
DeleteFileW(L"plugins\\components_template.bin");
DeleteFileW(L"plugins\\DivaSound_template.bin");
DeleteFileW(L"plugins\\keyconfig_template.bin");
DeleteFileW(L"plugins\\playerdata_template.bin");
DeleteFileW(L"plugins\\ShaderPatchConfig_template.bin");
// initialize configuration files
WCHAR config_pcname[MAX_COMPUTERNAME_LENGTH + 1];
GetPrivateProfileStringW(L"global", L"pc", L"", config_pcname, MAX_COMPUTERNAME_LENGTH + 1, CONFIG_FILE);
WCHAR this_pcname[MAX_COMPUTERNAME_LENGTH + 1];
DWORD count = MAX_COMPUTERNAME_LENGTH + 1;
if(GetComputerNameW(this_pcname, &count) && PathFileExistsW(CONFIG_FILE) && wcscmp(config_pcname, this_pcname)!=0)
{
auto cfgsel = MessageBoxW(nullptr, L"Incompatible configuration found. This can happen if you are upgrading.\n\nIf you are not upgrading, then this version of PD Loader was likely hacked or used on another computer.\nIt is recommended to download the latest version from the official repository and do a clean installation (delete plugins/, patches/, dnsapi.dll and/or dinput8.dll, and restore glut32.dll).\n\nRestore the default settings?", L"PD Loader", MB_YESNOCANCEL | MB_ICONWARNING);
if (cfgsel == IDYES) if(!DeleteFileW(CONFIG_FILE))
{
MessageBoxW(nullptr, L"Cannot delete config.ini.\n\nThe file might be read-only or in use (is the game still running?).", L"PD Loader", MB_OK | MB_ICONERROR);
exit(1);
}
else if(cfgsel != IDNO) exit(1);
}
if (!PathFileExistsW(CONFIG_FILE))
{
writeTemplate(config_template, CONFIG_FILE);
WritePrivateProfileStringW(L"global", L"pc", this_pcname, CONFIG_FILE);
WritePrivateProfileStringW(L"plugins", L"Launcher.dva", L"1", CONFIG_FILE);
WritePrivateProfileStringW(L"plugins", L"TLAC.dva", L"1", CONFIG_FILE);
WritePrivateProfileStringW(L"plugins", L"DivaSound.dva", L"1", CONFIG_FILE);
WritePrivateProfileStringW(L"plugins", L"Novidia.dva", L"1", CONFIG_FILE);
WritePrivateProfileStringW(L"plugins", L"ShaderPatch.dva", L"1", CONFIG_FILE);
if (!(
CreateDirectoryW(L"plugins_config", NULL) &&
WritePrivateProfileStringW(L"global", L"pc", this_pcname, CONFIG_FILE) &&
WritePrivateProfileStringW(L"patches", L"allow_custom_freeplay", L"0", CONFIG_FILE) &&
WritePrivateProfileStringW(L"plugins", L"Launcher.dva", L"1", CONFIG_FILE) &&
WritePrivateProfileStringW(L"plugins", L"TLAC.dva", L"1", CONFIG_FILE) &&
WritePrivateProfileStringW(L"plugins", L"DivaSound.dva", L"1", CONFIG_FILE) &&
WritePrivateProfileStringW(L"plugins", L"Novidia.dva", L"1", CONFIG_FILE) &&
WritePrivateProfileStringW(L"plugins", L"ShaderPatch.dva", L"1", CONFIG_FILE)
))
{
MessageBoxW(0, L"Could not install configuration files. Is the game in a read-only folder?", L"PD Loader", MB_ICONERROR);
exit(1);
}
}
const auto COMPONENTS = L"plugins\\components.ini";
if (!PathFileExistsW(COMPONENTS)) writeTemplate(components_template, COMPONENTS);
const auto KEYCONFIG = L"plugins\\keyconfig.ini";
if (!PathFileExistsW(KEYCONFIG)) writeTemplate(keyconfig_template, KEYCONFIG);
const auto PLAYERDATA = L"plugins\\playerdata.ini";
if (!PathFileExistsW(PLAYERDATA)) writeTemplate(playerdata_template, PLAYERDATA);
const auto DIVASOUND = L"plugins\\DivaSound.ini";
if (!PathFileExistsW(DIVASOUND)) writeTemplate(divasound_template, DIVASOUND);
const auto SHADERPATCHCONFIG = L"plugins\\ShaderPatchConfig.ini";
if (!PathFileExistsW(SHADERPATCHCONFIG)) writeTemplate(shaderpatchconfig_template, SHADERPATCHCONFIG);
else if(GetComputerNameW(this_pcname, &count) && wcscmp(config_pcname, this_pcname)!=0)
{
if (!(
WritePrivateProfileStringW(L"global", L"pc", this_pcname, CONFIG_FILE) &&
WritePrivateProfileStringW(L"patches", L"allow_custom_freeplay", L"0", CONFIG_FILE)
))
{
MessageBoxW(0, L"Could not update configuration files. Is the game in a read-only folder?", L"PD Loader", MB_ICONERROR);
exit(1);
}
}
else allowcustomfreeplay = GetPrivateProfileIntW(L"patches", L"allow_custom_freeplay", FALSE, CONFIG_FILE) == 1;
if (!PathFileExistsW(CONFIG_FILE) ||
!PathFileExistsW(COMPONENTS) ||
!PathFileExistsW(KEYCONFIG) ||
!PathFileExistsW(PLAYERDATA) ||
!PathFileExistsW(DIVASOUND) ||
!PathFileExistsW(SHADERPATCHCONFIG))
MessageBoxW(0, L"Could not install configuration files. Is the game in a read-only folder?", L"PD Loader", MB_ICONWARNING);
CreateDirectoryW(L"plugins\\pv_equip", NULL);
const auto eq_modules = L"plugins\\pv_equip\\modules.ini";
CreateDirectoryW(L"plugins_config\\pv_equip", NULL);
const auto eq_modules = L"plugins_config\\pv_equip\\modules.ini";
if (!PathFileExistsW(eq_modules))
{
std::ofstream stream(eq_modules);
stream << "[modules]\n# Manual editing is NOT recommended as the game will save here during gameplay";
stream.close();
}
const auto eq_sfx = L"plugins\\pv_equip\\sfx.ini";
const auto eq_sfx = L"plugins_config\\pv_equip\\sfx.ini";
if (!PathFileExistsW(eq_sfx))
{
std::ofstream stream(eq_sfx);
stream << "[SFX]\n# INI Format = ' pv.xxx.btn = sfx id (ex. 5) '\n# pv.001.btn=2 for example\n# pv.xxx.btn, pv.xxx.chain, pv.xxx.slide & pv.xxx.touch can all be assigned using the format";
stream.close();
}
const auto eq_skins = L"plugins\\pv_equip\\skins.ini";
const auto eq_skins = L"plugins_config\\pv_equip\\skins.ini";
if (!PathFileExistsW(eq_skins))
{
std::ofstream stream(eq_skins);
@@ -1,13 +0,0 @@
#include <fstream>
using namespace std;
void writeTemplate(char* cfgtemplate, const wchar_t* filename)
{
ofstream out;
out.open(filename);
out << cfgtemplate;
out.close();
return;
}
-534
View File
@@ -1,534 +0,0 @@
#pragma once
void writeTemplate(char* cfgtemplate, const wchar_t* filename);
char config_template[] =
{"#########################################\n"
"# /!\ WARNING: DO NOT EDIT WITH NOTEPAD!#\n"
"#########################################\n"
"\n"
"[Global]\n"
"# Load plugins including below options\n"
"Enable=1\n"
"# Enable built-in patches\n"
"Builtin_Patches=1\n"
"# Enable custom patches\n"
"Custom_Patches=1\n"
"# Enable built-in render\n"
"Builtin_Render=1\n"
"# PC\n"
"pc=\n"
"\n"
"[GPU]\n"
"# Force GPU model -- -1=auto, 0=Kepler, 1=Maxwell, 2=Turing, 3=Ampere\n"
"Model=-1\n"
"\n"
"[Launcher]\n"
"# Forces the launcher to be skipped, you can use the --launch parameter instead of this.\n"
"Skip=0\n"
"# Disables unsupported GPU warning dialogs.\n"
"No_GPU_Dialog=0\n"
"# Sets the dark colour scheme in the launcher.\n"
"Dark_Launcher=0\n"
"# Command line arguments\n"
"Command_Line=\n"
"# Launches divahook.bat intead of diva.exe.\n"
"Use_divahook_bat=0\n"
"# Language -- 0=auto, 1=en, 2=zh-Hans, 3=pt-BR, 4=it-IT\n"
"Launcher_Language=0\n"
"\n"
"[Patches]\n"
"# Disable movies (enable this if the game hangs when loading certain PVs)\n"
"No_Movies=0\n"
"# Enable or disable mouse cursor\n"
"Cursor=1\n"
"# Use 2 channels instead of 4 (when not using DivaSound)\n"
"Stereo=1\n"
"# Skip one or more menus -- 0=disabled, 1=guest, 2=guest+normal\n"
"Quick_Start=1\n"
"# Disable the scrolling sound effect\n"
"No_Scrolling_SFX=0\n"
"# Show \"FREE PLAY\" instead of \"CREDIT(S)\" and don't require credits\n"
"Freeplay=1\n"
"# Sing missed notes\n"
"Sing_Missed=0\n"
"# Hide the volume and SE control buttons\n"
"Hide_Volume=0\n"
"# Remove the photo controls during PV playback\n"
"No_PV_UI=0\n"
"# Hide the watermark that's usually shown in PV viewing mode\n"
"Hide_PV_Watermark=0\n"
"# Set the card reader and network status icons -- 0=default, 1=hidden, 2=error, 3=OK, 4=partial OK\n"
"Status_Icons=0\n"
"# Disable showing lyrics\n"
"No_Lyrics=0\n"
"# Disable the error banner\n"
"No_Error=1\n"
"# Hide \"CREDIT(S)\"/\"FREE PLAY\"\n"
"Hide_Freeplay=0\n"
"# Show \"PD Loader\" instead of \"FREE PLAY\"\n"
"PDLoaderText=1\n"
"# Freeze the timer\n"
"No_Timer=1\n"
"# Disable the timer sprite\n"
"No_Timer_Sprite=1\n"
"# Disable Message Bar\n"
"No_Message_Bar=0\n"
"# Disable Stage Text\n"
"No_Stage_Text=0\n"
"# Unlock PSEUDO modules (incomplete, will default to Miku)\n"
"Unlock_Pseudo=0\n"
"# Enable the card menu (incomplete, it doesn't bypass the card prompt)\n"
"Card=0\n"
"# Disable Extended Data (may break physics in some edits) AKA Skyth's no-opd patch\n"
"No_Opd=0\n"
"# Scale Debug Windows above HD internal resolution AKA somewhatlurker's dwgui patch\n"
"Dwgui_Scaling=0\n"
"# Allow using a real arcade slider attached to COM11 (or PS4 official FT controller)\n"
"Hardware_Slider=0\n"
"# Prevent data deletion\n"
"Prevent_Data_Deletion=0\n"
"\n"
"[Graphics]\n"
"# Lag Compensation\n"
"Lag_Compensation = 0\n"
"# Set to -1 to unlock the frame rate.\n"
"FPS.Limit=60\n"
"# Reduces FPS Limiter CPU usage\n"
"# (may have less consistent performance)\n"
"FPS.Limit.LightMode=1\n"
"# Enable debug warnings for lightweight limiter\n"
"FPS.Limit.Verbose=0\n"
"# Temporal Anti-Aliasing\n"
"TAA=1\n"
"# Morphological Anti-Aliasing\n"
"MLAA=1\n"
"# MAG Filter -- 0=default (bilinear), 1=nearest-neighbour, 2=sharpen, 3=cone (smooth)\n"
"MAG=0\n"
"# Depth of Field\n"
"DOF=1\n"
"# Reflections\n"
"Reflections=1\n"
"Reflect_Res_Width = 512\n"
"Reflect_Res_Height = 256\n"
"Refract_Res_Width = 512\n"
"Refract_Res_Height = 256\n"
"# Gamma -- 100=default, 125=console-like\n"
"Gamma = 100\n"
"# Shadows\n"
"Shadows=1\n"
"# Transparent Meshes\n"
"Punchthrough=1\n"
"# Glare\n"
"Glare=1\n"
"# Shader\n"
"Shader=1\n"
"# Toon shader (press F9 to toggle) -- 0=default, 1=force on, 2=force off\n"
"NPR1=0\n"
"# Disable all 3D passes. WARNING: The extended data will be deleted unless Prevent Data Deletion is enabled. Don't enable on Intel GPUs, enable no_opd instead.\n"
"2D=0\n"
"# FrameRateManager motion rate (fps)\n"
"FRM.Motion.Rate=400\n"
"\n"
"[Resolution]\n"
"# 0 = Windowed, 1 = Fast, 2 = Exclusive, 3 = Safe\n"
"# For same as screen res: -1x-1\n"
"Display=1\n"
"Width=-1\n"
"Height=-1\n"
"# Fullscreen only options\n"
"BitDepth=32\n"
"RefreshRate=60\n"
"\n"
"# Set a custom internal render resolution\n"
"# Same as window: -1x-1\n"
"# HD : 1280x720\n"
"# FHD : 1920x1080\n"
"# WQHD : 2560x1440\n"
"# 4K UHD: 3840x2160\n"
"# 5K UHD: 5120x2880\n"
"# 8K UHD: 7680x4320\n"
"r.Enable=0\n"
"r.Width=-1\n"
"r.Height=-1\n"
"\n"
};
char components_template[] =
{
"#########################################\n"
"# /!\ WARNING: DO NOT EDIT WITH NOTEPAD!#\n"
"#########################################\n"
"\n"
"# components.ini\n"
"# defines which components will be enabled\n"
"[components]\n"
"\n"
"# emulates game input through mouse and keyboard.\n"
"# controls can be set inside the keyconfig.ini file.\n"
"input_emulator = true\n"
"touch_slider_emulator = true\n"
"touch_panel_emulator = true\n"
"\n"
"# freezes the PV select timer at 39 seconds.\n"
"sys_timer = true\n"
"\n"
"# loads user defined const values from the playerdata.ini config\n"
"# and writes them to the game's PlayerData struct.\n"
"# required for modules selection\n"
"player_data_manager = true\n"
"\n"
"# adjusts 2D and 3D animations to retain their original speed at different frame rates.\n"
"frame_rate_manager = false\n"
"\n"
"# skip unnecessary DATA_INITIALIZE loading time, speed up SYSTEM_STARTUP and skip the startup WARNING message.\n"
"# further improvements can be achieved by shortening the duration of the pv_999 script file as it's test loaded during the SYSTEM_STARTUP.\n"
"fast_loader = true\n"
"\n"
"# allows for a user controllable camera which can be toggled using F3,\n"
"# can be controlled using W/A/S/D to move, SPACE/CTRL to ascend/descend, Q/E to rotate, R/F to zoom in/out\n"
"# and holding SHIFT/ALT to speed up or slow down these controls.\n"
"camera_controller = false\n"
"\n"
"# scales the framebuffer so that it will fit the current screen or window\n"
"# required to set resolutions in config.ini\n"
"scale_component = true\n"
"\n"
"# lets the user change the current game state using the F4 - F8 keys, enable the dw_gui / DATA_TESTs\n"
"# and speed up 2D animations / menu navigation by holding SHIFT + TAB.\n"
"# enabling this component is not recommended for most users.\n"
"debug_component = false\n"
"\n"
"# allows the usage of hold transfer\n"
"target_inspector = true\n"
"\n"
"# saves high scores to plugins/scores.ini\n"
"score_saver = true\n"
"\n"
"# adds a pause menu\n"
"pause = true\n"
};
char playerdata_template[] =
{
"[playerdata]\n"
"#########################################\n"
"# /!\ WARNING: DO NOT EDIT WITH NOTEPAD!#\n"
"#########################################\n"
"\n"
"# playerdata.ini\n"
"# defines constant values to be loaded into the PlayerData struct\n"
"# this file has to be encoded using utf-8\n"
"player_name =NO-NAME\n"
"level_name =忘れないでね私の声を\n"
"level =1\n"
"vocaloid_point=0\n"
"\n"
"# IDs defined in rom/gm_plate_tbl.farc/gm_plate_id.bin\n"
"level_plate_id =0\n"
"level_plate_effect=1\n"
"# IDs same as gam_skin%3d\n"
"skin_equip =0\n"
"# Allows for song specific skin settings which can be set in the file skins.ini\n"
"use_pv_skin_equip =true\n"
"# IDs defined in rom/gm_btn_se_tbl.farc/gm_btn_se_id.bin\n"
"btn_se_equip =-1\n"
"# Allows for song specific sound effect settings which can be set in the file sfx.ini\n"
"use_pv_sfx_equip =true\n"
"# IDs defined in rom/gm_slide_se_tbl.farc/gm_slide_se_id.bin\n"
"slide_se_equip =-1\n"
"# IDs defined in rom/gm_chainslide_se_tbl.farc/gm_chainslide_se_id.bin\n"
"chainslide_se_equip =-1\n"
"slidertouch_se_equip=-1\n"
"# \"Shared Set\" or \"Original\" setting, works similarly to PSP series module selection (Updates when changed in-game)\n"
"module_equip_cmn0=0\n"
"module_equip_cmn1=0\n"
"module_equip_cmn2=0\n"
"module_equip_cmn3=0\n"
"module_equip_cmn4=0\n"
"module_equip_cmn5=0\n"
"# Allows Song Specific module selections (values update when changed in-game in the file modules.ini) (May lag on song select and menu)\n"
"use_pv_module_equip=true\n"
"# Enable button/slider sounds & volume settings\n"
"act_toggle =true\n"
"act_vol =100\n"
"act_slide_vol=100\n"
"# Show clear borders on Progress Bar for:\n"
"# Great\n"
"border_great =true\n"
"# Excellent\n"
"border_excellent =true\n"
"# Rival\n"
"border_rival=true\n"
"\n"
"# Allows module selection (WARNING: It may cause lag in the main menu and other places) (May be necessary for use_pv_equip settings!)\n"
"use_card =true\n"
"\n"
"# Allows module selection without card and attempts to disable module refresh when sliding in PV select to reduce CPU and IO load.\n"
"module_card_workaround =false\n"
"\n"
"# Allows use of game mode modifiers (hi-speed, hidden, and sudden)\n"
"gamemode_options =true\n"
"\n"
"\n"
"\n"
"mylist_A=\n"
"mylist_B=\n"
"mylist_C=\n"
};
char keyconfig_template[] =
{
"#########################################\n"
"# /!\ WARNING: DO NOT EDIT WITH NOTEPAD!#\n"
"#########################################\n"
"[keyconfig]\n"
"# keyconfig.ini\n"
"# defines the input_emulator key bindings\n"
"# multiple keys are to be specified comma separated\n"
"\n"
"# Options:\n"
"\n"
"# Allow the user to mouse wheel scroll through the PV selection list\n"
"mouse_scroll_pv_selection = true\n"
"# The interval it takes for the emulated slider touch points to move from one contact point to another.\n"
"# In most cases, this does not need editing.\n"
"touch_slider_emulation_speed = 750.0\n"
"\n"
"# Preferred Xinput controller (0-3)\n"
"xinput_preferred =0\n"
"\n"
"# DirectInput Vendor ID and Product ID\n"
"# Check them in Device Manager or dxdiag.exe\n"
"VID = 046D\n"
"PID = C216\n"
"\n"
"# Rumble (Xinput)\n"
"rumble = true\n"
"\n"
"# Rumble intensity (Xinput)\n"
"xinput_rumble_intensity_left = 8000\n"
"xinput_rumble_intensity_right = 4000\n"
"\n"
"# Pause when focus is lost\n"
"autopause = true\n"
"\n"
"# Allow using slider in menus\n"
"# Recommended to enable this and remove MENU_L/R bindings if you have a real slider.\n"
"# Also needed to see slider in input test\n"
"slider_in_menus = false\n"
"\n"
"# Use the hardware slider from HORI FT official controller (PS4 version)\n"
"# Requires enabling hardware slider support.\n"
"# Warning: alpha feature, may not work properly\n"
"# Recommended to remove Ds4_L_Stick_* and Ds4_R_Stick_* from button bindings (JVS_LEFT, JVS_RIGHT, MENU_L, MENU_R).\n"
"ps4_official_slider = false\n"
"\n"
"# JVS Buttons:\n"
"JVS_TEST = F1\n"
"JVS_SERVICE = F2\n"
"JVS_SW1 = F11\n"
"JVS_SW2 = F12\n"
"\n"
"JVS_START = Enter, Ds4_Options, XINPUT_START, MouseMiddle\n"
"JVS_TRIANGLE = W, I, Ds4_Triangle, Ds4_DPad_Up, Ds4_L_Trigger, Ds4_R_Trigger, XINPUT_Y, XINPUT_UP, XINPUT_LT, XINPUT_RT\n"
"JVS_SQUARE = A, J, Ds4_Square, Ds4_DPad_Left, Ds4_L_Trigger, Ds4_R_Trigger, XINPUT_X, XINPUT_LEFT, XINPUT_LT, XINPUT_RT, MouseX2\n"
"JVS_CROSS = S, K, Ds4_Cross, Ds4_DPad_Down, Ds4_L_Trigger, Ds4_R_Trigger, XINPUT_A, XINPUT_DOWN, XINPUT_LT, XINPUT_RT, MouseX1\n"
"JVS_CIRCLE = D, L, Ds4_Circle, Ds4_DPad_Right, Ds4_L_Trigger, Ds4_R_Trigger, XINPUT_B, XINPUT_RIGHT, XINPUT_LT, XINPUT_RT\n"
"\n"
"JVS_LEFT = Left, Up, Ds4_L1, Ds4_L_Stick_Up, Ds4_R_Stick_Up, XINPUT_LS\n"
"JVS_RIGHT = Right, Down, Ds4_R1, Ds4_L_Stick_Down, Ds4_R_Stick_Down, XINPUT_RS\n"
"\n"
"MENU_L = Left, Up, Ds4_L1, XINPUT_LS, Ds4_DPad_Left, Ds4_DPad_Up, XINPUT_LEFT, XINPUT_UP, Q, U, Ds4_L_Stick_Left, XINPUT_LLEFT, Ds4_L_Stick_Up, XINPUT_LUP, Ds4_R_Stick_Left, XINPUT_RLEFT, Ds4_R_Stick_Up, XINPUT_RUP\n"
"MENU_R = Right, Down, Ds4_R1, XINPUT_RS, Ds4_DPad_Right, Ds4_DPad_Down, XINPUT_RIGHT, XINPUT_DOWN, E, O, Ds4_L_Stick_Right, XINPUT_LRIGHT, Ds4_L_Stick_Down, XINPUT_LDOWN, Ds4_R_Stick_Right, XINPUT_RRIGHT, Ds4_R_Stick_Down, XINPUT_RDOWN\n"
"MENU_CIRCLE = Spacebar\n"
"\n"
"TOON = F9\n"
"\n"
"COIN = F10\n"
"\n"
"WIREFRAME = F12\n"
"\n"
"# Touch Slider:\n"
"LEFT_SIDE_SLIDE_LEFT = Q, Ds4_L_Stick_Left, XINPUT_LLEFT\n"
"LEFT_SIDE_SLIDE_RIGHT = E, Ds4_L_Stick_Right, XINPUT_LRIGHT\n"
"\n"
"RIGHT_SIDE_SLIDE_LEFT = U, Ds4_R_Stick_Left, XINPUT_RLEFT\n"
"RIGHT_SIDE_SLIDE_RIGHT = O, Ds4_R_Stick_Right, XINPUT_RRIGHT\n"
"\n"
"# --- KEYBOARD KEY NAMES: ---\n"
"\n"
"# - Standard Keys\n"
"# uppercase \"A\" to \"Z\", \"0\" to \"9\"\n"
"\n"
"# - NumPad Keys\n"
"# \"NumPad0\" to \"NumPad9\"\n"
"# \"Plus\", \"Minus\", \"Divide\", \"Multiply\"\n"
"\n"
"# - Function Keys\n"
"# \"F1\" to \"F24\"\n"
"\n"
"# - Shift Keys\n"
"# \"LeftShift\", \"RightShift\"\n"
"\n"
"# - Control Keys\n"
"# \"LeftControl\", \"RightControl\"\n"
"\n"
"# - Arrow Keys\n"
"# \"Up\", \"Down\", \"Left\", \"Right\"\n"
"\n"
"# - Special Keys (may vary depending on the layout)\n"
"# \"Enter\", \"Tab\", \"Backspace\", \"Spacebar\", \"Insert\", \"Delete\", \"Home\", \"End\", \"PageUp\", \"PageDown\", \"Escape\"\n"
"# \"Comma\", \"Period\", \"Colon\", \"Slash\", \"Tilde\", \"LeftBracket\", \"Backslash\", \"RightBracket\", \"SingleDoubleQuote\", \"OEM_8\"\n"
"\n"
"# --- MOUSE BUTTON NAMES: ---\n"
"# \"MouseLeft\", \"MouseMiddle\", \"MouseRight\", \"MouseX1\", \"MouseX2\"\n"
"\n"
"# --- DUALSHOCK 4 BUTTON NAMES: ---\n"
"\n"
"# - Face Buttons\n"
"# \"Ds4_Square\", \"Ds4_Cross\", \"Ds4_Circle\", \"Ds4_Triangle\"\n"
"\n"
"# - Standard Buttons\n"
"# \"Ds4_Share\", \"Ds4_Options\", \"Ds4_PS\", \"Ds4_Touch\", \"Ds4_L1\", \"Ds4_R1\"\n"
"\n"
"# - D-Pad Directions\n"
"# \"Ds4_DPad_Up\", \"Ds4_DPad_Right\", \"Ds4_DPad_Down\", \"Ds4_DPad_Left\"\n"
"\n"
"# - Trigger Buttons\n"
"# \"Ds4_L_Trigger\", \"Ds4_R_Trigger\"\n"
"\n"
"# - Left Joystick\n"
"# \"Ds4_L_Stick_Up\", \"Ds4_L_Stick_Right\", \"Ds4_L_Stick_Down\", \"Ds4_L_Stick_Left\", \"Ds4_L3\"\n"
"\n"
"# - Right Joystick\n"
"# \"Ds4_R_Stick_Up\", \"Ds4_R_Stick_Right\", \"Ds4_R_Stick_Down\", \"Ds4_R_Stick_Left\", \"Ds4_R3\"\n"
"\n"
"# --- XINPUT BUTTON NAMES: ---\n"
"\n"
"# - Face Buttons\n"
"# \"XINPUT_A\", \"XINPUT_B\", \"XINPUT_X\", \"XINPUT_Y\"\n"
"\n"
"# - Standard Buttons\n"
"# \"XINPUT_START\", \"XINPUT_BACK\", \"XINPUT_LS\"/\"XINPUT_LB\", \"XINPUT_RS\"/\"XINPUT_RB\"\n"
"\n"
"# - D-Pad Directions\n"
"# \"XINPUT_UP\", \"XINPUT_DOWN\", \"XINPUT_LEFT\", \"XINPUT_RIGHT\"\n"
"\n"
"# - Trigger Buttons\n"
"# \"XINPUT_LT\", \"XINPUT_RT\"\n"
"\n"
"# - Left Joystick\n"
"# \"XINPUT_LLEFT\", \"XINPUT_LRIGHT\", \"XINPUT_LUP\", \"XINPUT_LDOWN\", \"XINPUT_LSB\"\n"
"\n"
"# - Right Joystick\n"
"# \"XINPUT_RLEFT\", \"XINPUT_RRIGHT\", \"XINPUT_RUP\", \"XINPUT_RDOWN\", \"XINPUT_RSB\"\n"
"\n"
"# --- Generic USB BUTTON NAMES: ---\n"
"\n"
"# - Standard Buttons (Button number in \"Game controller settings\", max allowed 13 buttons at the moment)\n"
"# \"GU_BUTTON1\", \"GU_BUTTON2\", \"GU_BUTTON3\", \"GU_BUTTON4\", \"GU_BUTTON5\", \"GU_BUTTON6\", \"GU_BUTTON7\", \"GU_BUTTON8\", \"GU_BUTTON9\", \"GU_BUTTON10\", \"GU_BUTTON11\", \"GU_BUTTON12\", \"GU_BUTTON13\"\n"
"\n"
"# - D-Pad Directions\n"
"# \"GU_DPAD_UP\", \"GU_DPAD_RIGHT\", \"GU_DPAD_DOWN\", \"GU_DPAD_LEFT\"\n"
"\n"
"# - Left Joystick\n"
"# \"GU_L_STICK_UP\", \"GU_L_STICK_RIGHT\", \"GU_L_STICK_DOWN\", \"GU_L_STICK_LEFT\"\n"
"\n"
"# - Right Joystick\n"
"# \"GU_R_STICK_UP\", \"GU_R_STICK_RIGHT\", \"GU_R_STICK_DOWN\", \"GU_R_STICK_LEFT\"\n"
};
char divasound_template[] =
{
"#########################################\n"
"# /!\ WARNING: DO NOT EDIT WITH NOTEPAD!#\n"
"#########################################\n"
"\n"
"[General]\n"
"# You can choose 2 channel or 4 channel mode.\n"
"# 4 channels uses front channels for speakers and rear channels as headphones.\n"
"# 2 channels only has headphones output (with in-game volume bypassed).\n"
"Channels=2\n"
"\n"
"# 16 or 24 bit integer and 32 bit float output are supported.\n"
"# If you don't know what this means, you should leave it at 16.\n"
"# On some versions of Windows floating point samples may increase latency.\n"
"Bit_Depth=16\n"
"\n"
"# This can be WASAPI, DirectSound, WASAPI_Exclusive, or ASIO.\n"
"# Only use DirectSound if WASAPI doesn't work for some reason.\n"
"# WASAPI_Exclusive may not work with some hardware, but can have lower latency.\n"
"# ASIO requires special driver support.\n"
"# ASIO doesn't use the buffer settings. Use ASIO config instead.\n"
"# For full descriptions of the backends see https://github.com/somewhatlurker/DivaSound/wiki/Backends.\n"
"Backend=WASAPI\n"
"\n"
"# If the game crashes when loading, try setting this to 0.\n"
"Alternate_Init=1\n"
"\n"
"[Buffer]\n"
"# Sets the requested period size in milliseconds.\n"
"# Try increasing this if audio stutters or desyncs.\n"
"# WASAPI will usually provide a larger period than specified.\n"
"# You can check the actual period size by enabling debug_component.\n"
"Period_Size=10\n"
"\n"
"# Sets how many periods to use.\n"
"# Fewer periods = lower latency, but it may cause issues.\n"
"# You probably shouldn't set this below 2, and increasing it probably isn't necessary.\n"
"Periods=2\n"
"\n"
"[ASIO]\n"
"# Sets the device ID.\n"
"# 0=first device(...), -1=first available device\n"
"Device=-1\n"
"\n"
"# When set to 1 the ASIO driver config will open alongside the game.\n"
"# Use this to adjust output settings, then disable it.\n"
"Show_Config=0\n"
};
char shaderpatchconfig_template[] =
{
"[Config]\n"
"# Patches to remove glitching with modern GPUs.\n"
"# Appropriate patches will automatically be selected based on your GPU.\n"
"Compat=1\n"
"\n"
"# Lyb's toon shader improvements (24 sept 2019)\n"
"# Toon_Improve: Adjusts toon shader lighting\n"
"Toon_Improve=0\n"
"# Specular Multiplier\n"
"Toon_Improve_Val1=0.9\n"
"# Specular Offset\n"
"Toon_Improve_Val2=-0.5\n"
"\n"
"# Lyb's toon shader improvements (24 sept 2019)\n"
"# Toon_Eyes_Improve: Adjusts toon shader eyes\n"
"Toon_Eyes_Improve=0\n"
"\n"
"# Lyb's toon shader improvements (24 sept 2019)\n"
"# Toon_Hair_Improve: Adjusts toon shader hair\n"
"Toon_Hair_Improve=0\n"
"# Diffuse Brightness\n"
"Toon_Hair_Improve_Val1=1.25\n"
"\n"
"# Lyb's toon shader improvements (24 sept 2019)\n"
"# Toon_Lines_Improve: Adjusts toon shader outlines\n"
"Toon_Lines_Improve=0\n"
"# ???\n"
"Toon_Lines_Improve_Val1=0.75\n"
"# Thickness Multiplier(?)\n"
"Toon_Lines_Improve_Val2=0.75\n"
"# Thickness Offset(?)\n"
"Toon_Lines_Improve_Val3=0.75\n"
"\n"
"# Debug patches:\n"
"# Nametags\n"
"# Adds comments with the shader file name to the shader text. Useful for debugging issues.\n"
"# You only need to enable one of these.\n"
"# `nametags2` is a bit faster, but the tags are placed at the end of the file and you may not like that.\n"
"Nametags1=0\n"
"Nametags2=0\n"
};