-----------------------------------------------------------------------------------------------
[Name]            TPDP SoD PvPHubExtension
[Purpose]         PvP menu feature extension for TPDP SoD (+Extended)
[Version]         1.93
[Web page]        https://xy1.ebb.jp/025
[Author]          くしち (Kushichi) (https://x.com/xyichi)
[Release date]    2026.05.05
[Requirements]    TPDP SoD v1.103 / Extended v3.41 / v4.0 / Battle Overlay
-----------------------------------------------------------------------------------------------


** About This Extension **
This is an unofficial dynamic-link library that extends the PvP menu of
"Touhou Puppet Dance Performance: Shard of Dreams" (TPDP SoD) (http://www.fo-lens.net/enbu_ap/)
and its unofficial extension patch
"TPDP SoD Extended" (http://gensoushinki.com/),
"Mod:Shard of Dreams - Battle Overlay" (https://tpdp.miraheze.org/wiki/Mod:Shard_of_Dreams_-_Battle_Overlay).

This functionality, the DLL file, and the changes it makes to other files are
referred to below as "this extension".

This extension is a personal, unofficial work.
Please do not contact the official TPDP SoD developers about issues
related to this extension; doing so only causes them inconvenience.
Please use this extension responsibly, with awareness of its design and consideration
for the wider community.


** Disclaimer **
This extension assumes users with basic familiarity with Windows file operations
and the game's installation path. These topics are not covered in this document.

Performance may degrade depending on PC specifications.
The extension may fail to operate due to PC configuration, specifications,
or bugs within the extension itself.
Even if it works today, future changes to "TPDP SoD", "TPDP SoD Extended",
the operating system, or DirectX may break
compatibility in the future.
The author cannot guarantee operation or provide support for these factors.
Please understand and acknowledge this before use.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!! BACK UP YOUR ENTIRE TPDP FOLDER BEFORE INSTALLING THIS EXTENSION !!!!!

This extension forcibly intervenes in the game's runtime behavior.
The author has tested it in their own environment, but cannot anticipate every
user environment.
Unexpected issues are entirely possible.
Damage to game executables, files, save data, or replay data cannot be
absolutely guaranteed never to occur.

Please use this extension only after fully understanding and accepting the risks
of forced runtime intervention.
The author bears no responsibility for any damage caused by use of this DLL.

To prepare for the worst case, we strongly recommend backing up the entire
pre-installation environment so that you can revert if necessary.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


** Installation **
If you install Extended or BattleOverlay on a system where PvPHubExtension is already installed, 
 PvPHubExtension will be overwritten and its functionality will be lost.
Please install PvPHubExtension after installing Extended or BattleOverlay.

This extension is distributed in installer form.
Run "PvPHubExtension-vX.X-setup.exe" and follow the on-screen instructions.

Main wizard choices:
- Setup language (the installer's own UI language)
- Game environment (SoD / Extended)
- Install destination (the folder where TPDP is installed)
- Operation (Fresh install / Update / Reinstall / Remove PvPHubExtension)
- Plugin language (the language used for in-game labels: jp / en)
- Enable features (BGM extension / Background select)

The installer automatically performs the following:
- Place “dxgi.dll” in the folder for TPDP SoD if it is not already present.
- Places "PvPHubExtension.dll" into the plugins\ subfolder of TPDP SoD (+Extended)
- Adds a [pvp_hub] section to "TPDPHook.ini" to enable the extension

------------------------------------------------------------------
幻想人形演舞-ユメノカケラ-\ # The folder where TPDP SoD (+Extended) is installed
├gn_enbu.exe
├SoD-Extended-JP.exe    # Existing files/folders may vary by environment
├SoD-Extended-EN.exe
├dxgi.dll               # <--If no existing file exists, it will be placed there
├TPDPHook.ini           # <-- [pvp_hub] section is added here
├...
├dat\
├save\
├...
└plugins\               # <-- installer places the DLL here
 └PvPHubExtension.dll   # placed here
------------------------------------------------------------------

Note: this installer does not register an entry in Windows "Programs and Features"
and does not modify the registry.
To upgrade or remove the extension, run the same installer (".exe") again
and select the desired action on the operation page.
If a previous version of "PvPHubExtension.dll" is detected, the installer
automatically determines whether to offer "Update" or "Reinstall".


** Uninstallation **
Run "PvPHubExtension-vX.X-setup.exe" again and select "Remove PvPHubExtension"
on the operation page.
"PvPHubExtension.dll" and the [pvp_hub] section in "TPDPHook.ini" are deleted
automatically.
If the dxgi.dll file installed by this installer is present, it will also be deleted.

After that, manually delete the following:
"PvPHubExtension-vX.X-setup.exe", "ReadMe_JP.txt", "ReadMe_EN.txt", "LICENSE"


** Verified Environments **
- TPDP SoD ver1.103
- MOD: TPDP SoD Extended ver3.41
- MOD: TPDP SoD Extended ver4.0
- MOD: StyleIconExtension (for Extended)
- MOD: BattleOverlay (for SoD)
- MOD: BattleOverlay (for Extended)

Older versions and the original Touhou Puppet Dance Performance (no subtitle)
,and other MODs have not been tested and are not planned for future support.


** Features and Usage **
After launching the game and opening the PvP menu,
 the features you enabled during installation will be added.

PvP BGM Extension (For Extended only):
You will be able to select additional tracks
 from the “Extended” section in the BGM selection menu.
However, only tracks you have heard at least once during gameplay are selectable.
Additionally, in Extended, selecting "Vs Butokai Puppeteer" played a different track;
 with this extension, the correct track is played.

Random Selection of PvP BGM:
The “Random” option will be added to the Battle BGM menu.
If you select this option before starting a battle,
 the system will randomly select a track from the SoD tracks
 you have unlocked and play it during the battle.

Specifying the Battle Background:
A new option to select a background image has been added at the bottom of the screen.
You can set the background for battles to the image selected here.
This option is limited to backgrounds that previously appeared randomly.
If you select “Random,” the background will appear randomly from the available options.
This behaves the same as the original version.


** Behavior Notes **
With the PvP BGM Extension active, the unlock state of "Vs Butokai Puppeteer"
becomes shared with that of "Vs Yukari Yakumo".
Even if you hear "Vs Butokai Puppeteer" played during gameplay, it cannot be
selected from the menu unless you have also heard "Vs Yukari Yakumo".


** Configuration **
This extension's settings live in the [pvp_hub] section of "TPDPHook.ini".
The installer writes initial values, so manual editing is normally unnecessary.

Settings:
[pvp_hub]
language      = jp       ; Language for in-game UI labels. jp or en.
bgm_extension = true     ; BGM list extension. true to enable, false to disable.
background_select = true ; Background selection feature. true to enable, false to disable.

To switch the language, change "language" to "jp" or "en".
To temporarily disable a feature, change its value from true to false.
A game restart is required for changes to take effect.


** Change History **
[ver1.93: 2026.05.09]
-Fixed a delay in displaying the background selection field

[ver1.6: 2026.05.05]
- Compatible with SoD
- Added a random BGM selection
- Added a Background selection

[ver1.1: 2026.04.26]
- Released exclusively for Extended
- Added a feature to allow selection of songs added in the Extended version


** Credit **
幻想人形演舞(Gensou Ningyou Enbu) and 幻想人形演舞-ユメノカケラ-(Gensou Ningyou Enbu Yume no Kakera) are
 copyrighted works by the doujin circle FocasLens / 幻想人形劇団(Gensou Ningyou Gekidan),
 and are a derivative work of the Touhou Project.
"Touhou Puppet Dance Performance" and "Touhou Puppet Dance Performance: Shard of Dreams" are
 an unofficial English title that refers to the above.
Touhou Puppet Dance Performance: Shard of Dream Exntended is
 an unofficial expansion patch created by Barudo(+his team).
Mod:Shard of Dreams - Battle Overlay is an unofficial expansion patch released by Wower.
This extension is an unofficial creation by くしち (Kushichi) (individual).
Please do not contact FocasLens, Gensou Ningyou Gekidan,
 or Barudo(&his team) about this tool, as it will cause inconvenience.
