MagosX.com
April 28, 2017, 03:53:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Patience is not a virtue, it is a waste of time!
 
  Home   Forum   Files Programs Help Search Login Register  
Pages: 1 [2] 3
  Print  
Author Topic: MpqLib  (Read 66610 times)
sikele2236
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #15 on: August 17, 2010, 09:37:35 AM »

Code:
mpq.ImportFile(jpath, utf8.GetBytes(crtJfile), MpqLib.Mpq.ECompression.Implode);
 mpq.ExportFile(jpath, "c:\\war3map.j");

unable to .......:
huffman,Bzip2,Zlib,
succeed:
Implode
Logged
qcz
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #16 on: August 22, 2010, 06:38:26 AM »

Hi again!
Would you make a new version with the latest StormLib? Or give a brief description how to compile it in VS2008/10 (where I have to put StormLib files, what to do w/ them)? I want to access files from StarCraft II, but it's using LZMA compression, and it's introduced in later versions of StormLib.

I spent an hour trying to compile, fix things, but as I never programmed in C++, not succeeded.
Logged
Magos
Godlike
Administrator
Jr. Member
*****
Offline Offline

Posts: 98



View Profile WWW
« Reply #17 on: August 24, 2010, 09:04:01 AM »

It's been a long time, but from what i remember you compile the stormlib and end up with a StormLibRAD.lib file, which you add to the "linker input (additional dependencies)" (visual studio project properties). Also make sure the "additional include directories" and "additional library directories" (in mpqlib) contain the path to the header files/lib file of the stormlib project, or visual studio might not find them.
Logged

qcz
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #18 on: August 24, 2010, 07:09:03 PM »

Hi! Thanks for the answer. The problem was VS2010, it was unable to convert the StormLib project files to it's new version, therefore no compile, and the lib files were never existed. After I installed C++ stuff for VS2008 (I used it only for C# so far), I was able to compile StormLib, and after some modifications to MpqLib (adding new compression methods, changing some calls), the new MpqLib was born Smiley

It works like a charm, even the compression problem is gone (So there were no problems on my side, it was probably a StormLib-related problem), and it handles SC2 files, too. I'll do some other stuff with the MpqLib code (i had to remove some SFileGetFileInfo calls temporary, and replace some as the function's signature has changed), and post here the new version if anybody interested.
Logged
Magos
Godlike
Administrator
Jr. Member
*****
Offline Offline

Posts: 98



View Profile WWW
« Reply #19 on: August 25, 2010, 08:58:05 AM »

Nice going  Smiley
Logged

qcz
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #20 on: August 27, 2010, 11:21:35 AM »

Here it is, MpqLib 1.1:
http://stuff.qcz.hu/

Changelog:
- Updated to .Net 4.0
- StormLib updated to 7.02
- Added support for (attributes) file on archive creation
- Added support for new compression methods (Sparse, LZMA, ADPCM Mono, ADPCM Stereo)
- Added HashTableSize attribute to CArchive (get, set). Using this, you can change hash table size of the archive.
- CFileStream CompressedLength attribute renamed to CompressedSize (StormLib uses Size instead of Length)
- Added Size attribute to CFileStream  (get)
- ZLib and BZip2 compression problems resolved on StormLib update
Logged
LittleYoschi
Newbie
*
Offline Offline

Posts: 2



View Profile
« Reply #21 on: September 12, 2010, 10:35:19 AM »

Hi,

Currently I am working on a project where I want to read Starcraft2 replays, the listfile's for example:

replay.game.events
replay.sync.events
replay.load.info
replay.smartcam.events
replay.initData
replay.details
replay.attributes.events
replay.message.events

These are the listfiles. Unless I come Nich already, but I can not get their content read or evaluate.

The goal is simply to read out the basis of data from the replay the following:

Player name
Mapname,
Graphic map (tga is saved in the replay)
Duration of the game,
the chat during the game and so on.

These data should I be able to read from the replay, but I'm just not there ran because I do not unfortunately know how to open them or to their content rankomme precisely, each experiment has so far failed: (

I hope you can help me as possible.
For I will read this data and also for example the map graphic export.

Hopeful
LittleYoschi

P.s. I am a vb.net developer ^^
« Last Edit: September 12, 2010, 10:37:27 AM by LittleYoschi » Logged
Magos
Godlike
Administrator
Jr. Member
*****
Offline Offline

Posts: 98



View Profile WWW
« Reply #22 on: September 13, 2010, 09:50:19 AM »

I don't know much (if anything Cheesy) about SC2's fortmats. Check out qcz's version of mpqlib above, as he added SC2 support.
Logged

LittleYoschi
Newbie
*
Offline Offline

Posts: 2



View Profile
« Reply #23 on: September 13, 2010, 10:57:20 AM »

I already use version from qcz's version but I can not get to the data in the tables are in the archive.
So my problem is how do I get closer to the exact dates, because I can not simply extract because I can not read them so I know what is inside, such as, for example, the tga graphic for the map.
I hope you understand what I mean
Logged
GeMan
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #24 on: September 26, 2010, 09:46:35 AM »

Hey thanks qcz for the SC2 update I had it working great but after the latest patch is stopped working for new replays. I have been scouring the source trying to figure out what I can do to correct it but no luck so far. Any plans on an update or anyway you can point me in the right direction? Thanks!
Logged
tomek320
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #25 on: September 29, 2010, 01:01:45 AM »

Magos can u explain me how to import and how work ur tool for mpq , becouse i think that i can import file in ur program and automatic on w3 mpq ??but if i erase file i cant get it back?
i mean that work for that map only or it is pernamently???
Logged
Magos
Godlike
Administrator
Jr. Member
*****
Offline Offline

Posts: 98



View Profile WWW
« Reply #26 on: September 29, 2010, 09:16:53 AM »

You have to decide yourself if you want to import/remove files in your map (which is an mpq) or in the main wc3 mpq (not recommended).
Logged

tomek320
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #27 on: September 29, 2010, 11:09:40 AM »

I want only to map but i dont know how ..
and thx for fast replay
Logged
GeMan
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #28 on: September 29, 2010, 11:21:52 AM »

Man we are at the point of paying someone to get us a working dll that will parse SC2 replays for the current version of SC2. It's just beyond our scope at this point. If anyone is willing to do some work for us, Magos or anyone else. Or if you can point me to qcz please send me a message.

Thanks!
-Greg
Logged
tomek320
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #29 on: September 30, 2010, 01:56:41 AM »

i download ur list or what is that is but i dont know where to extract , and i extract to one file and it dont work i dont know with what to open
Logged
Pages: 1 [2] 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.095 seconds with 22 queries.