You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
-
# deppth
2
-
Decompress, Extract, and Pack for Pyre, Transistor, and Hades.
1
+
# deppth2
2
+
Decompress, Extract, and Pack for Pyre, Transistor, Hades and Hades 2.
3
3
4
-
Deppth is a high-level I/O interface for package files in the games Transistor, Pyre, and Hades. Deppth provides both command-line and programmer interfaces.
4
+
Deppth2 is a high-level I/O interface for package files in the games Transistor, Pyre, Hades and Hades 2. Deppth provides both command-line and programmer interfaces.
5
5
6
6
## Installation
7
7
8
-
To install Deppth, download the latest [wheel](https://github.com/SGG-Modding/deppth/releases) and `pip install` it. Then read the following instructions to install dependencies.
8
+
To install Deppth2, download the latest [wheel](https://github.com/SGG-Modding/deppth/releases) and `pip install` it. Then read the following instructions to install dependencies.
9
9
10
10
### Dependencies
11
11
12
-
Deppth technically has no required dependencies outside of Python's core modules, but you may find its functionality very limited without also installing the following optional dependencies. If an optional dependency is missing, Deppth will abort an operation dependent on that module informing you of the missing module.
12
+
Deppth2 technically has no required dependencies outside of Python's core modules, but you may find its functionality very limited without also installing the following optional dependencies. If an optional dependency is missing, Deppth2 will abort an operation dependent on that module informing you of the missing module.
13
13
14
-
Packages primarily contain sprite sheets. Deppth uses Pillow to work with the image data within. If you plan to export/import sprite sheets to/from image files, you'll need to install that: `pip install pillow`.
14
+
Packages primarily contain sprite sheets. Deppth2 uses Pillow to work with the image data within. If you plan to export/import sprite sheets to/from image files, you'll need to install that: `pip install pillow`.
15
15
16
16
Hades uses LZ4 compression on its packages. If you plan to work with these packages, you'll want to install the LZ4 module: `pip install lz4`.
17
17
@@ -21,29 +21,29 @@ Transistor and Pyre both use LZF compression on their packages. If you plan to w
21
21
22
22
Let's say we want to edit a spritesheet in Launch.pkg. First, we'll want to **extract** the package to get the individual assets out.
23
23
24
-
deppth ex Launch.pkg
24
+
deppth2 ex Launch.pkg
25
25
26
26
This will create a folder called Launch in the current working directory. The texture atlases will be in the textures/atlases directory within there.
27
27
28
28
Let's say I edit Launch_Textures02.png. Now, to rebuild the package, I'll want to **pack** this folder into a package again.
29
29
30
-
deppth pk -s Launch -t Launch.pkg
30
+
deppth2 pk -s Launch -t Launch.pkg
31
31
32
32
If I then replace the package file in the game files with this package file, it should use my updated asset. But, suppose I'm trying to distribute a mod. I probably only want to distribute my change to the package, not the entire package. In that case, you probably want to build a patch for someone else to apply.
33
33
34
34
To do this, you can use the **pack** command with the **entries** flag to only include any items you changed (this works similar to patterns in other CLI tools).
I can then distribute Launch_patch.pkg and Launch_patch.pkg_manifest. To apply this patch to the actual package, one would need to place these files in the same folder and then use the **patch** command to perform the patching.
39
39
40
-
deppth pt Launch.pkg Launch_patch.pkg
40
+
deppth2 pt Launch.pkg Launch_patch.pkg
41
41
42
42
This will replace any entries in the package with any matching entries in the patches and append any new entries in the patches. More than one patch can be applied at a time (later ones take precedence if there are conflicts).
43
43
44
-
## Deppth API
44
+
## Deppth2 API
45
45
46
-
The Deppth module exposes functions that perform the actions described above, plus a fourth (which is also part of the CLI) to list the contents of a package. It's basically just a programmer interface for the same things the CLI does -- the latter is just a wrapper for the former.
46
+
The Deppth2 module exposes functions that perform the actions described above, plus a fourth (which is also part of the CLI) to list the contents of a package. It's basically just a programmer interface for the same things the CLI does -- the latter is just a wrapper for the former.
@@ -89,9 +89,9 @@ For example, here is a directory tree.
89
89
90
90
Using the command line in order to create your package for your mod, the package name must include the ``Mod-GUID`` (ThunderstoreTeamName-ModName) in order to work with Hell2Modding.
This will generate a folder called ThunderstoreTeamName-NewIconPackage in the parent directory that will be correctly formatted for deppth packaging, as well as 2 package files to use for your mod.
94
+
This will generate a folder called ThunderstoreTeamName-NewIconPackage in the parent directory that will be correctly formatted for deppth2 packaging, as well as 2 package files to use for your mod.
95
95
96
96
This will also generate the paths needed to be used in the game.
97
97
@@ -109,7 +109,7 @@ For example, if the package was in the folder by itself its file path in-game wo
109
109
### Args
110
110
111
111
-s or --source is the name of the folder in which to recursively search for images
112
-
-t or --target is the name of the resulting folder to be packed by deppth, must be in the form of a mod GUID (ModAuthor-ModName).
112
+
-t or --target is the name of the resulting folder to be packed by deppth2, must be in the form of a mod GUID (ModAuthor-ModName).
113
113
-c or --codec is to specify the image codec to use for packing, default is RGBA, often used is BC7 because of max chunk size being 32MB.
114
-
-dp or --deppthpack (not used above) set to anything but "True" to disable automatic Deppth Packing.
114
+
-dp or --deppthpack (not used above) set to anything but "True" to disable automatic Deppth2 Packing.
115
115
-iH or --includehulls (not used above) set to anything but "False" to calculate hull points.
Copy file name to clipboardExpand all lines: deppth2/cli.py
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
"""Command-line interface for deppth functionality"""
1
+
"""Command-line interface for deppth2 functionality"""
2
2
importos
3
3
importargparse
4
4
importsys
5
5
6
-
from .deppthimportlist_contents, pack, patch, extract
6
+
from .deppth2importlist_contents, pack, patch, extract
7
7
from .texpackingimportbuild_atlases_hades
8
8
9
9
defmain():
10
-
parser=argparse.ArgumentParser(prog='deppth', description='Decompress, Extract, Pack for Pyre, Transistor, and Hades')
10
+
parser=argparse.ArgumentParser(prog='deppth2', description='Decompress, Extract, Pack for Pyre, Transistor, and Hades')
11
11
subparsers=parser.add_subparsers(help='The action to perform', dest='action')
12
12
13
13
# List parser
@@ -39,11 +39,11 @@ def main():
39
39
patch_parser.set_defaults(func=cli_patch)
40
40
41
41
# Pack textures
42
-
hadespack_parser=subparsers.add_parser('hadespack', help='Format images into an atlas and manifest for packing with deppth', aliases=['hpk'])
42
+
hadespack_parser=subparsers.add_parser('hadespack', help='Format images into an atlas and manifest for packing with deppth2', aliases=['hpk'])
43
43
hadespack_parser.add_argument('-s', '--source', metavar='source', default='MyPackage', type=str, help='The directory to recursively search for images in, default is current folder')
44
44
hadespack_parser.add_argument('-t', '--target', metavar='target', default='ThunderstoreTeamName-MyPackage', help='Filenames created will start with this plus a number')
45
45
hadespack_parser.add_argument('-c', '--codec', metavar='codec', default="RGBA", help='Specify the image codec to use for packing, default is RGBA, often used is BC7 because of max chunk size being 32MB')
46
-
hadespack_parser.add_argument('-dP', '--deppthpack', metavar='deppthpack', default='True', help='Automatically Pack your images and Manifest using deppth')
46
+
hadespack_parser.add_argument('-dP', '--deppthpack', metavar='deppthpack', default='True', help='Automatically Pack your images and Manifest using deppth2')
47
47
hadespack_parser.add_argument('-iH', '--includehulls', metavar='includehulls', default="False", help='Set to anything if you want hull points computed and added')
0 commit comments