Staredit Network

Staredit Network -> StarCraft Editing Related -> How do you 'decode' starcraft files.
Report, edit, etc...Posted by Incinerate_IV on 2005-06-03 at 17:48:55
Hello. This question is for the programers who program starcraft stuff. How do you read the starcraft files (like .trg and .scm and stuff)
Report, edit, etc...Posted by chuiu on 2005-06-03 at 17:51:09
.SCM/SCX files are actually MPQ files that store a .CHK file with your maps information and any sounds you have. Information about the .CHK is found at CC.org.

http://campaigncreations.org/starcraft/sta...chkformat.shtml
Report, edit, etc...Posted by LegacyWeapon on 2005-06-03 at 21:47:43
How to extract the scenario.chk from the MoPaQ:
http://shadowflare.gameproc.com/inside_mopaq/
Report, edit, etc...Posted by SA_Max71 on 2005-06-04 at 03:31:05
QUOTE(LegacyWeapon @ Jun 3 2005, 06:47 PM)
How to extract the scenario.chk from the MoPaQ:
http://shadowflare.gameproc.com/inside_mopaq/
[right][snapback]225392[/snapback][/right]

Good luck getting something from that website. It's down or real slow most of the time.
Report, edit, etc...Posted by LegacyWeapon on 2005-06-04 at 08:57:49
Not for me, but here's another mirror of it:
http://www.campaigncreations.org/starcraft/inside_mopaq/
(This one isn't as complete)
Report, edit, etc...Posted by RexyRex on 2005-06-04 at 20:56:43
That thing doesn't make any sense for me.
Mostly because it uses C++ and VB while I only know PHP. sad.gif

So .scm's and .scx's are pretty useless for web-based programs.
Note that down Vicious. wink.gif

How do I decode .chk's? sad.gif
(I need more help than that link. wink.gif)

ADDITION:
And if someone does get the .chk out of the MPQ with PHP (So basically no one seeing as very few people use it here sad.gif) ...I'd love some help. mellow.gif
http://www.rexyrex.hostmatrix.org/chk_project

Also, I can't get it to read as hex, so I disabled the reading for now. smile.gif

ADDITION:
That's a lot of emoticons. sweatdrop.gif
Report, edit, etc...Posted by Incinerate_IV on 2005-06-04 at 20:59:20
Well that sux, I don't know C++.. Im still trying to understand that article right now, its pretty confusing.
Report, edit, etc...Posted by RexyRex on 2005-06-04 at 21:29:21
If it's not going to help you, it's not worth reading.
I learned a bit from it, but it's still of no use to me. LegacyWeapon told me MpqCtrl.ocx is the easy way out anyways. wink.gif
SF uses it, SCMD (I think) does, uber@tion does...
Report, edit, etc...Posted by LegacyWeapon on 2005-06-05 at 00:12:05
Lot of older programs use Storm.dll API functions and lmpqapi.dll
Report, edit, etc...Posted by RexyRex on 2005-06-05 at 01:21:02
That's what I meant. blushing.gif
It says so in the link you posted. It has the function lists. wink.gif
Anyways, .dll's don't work online. So more grief for Rexy. sad.gif
Report, edit, etc...Posted by BSTRhino on 2005-06-05 at 06:34:44
You could do what the MPQ Compactor does. First generate a script of commands to open an MPQ, add/update/extract files from it, and close it. Then call WinMPQ or MPQ2K using one of the shell commands, wait until their execution is complete, and then mess around with your newly extracted files. It will be a huge load on your webserver to do it this way, but if DLLs are not for you, then you don't have any other choice.
Report, edit, etc...Posted by Incinerate_IV on 2005-06-05 at 13:18:03
QUOTE
LegacyWeapon told me MpqCtrl.ocx is the easy way out anyways.


Whats MpqCtrl.ocx?
Report, edit, etc...Posted by LegacyWeapon on 2005-06-05 at 17:06:37
http://shadowflare.gameproc.com/dwnload.html#MpqControl
Report, edit, etc...Posted by RexyRex on 2005-06-05 at 21:37:00
QUOTE(BSTRhino @ Jun 5 2005, 03:34 AM)
You could do what the MPQ Compactor does. First generate a script of commands to open an MPQ, add/update/extract files from it, and close it. Then call WinMPQ or MPQ2K using one of the shell commands, wait until their execution is complete, and then mess around with your newly extracted files. It will be a huge load on your webserver to do it this way, but if DLLs are not for you, then you don't have any other choice.
[right][snapback]226856[/snapback][/right]

If I were to delete the temporary file, actual file, etc..would I still be raping my server? Also, do uploads use bandwidth? I never knew.
Anyways, I don't even know what a shell command is. smile.gif

Hey, BST, you should drop me a line on MSN or AIM. sweatdrop.gif

ADDITION:
Things I need help with...
  • Script of commands to open a MPQ.
  • Calling WinMPQ or MPQ2K.
  • Shell commands.
If this does totally own my server, then I'll just toy around on localhost. wink.gif
Report, edit, etc...Posted by BSTRhino on 2005-06-07 at 07:56:05
Heh, I'm sure you know what a shell command is, I'm just using geekspeak. It's just running a program with parameters, just like going to Start > Run and typing a command there. If you use shell_exec in PHP you can run a "shell command" also known as a program, with some parameters. Look at the WinMPQ manual, it's got a big long description of all the command line parameters you can give it. A script is just like a whole lot of those commands stuck together, it's all in the manual.

If you try copying WinMPQ to your server (your server would need to be a windows one), and then running "shell" commands on WinMPQ, you could test whether it works. Here's some example code for it:
CODE
shell_exec('"C:\\Program Files\\WinMPQ\\WinMPQ.exe" extract "C:\\My Documents\\Counterattack.scx" "staredit\\scenario.chk" "C:\\Extracted Files\\scenario.chk"')

Then in your code you could check the file which would be extracted to C:\Extract Files\scenario.chk and you might be surprised.

The reason I say it'll probably be slow is because it has to start up a new instance of WinMPQ every time you want to run a command, and so if a lot of people are on extracting this, adding that, it would be quite slow. It really depends on the kind of traffic you get.
Report, edit, etc...Posted by RexyRex on 2005-06-07 at 18:15:19
The most traffic I will ever get is from myself testing. I'll try it and see what my bandwidth looks like, it seems as if I have unlimited disk space.

But, um, wait...would this work on Linux? How about MpqCtl.ocx?

Eh, thanks for all the help you've given me BST. smile.gif
Report, edit, etc...Posted by BSTRhino on 2005-06-08 at 05:08:02
You're welcome. But, WinMPQ won't work on Linux unfortunately, neither will anything with the extension OCX, since OCX means ActiveX, which is Microsoft-only. So... yeah, that might be a problem...

QUOTE
The most traffic I will ever get is from myself testing. I'll try it and see what my bandwidth looks like, it seems as if I have unlimited disk space.

Well, it's not really bandwidth, it's more to do with processing power. But if it's only really you doing it, then you'll have no problem, it'll be no worse than yourself using WinMPQ yourself. Just imagine 10 people using WinMPQ on your computer at the same time... that's the slowness I'm talking about.
Report, edit, etc...Posted by RexyRex on 2005-06-08 at 09:04:39
Oh, I get it now.
I guess I won't be able to publicly play with this, but thats okay with me because, like I said, I'm usually the one using it. Well...soon I'll have this working, hopefully. happy.gif

Thank you BST! king.gif
Next Page (1)