Touhou Community Reliant Automatic Patcher

From Touhou Patch Center
Jump to: navigation, search



Project overview
About Tutorial FAQ Patch servers Download Patch overview Bug tracker Artwork Wiki security

Main Package (Multi-Language, Multi-Game)

Gnome-dev-zipdisk.svg Download from Touhou Patch CenterGnome-dev-zipdisk.svg Download from GitHub
Latest build: 2017-04-04
Changelog
Source code: @ GitHub


Pre-packaged patches based on our English translation (not recommended).

System Requirements

  • Windows XP or later; also works with Wine
  • Internet connection only required for initial configuration and updating; without a connection, thcrap will simply use the last downloaded state
    • You can safely delete thcrap_update.dll after configuration to remove all on-line functionality

Setup Instructions

Image walkthrough (slightly outdated, though)

Concise

  • First of all, you don't need to extract this into a specific game directory. The patcher can run from any directory.
  • Run thcrap_configure.exe and follow the instructions to create your patch configuration.
  • You'll end up with a .js file (the configuration itself) as well as links to start every Touhou game found on your system with this configuration. Note that thcrap does not modify any existing Touhou installation on your system.

Detailed

  1. Download Patch and unzip (directory does not have to be specified; feel free to place wherever you want)
  2. Run thcrap_configure to find the Touhou games.
  3. Pick your languages.
    Yes, plural. If you understand English to some degree, we recommend to always include lang_en at the bottom, and your native language on top of that. Read more on the topic of patch stacking here.
  4. Wait for the downloads to occur.
  5. In the browsing dialog, select the path where your Touhou games are located, or hit Cancel to search your whole system.
  6. Select your preferred version out of the Touhou games with multiple versions on your system.
  7. Use shortcuts.
  8. Enjoy.

Running on top of vpatch

This is possible as of the 2013-10-25 build. Unfortunately we can't automate such a setup due to the DLL-centric design of vpatch, so this requires a few manual steps:

  1. In order to make Icon th06.png Embodiment of Scarlet Devil run at all, replace vpatch_th06.dll with our modified Unicode version.
  2. Configure your patch stack as usual. If you have multiple versions of the games installed, it is merely important to choose the correct directory at this point.
  3. Open the generated games.js in a plaintext editor, and replace the game's .exe file names with vpatch.exe (or whatever the local vpatch executable is called).
  4. Starting the games through the shortcuts will then launch thcrap, vpatch and the game itself. thcrap will automatically enable support for Japanese characters and file names, so AppLocale is not required (yes, not even for 東方紅魔郷.exe).

Tricks

File Output

Usage: To dump all the files used in a Touhou game as it runs. This is useful for locating a certain sprite name for image replacement as well as advanced patching.

Steps:

  1. Locate the .js file that is created when you run thcrap_configure.exe (this would be whatever you named your shortcuts, so if you called your shortcut "en" then the .js file will also be called en.js).
  2. Open it with your text editor (notepad, editpadpro, etc)
  3. Change "dat_dump": false to either
  • "dat_dump": true - this will output files to wherever you placed your original game, in a folder called dat
  • "dat_dump": "C:/name/to/dump/path/" - this will output files into the given directory.

Then, run the shortcut.

Steam

Usage: To place the shortcuts into Steam. Full integration is one of our contemplated ideas.

Steps: See here

Troubleshooting

My game isn't recognized by the configuration tool

Issue: The game does not create a shortcut to certain games.

Solution: If that game happens to be Icon th06.png Embodiment of Scarlet Devil or any of the fighting games (Icon th075.png Immaterial and Missing Power, Icon th105.png Scarlet Weather Rhapsody, Icon th123.png Touhou Hisoutensoku or Icon th135.png Hopeless Masquerade): thcrap does not support them yet.

Otherwise, please post the game's executable on either discord.png Discord or irc.png our IRC channel #thcrap on irc.freenode.net. We'll see what we can do.

Dialog

Blank text

