(De)Warp Version 1.xx by Mikero
read genreamde.txt
see fixes
DeWrp is a simple application that analyses the content
of any wrp file (binarised or otherwise) from the very first cwc demo thru to
Vbs2lite and does a few consistency checks.
The wrp itself can be exposed in a folder 'some\where', or, it can be within a
pbo. DeWrp will find it.
Syntax:
DeWrp [-options] AnyfileOrFolder[.wrp/.pbo]
If a folder is specified then all wrps in the folder and it's children are
operated on.
The default is no options and an assumed .wrp or .pbo extension. With no options DeWrp will simply analyze *the* wrp
(or a wrp in a pbo) and display any errors or inconsistencies it discovers.
If no specific extension is supplied, DeWrp will first look for a wrp of that
name, otherwise it assumes content of a pbo of that name
the *actual* name of wrp in a pbo does not have to be same as pbo name.
Options (case inSeNsiTIVe) (default none)
standard behaviour (no options)
intention of code is to do multi-passes thru a range of wrps to check the dll can
analyze it and that the wrp itself (be it binarised or exported from pew) has
integrity
-P don't pause
-S Split wrp layers : see end of document
-I Islands
will list all ID's used on island, including their AaNN map coordinate and
literal pos[X,Y] along with *the* model for that ID
especially useful when converting missions that use OFP's SQx object ID command,
you can rapidly locate it on the map
output is produced on screen
general usage would be
dewrp -I someWrpPbo >SomeText.txt
-L list land classes -------
DeWrp will list all land_xxx classes encountered in the wrp.
(note all output is forced to lower case because of sqX case sensitivity)
DeWrp -L NameOfWrp/Pbo
will provide a SQF compatible array of all land_xxx classes with their (series
of) locations on the map in xyz format
sample:
["land_barn_w_01", [ [3269,4325,27],[4285,3170,32] ] ],
the land_xxx string can be used to directly access the config>>cfgVehicles->Land_xx
class
-O list objects -------
DeWrp will list all p3d's encountered with their objectID and position on the
map
sample:
["ca\structures\barn_w\barn_w_02.p3d",
[
[3958,[3536,4270]],//id, x,y
[2483,[3463,4432]]
]
],
-D list objects -------
same as -O but ID's are removed. useful for cba hash function
sample:
["ca\structures\barn_w\barn_w_02.p3d",
[
[3536,4270], // x,y
[3463,4432]
]
],
Splitting the wrp layer folder.
this option is BETA. there is no parachute.
this option is used for two separate reasons
extremely large maps can exceed the 2gig limit of a pbo
this option splits the layers into smaller chunks < 1gig each, thus enabling game play
splitting can ONLY happen to exported (unbinarised) wrps
binarised wrps cannot be split for the simple reason that the packing process has already tried to create the one, single, pbo and failed, hence, there is no wrp to split
syntax
dewrp -S[=meg] NameOf[.wrp]
dewrp will create successive folders in
NameOfWrp_layers\section1
....
NameOfWrp_layers\section909
each one of which will be < 1gig by default OR the value specified on the command line. Ie
dewrp -S=200 SomeWrp
will split into layer pbos of approx 200Meg each
Internals
the incoming layers folder MUST be in the data\ folder or beyond. Traditionally, it's in nameofWrp\data\layers
this layers folder is deleted on successful splitting. Not any other folder or contents in that potentially still used pbo, just the layers
the outputs are to
NameOfWrp_split\NameOfWrp_split1
.........
NameOfWrp_split\NameOfWrp_split99
You simply point pboProject to NameOfWrp_split
and it will make successive pbos for you. Automatically