TBL FILES
See the Starcraft Editing Bible for a more recent reference.
Ever wonder what the hell all those *.tbl files in the MPQs did besides simply holding the text for the game? They actually do quite a lot, and if you know how to edit them, you can do some pretty cool things -- or at least save yourself a little time or make your CWAD a little smaller. Here, I have a list of the "useful" tbl files and descriptions of how to utilize them.
- arr\images.tbl
- arr\mapdata.tbl
- arr\portdata.tbl
- arr\sfxdata.tbl
- rez\gluAll.tbl
- rez\gluHist.tbl
- rez\help_txt.tbl
- rez\network.tbl
- rez\stat_txt.tbl
- rez\tips.tbl
This is a listing of the grp files in the unit\ directory of the MPQ files (i.e., all the unit, weapon, doodad sprites, and stuff). Each line is listed as the path and file name that is appended to unit\ in the MPQ. For example, unit\zerg\drone.grp in the MPQ is listed as zerg\drone.grp. Each line is essentially a "pointer" that tells Starcraft where to look for a certain grp file. For example, if I changed zerg\drone.grp to bobo\bear.grp, then Starcraft would use the bobo\bear.grp as the Zerg Drone (assuming that bobo\bear.grp existed in the MPQ =).
The only utility I can find in editing the lines of this tbl is to redirect a unit's grp to that of another unit. For example, let's say I wanted both the SCV and the Probe to look like Probes. You could do this in Arsenal II by simply changing the SCV's sprite to that of a Probe, but let's say I also wanted to keep the SCV's animation properties the same (i.e., it would keep the back-burner overlay when it moved). One way you could do this is to manually replace all of an SCV's grp frames with that of a Probe's. However, if you redirect using the images.tbl, you not only save yourself the time consuming effort of making a GRP, but you also save room in your CWAD (a GRP is a lot bigger than a tbl file). Here's how to do it:
Find terran\SCV.grp in the images.tbl file. Edit it so it insead reads protoss\probe.grp (and make sure you keep the <0> at the end). That's it. The SCV sprite will now use the probe GRP. When you do this, remember that the animation properties of a unit don't change, so if a GRP doesn't have enough frames for that unit's original animation, Starcraft will still crash.
Now, you may think that you can add GRPs to the MPQ this way (by adding lines to the tbl), but so far I haven't been able to get it to work with just a Stardraft CWAD. You'll need to use a Custom MPQ File.
This is a listing of all the campaign maps (and their respective directories) on the CD(s). Each line is prepended to the \staredit\ paths in the Install.exe. For example, campaign\terran\terran01 points to campaign\terran\terran01\staredit\scenario.chk and all the wav files in campaign\terran\terran01\staredit\wav\ directory.
Again, I have not found too much use for this file. You can rearrange the order of the campaign levels this way though. [When playing the campaigns, Starcraft automatically moves through the levels on the CD sequentually, even if you replace one of them with your own map and change the "set next scenario" triggers.] For example, let's say you wanted the Broodwar Terran mission 5a -- Emperor's Fall (Ground Zero), commonly known as the "nuke" level =) -- to play as the first Protoss Broodwar mission. All you'd do is change campaign\expprotoss\protoss01 to campaign\expterran\terran5a. That's it.
This isn't extremely useful, but if you are adding your own maps into the campaign structure and oly using a Stardraft CWAD, you know that you can only use the original sounds that are on the CD and only the original ones for that particular mission. By rearranging the level directories, you also rearrange which set of sounds (mission briefings and in game sounds) go with which mission. If you plan it carefully enough, you can get (some of) the sounds you want in each mission you want them in. Of course, if you compile your maps in a Custom MPQ, you can use all your custom sounds. See this article.
This is a listing of the protrait files in the MPQs (*.smk files). The format is a little wierd; each line is appended to the portrait\ directory and also prepended to the #.smk's in the MPQ. For example, tmarine\TMaFid0 in portdata.tbl refers to protrait\tmarine\TMaFid00.smk, protrait\tmarine\TMaFid01.smk, protrait\tmarine\TMaFid02.smk, etc. in the MPQ. It's pretty easy once you recognize it.
Again, for this tbl, you can change each line to redirect Starcraft to use another portrait(s). For example, changing tmarine\TMaFid0 to tgoliath\TGoTlk0 will have the Marine display all the Goliath's talking protraits when he is idle. Simple.
Here is another neat trick. Let's say you make a replacement portrait for a marine, but only want to use that one for all of the marine's four idle protraits and all three of his talking ones (this is common when you use still smk files instead of movies). You could make 7 copies of your replacement and place them all respectively in your CWAD, but that makes it a hell of a lot bigger. Instead do this:
First, change both the marine's portrait lines in the tbl -- tmarine\TMaFid0 (the idle portraits) and tmarine\TMaTlk0 (the talking portraits) -- to a new user defined line path. For example, change them both to mymarine\TMaFid0. Now place your custom portrait into your CWAD as portrait\mymarine\TMaFid00.smk. That's it; Starcraft will now only use the smk files with the portrait\mymarine\TMaFid0- prepended for the marine's portrait cycle.
This tbl file is a listing of all the wav files in the MPQs. Each line is appended to the sound\ directory. It's pretty simple.
Just like the other three tbl's above, each line points Starcraft in the direction of the wav files in the MPQ. For sfxdata.tbl, it points to each individual file like the images.tbl. For example, if you changed the Terran\CIVILIAN\TCvWht00.WAV line to Terran\DROPSHIP\TDrPss00.WAV, then the Civilian would play the Dropship's annoyed sound sometimes when you click on him. =)
The primary use of this tbl is to save space. Let's say You have made replacement sounds for a Civilian, but only have 3 selected or "Wht" sounds; the original Civilian has 4. Now, the simple way to get rid of the fourth sound would be to duplicate one of the 3 replacment wavs you made and put it in your CWAD as the fourth one. However, that adds unneeded space -- which can start to get very bulky if you do that a lot. If you simply redirect the fourth sound with the sfxdata.tbl, you save space. Just change Terran\CIVILIAN\TCvWht03.WAV (the fourth Civilian selected sound) to Terran\CIVILIAN\TCvWht00.WAV (or 01 or 02 depending on which one you want to duplicate).
Another common usage is to switch around sounds between units without adding too much space. For example, let's say you turn the Raynor marine unit into a Firebat using Arsenal II (by giving him a Firebat sprite) and want him to use the normal Firebat sounds. Instead of putting all the Firebat wav files in your CWAD to replace Raynor's voice (that's a lot of useless room), simply edit the sfxdata.tbl to redirect Raynor's sounds to the Firebat's. This way, you also still have Raynor's original sounds if you want to have another unit use them.
A fun (but ultimately unimportant) thing to do is: first export the sfxdata.tbl to text, edit the text file by cutting, say, 10 lines from the top and pasting them at the bottom, and then reimporting the edited text file into the tbl. Now, all the sounds are offset by 10 and everything action will play something funny (or just out of the ordinary =). It's really fun to do -- I got my spider mine to play the nuke sound when it burrowed. =)
Lastly, as far as I know, you can not add sounds to the MPQ with Stardraft by adding lines to the tbl. You can get pretty far, but ultimately it won't be able to find the added wav. Again, you need to use a Custom MPQ instead of a Stardraft CWAD if you want to do this successfully.
This is just a normal tbl containing game text. In here, you'll find most of the text for game menu screens (like the score titles on the Victory/Defeat screens) and the Battle.net text.
This is another normal tbl file with game text. The things you'll find here are the campaign mission titles and cinematic tiles.
Yet another normal game text file. You'll find the in-game pop-up menu text and the short cut hints here.
This normal game text file contains a lot of the "system messages" like "Building exit is blocked" or "Cannot create more units." It also contains the race names (for when you select race), the tribe/brood/squadron names (for the Victory/Defeat screens), and a little bit more miscellaneous stuff.
This is essentially the "main" tbl file that people talk about. It contains basically all the text most people would ever want to edit like unit names, weapon names, spell names, upgrade/tech names, ranks, miscellaneous unit text like "Parasite Detected" or "Detector", Advisor error messages like "You must build on creep." or "Not enough energy.", and a slew of other things like labels for things in the data files and AI scripts. If you're looking for some text, you'll most likely find it in here.
This tbl contains all the "Tool Tips" in Starcraft: the helpful hints you can ask Starcraft to give you when you start a mission, like "Combining different types of units during an attack makes your attack more effective. The strength of one unit will complement the weakness of another." =)
DI (aka MAGNUS99)
June 18, 1999


