From 2291d758ac5c121228c409bedee5ade6febdc1ce Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 11 Mar 2023 11:37:57 -0800 Subject: [PATCH] rewrite quest format table --- README.md | 35 ++++++++++++++++++----------------- src/Quest.cc | 4 ++-- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1c1929fc..e4725ee7 100644 --- a/README.md +++ b/README.md @@ -113,28 +113,29 @@ Standard quest files should be named like `q###-CATEGORY-VERSION.EXT`, battle qu For example, the GameCube version of Lost HEAT SWORD is in two files named `q058-ret-gc.bin` and `q058-ret-gc.dat`. newserv knows these files are quests because they're in the system/quests/ directory, it knows they're for PSO GC because the filenames contain `-gc`, and it puts them in the Retrieval category because the filenames contain `-ret`. -There are multiple PSO quest formats out there; newserv supports most of them. It can also decode any known format to standard .bin/.dat format. Specifically: +There are multiple PSO quest formats out there; newserv supports all of them. It can also decode any known format to standard .bin/.dat format. Specifically: -| Format | Extension | Supported | Decode action | -|---------------------------|-----------------------|---------------|------------------| -| Compressed | .bin and .dat | Yes | None (1) | -| Compressed Ep3 | .bin or .mnm | Yes (4) | None (1) | -| Uncompressed | .bind and .datd | Yes | compress-prs (2) | -| Uncompressed Ep3 | .bind or .mnmd | Yes (4) | compress-prs (2) | -| VMS | .bin.vms and .dat.vms | No | decode-vms (3) | -| Unencrypted GCI | .bin.gci and .dat.gci | Yes | decode-gci | -| Encrypted GCI with key | .bin.gci and .dat.gci | Yes | decode-gci | -| Encrypted GCI without key | .bin.gci and .dat.gci | No | decode-gci (3) | -| Ep3 GCI | .bin.gci or .mnm.gci | Download only | decode-gci | -| Encrypted DLQ | .bin.dlq and .dat.dlq | Yes | decode-dlq | -| Ep3 DLQ | .bin.dlq or .mnm.dlq | Download only | decode-dlq | -| Online QST | .qst | Yes | decode-qst | -| Download QST | .qst | Yes | decode-qst | +| Format | Extension | Supported | Decode action | +|------------------|-----------------------|------------|------------------| +| Compressed | .bin and .dat | Yes | None (1) | +| Compressed Ep3 | .bin or .mnm | Yes (4) | None (1) | +| Uncompressed | .bind and .datd | Yes | compress-prs (2) | +| Uncompressed Ep3 | .bind or .mnmd | Yes (4) | compress-prs (2) | +| VMS (DCv1) | .bin.vms and .dat.vms | Yes | decode-vms | +| VMS (DCv2) | .bin.vms and .dat.vms | Decode (3) | decode-vms (3) | +| GCI (decrypted) | .bin.gci and .dat.gci | Yes | decode-gci | +| GCI (with key) | .bin.gci and .dat.gci | Yes | decode-gci | +| GCI (no key) | .bin.gci and .dat.gci | Decode (3) | decode-gci (3) | +| GCI (Ep3) | .bin.gci or .mnm.gci | Yes | decode-gci | +| DLQ | .bin.dlq and .dat.dlq | Yes | decode-dlq | +| DLQ (Ep3) | .bin.dlq or .mnm.dlq | Yes | decode-dlq | +| QST (online) | .qst | Yes | decode-qst | +| QST (download) | .qst | Yes | decode-qst | *Notes:* 1. *This is the default format. You can convert these to uncompressed format by running `newserv decompress-prs FILENAME.bin FILENAME.bind` (and similarly for .dat -> .datd)* 2. *Similar to (1), to compress an uncompressed quest file: `newserv compress-prs FILENAME.bind FILENAME.bin` (and likewise for .datd -> .dat)* -3. *If you know the encryption seed (serial number), pass it in as a hex string with the `--seed=` option. If you don't know the encryption seed, newserv will find it for you, which will likely take a long time.* +3. *Use the decode action to convert these quests to .bin/.dat format before putting them into the server's quests directory. If you know the encryption seed (serial number), pass it in as a hex string with the `--seed=` option. If you don't know the encryption seed, newserv will find it for you, which will likely take a long time.* 4. *Episode 3 online quests don't go in the system/quests directory; they instead go in the system/ep3/maps-free or system/ep3/maps-quest directories. If you want an Episode 3 quest to be available for both online play and for downloading, the file must exist in both system/quests and in one of the map directories in system/ep3.* Episode 3 download quests consist only of a .bin file - there is no corresponding .dat file. Episode 3 download quest files may be named with the .mnm extension instead of .bin, since the format is the same as the standard map files (in system/ep3/). These files can be encoded in any of the formats described above, except .qst. There are no encrypted Episode 3 GCI formats because the game doesn't encrypt quests saved to the memory card, unlike Episodes 1&2. diff --git a/src/Quest.cc b/src/Quest.cc index 8700463c..d7be5cec 100644 --- a/src/Quest.cc +++ b/src/Quest.cc @@ -728,7 +728,7 @@ string Quest::decode_gci( } else { if (find_seed_num_threads < 0) { - throw runtime_error("GCI file appears to be encrypted"); + throw runtime_error("file is encrypted"); } if (find_seed_num_threads == 0) { find_seed_num_threads = thread::hardware_concurrency(); @@ -810,7 +810,7 @@ string Quest::decode_vms( } else { if (find_seed_num_threads < 0) { - throw runtime_error("GCI file appears to be encrypted"); + throw runtime_error("file is encrypted"); } if (find_seed_num_threads == 0) { find_seed_num_threads = thread::hardware_concurrency();