|
There are many file formats used in modding. Understanding what these formats represent as well as when and how to edit them is key to modding effectively.
Contents[hide] |
There exists three different *.bin files: dialog data (rez\), AI and animation scripts (scripts\), and doodad data (\tileset\*\dddata.bin).
AIScript.bin Opcodes, iscript.bin Opcodes
For script\ files, edit with SCAIEdit (AI scripts), IceCC/Ice. (iscript, no ice link)
(font\font.ccd) A checksum file used during decrypting the CD key.
Raw map data. Used for maps and campaigns. Edit like normal maps.
scenario.chk format
(font\font.clh) This file contains the encrypted CD owner name.
Patch command script.
* set the product patch name PatchVersion This patch upgrades Brood War from version 1.04 to version 1.12. * make sure that we don't patch version 1.12 or greater ProductVersionLessThan $(InstallPath)\Starcraft.exe 1.1.2.0 0xffff.0xffff.0xffff.0xffff * make sure we only patch brood war (which is numbered ##.##.##.1) * v1.02 uses 1.024, so we can only check low bit for Brood War. ProductVersionEqualTo $(InstallPath)\Starcraft.exe 0.0.0.1 0.0.0.0x01 SetLauncher $(InstallPath)\Starcraft.exe
Blizzard map signing (Candidate Scenarios).
Contain properties and information, such as unit stats, properties, flags, and basic AI.
Edit with DatEdit.
StarCraft font files. Encrypted in StarDat.mpq, you can get un-encrypted ones from install.exe.
No editor exists, but a spec sheet exists.
The encrypted font file use the SHA-0 digest algorithm and IDEA encryption but not follow the standard form.
All the data and calculation assume the little-endian byte order and seems a bug exist in Blizzard's SHA-0 algorithm: they did all left rotation with signed integer instead of general unsigned.
By this you cannot use common security library such as the OpenSSL to decrypt them directly anyway...
However, you can modify its source to make them work easily.
(font\font.gid) This file contains the encrypted CDKey.
Game Templates. Contain different game types and their settings.
Edit with GameTemplate.EXE
In-game images for sprites (including units, weapons, spells, buildings, etc.).
Compile and decompile with GRPEdit, RetroGRP or SFGrp Conv on Windows, and PyGRP on Mac.
Installer script files, found in INSTALL.EXE
@filename
Include a file, essentially pastes the contents of the file into this one
String variablename = "xyz";
Declares a variable
$(variablename)
Gets the value of a variable
Overlay files. These files control positions of things like bunker overlay, attacks, and engine glows.
Edit with LoEdit
Attack overlay. Used by the bunker, this is where the firing animations are placed. Also used by siege mode siege tank.
Birth overlay. Used to units with the 2 in 1 egg spawning option.
Down overlays. The offsets in this file determine placement of dust when a building lands.
Fire overlays. These files are used when a building enters critical HP and starts to display flames or blood.
Object overlay. Used by workers to place powerups when carried.
Shield/smoke overlay. Used when placing shield hit graphics. For smoke overlay, they are used for the vespene gas poofs.
Up overlays. The offsets in this file determine placement of dust when a building lifts off.
Miscellaneous overlays. Some are attack overlay offsets, some are for spells, some are for engine overlays, and then there's some more effects they have. Basically, these are used most by the Iscript, while the above ones (except for .loa) are used by the engine.
templates\templates.lst contains the list of *.got files.
Edit with notepad or another text editor.
MPQ is short for Mo'PaQ, which is in turn short for Mike O'Brien Pack, the creator the format. Probably the most important format used in modding, MPQ files are similar in function to ZIP files, that is, they hold (and compress) other files inside of them.
When creating a mod, the mod maker usually starts with an MPQ and begins filling it with edited files. The MPQ is then run through a program called MPQDraft, which applies the MPQ in a similar fashion to patch_rt.mpq (and in fact, in a grafted mod, the modded MPQ replaces patch_rt.mpq): the modded MPQ take precedence over patch_rt.mpq, which takes precedence over BrooDat.mpq, which takes precedence over StarDat.mpq. Thus, a file named FOO.BAR in the modded MPQ will be used even if there is a FOO.BAR in any of the other MPQs.
MPQs usually contain metadata files:
PCX files are used for the UI images (such as backgrounds, buttons, the in-game console, etc.) and color tables. They can be converted to other formats by programs like Irfanview, and many image editors can edit them (e.g. Paint.NET and the GIMP). Current versions of MS Paint cannot edit PCX images, however older versions (Window 98 and before) can edit them.
PalEdit2 can be used to edit the color tables (mainly the tileset\*\*.pcx ones) and convert them to normal palette files.
(glubnres.res) Battle.net dialogs. Normal resource file.
Map files. SCM is for Vanilla maps and SCX is for Expansion maps.
Smacker animation files. Used for unit portraits, UI animations (main menu and campaign selection buttons), and cinematics.
Edit with Smacker Tools.
Multiplayer resource files.
(parallax\star.spk) Star parallax images.
TBL files contain strings, which are anything from path names to unit/weapon/armor names, to button captions. Most strings in TBL files work just like strings in maps- you can use overlapping and colors. Some strings, particularly the button captions and unit names, are different. Button captions follow a format like this:
button hotkey (a-z)<1>Button caption (usually with a <3>highlightedletter<1>) <0>
Unit names follow this format:
Unit name<0>parenthesed in Staredit (like Jim Raynor (Vulture)) * means no text in italics<0>Group in Staredit<0>
TBL files are edited using TBLPad.
Blizzard is nuts and made tileset files into a billion little things.
The files are pretty obviously named, however some of them have '-nc' in their name. This indicates that they don't use the color cycling palette (Normally the first row in the palette will rotate values, giving the appearance of animated water or lava.) The editor uses these.
Edit with TileEdit.
Doodad data values. Appears to be the same as the vf4 values.
Tileset group values, main tileset file. This contains all the flags for each row of tiles, and the 16 MegaTiles in the row.
Mini-tile type. Contains the data for mini-tiles, such as whether or not you can walk on them. Bit 0 will indicates if you can walk on it. In simpler terms, if the number is odd you can walk on the minitile. It also shows elevation. The higher the number, the higher the tile.
Mini-tile image data. Every 64 bytes is one mini-tile. Each byte is a reference to the palette index (exactly like a paletted bitmap.)
Mini-tile image pointer. Bit 0 will indicate if the tile is flipped, and the 7 high bits will indicate the image to be used.
Tileset (in-game) palette files. 1024-byte palette file. (4-byte integer for each color.) Edit with PalEdit2.
Trigger files for game templates. Similar to the ones saved by StarEdit, except they do not have the 8-byte header and contain no extra data. They cannot use any locations and can only use standard strings. [/wiki]*.trg format[/wiki]
Normal text files. rez\*.txt contain text screen scripts (credits and the campaign screens.)
Codes:
Example:
</COMMENT Example screen> </FADESPEED 100> </DISPLAYTIME 5000> </COMMENT #############################################################> </BACKGROUND glue\title\title.pcx> </FONTCOLOR glue\title\tfont.pcx> </SCREENCENTER> LOLOL PANCAKE! </PAGE>
Installer dialogs
Supported sound format for StarCraft.
Basic edits to WAV files can be done with Sound Recorder. More advanced edits can be done with these programs.
(files\staredit.cnt)
(editor\mask.flc, editor\trigrgn.flc)
(editor\mask.fsp, editor\trigrgn.fsp)
Heinermann: I believe one of the formats for mask/trigrgn can be opened with quicktime. FaRTy: All I get is a little green square with mask.flc, and a dark blue square with trgrgn.flc... Also the mask/trgrgn.grp files are a brown square and a blue square, respectively. Can't find anything to open the *.fsp files. Clokr_: The editor rgn files (from region) where supposed to be used to display locations. Doodle77: moving INS out of Unknown, they're installer script files
|