View Full Version : WRP File - OPRW24 Format question
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.
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.
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.
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.
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.
Tyrghen
Dec 11 2011, 19:45
I wanted to thank you, I went through the first GridBlock thanks to you!
http://i166.photobucket.com/albums/u115/tyrghen/ArmA2/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?
.kju [PvPscene]
Dec 12 2011, 07:02
Looks great. Good job Tyrghen!
This might be of interest to you:
http://sites.google.com/site/macsarmatools/mac-arma
http://forums.bistudio.com/showthread.php?t=114695
http://www.armaholic.com/page.php?id=13442
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.
Tyrghen
Dec 12 2011, 09:52
Looks great. Good job Tyrghen!
This might be of interest to you:
http://sites.google.com/site/macsarmatools/mac-arma
http://forums.bistudio.com/showthread.php?t=114695
http://www.armaholic.com/page.php?id=13442
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.
Tyrghen
Dec 12 2011, 09:54
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 :)
[APS]Gnat
Dec 13 2011, 10:48
..... watching this thread is like watching gods chat to each other!
*waits for an amazing outcome*
Tyrghen
Dec 13 2011, 22:46
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.