Issue: There is a known issue with Wine not displaying untranslated Japanese text. This is due to Wine's glyph replacement system not being sophisticated enough to use Japanese glyphs from a default system font in case the currently selected font (Touhou Biolinum for Latin script languages) does not contain Japanese glyphs, as is the case on Windows.

Workaround: None. This is an issue in Wine.

Dialogue does not fit in text box

Issue: In-game text cut off when characters are speaking.

Solution: ZUN's engine has never been able to do automatic line breaks, and we don't want to combat this by having the wiki parser guess where to put a line break. This means that all of the line breaks have to be done manually.

If you see such a line, just log in, look for the corresponding page and split it yourself. If it's a 3rd party patch, then e-mail the project leader about the issue, or tell them on GitHub or wherever they host their patch.

Error

Could not load the function: thcrap_init

Issue: Error: Could not load the function: thcrap_init

Solution: We don't know yet what exactly this causes - if you have this problem, please get in touch with us so that we can debug it. Probably some antivirus. Reinstalling thcrap and the affected game seems to help.

Japanese text error

The ZUN Mutex

Issue: You get an error message that looks the picture on the right.

Solution: You are running more than one game process, could be because you attempted to open another game while one is running or you have zombie game processes that are running. Open one game only if it's the former or open task manager and kill the zombie processes if it's the latter.

The translation is incomplete/missing

Issue: The text is appearing in japanese.

Solution: This is not a bug; the translations on the wiki have not been finished yet, and we would need someone to complete the translations.

Font

Too large

Issue: The font is too large!

Solution: If this is happening only in Icon th143.png Impossible Spell Card and you have set your system to Japanese locale, this is caused by the new default font ZUN uses with this game. This requires an improved font replacement system in thcrap to be resolved thoroughly. We are currently working on this,, and will post on facebook/twitter once it's completed. Otherwise, you are using an old version of thcrap. Update, reconfigure, and this issue should be gone.

Patch configuration

Why does Patch X not work with Patch Y?

Oops!

Issue: When using a patch, some of the features mix together!

Solution: When you are using multiple patches, the order is important. For example one may want to use Gamer251's Mima patch for the Mima sprite and dialog, the Alphes patch for Alphes-style art, and our English patch to have the rest of the game translated to English. If one was to use the Mima patch first, then the Alphes patch, then the English one, they would discover that while the other patches were applied, the English title screen was applied to the Mima's custom title. So for a typical patch selection, the correct way to select a patch if it's not already not added for you (as seen with Nazeo's gangster patch) is using the main language first, then the mod.

Updating

Issue: The game does not seem to update.

Solution: You are using an old version of thcrap. Download the most current version and this should resolve the issue.

Neighbors

HALP

Issue: Something not covered here? Everything just going wrong? We have the solution! (Most of the time)

Solution: Please submit any further bugs to our bug tracker. If you prefer live trouble-shooting, visit our IRC channel #thcrap on irc.freenode.net. Please come only after all the above has failed. Things we would need are OS, game, what you were doing, and the patcher's log file (thcrap_log.txt).

Run configuration parameters

Root level

dat_dump

Dumps original game data from the .dat archive as it's loaded.
As of the 2013-07-29 build, this also dumps the sprite boundaries for all graphic files.
values: false to disable, directory string to specify directory, anything else will enable dumping into game directory/dat

console

Enables or disables the on-screen patch debugging console.
values: true / false

font

Changes the font used in the game to any other font installed on your system.
values: string

Patch level

archive

Specifies the base directory of this patch. Must end in a forward slash (/).
As of the 2014-01-03 build, this can be a directory relative to the one the run configuration is stored in.
value: string

ignore

Ignores any files from this patch that match the given wildcard.
value: array of strings
Example: Disabling music title and spell card translations for a specific language
{
	"archive": "thpatch/lang_en/"
},
{
	"archive": "thpatch/lang_pt-br/",
	"ignore": ["*themes.js", "*spells.js"]
},

update

Set to false to disable automatic updates for this patch.
value: true/false