Update CONTRIBUTING & README

This commit is contained in:
Akitake 2024-11-21 13:07:14 +01:00
parent 34eba84adf
commit 4acf22ed53
2 changed files with 35 additions and 29 deletions

View File

@ -1,37 +1,41 @@
# Contributing
*You may help the community by contributing patches.*
*We welcome your contributions to enhance this patcher.*
## How?
## How to Contribute
1. **Fork** the project if you don't already have it
2. **Add/Modify/Stage/Commit** files as necessary **BUT don't Push/Sync them yet**
3. **Run** the `checks.py` script with `python checks.py`
4. If the script did anything: **Commit** its changes
5. **Push/Sync** the changes to your repo
6. **Propose a Pull Request** and we'll get to it asap
1. **Fork the Repository**
If you haven't already, fork the repository to your GitHub account.
Once a pull request is merged, patches will be available within minutes at `https://sp2x.two-torial.xyz/`
2. **Make Your Changes**
Add, modify, stage, and commit your changes locally. **Do not push/sync yet.**
### /!\ Important Note
When adding a new game version, add it to the [List of supported games](SUPPORTED.md) using the existing format, we won't merge your PR until you do.
3. **Run Checks**
Execute the `checks.py` script by running: `python checks.py`
If the script makes any changes, commit those changes.
4. **Push Your Changes**
Push/sync your changes to your forked repository.
5. **Submit a Pull Request**
Submit a pull request to the main repository. We will review it promptly, address any issues, and merge it.
Once your pull request is merged, the patches will be available within minutes at `https://sp2x.two-torial.xyz/`.
### Important Note
When adding a new game version, ensure it is included in the [List of Supported Games](SUPPORTED.md) using the existing format. Your PR will not be merged until this is done.
## JSON Naming
**Spice2x patches have one json file per game version**.
It needs to be **[named in a very specific way](https://github.com/spice2x/spice2x.github.io/wiki/patches.json-specification#pe-identifier)** to be recognized by the [Spice2x 'Import from URL'](https://github.com/spice2x/spice2x.github.io/wiki/Patching-DLLs-(hex-edits)#importing-patches-from-a-url) feature.
**Each Spice2x patch must have a separate JSON file for each game version.**
The file must be [named according to specific guidelines](https://github.com/spice2x/spice2x.github.io/wiki/patches.json-specification#pe-identifier) to be recognized by the [Spice2x 'Import from URL'](https://github.com/spice2x/spice2x.github.io/wiki/Patching-DLLs-(hex-edits)#importing-patches-from-a-url) feature.
A python [peinfo.py](https://github.com/akitakedits/peinfo) script is available to help you figure that name out for your provided game's dll file.
Check out [peinfo's README](https://github.com/akitakedits/peinfo/blob/main/README.md) for more information.
A Python script, [peinfo.py](https://github.com/akitakedits/peinfo), is available to help you determine the correct name for your game's DLL file.
## Converting web to json (spice2x) patches
## Creating Spice2x Patches
Right now **this has to be done manually**, however we plan on having tooling available to make this easier.
Look at the files respective structures (html and json) and try to figure it out yourself.
**To support a new game version, you need to create its Spice2x patches from scratch.**
Hexadecimal signature matching can help in porting patches between different game versions.
This method is not foolproof and patches could break if the game changes too much, but it's still highly effective for MOST patches.
## Porting spice2x patches
It is possible to port patches from **one version of a game to another**.
A python [port_sp2x_patches.py](https://github.com/akitakedits/port_sp2x_patches) script is available to help you through some of that work.
However it will **not be able to port all patches** and it will **not always be 100% accurate**, **false positives can occur**.
Porting patches the script cannot, or fixing false positives will have to be done manually.
**You can use the Python script [find_sp2x_patches.py](https://github.com/akitakedits/find_sp2x_patches) to facilitate this process.**

View File

@ -1,16 +1,18 @@
# [TWO-TORIAL](https://two-torial.xyz)'s Spice2x Patcher
### URL: `https://sp2x.two-torial.xyz/`
### [List of Supported Games](SUPPORTED.md)
### [Join our Discord server!](https://discord.gg/cZRUmEPK78)
### [Supported Games](SUPPORTED.md)
### [Join our Discord!](https://discord.gg/cZRUmEPK78)
## About
This repo contains patches compatible with [Spice2x's 'Import from URL'](https://github.com/spice2x/spice2x.github.io/wiki/Patching-DLLs-(hex-edits)#importing-patches-from-a-url) feature. For anything else, see our [web patcher](https://patcher.two-torial.xyz/).
We'll be keeping the **repo public** and **url alive** for as long as possible, **feel free to [contibute patches](CONTRIBUTING.md)** for the community through pull requests!
This repository offers patches for the [Spice2x 'Import from URL'](https://github.com/spice2x/spice2x.github.io/wiki/Patching-DLLs-(hex-edits)#importing-patches-from-a-url) feature. For other options, check our [web patcher](https://patcher.two-torial.xyz/).
We aim to keep this repository public and the URL active for as long as possible. Feel free to [contribute patches](CONTRIBUTING.md) via pull requests!
## Usage
See our guide on [spice2x patching](https://two-torial.xyz/extras/patchsp2x/) and use the url provided above.
For Spice2x patching instructions, see our [patching guide](https://two-torial.xyz/extras/patchsp2x/) and use the URL above.
## [Contributing](CONTRIBUTING.md)
Contributions are very welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.