Thanks a lot Zrax!
I've begun testing this new tool. Here's a few bugs that I found. I hope this is useful.
Bug01 (may not be a bug)
As previously noticed, modifying a prp will change the size of drawablespans.
Here's my test results, I don't know if this is normal or not.
Steps:
1- Execute "prppack -x Abysos_District_Mainroom.prp" to extract all objects from the prp into .po files in a subfolder.
2- Execute "prpmod abysos.prp del plGenericPhysical:Cave1" to delete Cave1 from the prp.
3- Execute again "prppack -x Abysos_District_Mainroom.prp" to extract all objects from the prp into .po files in a subfolder.
4- Compare the contents of the two subfolders.
Result:
- object Cave1 is deleted as expected
- the file size of the prp file has dropped from 1530K to 623K
- plDrawableSpan objects have shrunk to less than half their size
- other unrelated objects have lost some bytes: all plCoordinateInterface objects and the one plDirectionalLightInfo object in the prp.
- examination of lamp.po using a hex editor shows this: before running PrpMod there were seven 00 bytes after the Urustring for "lamp", after running PrpMod there are only four such bytes.
- test.jpg (140.31 KiB) Viewed 5082 times
Abysos is a fan Age, it is possible that the texture compression was incorrect in the first place.
Repeating the test with the Gira prp from Cyan results in a smaller shrinkage: from 7193K to 7189K.
Bug02Starting with a clean copy of Abysos:
1- Execute "prpmod abysos.prp extract plGenericPhysical:Cave1" to extract the object into file "[003F]Cave1.po."
2- execute "prpmod abysos.prp add [003F]Cave1.po" to add the object even though it already exists.
This results in an error trapped by PrpMod and displayed in the console:
* Loading: mainRoom (Abysos)
Location: <16858|0>
Version: PotS/CC
pdUnifiedTypeMap::PlasmaToMapped ERR: Got type 2100
pdUnifiedTypeMap::PlasmaToMapped ERR: Got type 2100
pdUnifiedTypeMap::ClassName ERR: Got type FFFF
pdUnifiedTypeMap::PlasmaToMapped ERR: Got type 2100
Warning: NOT reading type [FFFF](null)
Failure parsing [003F]Cave1.po
Repeating the test and first deleting the object before adding it results in the same error.
Repeating the test with the Gira prp from Cyan results in the same error.
Bug03Starting with a clean copy of Gira:
1- Execute "prpmod gira.prp extract plGenericPhysical:Bone05 --prc" to extract the object into file "[003F]Bone05.prc."
2- execute "prpmod gira.prp add [003F]Bone05.prc" to add the object even though it already exists.
This results in a crash; console shows no error, only the normal output:
prpmod Gira.prp add [003F]Bone05.prc
* Loading: giraCanyon (Gira)
Location: <24|1>
Version: PotS/CC
The size of the prp file has INCREASED from 7193K to 7195K.
Repeating the test and first deleting the object before adding it give the same results.
All tests ran on Windows Vista 64bits Business edition with MS C++ Runtime library 9.
Same results with XP 32 bits SP3.