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.



None.

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)



TheNitesWhoSay - Clan Aura - github

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



TheNitesWhoSay - Clan Aura - github

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



TheNitesWhoSay - Clan Aura - github

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.



TheNitesWhoSay - Clan Aura - github

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.



None.

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.
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
Please log in to shout.


Members Online: Roy