Jump to content
Sign in to follow this  
tyrghen

WRP File - OPRW24 Format question

Recommended Posts

Good day,

First, sorry if I'm posting in the wrong forum, but from what I've read, it should be the good one.. or I do believe so.

I'm working on a "parser" for WRP files.

I know there are projects like DePbo.dll which do that, but I haven't found the source code and I would like to make an open source .NET library to interact with ArmA files.

Now, to the point, I've already spend some good time trying to decompress the GridBlocks present in the WRP files.

What I understood from the Wiki is that in the OPRW24 format the GridBlocks are compressed (which you can easily verify when comparing the number of GridBlocks and the relatively small size they take in the WRP files).

From the same Wiki, I understand that the algorithm used is LZO compression.

I already coded the LZSS decompressor and the content of the WRP file doesn't look like it fits LZSS. I tried it on the content just for the sake of eliminating possibilities and the output didn't looked very convincing.

I've been trying to parse the zones containing GridBlocks using the LZO decompressor from Oberhumer, but I can't get the expected information out of them.

So, I'm posting here, in hope that someone can point me in the right direction!

Thanks in advance!

Tyrghen.

Share this post


Link to post
Share on other sites

You can contact mikero and he will happily give you access to the source code.

The GridBlocks arent LZSS or LZO compressed but use something similar to a quadtree. The tricky part is to determine the output size. But afaik evertyhing is explained in the discussion tab of the OPRW biki article.

Share this post


Link to post
Share on other sites

Hello T_D,

Thanks for the information.

I have seen the reference to the discussion tab, but I didn't see it in the first place.

*EDIT* ... my bad... Google Chrome didn't show any tabs... I openened the WiKi in IE and got the tabs now :)

I'll give that a try!

Regards,

Tyrghen.

Edited by Tyrghen

Share this post


Link to post
Share on other sites

you are quite correct re the quad-tree, and, indeed, the output size of some remain a mystery.

for the purposes of re-creating a pew, the contents of the trees are not interesting.

'officially' bis only now use lzo. under the covers, the engine still accepts lzss compressed files for *most* items. not all, most. Bis tools however only now produce lzo

my dll compresses *some* files to lzss for this reason. (notably raP and ordinary text)

eliteness gui will display graphics for what it thinks the quad-trees decode to. results are interesting and curious, but, not reliable.

you are most welcome to the dewrp source code. it is available for anyone to browse

http://www.dev-heaven.net/projects/mikero-pbodll/repository (good luck navigating it, I can't)

my skype name is mike.andrew

you are most welcome to ADD to the dll should you choose to.

T_D above, SY, and myself, would be the most accessible people here to help you decode this stuff, as well all share a common interest in doing so.

Edited by Mikero

Share this post


Link to post
Share on other sites

Hello Mikero,

Thanks for your input!

I've found the repository earlier, but I didn't found how to get the files out of it :)

And didn't put much time into it. I'm mostly working on this project after my work days (starting around 11PM until I fall asleep ;))

As to my goal, it is quite humble, I'm not trying to make converters/writers but mostly readers.

The initial purpose was to make a tool able to generate alternative map layouts out of any ArmA2/OA map/PBO.

Since maps are exported in WRP... I needed to understand the structure of the WRP.

I don't think the content of the GridBlocks is of interest to me, but since I didn't found any header indicating a GridBlock size, I had no other choice than to decode them (in the fashion of the LZSS) in order to find the beginning of the next block (Elevation grid is of high interest to me... as you might have already understood :))

I've looked through the other algorithms because I'd like to be able to work out of PBOs without requiring to first DePBO the files to access the WRP.

I haven't started working on this aspect though.

Also, I'd code it in .NET since it's what I use at work and I have all the tools ready.

It's now mostly a question of how much time I'll be able to put into all this and how fast it'll go.

There's a very low chance I'll ever get as far as you've got with your DLL, but it's a project I'm really willing to get going as much as time permits it.

Thanks again to both of you for posting all those useful info in the WiKi, it has been a very interesting read.

Share this post


Link to post
Share on other sites

I wanted to thank you, I went through the first GridBlock thanks to you!

WRP_Test03.jpg

*Note* I did post a reply before this one, but it didn't got through it seems... anyway... Thanks again to both of you, I'll keep working on the WRP and head to the elevations since they were my first interest!

I was also wondering if the ClutterMask has something to do with the rendering of the map?

Is that the info used to add some "randomness" to the terrain cells to be less linear?

Share this post


Link to post
Share on other sites

i think that's an Eliteness snapshot. So thank u Q.

Tyrghen, contact me on skype and I'll get you access to the svn source to code.

you are *most* welcome to convert part or all of it to .net. I will have an active interest.

Share this post


Link to post
Share on other sites

Thanks for these links.

I never stumbled across that Mac Arma when searching for such a tool (bad keywords probably). That's really interesting. It's good to test what others have done.

Though at this moment I'm more after the challenge than the goal :D

I want to learn more about the file structures and the information they contain.

Share this post


Link to post
Share on other sites
i think that's an Eliteness snapshot. So thank u Q.

Tyrghen, contact me on skype and I'll get you access to the svn source to code.

you are *most* welcome to convert part or all of it to .net. I will have an active interest.

The screenie is an extract of the GridBlock CellEnv, displaying the flags which are most interesting for me: Sea, Ground, Road, Forest.

I'll try to get in touch with you. Thanks for the offer :)

Share this post


Link to post
Share on other sites

..... watching this thread is like watching gods chat to each other!

*waits for an amazing outcome*

Share this post


Link to post
Share on other sites
Gnat;2071581']..... watching this thread is like watching gods chat to each other!

*waits for an amazing outcome*

They sure are incredibly good :)

I'm really amazed by their work.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×