two-torial-sp2xpatcher/CONTRIBUTING.md

42 lines
2.0 KiB
Markdown
Raw Normal View History

2024-06-30 22:43:42 +02:00
# Contributing
2024-11-21 13:07:14 +01:00
*We welcome your contributions to enhance this patcher.*
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
## How to Contribute
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
1. **Fork the Repository**
If you haven't already, fork the repository to your GitHub account.
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
2. **Make Your Changes**
Add, modify, stage, and commit your changes locally. **Do not push/sync yet.**
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
3. **Run Checks**
Execute the `checks.py` script by running: `python checks.py`
If the script makes any changes, commit those changes.
2024-07-11 13:37:23 +02:00
2024-11-21 13:07:14 +01:00
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/`.
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
### Important Note
2024-11-21 13:09:08 +01:00
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.**
2024-11-21 13:07:14 +01:00
## JSON Naming
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
**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.
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
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.
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
## Creating Spice2x Patches
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
**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.
2024-06-30 22:43:42 +02:00
2024-11-21 13:07:14 +01:00
**You can use the Python script [find_sp2x_patches.py](https://github.com/akitakedits/find_sp2x_patches) to facilitate this process.**