The Starcraft Editing Bible

Chapter Four: Sprites and Graphical Data

Reference: ICE

Of all the file utilities discussed so far ICE is probably the most powerful (this is excluding the Stardraft and Stargraft patch loaders of course, since without them none of this would be possible :). While ICE is designed to be user friendly (much, much more user friendly than if you had to edit the iscript.bin manually, which, believe it or not, is what a lot of people did until now), it is still critical to understand the basic structure of the iscript.bin before learning how to use it. It will make it a lot easier to understand, and help you diagnose bugs (with your scripts and with ICE itself). With that said, I will reluctantly tell you that you probably won't have to worry about much of the pointers (goto line XXX, etc.) that were ranted about in the last section. Pointers are still important and will still cause many crashes if they aren't handled right, but ICE tries to handle them for you. For example, you normally can't just insert an opcode in the middle of some animation routine because it will throw off every pointer that is below it. However, in ICE you normally can just insert (add) an opcode in the middle of a script. This is because when you do this, ICE will automatically move the script you are editing to the end of the iscript, and adjust the appropriate script pointer in the header to match.

File Menu

Open File - This will let you open an iscript.bin file for editing.

Load Default - This will load the default iscript.bin from the MPQ for editing (it will not edit the iscript.bin that is in the MPQ specifically, it will just extract it and you can edit it as a new file).

Load from CWAD - This will load the iscript.bin from inside a specific CWAD file. Note that it must be in scripts\iscript.bin in your CWAD.

Save File - Self explanatory.

Save File As - Self explanatory.

Save File to CWAD - This will import the current iscript.bin file into a specific CWAD with the path scripts\iscript.bin (the appropriate one for use by SC). This will save you the trouble of opening up the CWAD Manager all the time.

Create CWAD from File - This will create a new CWAD with your iscript.bin inside (with the path scripts\iscript.bin).

Main Headers

This tab on top will allow you to select which animation header you want to edit (or create a new one or delete one). Recall that an animation header is the set of line offsets which determine which individual animation for that animation set is located. ICE gives "names" for the headers indicating which sprite the header was originally associated with. Don't let the names confuse you though; they really don't mean a thing. (You can associate any animation header with any images.dat sprite)

The drop-down menu will allow you to select one of the current headers, and thus load the header's data (pointers and animation routines into the editing tabs on the bottom).

Create New Header - This will allow you to add a new header (set of animation routines) to the iscript.bin.

Script Name: This will make ICE associate a name with this animation header. Its just for helping you remember what this header is for. It doesn't effect anything.

Offset: This will tell ICE where to put this animation header in the iscript.bin ("line," or offset). By default ICE will add the header to the end so it won't mess up any pointers. YOU SHOULD ONLY PLACE THE HEADER IN ANOTHER LOCATION IF YOU KNOW WHAT YOU'RE DOING.

ID Tag: This is the Iscript ID number that is associated with this set of animations. For example, if you want a certain images.dat entry to associate with this animation routine, you would make this ID Tag and the Iscript ID variable in the images.dat the same number. If the ID number you choose is already associated with an images.dat entry (in the original images.dat in the MPQ), then ICE will allow you to "Preview" the GRP file which is associated with that images.dat entry.

Type: Each set of animations in the iscript is of a certain "type." The type of header determines how many different animations there are in the set. Most "normal" terran and protoss man sprite (non-building) have type 12 or 13. Most zerg man sprites have type 26 (extra animations routine needed for burrowing). Most buildings have 20 (zerg) or 26 or 27 (terran, protoss; need more animation for lift off and "building is working" animations). Most "overlay" type sprites (sprites that aren't used for units but just played in conjunction on top of or below to other sprites have type 0 or 1 (they only need an initial initial and death animations). If you're not sure what type to use, just go with the largest number of animations. Which animation is which doesn't change between types (e.g., the initial animation will always be the first animation listed in type 0, 13, or 27), but you don't always need all of them.

Delete Header - Self explanatory.

Rename Header - Self explanatory.

GRP Preview and WAV Preview

These are peripheral tabs that are designed to help you edit the iscript by allowing you to preview unit graphics and sounds, but have absolutely nothing to do with the actual iscript you are editing. In other words, you could ignore them if you wanted and there wouldn't be any difference, and messing with them doesn't effect your iscript. The GRP Preview tab will allow you to preview the GRP which is originally associated with this animation set (in the Main GRP window). How it does this is ICE looks up what original images.dat entry is currently associated with this animation header's ID tag and then looks up what GRP is associated with that images.dat entry. Keep in mind that no GRP is actually directly associated with the animation set, it is only indirectly connected by association with the images.dat entry which contains a pointer to this iscript routine. The Secondary GRP window allows you to preview another GRP (associated with a certain images.dat entry, or a certain sprites.dat entry -- which is really just a sprites.dat entry pointing to an images.dat entry which then points to a GRP). The purpose of this is to allow you to preview overlay or underlay graphics that are played by the iscript on the current main sprite. This is done by double clicking on certain opcodes which will be explained further later. The buttons between the two windows allow you to choose a specific GRP to preview in the Secondary GRP window. You just enter the number of the images.dat or sprites.dat entry, check the appropriate radio button, and click preview. ICE will show the GRP originally associated with that entry.

The WAV Preview is similar. While there are no "default" sounds associated with sprites, iscript animation routines are allowed to play sounds (i.e., the clash of psi blades when the zealot sprite attacks). When you double click on certain opcodes which play sounds (by association with an sound entry in sfxdata.dat), ICE will put the associated sound in this window. You can double click on it or press "Play WAV" to preview the actual sound. You can add more WAVs to the preview list by inputing an entry number from sfxdata.dat (the sounds data file, each entry points to a certain sound, listed in sfxdata.tbl -- we'll get to this later, but its not that complicated). ICE will add the associated wav file to the list for previewing. Similarly you can remove wavs from this list with the "Remove WAV" button.

Copyright (c) 1999-2000 Jeffrey Pang. Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the
Free Software Foundation with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".

[an error occurred while processing this directive]