Staredit Network > Forums > Modding Discussion > Topic: StarCraft File Formats
StarCraft File Formats
May 23 2016, 6:16 am
By: iCCup.xboi209  

May 23 2016, 6:16 am iCCup.xboi209 Post #1



Is there a complete repository of information regarding file formats that StarCraft uses? I only found a page on ShadowFlare's website, but it doesn't seem very complete. I suggest that we have a sticky topic that will contain this information too.




May 23 2016, 7:48 am O)FaRTy1billion[MM] Post #2

👻 👾 👽 💪

I dunno if it's still around, but the modcrafters wiki had a bunch.

Or if you are looking for any particular file(s) I could probably help.

Post has been edited 1 time(s), last time on May 23 2016, 8:16 am by FaRTy1billion.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 23 2016, 5:31 pm jjf28 Post #3

Cartography Artisan

I miss the modcrafters wiki... here's what I have, some of my formats may be inconvenient as I didn't like the way blizzard layed out the dat files and had them parsed instead.

CV5


VF4 and VR4


VX4


WPE


Upgrades.dat


techdata.dat


units.dat


weapons.dat


flingy.dat


sprites.dat


(out of characters)



Rs_yes-im4real - Clan Aura - jjf28.net84.net

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

May 23 2016, 5:32 pm jjf28 Post #4

Cartography Artisan

reserved



Rs_yes-im4real - Clan Aura - jjf28.net84.net

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

May 24 2016, 12:38 pm Clokr_ Post #5



I can provide some of the lesser known file formats (.spk, font files, replay files) if needed.

Does anyone have the specs for the .bin dialog files?



?????

May 24 2016, 2:25 pm Corbo Post #6

ALL PRAISE YOUR SUPREME LORD CORBO

Quote from Clokr_
I can provide some of the lesser known file formats (.spk, font files, replay files) if needed.

Does anyone have the specs for the .bin dialog files?
Farty should have some SPK. I remember him talking all bad things about you and how you sucked and that you couldn't get the algorithm right for the parallax and all that stuff.

I'm naturally just making this up :P but he did make spkedit so he should also have some stuff.

I can contribute with the link to where I got many formats when I was programming stuff: http://www.staredit.net/wiki/index.php?title=Category:Reference
There's SPK, several .dats, Font, GRP, Bins...

Post has been edited 1 time(s), last time on May 24 2016, 3:39 pm by Corbo.



fuck you all

May 25 2016, 3:30 am O)FaRTy1billion[MM] Post #7

👻 👾 👽 💪

Quote from Clokr_
Does anyone have the specs for the .bin dialog files?
I think Heinermann had a more correct one somewhere. It has a ton of unknowns because it's just sort of the internal memory structure dumped in to a file or something.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 26 2016, 4:15 am Heinermann Post #8

SDE, BWAPI owner, hacker.

Quote from O)FaRTy1billion[MM]
Quote from Clokr_
Does anyone have the specs for the .bin dialog files?
I think Heinermann had a more correct one somewhere. It has a ton of unknowns because it's just sort of the internal memory structure dumped in to a file or something.

It's more or less a forward linked list in fixed memory space. https://github.com/bwapi/bwapi/blob/develop/bwapi/BWAPI/Source/BW/Dialog.h
No info on the SMK struct in the dialog files or some of the function callback signatures (i.e. pModalFcn and pfcnScrollerUpdate).

Decrypted font file: https://github.com/bwapi/bwapi/blob/develop/bwapi/BWAPI/Source/BW/Font.h
GRP is in this file for some reason: https://github.com/bwapi/bwapi/blob/develop/bwapi/BWAPI/Source/BW/CImage.h

EDIT: I have some more info dumped into https://code.google.com/archive/p/vgce/source/default/source
I saw the BIN SMK structure and replay format in there, along with some other things. I was thinking of porting some of that stuff to Google docs or something. A wiki would also work.

EDIT2: Speaking of replay format, this used to be in BWAPI, but it's too large for myself to maintain, and didn't serve much purpose for me, so I dumped it off to another repository: https://github.com/bwapi/ReplayTool
Replay header: https://github.com/bwapi/ReplayTool/blob/master/libReplayTool/RepHeader.h
This interpretation of the header just shows how other known structures were mashed together to create it.


Quote from jjf28
units.dat

Instead of being misleading, why not just specify it exactly:
units.dat altered


Can't verify if that's precisely the correct structure, but it sure as hell is easier to read from file (one-liner). To further enhance it, you can use more explicit typing (i.e.
Code
enum class UnitType : u16 { ... };
)

Post has been edited 7 time(s), last time on May 26 2016, 4:45 am by Heinermann.




May 26 2016, 5:02 am O)FaRTy1billion[MM] Post #9

👻 👾 👽 💪

Quote from Heinermann
Can't verify if that's precisely the correct structure,
Other than addon horizontal/vertical, which should be in a struct, it's good.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 26 2016, 12:06 pm jjf28 Post #10

Cartography Artisan

Quote from Heinermann
Instead of being misleading, why not just specify it exactly:
units.dat altered


