-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
65 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "papers-tools" | ||
version = "0.1.0" | ||
version = "1.0.0" | ||
edition = "2021" | ||
authors = ["creepycode"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,73 @@ | ||
# Papers Tools | ||
|
||
## Unpacking `Art.dat`: | ||
## Unpacking `sharedassets0.assets`: | ||
|
||
```bash | ||
./papers-tools -i ./Art.dat -o ./out -g /path/to/game/dir | ||
./papers-tools -g /path/to/steamapps/common/PapersPlease unpack | ||
``` | ||
|
||
## Packing a folder into the `Art.dat` format: | ||
You can also pass the Art.dat file as the input directly. | ||
|
||
## Patching | ||
|
||
To overwrite textures, just put the new texture in the same path as the original one, with the same name. For example, | ||
to replace the `RifleTranq.png` texture, put the new texture in `patch/assets/textures/RifleTranq.png`. | ||
Editing xml files is also supported. The tool will merge your changes with the original file. Example for adding a new | ||
paper (`patch/assets/data/Papers.xml`): | ||
|
||
```xml | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<papers> | ||
<paper id="ExamplePaper" outer="ExamplePaperOuter.png" reveal="fromslot" oddshape="true"> | ||
<page image="ExamplePaperInner.png"/> | ||
</paper> | ||
</papers> | ||
``` | ||
|
||
for more information on the format, just check out the unpacked files. | ||
Replacing audio files is also supported, but a separate json file is needed to map the original audio file to the new | ||
one. Example (json path: `patch/audio_patches.json` audio path: `patch/audio/awp.fsb`): | ||
|
||
```json | ||
[ | ||
{ | ||
"objectName": "border-gunshot", | ||
"patchedPath": "audio/awp.fsb", | ||
"loadType": 0, | ||
"channels": 2, | ||
"frequency": 48000, | ||
"bitsPerSample": 16, | ||
"length": 4.642667, | ||
"isTrackerFormat": false, | ||
"subsoundIndex": 0, | ||
"preloadAudioData": false, | ||
"loadInBackground": false, | ||
"legacy3d": true, | ||
"compressionFormat": "adpcm" | ||
} | ||
] | ||
``` | ||
|
||
Please note that the audio files need to be unity compatible fmod sound banks. Any other format will not work. | ||
|
||
To apply the patch, run: | ||
|
||
```bash | ||
./papers-tools -i ./dir -o Art-modded.dat -g /path/to/game/dir | ||
./papers-tools -g /path/to/steamapps/common/PapersPlease patch -p patch | ||
``` | ||
|
||
The first folder will not be included in the asset names when packing. So make sure your folder structure is something like: | ||
* `./dir/assets/some_texture.png` | ||
* `./dir/assets/some_other_texture.png` | ||
* `./dir/assets/fonts/some_font.fnt` | ||
`-p patch` can be omitted if the patch is in the default path `patch`. | ||
|
||
## Reverting | ||
|
||
To revert the changes made by the patch, run: | ||
|
||
```bash | ||
./papers-tools -g /path/to/steamapps/common/PapersPlease revert | ||
``` | ||
|
||
For less common used commands, check the built-in help: | ||
|
||
```bash | ||
./papers-tools -h | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters