Touhou Patch Center:Servers/zh-hans: Difference between revisions
(Created page with "== 镜像 == 为保持我们的翻译可用性,由Touhou Community Reliant Automatic Patcher使用的补丁数据在多个服务器上被镜像。 {{thcrap_servers}}") |
DalekCraft (talk | contribs) No edit summary |
||
(66 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{Project overview/{{PAGELANGUAGE}}}} | |||
<languages /> | <languages /> | ||
== 镜像 == | == 镜像 == | ||
Line 5: | Line 5: | ||
{{thcrap_servers}} | {{thcrap_servers}} | ||
作为主服务器,[http://srv.thpatch.net srv.thpatch.net]是最新的资源,并且在wiki出现修改时直接接收翻译。 其他镜像每分钟从那里同步出最新状态。 | |||
就像维基上的内容一样,此服务器上的翻译和图像都根据{{License URL|署名-相同方式共享 4.0 国际}}许可。 | |||
== | == 邻居 == | ||
此列表包含一些第三方补丁的仓库链接,这些仓库不受我们控制。当指向{{SITENAME}}时,配置工具还将提供从这些仓库中选择补丁的功能。 | |||
如果你想让你的补丁也包含在此列表,请发送邮件至<code>[mailto:submissions@thpatch.net submissions@thpatch.net]</code>,并在邮件中提供仓库的公共路径(<code>repo.js</code>中的<code>"servers"</code>值)。如果你使用git管理服务器,还可以请求将其自动镜像到<code>[http://mirrors.thpatch.net/ mirrors.thpatch.net]</code>。为了在原始主机发生故障时保证补丁的可用性,强烈建议你这样做。 | |||
{{thcrap_neighbors}} | {{thcrap_neighbors}} | ||
== | == 搭建自己的补丁服务器== | ||
{{mbox|text=''' | {{mbox|text='''请注意,本指南有点过时了。'''现在最常用的提供服务的方法是通过[https://mirrors.thpatch.net/ mirrors.thpatch.net],它可以自动执行<code>repo_update.py</code>。你只需要为你的补丁创建适当的repo.js和patch.js并通过git发布。请在我们的 [https://discord.thpatch.net/ discord服务器] 上的 [https://discordapp.com/channels/213769640852193282/395767870119870466/590774941197139989 指南] 中查看更多详细信息。 | ||
还要注意,GitHub for Windows已由GitHub Desktop取代,后者具有不同的<!--(horrible) -->接口。}} | |||
对于2014-01-26及以后的版本, [[Project:Download|thcrap]] 包含了一个Python脚本,它可以帮助你构建你自己的自更新补丁服务器。您可以在其中发布自己的补丁,同时完全控制它们。虽然这听起来很复杂,但实际上并没有那么复杂——我们特意以不需要特定服务器软件的方式设计系统。可以使用任何支持HTTP协议并允许在保留文件名和目录结构的情况下将任意文件存储并发布到网络的任何东西。 | |||
要做到这件事,你甚至无需为网络存储付费;有许多免费的云存储提供商可以很好的工作。在下面,您可以找到有关如何在免费云存储上设置自己的存储库的教程。所有这些教程都是仅针对Windows编写的,但如果你使用其他操作系统,你应该可以毫无困难地适应它们。☺ | |||
=== | === 概述 === | ||
术语解释: | |||
* | * 首先我们有 ''补丁'' 。补丁基本上只是无序的文件集合,它们可以替换某些游戏原始数据。一个补丁可以为不限数量的游戏提供数据。 | ||
* | * 补丁在 ''仓库'' 中分组。仓库依次是一个人或社区提供和控制的所有不同补丁的集合。 | ||
首先创建一个 ''仓库'' ,然后创建一个或多个 ''补丁'' ,然后定期将其发布在 ''服务器'' 上 | |||
=== | === 本地配置 === | ||
首先,你需要给仓库取一个 ''全局唯一的短ID'' 。这可以只是你的名字,或者你社区的名字。本教程中,我们就用 <code>RepoDir</code> 。 | |||
你还需要做下面这些: | |||
# | # 下载并安装 [[File:Python.svg|16px]] [http://python.org/download/releases/ Python 3] ,如果你还没有安装,确保记住它的安装路径。<br />(这是一种编程语言,用于编写构建仓库的脚本) | ||
# | # 在你的thcrap目录中,新建以 <code>RepoDir</code> 命名的目录。<br />这将会是你的 ''本地仓库路径'' ,也就是你所有补丁开发的地方。 | ||
# | # 在 <code>RepoDir</code> 中,为每个补丁创建一个新目录,并以各自的短ID命名。本教程就以 <code>PatchDir</code> 为例。 | ||
=== | ===补丁配置 === | ||
在 <code>RepoDir\PatchDir</code> 中为每个补丁创建一个名为 <code>patch.js</code> 的文件。'''这是强制性的''',否则构建脚本将无法识别该补丁。 | |||
所有 <code>.js</code> 结尾的文件都是 [http://json.org JSON格式的文件]。您可以使用类似 [http://jsonlint.com/ JSONLint] 的网站验证其语法。 | |||
{{mbox|text= | {{mbox|text=请注意,你放在 '''所有''' 补丁目录下的 '''所有文件''' 都将被脚本发布,并被所有使用了你的补丁的人下载!}} | ||
==== | ==== 依赖 ==== | ||
依赖使用 <code>patch.js</code> 中的 <code>dependencies</code> 数组设置,并确保配置工具自动为您的补丁提取所有必需的功能。 | |||
依赖声明的格式为 <code>repo_id/patch_id</code>。<code>repo_id</code>是可选的——若省略,首先会在你的仓库中解析,随后在用户发现的所有仓库中全局解析。注意,使用不在你仓库中的补丁可能会带来意料之外的后果。 | |||
你可能需要或者想依赖的补丁包有这么一些: | |||
* < | * <code>nmlgc/base_tsa</code>: Windows上的东方游戏的最基础技术支持包。''如果你的补丁包要在任何这些游戏中生效,请一定要确保依赖这个补丁包!''否则配置工具不会把这个包同步下来,也就会导致配置失效! | ||
* < | * <code>nmlgc/script_latin</code>: 包含了[[:File:THBiolinum (unscaled).otf|一个对拉丁、希腊和西里尔文字有足够Unicode覆盖率的字体]],拥有一些能够尽可能优化每个游戏的设置,包括对平文式罗马字形式的词语和图像的优化。 | ||
* < | * <code>nmlgc/western_name_order</code>: 正如其名,将Boss战中显示的名字改为西式顺序(先名后姓)。 | ||
* < | * <code>thpatch/lang_en</code>: 这个补丁不仅仅是会带来最新的英文翻译,它还确保在配置工具中选择补丁时,翻译补丁的任何其他依赖(如上面提到的所有三个补丁包)都将存在。 | ||
===== | ===== 样例 ===== | ||
使用非英语拉丁语脚本语言的翻译补丁的基本配置: | |||
< | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
<syntaxhighlight lang="json" inline> | |||
{ | { | ||
"dependencies": [ | "dependencies": [ | ||
Line 71: | Line 72: | ||
] | ] | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
</div> | |||
以上所有内容(将来可能更多)再附上英语翻译的设置: | |||
< | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
<syntaxhighlight lang="json" inline> | |||
{ | { | ||
"dependencies": [ | "dependencies": [ | ||
Line 80: | Line 83: | ||
] | ] | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
</div> | |||
==== | ==== 字体 ==== | ||
若您的补丁包含自定义字体, 请用<code>fonts</code>进行注册。 以下是对游戏应用补丁前需要加载 | |||
的字体列表: | |||
< | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
<syntaxhighlight lang="json" inline> | |||
{ | { | ||
"fonts": { | "fonts": { | ||
Line 92: | Line 98: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</div> | |||
(thcrap并不检查这些项目的值,"true"仅为参考) | |||
==== | ==== 好的,接下来我该怎么做 ==== | ||
thcrap可以做很多事情。 ☺ 在我们全部进行介绍前,您最好先看看我们的补丁如何实现您的 | |||
打算。若您仍有疑问,请进入我们的IRC聊天室提问,我们很乐意为您解答。 | |||
=== | === 建立服务器 === | ||
本教程的剩余部分因您使用的网络空间或服务器提供商而异。 | |||
==== | ==== 使用[[File:GitHub.png|24px]] [https://www.github.com/ GitHub] ==== | ||
此为推荐选项。它能使你的仓库处于版本控制的管理下并储存历史补丁版本,并可以方便的 | |||
在Github上进行阅览。我们也考虑为thcrap的更新程序添加Git支持,以此让安装更为简便。 | |||
如果您已经熟悉Git: 只需在每次提交前运行<code>repo_update.py</code>。如果您不熟悉,以下是 | |||
如何在Windows进行设置: | |||
# | # 确保你的 Thcrap 为 [[Project:Download|2014-05-08或更新]]版本。此版本对仓库脚本进行了一些重要更改。并确保 thcrap.zip 及其内容与补丁位于同一目录下。 否则将提示“ repo_update 丢失”的错误。 | ||
# | # 如果您没有 GitHub 账户,请前往网站注册。 | ||
# <p> | # <p>在您的用户界面上,使用默认设置创建一个新仓库。它的名称无需与您在本地的 <code>RepoDir</code> 名称一致。</p><p>[[File:GitHub Tutorial 02 - Dashboard.png|border]]</p><p>[[File:GitHub Tutorial 03 - New repo.png|border]]</p> | ||
# | # 下载并安装 [https://windows.github.com/ GitHub Windows 客户端]并登录你的 GitHub 账户。 | ||
# <p> | # <p>在 Options 选项卡中,设置''default storage directory''为你的 thcrap 目录,并在''configure git''项中填入用户名和邮箱。</p><p>[[File:GitHub Tutorial 05 - Login.png|border]]</p> | ||
# <p> | # <p>将你在GitHub创建的仓库Clone到 Thcrap 目录。<br />如果你的本地目录与 GitHub 仓库名一样则会导致失败。这种情况下,只需要暂时先重命名本地目录,之后待Clong完成后将所有的文件移入新建的目录即可。</p><p>[[File:GitHub Tutorial 06 - Clone.png|border]]</p> | ||
# <p> | # <p>在新Clone好的目录中,创建名为<code>Update.bat</code>的文件,用于运行Thcrap的更新脚本:</p> | ||
<syntaxhighlight lang="dos"> | <syntaxhighlight lang="dos"> | ||
C:\path\to\python.exe ..\scripts\repo_update.py | C:\path\to\python.exe ..\scripts\repo_update.py | ||
pause | pause | ||
</syntaxhighlight> | </syntaxhighlight> | ||
:: | :: 之后运行 <code>Update.bat</code> 并设置仓库的基本参数。 仓库ID应当与目录名称一致,GitHub 的公共 URL 为: | ||
:::< | :::<code><nowiki>https://raw.githubusercontent.com/</nowiki>''GitHub 用户名''/''GitHub 仓库名''/master/</code> | ||
::<p>[[File:GitHub Tutorial 07 - repo_update.png|border]]</p> | ::<p>[[File:GitHub Tutorial 07 - repo_update.png|border]]</p> | ||
以上是基本设置。下面是在完成补丁制作后,如何将其发布: | |||
# | # 运行<code>Update.bat</code>。 | ||
# | # 打开 GitHub 客户端并进入您的补丁仓库页面。页面应当为您提供自上次提交以来的所有更改以及创建新更改的选项。<br /><del>'''请务必于运行更新脚本后立即操作!''' 如果在'''提交之前'''运行 Thcrap 使用正在编辑的补丁,更新程序将使用服务器上该补丁的最后状态'''覆写'''你的更改!</del> 自2017-02-05起,若补丁位于git仓库中,自动更新将禁用。 | ||
# <p> | # <p>验证您将要提交的更改。如果一切正常的话,每个您更改的文件在所受影响补丁的<code>files.js</code>中应该具有不同的校验和:</p><p>[[File:GitHub Tutorial 08 - Commit.png|border]]</p> | ||
# | # 之后,只需单击''commit to master'',并单击''publish'',您的更改就会生效。 | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
<div style="clear:both;"></div> | <div style="clear:both;"></div> | ||
</div> | |||
== | == 推广你的仓库 == | ||
为了让您的补丁在全球范围内被其他人看到并能够使用,通常有以下三种方法: | |||
* | * 在您的仓库被上传,其他人都可以通过使用您的 URL 作为命令行参数调用 <code>thcrap</code> 发现它。 | ||
* | * 如果您有自己的网站、博客等,您可以上传一个在目录中包含<code>repo.js</code>文件的自定义版本。 虽然我们不推荐这么做。 | ||
* | * 然而最好的方式是在 https://thpatch.net/w/logos/discord.png [https://discord.thpatch.net Discord] 联系并告诉我们您的仓库 URL ,以作为我们的邻居之一在东方补丁中心网络中列出。 | ||
[[Category:Project overview]] |
Latest revision as of 16:30, 16 October 2023
项目总览 | ||||||
---|---|---|---|---|---|---|
关于 | 教程 | FAQ |
下载 | 补丁服务器 | Bug 反馈 | Wiki 安全性 |
镜像
为保持我们的翻译可用性,由Touhou Community Reliant Automatic Patcher使用的补丁数据在多个服务器上被镜像。
Server | URL |
---|---|
thpatch.net main server (HTTPS) | https://srv.thpatch.net/ |
作为主服务器,srv.thpatch.net是最新的资源,并且在wiki出现修改时直接接收翻译。 其他镜像每分钟从那里同步出最新状态。
就像维基上的内容一样,此服务器上的翻译和图像都根据署名-相同方式共享 4.0 国际许可。
邻居
此列表包含一些第三方补丁的仓库链接,这些仓库不受我们控制。当指向Touhou Patch Center时,配置工具还将提供从这些仓库中选择补丁的功能。
如果你想让你的补丁也包含在此列表,请发送邮件至submissions@thpatch.net
,并在邮件中提供仓库的公共路径(repo.js
中的"servers"
值)。如果你使用git管理服务器,还可以请求将其自动镜像到mirrors.thpatch.net
。为了在原始主机发生故障时保证补丁的可用性,强烈建议你这样做。
URL | Title | Patches |
---|---|---|
https://mirrors.thpatch.net/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/Nutzer/Touhou-8.3/master/ | Nutzer |
|
https://raw.githubusercontent.com/Zrrg/UnKnwn/master/ | UnKnwn Thcrap Repository |
|
https://raw.githubusercontent.com/DTM9025/DTM/master/ | DTM's Patch Repository |
|
https://mirrors.thpatch.net/wobuffet3/ | Wobuffet3's patches |
|
https://mirrors.thpatch.net/PookChang'e/ | Pook Chang'e's Patches |
|
https://mirrors.thpatch.net/MasterGameFTW3561/ | MGFTWH3561's Mods |
|
https://raw.githubusercontent.com/Tearff/Tear/master/ | Tear's Touhou Mods |
|
https://raw.githubusercontent.com/GhostPhanom/GhostPhanom-Thcrap/master/ | GhostPhanom's strange thoughts |
|
https://mirrors.thpatch.net/Bravi/ | Bravi's creations |
A stage 6 midboss got added in th13, 15, and 16 as well. Okina in Stage 6, Extra (turned into Phantasm) that got a revamp, Wrong/Nightmare Saturdays that got a stage background revamp too Yukari in Day 10 Futo and Tojiko in Stage 5 Seiran in Stage 1 Mayumi in stages 5 and 6, got new additions to Keiki's fight too Megumu in stage 5.)
Also please refrain from selecting this patch along with the OCOkina patch...)
Okina's fight has the order of the seasons shuffled, and Mai and Satono drop too many ressources. Keiki and Saki also seem to be affected by a curse, making them wrathful.)
|
https://raw.githubusercontent.com/Priw8/thmod/master/ | Priw8's mods |
|
https://mirrors.thpatch.net/Splashman/ | Splashman's BGM patches. |
|
https://mirrors.thpatch.net/MoriyaFaith/ | @MoriyaFaith#9287 |
|
https://mirrors.thpatch.net/PKWeegee/ | PKWeegee |
|
https://mirrors.thpatch.net/dass7/ | DassRepo |
|
https://raw.githubusercontent.com/SMB7/SMB3Memes/master/ | SMB3's Meme Patches |
|
https://raw.githubusercontent.com/WindowDump/thcrap_mods/master/ | Window Dump's Mod Dump |
|
https://mirrors.thpatch.net/Vasteel/ | Misc Touhou mods |
|
https://raw.githubusercontent.com/Daikarasu/DaiMod/master/ | Daikarasu's repository of Touhou patches |
Currently supports: th14, th15, th16, th16.5, th17, th18, th18.5)
Makes every attack purely RNG. (v2.0))
Adds a TF2-styled kill cam to the game, which zooms in to the enemy that killed you (if it is still alive). Should be fully compatible with vanilla replays!)
|
https://mirrors.thpatch.net/Clover/ | Clover Music Mods |
|
https://raw.githubusercontent.com/32th-System/crap/master/ | 32th's Patch Repo |
|
https://mirrors.thpatch.net/Gensokyo.EXE/ | Gensokyo Executors |
|
https://mirrors.thpatch.net/pgj1997/ | Pgj1997's Patches |
|
https://raw.githubusercontent.com/rosenrose/thmod/master/ | rosenrose's Patch Repo |
(TH10)MarisaA→ReimuC style, MarisaC→ReimuA style (TH11)ReimuA→MarisaA style, ReimuB→MarisaB style, MarisaB→ReimuB style)
by Dide, https://snipestalker.blog.me/221508374213)
|
https://mirrors.thpatch.net/AsyrafFile/ | Tampalan THCRAP AsyrafFile |
|
https://raw.githubusercontent.com/ExpHP/thcrap-patches/master/patches/ | Patches by ExpHP |
UM not well-tested. Defaults to 16x everything. To configure, see http://exphp.github.io/thpages/#/mods/bullet-cap)
|
https://raw.githubusercontent.com/Arandui/trash_patch/master/ | Trash Ideas |
|
https://mirrors.thpatch.net/tpZHCNex/ | thpatch zh-hans ex-patches |
|
https://raw.githubusercontent.com/bttf0504/thmod/master/ | BTTF's Patch Repo |
|
https://raw.githubusercontent.com/chrisGrando/thcrap-patches/master/ | Dreamland's Crazy Tea Party |
|
https://mirrors.thpatch.net/sqrt/ | Welcome to sqrt-net! |
|
https://mirrors.thpatch.net/someguy/ | Bullet Artistry |
|
https://mirrors.thpatch.net/LmocinemodPatchRepo/ | Lmocinemod's (Low-Effort) Patch Repository |
|
https://raw.githubusercontent.com/zero318/thcrap_patches/master/patches/ | zero318's Patch Pile |
|
https://raw.githubusercontent.com/PartyParrotTH/PartyParrot-s-Patches-Repository/master/ | Party Parrot's Patches Repository |
|
https://mirrors.thpatch.net/WilliamDavi/ | This Repository maybe have some bgm and bullets edits |
|
https://mirrors.thpatch.net/shirokura/ | shirokura's Repository |
|
https://raw.githubusercontent.com/yeashie/yeashiePatches/master/ | yeashie |
|
https://mirrors.thpatch.net/redirectto/ | redirectto's patches |
|
https://mirrors.thpatch.net/Revenant/ | Revenant's Touhou hacks |
|
https://raw.githubusercontent.com/WishMakers0/th_crap/master/ | Wish's Scripts |
|
https://mirrors.thpatch.net/Guy/ | Guy's patches |
|
https://raw.githubusercontent.com/KabanFriends/THGTE/master/ | Project 6 (a.k.a. Touhou Project: Google Translate Edition) |
|
https://mirrors.thpatch.net/Shoxlu/ | Some projects. |
|
https://mirrors.thpatch.net/Kogasas_Mods/ | Kogasa's Mods |
|
https://mirrors.thpatch.net/TESM/ | TESM's Patches |
|
https://mirrors.thpatch.net/Clb184/ | Clb184 stuff |
|
https://mirrors.thpatch.net/Wasted/ | Wasted mods |
|
https://raw.githubusercontent.com/BrosterMedia/touhoupatches/main/ | Broster Thcrap Repository |
|
https://mirrors.thpatch.net/egor/ | egor's patches |
|
https://mirrors.thpatch.net/mintymods/ | Mints' Semi-Functional Patch Repository |
|
https://mirrors.thpatch.net/yova/ | Yova's Repository of Hirokawa Ghost |
|
https://mirrors.thpatch.net/SuperChrim/ | SuperChrim's Patch Repository |
Supports th6, th7, th8, th9, th10, th11, th12, th13, th14, th143, th15, th16)
|
https://mirrors.thpatch.net/TRDario/ | TRDario's patches |
|
https://mirrors.thpatch.net/yuureiki/ | yuureiki's Patches |
|
https://mirrors.thpatch.net/tpZHCHTex/ | Thpatch Chinese Traditional ex-Patches. |
|
https://mirrors.thpatch.net/farawayvision/ | FarawayVision's patches |
|
https://raw.githubusercontent.com/megapig9001/megapig9001-mods/main/ | Megapig9001 Mods |
|
https://mirrors.thpatch.net/SSM/ | SSM's Patches |
|
https://mirrors.thpatch.net/catysumi/catysumi/ | Profaned Red Moon Team |
|
https://mirrors.thpatch.net/DedeHead/ | ZeZunStyler's Mods |
|
搭建自己的补丁服务器
请注意,本指南有点过时了。现在最常用的提供服务的方法是通过mirrors.thpatch.net,它可以自动执行 还要注意,GitHub for Windows已由GitHub Desktop取代,后者具有不同的接口。 |
对于2014-01-26及以后的版本, thcrap 包含了一个Python脚本,它可以帮助你构建你自己的自更新补丁服务器。您可以在其中发布自己的补丁,同时完全控制它们。虽然这听起来很复杂,但实际上并没有那么复杂——我们特意以不需要特定服务器软件的方式设计系统。可以使用任何支持HTTP协议并允许在保留文件名和目录结构的情况下将任意文件存储并发布到网络的任何东西。
要做到这件事,你甚至无需为网络存储付费;有许多免费的云存储提供商可以很好的工作。在下面,您可以找到有关如何在免费云存储上设置自己的存储库的教程。所有这些教程都是仅针对Windows编写的,但如果你使用其他操作系统,你应该可以毫无困难地适应它们。☺
概述
术语解释:
- 首先我们有 补丁 。补丁基本上只是无序的文件集合,它们可以替换某些游戏原始数据。一个补丁可以为不限数量的游戏提供数据。
- 补丁在 仓库 中分组。仓库依次是一个人或社区提供和控制的所有不同补丁的集合。
首先创建一个 仓库 ,然后创建一个或多个 补丁 ,然后定期将其发布在 服务器 上
本地配置
首先,你需要给仓库取一个 全局唯一的短ID 。这可以只是你的名字,或者你社区的名字。本教程中,我们就用 RepoDir
。
你还需要做下面这些:
- 下载并安装 Python 3 ,如果你还没有安装,确保记住它的安装路径。
(这是一种编程语言,用于编写构建仓库的脚本) - 在你的thcrap目录中,新建以
RepoDir
命名的目录。
这将会是你的 本地仓库路径 ,也就是你所有补丁开发的地方。 - 在
RepoDir
中,为每个补丁创建一个新目录,并以各自的短ID命名。本教程就以PatchDir
为例。
补丁配置
在 RepoDir\PatchDir
中为每个补丁创建一个名为 patch.js
的文件。这是强制性的,否则构建脚本将无法识别该补丁。
所有 .js
结尾的文件都是 JSON格式的文件。您可以使用类似 JSONLint 的网站验证其语法。
请注意,你放在 所有 补丁目录下的 所有文件 都将被脚本发布,并被所有使用了你的补丁的人下载! |
依赖
依赖使用 patch.js
中的 dependencies
数组设置,并确保配置工具自动为您的补丁提取所有必需的功能。
依赖声明的格式为 repo_id/patch_id
。repo_id
是可选的——若省略,首先会在你的仓库中解析,随后在用户发现的所有仓库中全局解析。注意,使用不在你仓库中的补丁可能会带来意料之外的后果。
你可能需要或者想依赖的补丁包有这么一些:
nmlgc/base_tsa
: Windows上的东方游戏的最基础技术支持包。如果你的补丁包要在任何这些游戏中生效,请一定要确保依赖这个补丁包!否则配置工具不会把这个包同步下来,也就会导致配置失效!nmlgc/script_latin
: 包含了一个对拉丁、希腊和西里尔文字有足够Unicode覆盖率的字体,拥有一些能够尽可能优化每个游戏的设置,包括对平文式罗马字形式的词语和图像的优化。nmlgc/western_name_order
: 正如其名,将Boss战中显示的名字改为西式顺序(先名后姓)。thpatch/lang_en
: 这个补丁不仅仅是会带来最新的英文翻译,它还确保在配置工具中选择补丁时,翻译补丁的任何其他依赖(如上面提到的所有三个补丁包)都将存在。
样例
使用非英语拉丁语脚本语言的翻译补丁的基本配置:
{ "dependencies": [ "nmlgc/base_tsa", "nmlgc/script_latin", "nmlgc/western_name_order" ] }
以上所有内容(将来可能更多)再附上英语翻译的设置:
{ "dependencies": [ "thpatch/lang_en" ] }
字体
若您的补丁包含自定义字体, 请用fonts
进行注册。 以下是对游戏应用补丁前需要加载
的字体列表:
{ "fonts": { "Font1.ttf": true, "Font2.otf": true } }
(thcrap并不检查这些项目的值,"true"仅为参考)
好的,接下来我该怎么做
thcrap可以做很多事情。 ☺ 在我们全部进行介绍前,您最好先看看我们的补丁如何实现您的 打算。若您仍有疑问,请进入我们的IRC聊天室提问,我们很乐意为您解答。
建立服务器
本教程的剩余部分因您使用的网络空间或服务器提供商而异。
使用 GitHub
此为推荐选项。它能使你的仓库处于版本控制的管理下并储存历史补丁版本,并可以方便的 在Github上进行阅览。我们也考虑为thcrap的更新程序添加Git支持,以此让安装更为简便。
如果您已经熟悉Git: 只需在每次提交前运行repo_update.py
。如果您不熟悉,以下是
如何在Windows进行设置:
- 确保你的 Thcrap 为 2014-05-08或更新版本。此版本对仓库脚本进行了一些重要更改。并确保 thcrap.zip 及其内容与补丁位于同一目录下。 否则将提示“ repo_update 丢失”的错误。
- 如果您没有 GitHub 账户,请前往网站注册。
在您的用户界面上,使用默认设置创建一个新仓库。它的名称无需与您在本地的
RepoDir
名称一致。- 下载并安装 GitHub Windows 客户端并登录你的 GitHub 账户。
在 Options 选项卡中,设置default storage directory为你的 thcrap 目录,并在configure git项中填入用户名和邮箱。
将你在GitHub创建的仓库Clone到 Thcrap 目录。
如果你的本地目录与 GitHub 仓库名一样则会导致失败。这种情况下,只需要暂时先重命名本地目录,之后待Clong完成后将所有的文件移入新建的目录即可。在新Clone好的目录中,创建名为
Update.bat
的文件,用于运行Thcrap的更新脚本:
C:\path\to\python.exe ..\scripts\repo_update.py
pause
以上是基本设置。下面是在完成补丁制作后,如何将其发布:
- 运行
Update.bat
。 - 打开 GitHub 客户端并进入您的补丁仓库页面。页面应当为您提供自上次提交以来的所有更改以及创建新更改的选项。
请务必于运行更新脚本后立即操作! 如果在提交之前运行 Thcrap 使用正在编辑的补丁,更新程序将使用服务器上该补丁的最后状态覆写你的更改!自2017-02-05起,若补丁位于git仓库中,自动更新将禁用。 验证您将要提交的更改。如果一切正常的话,每个您更改的文件在所受影响补丁的
files.js
中应该具有不同的校验和:- 之后,只需单击commit to master,并单击publish,您的更改就会生效。
推广你的仓库
为了让您的补丁在全球范围内被其他人看到并能够使用,通常有以下三种方法:
- 在您的仓库被上传,其他人都可以通过使用您的 URL 作为命令行参数调用
thcrap
发现它。 - 如果您有自己的网站、博客等,您可以上传一个在目录中包含
repo.js
文件的自定义版本。 虽然我们不推荐这么做。 - 然而最好的方式是在 Discord 联系并告诉我们您的仓库 URL ,以作为我们的邻居之一在东方补丁中心网络中列出。