Staredit Network

Staredit Network -> StarCraft Editing Related -> online scenario.chk extractor
Report, edit, etc...Posted by darkzerox on 2006-10-10 at 23:48:03
hi,
i need a program that can extract (or at least read) scenario.chk from a .scx or .scm file.
i've written a program in c++ for windows, but my server is linux.. i'm wondering if it might be possible to execute the program over the server..
or somehow extract it with php or javascript.
if anyone knows how one might be able to do this, or has any suggestions, it would be much appreciated.
Report, edit, etc...Posted by Xx.Doom.xX on 2006-10-11 at 07:13:50
WinMPQ is probably the best. Its in the DLDB. Open a .scm/.scx file, and right click and press extract on the .chk file.
Report, edit, etc...Posted by darkzerox on 2006-10-11 at 19:17:38
QUOTE(DoomStrike @ Oct 11 2006, 03:13 AM)
WinMPQ is probably the best. Its in the DLDB. Open a .scm/.scx file, and right click and press extract on the .chk file.
[right][snapback]574879[/snapback][/right]


did you read my entire post?
i need a program or a script that i can use over my server. for example, when a user uploads a map, it extracts the .chk

thanks for trying anyway.
Report, edit, etc...Posted by synd][cate on 2006-10-11 at 21:49:07
I actually was looking to do the same thing a while back but could not find any linux utils for the job. You just might have to write your own MPQ decompressor :/ If you do, give it to me tongue.gif

edit: also who's the mod that manages these forums, what is the purpose of locking older threads? and were you dropped on your head as a child?
Report, edit, etc...Posted by MindArchon on 2006-10-12 at 00:45:32
A quick search came up with a program called mpq-tools, which can manage MPQ archives, and its a linux program. I don't know much about it, but you can try this link (you might have to compile it yourself):

http://freshmeat.net/projects/mpq-tools

lol synd][cate, the forums have a setting on to automatically lock older threads smile.gif
Report, edit, etc...Posted by darkzerox on 2006-10-12 at 01:21:51
QUOTE(synd][cate @ Oct 11 2006, 05:48 PM)
I actually was looking to do the same thing a while back but could not find any linux utils for the job.  You just might have to write your own MPQ decompressor :/ If you do, give it to me tongue.gif

edit: also who's the mod that manages these forums, what is the purpose of locking older threads? and were you dropped on your head as a child?
[right][snapback]575348[/snapback][/right]


i already wrote one, but it's windows-based.
could do some amazing stuff w/ this if we got it working...

ADDITION:
QUOTE(MindArchon @ Oct 11 2006, 08:45 PM)
A quick search came up with a program called mpq-tools, which can manage MPQ archives, and its a linux program. I don't know much about it, but you can try this link (you might have to compile it yourself):

http://freshmeat.net/projects/mpq-tools

lol synd][cate, the forums have a setting on to automatically lock older threads smile.gif
[right][snapback]575459[/snapback][/right]


looks like you need to run the installer...

and i don't think i have the permissions to run a binary anyway :\
Report, edit, etc...Posted by synd][cate on 2006-10-12 at 01:45:15
QUOTE(darkzerox @ Oct 12 2006, 12:21 AM)
i already wrote one, but it's windows-based.
could do some amazing stuff w/ this if we got it working...

ADDITION:
looks like you need to run the installer...

and i don't think i have the permissions to run a binary anyway :\
[right][snapback]575469[/snapback][/right]


By write one hopefully you didn't mean you used someone elses dll. Specifically blizzard's. storm.dll
Well unless you know the ins and outs of huffman encoding you used someone elses code, simple as that.

It would take quite a bit of work but if you look at the source code for that linux extractor you could use these php huffman encode/decode functions to do make your own php MPQ extractor which doesn't require a binary to run. However loading a pecl package (huffman.so) probably wouldn't work in safe mode anyways.. if your on a shared php host.



QUOTE(MindArchon @ Oct 11 2006, 11:45 PM)
A quick search came up with a program called mpq-tools, which can manage MPQ archives, and its a linux program. I don't know much about it, but you can try this link (you might have to compile it yourself):

http://freshmeat.net/projects/mpq-tools

lol synd][cate, the forums have a setting on to automatically lock older threads smile.gif
[right][snapback]575459[/snapback][/right]


Thats really cool I might actually try and get it working with my php script.

Edit: This what I came up with..
http://local.syndsys.net:81/mpqextract/index.php

Accepted files .scx .scm
Report, edit, etc...Posted by darkzerox on 2006-10-12 at 04:04:00
QUOTE(synd)
[cate,Oct 11 2006, 09:44 PM]By write one hopefully you didn't mean you used someone elses dll.  Specifically blizzard's. storm.dll
Well unless you know the ins and outs of huffman encoding you used someone elses code, simple as that.

It would take quite a bit of work but if you look at the source code for that linux extractor you could use these php huffman encode/decode functions to do make your own php MPQ extractor which doesn't require a binary to run.  However loading a pecl package (huffman.so) probably wouldn't work in safe mode anyways.. if your on a shared php host.
Thats really cool I might actually try and get it working with my php script.

Edit: This what I came up with..
http://local.syndsys.net:81/mpqextract/index.php

Accepted files .scx .scm
[right][snapback]575479[/snapback][/right]


i didn't use storm.dll, but i did use SFmpq.dll, which I guess adds the writing capabilities.

I wasn't insane enough to try and crack this archive and write these "SFileOpenArchive" functions myself.

but with this info you've posted, it looks like this might all be possible after all. the host is a friend of mine, so he can give me all the permissions I need..but I'd still rather avoid using any executables if I can help it. don't want to accidentally bring down his precious server smile.gif

I've uploaded a .chk I extracted on my computer... here's what I was able to get out of it using php, so far: http://www.mnbayazit.com/sc/mapdata.php

I'll look into this huffman stuff... see if I can't come up with some MPQ reading functions.

If you do manage to extract scenario.chk w/ php, I'll love you forever and ever.

It looks like you've managed to read the archive..but not pull anything out of it, yet? Still quite impressive.

edit: this link seems to be down http://pecl.docuverse.de/, could you post a copy of huffman.so, or do you know of another link?

the package at http://pecl.php.net/package/huffman doesn't seem to contain huffman.so either

QUOTE(synd][cate @ Oct 11 2006, 09:44 PM)
Edit: This what I came up with..
http://local.syndsys.net:81/mpqextract/index.php

Accepted files .scx .scm
[right][snapback]575479[/snapback][/right]


wait a second..you used mpq-tools for that? how'd you manage to install it on the server computer?
Report, edit, etc...Posted by synd][cate on 2006-10-12 at 04:30:55
Very nice on the php script, I was actually doing the same thing a while back .. I didn't get get as far though.
http://local.syndsys.net/n-mapper/index2.php
(Yes it's a map unprotector but nobody has to worry about anything, I'm too ADD to complete anything)

Unfortuantely I don't have much time to be spending side projects at this time so couldn't help you out with the php mpq functions :/. Got school and my website www.dkphost.net and 1000 other things to get done, sorry tongue.gif

I don't even know if those functions could be done to do the same thing.. if you look at the linux libmpq functions it's pretty complicated sh!t.

QUOTE(darkzerox @ Oct 12 2006, 03:03 AM)
wait a second..you used mpq-tools for that? how'd you manage to install it on the server computer?
[right][snapback]575516[/snapback][/right]


I compiled program on my linux webserver beside me biggrin.gif
Report, edit, etc...Posted by darkzerox on 2006-10-12 at 04:56:40
QUOTE(synd)
[cate,Oct 12 2006, 12:30 AM]Very nice on the php script, I was actually doing the same thing a while back .. I didn't get get as far though.
http://local.syndsys.net/n-mapper/index2.php
(Yes it's a map unprotector but nobody has to worry about anything, I'm too ADD to complete anything)

Unfortuantely I don't have much time to be spending side projects at this time so couldn't help you out with the php mpq functions :/.  Got school and my website www.dkphost.net and 1000 other things to get done, sorry tongue.gif

I don't even know if those functions could be done to do the same thing.. if you look at the linux libmpq functions it's pretty complicated sh!t.
[right][snapback]575520[/snapback][/right]


thank you! smile.gif

and i'm supposed to be studying for midterms/finishing projects.. but this is how i kill my time.

that and eating pumpkin pie.

this link here.. http://local.syndsys.net/n-mapper/index2.php ..looks half functional..but it unprotected a map that you uploaded?

QUOTE(synd)
[cate,Oct 12 2006, 12:30 AM]I compiled program on my linux webserver beside me biggrin.gif
[right][snapback]575520[/snapback][/right]


i should get me one of those..maybe i can turn my lappy into a linux server.


nice sites btw.
Report, edit, etc...Posted by synd][cate on 2006-10-12 at 05:01:17
QUOTE(darkzerox @ Oct 12 2006, 03:56 AM)
heh. and i'm supposed to be studying for midterms/finishing projects.. but this is how i kill my time.

that and eating pumpkin pie.

this link here.. http://local.syndsys.net/n-mapper/index2.php ..looks half functional..but it unprotected a map that you uploaded?
i should get me one of those..maybe i can turn my lappy into a linux server.
[right][snapback]575522[/snapback][/right]


Hah, yeah you sound like me. All of what I know is the result of procrastination from actual school work, which ironically is what pays the bills now. Not what I learned in school for the most part.

-- about nmapper thing, yeah it's not automated at all at the time I wrote it .. about 2 years back. But it would be fairly easy to do now that libmpq binary.

edit: Use that hotmail address in the link if you want to hit me up on MSN.
Report, edit, etc...Posted by darkzerox on 2006-10-19 at 01:03:34
QUOTE(synd][cate @ Oct 12 2006, 01:00 AM)
Hah, yeah you sound like me.  All of what I know is the result of procrastination from actual school work, which ironically is what pays the bills now.  Not what I learned in school for the most part.

-- about nmapper thing, yeah it's not automated at all at the time I wrote it .. about 2 years back.  But it would be fairly easy to do now that libmpq binary.

edit: Use that hotmail address in the link if you want to hit me up on MSN.
[right][snapback]575523[/snapback][/right]


damn. looking at the source of mpq-tools...this is even more complicated than i thought. looks like the mpq's are encoded using one of several different methods.. pkzip...zlib..huffman.. multi??? a freaking nightmare.

ADDITION:
if anyone's interested, synd][cate and I have just about got this thing working! It can read any .scx/.scm that's uploaded.
Report, edit, etc...Posted by Angelfarto on 2006-10-30 at 13:57:05
maybe this should be the start of a new topic, or maybe this can be answered here in one post:

winmpq's scripting feature, how is it used properly?

he doesn't give an overall syntax for the script file in his help file, so I tried:

winmpq.exe open mapfile.scx
winmpq.exe extract mapfile.scx staredit\scenario.chk
winmpq.exe close
winmpq.exe exit

this completes the goal of extracting the chk file, but it opens 4 instances of winmpq. ranting.gif
Report, edit, etc...Posted by Doodle77(MM) on 2006-10-31 at 19:12:11
QUOTE(Angelfarto @ Oct 30 2006, 01:56 PM)
maybe this should be the start of a new topic, or maybe this can be answered here in one post:

winmpq's scripting feature, how is it used properly?

he doesn't give an overall syntax for the script file in his help file, so I tried:

winmpq.exe open mapfile.scx
winmpq.exe extract mapfile.scx staredit\scenario.chk
winmpq.exe close
winmpq.exe exit

this completes the goal of extracting the chk file, but it opens 4 instances of winmpq.  ranting.gif
[right][snapback]580926[/snapback][/right]

Winmpq is not for linux.
Report, edit, etc...Posted by Angelfarto on 2006-11-03 at 15:11:03
QUOTE(Doodle77(MM) @ Oct 31 2006, 07:12 PM)
Winmpq is not for linux.
[right][snapback]581554[/snapback][/right]


thanks, for, uh.. telling me? apparently you dont know how to use winmpq, otheriwse you might have understood my question. or maybe you thought I was using linux. im using windows. otherwise how would i have gotten winmpq to work at all? is this a linux thread? did i not make it absolutely clear what my problem was? or maybe i dont really know what a script is..

winmpq stated in its help file that it has a scripting feature:

QUOTE
Writing Scripts
A script is basically a file that contains a lot of command lines for WinMPQ to process.  This allows you to compile one or more entire MoPaQs in a single process.


Though it gives a large list of commands that the user may run i.e.:

QUOTE
o[pen] <MPQFile> [FileLimit]


it does not give a clear definition (i.e. syntax) on how to actually use multiple commands.
Report, edit, etc...Posted by synd][cate on 2006-11-07 at 03:06:30
Yes your question is unrelated and should be started in a new topic.... This topic is related to a online script which is able to display CHK file information from a SCX. The only relation is that it uses a MPQ extractor.

I would recommend reading the help file if you need help on syntax for whatever extractor you are using.

QUOTE
winmpq.exe open mapfile.scx
winmpq.exe extract mapfile.scx staredit\scenario.chk
winmpq.exe close
winmpq.exe exit


ps: thats the most hilarious script I have ever seen... you would have 4 instances of mpqopen and I'm pretty sure you were pulling those commands out of your ass.
Report, edit, etc...Posted by darkzerox on 2006-11-20 at 02:42:26
i think he's new to the internet smile.gif
reminds me of my early days... topic hijacking. good times.

so yah.. i totally still haven't done the db thing yet...
i've got like 20 days left of school, maybe i'll finish it over christmas break.

do you want to advertise this thing synd? maybe sell it to SEN? wink.gif

i think it would be fantastic for..you know.. a map database..thingie..you know..the whole reason i was developing it and all.

we should try and get a minimap generator too.

oh..and i updated the uhh..drawingness too.. heimdal gave me some pointers..kinda.

but then i think i broke it. it was almost perfect though..

and now i have to update those darn text colors thanks to 1.14 (not that that's difficult..)

i really liked the look of your map unprotector site/script thing..if you want to get some use out of it.. we could use it tongue.gif
Next Page (1)