Touhou Patch Center:Servers
|About||Tutorial||FAQ||Patch servers||Download||Patch overview||Bug tracker||Artwork||Wiki security|
To ensure the availability of our translations, the patch data used by the Touhou Community Reliant Automatic Patcher is mirrored across multiple servers.
|thpatch.net main server (HTTPS)||https://srv.thpatch.net/|
|thpatch.net main server (HTTP)||http://srv.thpatch.net/|
|Nmlgc's mirror (HTTPS)||https://thcrap.nmlgc.net/repos/thpatch/|
|Nmlgc's mirror (HTTP)||http://thcrap.nmlgc.net/repos/thpatch/|
As the main server, srv.thpatch.net is the most up-to-date resource and directly receives translations after they were made in the wiki. The other mirrors pull the latest state from there every minute.
Just like the content on the wiki, the translations and images on this server are licensed under Creative Commons Attribution-ShareAlike 4.0 International.
This list contains links to third-party patch repositories not under our control. When pointed to Touhou Patch Center, the configuration tool will offer to choose patches from these repositories as well.
If you want your repository to be included in this list, please send a mail to email@example.com, containing the public path to your repository (this is the "servers" value in repo.js). In case you use Git to manage your server, you can also request it to be automatically mirrored on mirrors.thpatch.net. This is highly recommended in order to keep your patches available in case the original host happens to go down.
|http://thcrap.nmlgc.net/repos/nmlgc/||Nmlgc's patch repository||
(missing support for TH07 and TH08))
(by sibgamer, http://tinyurl.com/real-bullet-size))
|https://raw.githubusercontent.com/Ghildrean/touhou-es-es/master/||Traduccion al castellano||
|https://raw.githubusercontent.com/Gamer251/thcrap-gamer251/master/||The Amateur Modder||
This mod has a few bugs in the fighting games.)
|https://raw.githubusercontent.com/soap925/BurntToast-Mod-Stockhouse/master/||BurntToast12's Mod Stockhouse||
|https://raw.githubusercontent.com/Zrrg/UnKnwn/master/||UnKnwn Thcrap Repository||
|https://raw.githubusercontent.com/DTM9025/DTM/master/||DTM's Patch Repository||
|http://mirrors.thpatch.net/PookChang'e/||Pook Chang'e's Patches||
|https://raw.githubusercontent.com/Tearff/Tear/master/||Tear's Touhou Mods||
|https://raw.githubusercontent.com/GhostPhanom/GhostPhanom-Thcrap/master/||GhostPhanom's strange thoughts||
|http://thcrap.nmlgc.net/repos/Bravi/||Bravi's Strange Creativity||
|http://mirrors.thpatch.net/Splashman/||Splashman's BGM patches.||
|http://mirrors.thpatch.net/MoriyaFaith/||The Modder from Moriya Shrine||
Building your own patch server
As of the 2014-01-26 build, thcrap includes a Python script to assist in building your own self-updating patch server, where you can publish your own patches while having full control over them. While this may sound pretty involved, it really is not that complex – we deliberately designed the system in such a way that no specific server software is required. Anything that uses the HTTP protocol and allows for arbitrary files to be stored and served to the Web while retaining their file names and directory structure can be used.
You don't even have to pay for webspace in order to do this; there are a number of free cloud storage providers that work just as well. Below, you can find tutorials on how to set up your own repository on one of these. All these tutorials are written for Windows only, but if you use a different operating system, you should have no trouble adapting them. ☺
To explain the terminology:
- First, we have patches. These are basically just unordered collections of files that provide replacements for certain original game data. One patch can provide data for an unlimited number of games.
- Patches are grouped in repositories. These are in turn collections of all the different patches offered and controlled by one person or community.
You start by creating a repository, then one or more patches, which you then regularly publish on a server.
First, you need to think of a globally unique, short ID for your repository. This could simply be your name, or the name of your community. For the sake of this tutorial, we'll call it RepoDir.
You also need to do the following:
- Download and install Python 3, if you don't have it already. Be sure to make a note of the path it gets installed to.
(This is the programming language the repository build script is written in.)
- Create a new directory named RepoDir inside your thcrap directory.
This will be your local repository path, where all your patch development will take place.
- Inside RepoDir, create a new directory for each of your patches, named after their respective short ID. We'll use PatchDir as an example.
For each patch, create a file named patch.js in RepoDir\PatchDir. This is mandatory, the build script won't recognize the patch otherwise.
Note that anything you put in any of your patch directories will be published by the script, and downloaded by every user of your patches!
These are set using the dependencies array in patch.js, and ensure that the configuration tool automatically pulls in all required functionality for your patch.
Dependency statements have the form repo_id/patch_id. repo_id is optional - leaving it out will resolve the given patch first on your repository, then globally across all repositories a user has discovered. Be careful, this might have unintended consequences when used with a patch not in your repository.
Some of the patches from the network you may want to bundle are:
- nmlgc/base_tsa: The basic technical support for Windows Touhou games. If your patch targets any of these games, make absolutely sure to include this one in some way! Otherwise, the configuration tool may not pull it in and the resulting configurations may not work!
- nmlgc/script_latin: Contains a font with sufficient Unicode coverage for Latin, Greek and Cyrillic scripts, some settings to make it look as nice as possible for every game, as well as Hepburn romanizations for common terms and images.
- nmlgc/western_name_order: Exactly what it says – Western name order for the enemy names during boss battles.
- thpatch/lang_en: Not only does this give you our up-to-date English translation, it also ensures that any other dependencies for a translation patch (such as all three patches mentioned above) will be present when selecting your patch in the configuration tool.
A basic configuration for a translation patch using a non-English Latin script language:
Pulls in all of the above (and maybe even more in the future) plus the English translations:
If your patch includes custom fonts, register them using the fonts object. This is a simple list of every font file name to load before starting the patched game:
(thcrap does not look at the actual value of the key, true in this example.)
OK, and how do I do X?
Well, thcrap can do a lot of things. ☺ Until we have described them all, your best bet is to look at how our patches do the things you intend to do. If you still have questions, just visit our IRC chat, ask us, and we'll be glad to help you.
The rest of this tutorial differs depending on the webspace or server provider you use.
This is the recommended option. It will keep your repository under a revision control system and thus store the entire history of your patches, which can then be viewed nicely on the GitHub website. We are also thinking about adding direct Git support to the thcrap updater in the future, which would make this setup even simpler.
If you're already familiar with Git: Just run repo_update.py every time before you commit. If you aren't, how to set it up on Windows:
- Make sure you have version 2014-05-08 or later of thcrap. This build introduces some important changes to the repository script which make GitHub support possible in the first place. Also make sure that thcrap.zip and it's contents are in the same directory as your patches. Otherwise you will get an error that repo_update is missing.
- Register a new free account on GitHub if you don't have one yet.
On your dashboard, create a new repository with the default settings. Its name does not necessarily have to correspond with the name you chose for RepoDir in your local setup.
- Download and install the GitHub Windows client and log in with your GitHub account.
In the Options menu, set the default storage directory to your thcrap directory, and put your name and e-mail address in the configure git section.
Clone the repository you created on GitHub into your thcrap directory.
If your local repository directory shares its name with the one on GitHub, this will fail. In that case, just rename your local directory temporarily, then move all of its contents into the newly created directory after the cloning process is complete.
In the newly cloned directory, create a file named Update.bat, which you will use to launch thcrap's update script:
C:\path\to\python.exe ..\scripts\repo_update.py pause
That's it for the basic setup. After you have made some edits to your patches, this is how you publish them:
- Run Update.bat.
- Open the GitHub client and navigate to your patch repository. This should give you all changes since the last commit as well as the option to create a new one.
Be sure to do this immediately after running the update script! If you run thcrap with the patch you are editing before committing, the updater will overwrite your changes with the last state on the server!
Verify the changes you are about to commit. If everything went fine, each file you changed should now have a different checksum in the files.js file of the affected patches:
- Then, simply click commit to master, followed by publish, and your changes are live.
Making your repository known
In order for your patch to be seen and able to be used by others globally, there are generally three methods:
- After your repository has been uploaded, anyone else can then discover it by calling thcrap_configure with your URL as a command-line parameter.
- If you have a own website, blog, etc., you can upload a custom version of the thcrap archive containing the repo.js file inside your local repository directory. This is generally not recommended, though
- The best method, however, is to contact us on Discord and tell us your repository URL to get listed in the Touhou Patch Center network as one of our neighbors.