Can't verify if that's precisely the correct structure, but it sure as hell is easier to read from file (one-liner). To further enhance it, you can use more explicit typing (i.e.
Code
enum class UnitType : u16 { ... };
)

I'd like to, but I don't have those stored and didn't feel like building them :P



Rs_yes-im4real - Clan Aura - jjf28.net84.net

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

May 29 2016, 7:05 am Heinermann Post #11

SDE, BWAPI owner, hacker.

Quote from jjf28
I'd like to, but I don't have those stored and didn't feel like building them :P

I don't understand the issue. You just read in the entire original DAT file, passing in a pointer to the structure so that it reads directly onto it as a 1-1 mapping.




May 29 2016, 7:54 am jjf28 Post #12

Cartography Artisan

Quote from Heinermann
Quote from jjf28
I'd like to, but I don't have those stored and didn't feel like building them :P
I don't understand the issue.

I get that those would be better, the issue is I don't have structs like that for the files, I have the loading code shown above and would have to work backwards to the structs from it (which of course takes work :P ) since the wiki I got the info from is dead.



Rs_yes-im4real - Clan Aura - jjf28.net84.net

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

May 30 2016, 2:43 am iCCup.xboi209 Post #13



Heinermann, I wonder how the replay format implementation diverged: https://github.com/RElesgoe/bwreplib/blob/master/bwreplib_unix/BWrepAPI.h#L124
Yours doesn't seem to contain any data for the date of the replay for example.




May 30 2016, 6:27 am Heinermann Post #14

SDE, BWAPI owner, hacker.

Actually, there was an original "replay lib" thing in BWAPI, but it was incomplete and I only used it to fix replays with broken headers.

Then some team from some university wrote the rest of it, which I didn't really have anything to do with. I believe they used it to analyze replays en mass. The library they wrote is a very high level approach compared to bwreplib. I would have taken a different approach than they did, but it would still have been equally high level, and this is what we ended up with.

If you mean replay action data, it's all there AFAIK.

The major decompress-and-read-all function you're looking for is here. The part that actually parses the actions is here.

The actions themselves are registered into some game action factory class, in which case it does a lookup and constructs the correct one. For example, if you look at SetSpeedAction, you'll see the read function, which reads the correct parameters from the replay actions data.

EDIT: bwreplib seems to have way too many unknowns (especially actions, "objects" (which should be unit types), etc). Most things are known by now.

Post has been edited 1 time(s), last time on May 30 2016, 6:36 am by Heinermann.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:59 pm]
Pr0nogo -- NudeRaider
NudeRaider shouted: NudeRaider Background: In music this has caused a loudness war, over the past decades where artists amplified their works more and more to sound more prominent than others. In this context it's actually perceived negative, because while for the untrained listener this creates a more effectful (because louder) piece, it actually destroys the finer details artists used to play very quietly. But because the latter is only appreciated by music enthusiasts with good stereo equipment, the former targets a larger audience and thus has proven more commercially successful.
yeah this happens in all media now, sc2's sfx compared to sc1's is a good example of loudness war. also commercials/youtube ads being way louder than the content you're watching
[05:42 pm]
MasterJohnny -- Echo
Echo shouted: My minerals still negative from Moose
We should get minerals for logging for the day.
[05:23 pm]
jjf28 -- Echo
Echo shouted: Did Crescent Dyne ever get finished
:lol:
[05:14 pm]
Echo -- Did Crescent Dyne ever get finished
[05:13 pm]
Echo -- My minerals still negative from Moose
[05:13 pm]
Echo -- I joined 15 years ago and now I'm turning 29 tomorrow. Time zoomed by
[05:12 pm]
Echo -- What you guys still doing here
[05:06 pm]
NudeRaider -- NudeRaider
NudeRaider shouted: SiKiN Don't wanna persuade you to do anything, Sikin, but Pronogo has a point. Uniformly lifting the wave form can only do so much (you noticed that you hit a ceiliing pretty early) but if you use a method that amplifies quiet component more than loud components the resulting perceived loudness will go up much quicker without hitting distortion.
Background: In music this has caused a loudness war, over the past decades where artists amplified their works more and more to sound more prominent than others. In this context it's actually perceived negative, because while for the untrained listener this creates a more effectful (because louder) piece, it actually destroys the finer details artists used to play very quietly. But because the latter is only appreciated by music enthusiasts with good stereo equipment, the former targets a larger audience and thus has proven more commercially successful.
[05:01 pm]
NudeRaider -- SiKiN
SiKiN shouted: Yea cheers but I think I'll land on 20db, hes fine how he is.
Don't wanna persuade you to do anything, Sikin, but Pronogo has a point. Uniformly lifting the wave form can only do so much (you noticed that you hit a ceiliing pretty early) but if you use a method that amplifies quiet component more than loud components the resulting perceived loudness will go up much quicker without hitting distortion.
[03:03 pm]
Zycorax -- :wob:
Please log in to shout.


Members Online: Roy, KrayZee, Moose, jun3hong, Pandut