ACCESSING CCdataBase\\ RETRIEVING CCcontentMessage\\ .. msg:"Welcome, user7576."


ISCRIPT.BIN

Note: these specifications are vastly out of date. See the SCEB for a more complete opcode listing.

Note: These specs are for 1.05, there was a large section of data at the begining in the pre-bw iscript, the new iscript has replaced this with 00's, the purpose of this data was never looked into as I started the iscript research for the most part and it was done after bw was released. There may be other minor differences also but none that I am aware of.

All offsets used internally are decimal, in hex, unsigned short, intel byte order.

The Iscript is a bunch of scripts that control how an image behaves (hence the name iscript - image script). The overall structure of the file is:
- first two bytes: offset of the entree table
- several 0's
- the scripts
- the entree table (assigns each entree with a number which is used in the images.dat).

The entree format is:
- SCPE (53 43 50 45 - a header it seems)
- the pointer section which sets the type of entree, and where each of it's animation scripts for that entree are located
- the scripts themselves.

The entree table:
- Number (unsigned short, intel)
- Offset

The pointer section varies depending on the type, but for most unit graphics, it is as follows:

Section                                           Size
--------------------------------------------------------------

Type                                              1 Byte
Spacer                                            3 Bytes
Initial                                           2 Bytes
Death                                             2 Bytes
Initial ground attack                             2 Bytes
Initial air attack                                2 Bytes
Spell? Spacer?                                    2 Bytes
Repeated ground attack                            2 Bytes
Repeated air attack                               2 Bytes
Spell casting                                     2 Bytes
Return to idle from ground attack                 2 Bytes
Return to idle from air attack                    2 Bytes
Spell casting                                     2 Bytes
Walking/movement                                  2 Bytes
Return to idle from walking                       2 Bytes
General 'other' animation?                        2 Bytes
OpCode   Function                 Variables
--------------------------------------------------------------

00 XXXX  Play frame from set      XXXX - Frame set (1 of 17
                                         frames in GRP)

02       Unknown                  None

03 XX    Shift Position Down      XX - pixels to shift sprite

05 XX    Wait                     XX - ticks to wait

06 XX YY Wait random time         XX - Time 1
                                  YY - Time 2

07 XXXX  Go to offset XX XX       XXXX - Offset

08 XXXX  Place active overlay     XXXX - Overlay graphic
YYYY     (active = "follows              (image.dat entry)
         main graphic"            YYYY - Vertical Offset

09 XXXX  Place active underlay    XXXX - Underlay graphic
YYYY                              YYYY - Vertical Offset

10 XXXX  Place underlay under     XXXX - Underlay graphic
YYYY     this anim level          YYYY - Vertical Offset

11 XXXX  Place under everything   XXXX - Underlay graphic
YYYY

16       End animation &          None
         Remove graphic

18 XXXX  Play Sound               XXXX - Sound to be played
                                         (sfxdata.dat entry)

19 XX    Randomly play one        XX   - Number of sounds
YYYY     of XX sounds             YYYY - Sound 1 (sfxdata.dat)
ZZZZ                              ZZZZ - Sound 2

1A XXXX  Randomly plays one       XXXX - First sound
YYYY     sound between            YYYY - Last sound
         XXXX and YYYY            (both inclusive)

1C XXXX  Melee attack playing     XXXX - First sound
YYYY     sound XXXX or            YYYY - second sound
         YYYY randomly

1D       Shadow opcode:           None
         follow the main graphic
         when changing frames

1E XX    Randomly goes to Offset  XX   - Randomizer variable?
YYYY                              YYYY - Offset

1F XX    Turn graphic XX          XX - number of frames to turn
                                       frames counter-clockwise

20 XX    Turn graphic XX          XX - number of frames to turn
                                       frames clockwise

21       Turn 1 frame clock-wise  None

22 XX    Turn graphic XX          XX - number of frames to turn
                                       frames in random
                                       direction

24 XX    ????                     if XX = 2 then goto Return
                                  to idle from walking anim

25 XX    Attack                   XX - Attack to use
                                       (01 ground, 02+ air)

27       Cast Spell (normal)      None

29 XX    Move in direction        XX - ammount to move
         unit's facing                 (only works in
                                       movement script)

2A       Used in looping attack   None

2E       Unbreakable code start   None
         finish section
         regardless of other
         player commands

2F       Unbreakable code end     None

30       Ignore the rest?         None
         (except 07)

31 XX    Projectile attack from   XX - Angle to spawn sprite from
         Angle

34 XX    Play Specific Frame      XX - Frame Number

3F XXXX  Some kind of goto offet  XXXX - Offset