This commit is contained in:
DazedAnon 2026-07-09 17:24:37 -05:00
parent ae17564a1c
commit 79c5665f43

316
README.md
View file

@ -1,159 +1,159 @@
# Apply Patch # Apply Patch
1. Click Code 1. Click Code
2. Click Download ZIP 2. Click Download ZIP
3. Extract to game folder and Replace All. 3. Extract to game folder and Replace All
## Future Patching ## Future Patching
1. Run **`GameUpdate.bat`** to auto patch (Windows). 1. Run **`GameUpdate.bat`** to auto patch (Windows).
### Folder layout ### Folder layout
**In this translation-tool repo:** Patch payloads stay tidy inside **`gameupdate/gameupdate/`** (`patch.ps1`, `patch-config.txt`, etc.). **`GameUpdate.bat`** and **`GameUpdate_linux.sh`** sit one level up, under **`gameupdate/`**. **In this translation-tool repo:** Patch payloads stay tidy inside **`gameupdate/gameupdate/`** (`patch.ps1`, `patch-config.txt`, etc.). **`GameUpdate.bat`** and **`GameUpdate_linux.sh`** sit one level up, under **`gameupdate/`**.
**On an installed game (what gets copied over):** Put **`GameUpdate.bat`** in the **game root**, next to the game exe. Put **`patch.ps1`** and friends inside **`gameupdate\`** under that same root (mirror names—still **`gameupdate\`**). **`GameUpdate.bat`** finds **`gameupdate\patch.ps1`** from its own folder, so **`GameRoot`** is correct even if the console cwd is somewhere else. **On an installed game (what gets copied over):** Put **`GameUpdate.bat`** in the **game root**, next to the game exe. Put **`patch.ps1`** and friends inside **`gameupdate\`** under that same root (mirror names—still **`gameupdate\`**). **`GameUpdate.bat`** finds **`gameupdate\patch.ps1`** from its own folder, so **`GameRoot`** is correct even if the console cwd is somewhere else.
**Copy checklist:** From **`DazedMTLTool/gameupdate/`**, copy **`GameUpdate.bat`** to `<game>\`; copy everything inside **`gameupdate/gameupdate/`** into `<game>\gameupdate\`. **Copy checklist:** From **`DazedMTLTool/gameupdate/`**, copy **`GameUpdate.bat`** to `<game>\`; copy everything inside **`gameupdate/gameupdate/`** into `<game>\gameupdate\`.
2. Optional: set `GAMEUPDATE_PROMPT_PWSH=1` before running `GameUpdate.bat` if you want users to be prompted to install PowerShell 7 via winget. 2. Optional: set `GAMEUPDATE_PROMPT_PWSH=1` before running `GameUpdate.bat` if you want users to be prompted to install PowerShell 7 via winget.
3. Optional: set `GAMEUPDATE_DL_ATTEMPTS` (default `2`) to control retries for API checks/downloads. Lower values fail faster; higher values tolerate flaky networks. 3. Optional: set `GAMEUPDATE_DL_ATTEMPTS` (default `2`) to control retries for API checks/downloads. Lower values fail faster; higher values tolerate flaky networks.
### patch-config.txt ### patch-config.txt
Create `gameupdate/patch-config.txt` next to `patch.ps1` (see `patch-config.example.txt`). Create `gameupdate/patch-config.txt` next to `patch.ps1` (see `patch-config.example.txt`).
In DazedMTLTool, set **Config → Game Update Defaults** (forge, host, org/username, branch) once. Step 1 **Copy gameupdate/** writes those into each game's `patch-config.txt`. You still set `repo=` per game. In DazedMTLTool, set **Config → Game Update Defaults** (forge, host, org/username, branch) once. Step 1 **Copy gameupdate/** writes those into each game's `patch-config.txt`. You still set `repo=` per game.
```txt ```txt
forge=gitlab forge=gitlab
host=gitgud.io host=gitgud.io
username=YOUR_ORG_OR_USER username=YOUR_ORG_OR_USER
repo=YOUR_PATCH_REPO repo=YOUR_PATCH_REPO
branch=main branch=main
``` ```
| Key | Meaning | | Key | Meaning |
|-----|---------| |-----|---------|
| `forge` | `gitlab` (default), `github`, or `forgejo` (`gitea` also accepted) | | `forge` | `gitlab` (default), `github`, or `forgejo` (`gitea` also accepted) |
| `host` | Hostname only. Defaults: `gitgud.io` / `github.com` / `codeberg.org` | | `host` | Hostname only. Defaults: `gitgud.io` / `github.com` / `codeberg.org` |
| `username` | Owner / org / group (`owner=` / `org=` aliases work) | | `username` | Owner / org / group (`owner=` / `org=` aliases work) |
| `repo` | Repository name | | `repo` | Repository name |
| `branch` | Branch to track | | `branch` | Branch to track |
Examples: Examples:
```txt ```txt
# GitLab / gitgud # GitLab / gitgud
forge=gitlab forge=gitlab
host=gitgud.io host=gitgud.io
username=myorg username=myorg
repo=cool-game-en repo=cool-game-en
branch=main branch=main
# GitHub # GitHub
forge=github forge=github
host=github.com host=github.com
username=myorg username=myorg
repo=cool-game-en repo=cool-game-en
branch=main branch=main
# Forgejo / Codeberg # Forgejo / Codeberg
forge=forgejo forge=forgejo
host=codeberg.org host=codeberg.org
username=myorg username=myorg
repo=cool-game-en repo=cool-game-en
branch=main branch=main
``` ```
Older configs with only `username` / `repo` / `branch` still work (assumes GitLab on `gitgud.io`). Older configs with only `username` / `repo` / `branch` still work (assumes GitLab on `gitgud.io`).
# Troubleshooting # Troubleshooting
**GAMEUPDATE.bat doesn't update and closes immediately** **GAMEUPDATE.bat doesn't update and closes immediately**
1. Make sure your path doesn't contain any Japanese characters or lots of whitespace. 1. Make sure your path doesn't contain any Japanese characters or lots of whitespace.
2. Make sure you actually have permissions in the folder 2. Make sure you actually have permissions in the folder
3. Auto-update calls the forge's public HTTP API (GitLab `/api/v4`, GitHub `/repos/...`, Forgejo `/api/v1`), not the web “Download ZIP” button - no account is required for public patch repos. 3. Auto-update calls the forge's public HTTP API (GitLab `/api/v4`, GitHub `/repos/...`, Forgejo `/api/v1`), not the web “Download ZIP” button - no account is required for public patch repos.
# Wolf Games # Wolf Games
WOLF RPG installs from DLSite ship a master `Data.wolf` archive that takes priority over loose English patch files. `GameUpdate.bat` detects that and unpacks it automatically with the bundled `UberWolfCli.exe` (MIT, [Sinflower/UberWolf](https://github.com/Sinflower/UberWolf)), then renames `Data.wolf` to `Data.wolf.bak` so the patched loose `Data/` files load. WOLF RPG installs from DLSite ship a master `Data.wolf` archive that takes priority over loose English patch files. `GameUpdate.bat` detects that and unpacks it automatically with the bundled `UberWolfCli.exe` (MIT, [Sinflower/UberWolf](https://github.com/Sinflower/UberWolf)), then renames `Data.wolf` to `Data.wolf.bak` so the patched loose `Data/` files load.
Just run **`GameUpdate.bat`**. No manual UberWolf download is required. Just run **`GameUpdate.bat`**. No manual UberWolf download is required.
If unpack fails (rare Pro / protected builds), unpack once with [UberWolf](https://github.com/Sinflower/UberWolf/releases), ensure a loose `Data/` folder exists, rename or remove `Data.wolf`, delete `gameupdate/previous_patch_sha.txt`, and run `GameUpdate.bat` again. If unpack fails (rare Pro / protected builds), unpack once with [UberWolf](https://github.com/Sinflower/UberWolf/releases), ensure a loose `Data/` folder exists, rename or remove `Data.wolf`, delete `gameupdate/previous_patch_sha.txt`, and run `GameUpdate.bat` again.
# Edit/Contribute # Edit/Contribute
TLDR 3 steps. TLDR 3 steps.
Fork the repository. Fork the repository.
Make the changes. Make the changes.
Submit a merge request. Submit a merge request.
If everything looks good and doesn't break things I'll merge it in. If everything looks good and doesn't break things I'll merge it in.
Longer Version: Longer Version:
# Required Software: # Required Software:
* [VSCode](https://code.visualstudio.com/) Make sure you check all the boxes for context menus. * [VSCode](https://code.visualstudio.com/) Make sure you check all the boxes for context menus.
* [Git](https://git-scm.com/downloads) (Use the default for everything. Just keep clicking Next) * [Git](https://git-scm.com/downloads) (Use the default for everything. Just keep clicking Next)
# Guide to contributing # Guide to contributing
### 1. Fork the Repository ### 1. Fork the Repository
- Go to the repository you want to fork. - Go to the repository you want to fork.
- Click the "Fork" button. - Click the "Fork" button.
### 2. Clone Your Fork ### 2. Clone Your Fork
- Clone your forked repository to your local machine. - Clone your forked repository to your local machine.
```sh ```sh
git clone https://gitgud.io/YOUR_USERNAME/REPO_NAME.git git clone https://gitgud.io/YOUR_USERNAME/REPO_NAME.git
``` ```
### 3. Make Your Changes (In VSCode) ### 3. Make Your Changes (In VSCode)
- Edit the files locally on your new branch using VSCode. - Edit the files locally on your new branch using VSCode.
- Add and commit your changes. - Add and commit your changes.
```sh ```sh
git add . git add .
git commit -m "Description of your changes" git commit -m "Description of your changes"
``` ```
### 4. Push Your Changes ### 4. Push Your Changes
- Push your changes to your fork on GitGud.io. - Push your changes to your fork on GitGud.io.
```sh ```sh
git push origin your-feature-branch git push origin your-feature-branch
``` ```
### 5. Create a Merge Request ### 5. Create a Merge Request
- Go to your fork on GitGud.io. - Go to your fork on GitGud.io.
- Click on "Merge Requests" in the sidebar. - Click on "Merge Requests" in the sidebar.
- Click the "New merge request" button. - Click the "New merge request" button.
- Select the branch you made changes to and the target project (the original repo). - Select the branch you made changes to and the target project (the original repo).
- Provide a title and description for your merge request and submit it. - Provide a title and description for your merge request and submit it.
--- ---
## Example ## Example
Assuming you want to fork a repository named `example-project`: Assuming you want to fork a repository named `example-project`:
### 1. Fork the Repo ### 1. Fork the Repo
- Navigate to `https://gitgud.io/original_user/example-project` and click "Fork". - Navigate to `https://gitgud.io/original_user/example-project` and click "Fork".
### 2. Clone Your Fork ### 2. Clone Your Fork
```sh ```sh
git clone https://gitgud.io/YOUR_USERNAME/example-project.git git clone https://gitgud.io/YOUR_USERNAME/example-project.git
``` ```
### 3. Make Changes and Commit ### 3. Make Changes and Commit
```sh ```sh
# Make changes to the files # Make changes to the files
git add . git add .
git commit -m "Add new feature to example project" git commit -m "Add new feature to example project"
``` ```
### 4. Push Changes ### 4. Push Changes
```sh ```sh
git push origin add-new-feature git push origin add-new-feature
``` ```
### 5. Create a Merge Request ### 5. Create a Merge Request
- Go to `https://gitgud.io/YOUR_USERNAME/example-project/merge_requests` and click on "New merge request" - Go to `https://gitgud.io/YOUR_USERNAME/example-project/merge_requests` and click on "New merge request"
- Choose the source branch `add-new-feature` and target branch (default: `main` or `master`) - Choose the source branch `add-new-feature` and target branch (default: `main` or `master`)
- Fill in the details and submit the merge request - Fill in the details and submit the merge request