diff options
| author | Nicholas Estelami <NEstelami@users.noreply.github.com> | 2022-03-31 19:42:44 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-31 19:42:44 -0400 |
| commit | e39343bcc878c84e041bd2246a353db3117a701e (patch) | |
| tree | 3967c85b43141ba988b138e839c43fbc8901e955 /extract_assets.py | |
| parent | e503d5e53aa4a71a9b28131d00d6b3839ba05e6b (diff) | |
Added support for multiple game versions (#107)
* WIP Multiversion support
* GC PAL Non-MQ support complete
* Updated OtrGui to handle different game versions
* Added version file
* Added new extract mode to ZAPD and optimized OTR gen time
* Fixed bug causing crash
* Further optimized OTRExporter, saving around ~20 seconds.
* ZAPD is now multi-threaded.
* Fixed merge issue
* Fixed memory leak and fog issue on pause screen.
* Additional fog fixes.
Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
Diffstat (limited to 'extract_assets.py')
| -rwxr-xr-x | extract_assets.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/extract_assets.py b/extract_assets.py index 404b49c..2922bbf 100755 --- a/extract_assets.py +++ b/extract_assets.py @@ -48,7 +48,7 @@ def ExtractFunc(fullPath): *pathList, xmlName = fullPath.split(os.sep) objectName = os.path.splitext(xmlName)[0] - outPath = os.path.join("..\\soh\\assets\\", *pathList[4:], objectName) + outPath = os.path.join("..\\soh\\assets\\", *pathList[5:], objectName) os.makedirs(outPath, exist_ok=True) outSourcePath = outPath @@ -64,6 +64,7 @@ def main(): parser.add_argument("-s", "--single", help="asset path relative to assets/, e.g. objects/gameplay_keep") parser.add_argument("-f", "--force", help="Force the extraction of every xml instead of checking the touched ones.", action="store_true") parser.add_argument("-u", "--unaccounted", help="Enables ZAPD unaccounted detector warning system.", action="store_true") + parser.add_argument("-v", "--version", help="Sets game version.") args = parser.parse_args() global mainAbort @@ -73,6 +74,13 @@ def main(): extractedAssetsTracker = manager.dict() + xmlVer = "GC_NMQ_D" + + if (args.version == "gc_pal_nmpq"): + xmlVer = "GC_NMQ_PAL_F" + elif (args.version == "dbg_mq"): + xmlVer = "GC_MQ_D" + asset_path = args.single if asset_path is not None: fullPath = os.path.join("..\\soh\\assets", "xml", asset_path + ".xml") @@ -90,7 +98,7 @@ def main(): extract_staff_text_path = None xmlFiles = [] - for currentPath, _, files in os.walk(os.path.join("..\\soh\\assets", "xml")): + for currentPath, _, files in os.walk(os.path.join("..\\soh\\assets\\xml\\", xmlVer)): for file in files: fullPath = os.path.join(currentPath, file) if file.endswith(".xml"): |
