##############################################################
# This is a sample Unit Sprite script. 
##############################################################

0     # this leading zero is required (it can be any number.  A number
      # here is required, but ignored currently

#
# The UNIT_SPRITE keyword indicates that this is a sprite for units
#
UNIT_SPRITE
{
    # The UNIT_SPRITE_MOVE tag specifies whether this sprite has
    # a Move action.  It has a value of either 0 or 1.  If it's 0,
    # no sprite action definition block is required.  Since it's 1, 
    # this block is required.
    #
    UNIT_SPRITE_MOVE    1
    {
        # This is the sprite action definition block.  All sprite
        # actions require this block if the sprite action is defined.
        #
        SPRITE_NUM_FRAMES    10    # number of frames of animation
        SPRITE_FIRST_FRAME    0    # the index of the first frame
        SPRITE_WIDTH         96    # the width of each sprite image
        SPRITE_HEIGHT        72    # the height of each sprite image
        SPRITE_HOT_POINTS          # the hot points (center points) of
                                   # the sprite for each of the 5 facings
            47 35     # facing 1
            47 35     # facing 2
            47 35     # facing 3
            47 35     # facing 4
            47 35     # facing 5
    }

    # The ANIM block is required for each UNIT_SPRITE_* action block 
    # that is defined (set to 1, and has a sprite action definition
    # block.)  It describes the animation that will pay, given the
    # sprite frames described in the UNIT_SPRITE_* block.
    #
    ANIM    1
    {
        ANIM_TYPE             1     # what type of animation is this?
                                    # 0 = sequential (play through from
                                    #     the first frame to the last
                                    #     defined frame
                                    # 1 = looped (starts over at the 
                                    #     first frame when it's gone
                                    #     through all of the frames
                                    # 2 = back-n-forth (reverses 
                                    #     direction of playback when
                                    #     it reaches the last frame,
                                    #     and playes back to the first
                                    #     before reversing direction
                                    #     again.
        ANIM_NUM_FRAMES       10    # How many frames of animation?
        ANIM_PLAYBACK_TIME    1000  # How much time does it take to play
                                    # back the animation (in ms.)  This
                                    # is not currently supported.
        ANIM_DELAY            0     # amount of time to repeat the very
                                    # last frame of the animation before
                                    # continuing (when playing looped
                                    # or Back 'n Forth animations)
        ANIM_FRAME_DATA             # the list of the sprite frames to 
            0    1    2    3    5   # to play (must be the same number
            5    6    7    8    9   # as defined in ANIM_NUM_FRAMES)

        #
        # The ANIM_MOVE_DELTAS are nudges applied to each frame of
        # animation which bump the draw location the specified offset.
        # They allow an single static frame to be moved around a fixed
        # location, for instance.
        #
        # There's one per frame of animation as defined in 
        # ANIM_NUM_FRAMES
        #
        ANIM_MOVE_DELTAS    1
        {
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0

        }
        
        #
        # This is a 4 bit transparency value, ranged from 0-15, to be
        # applied to each frame.  This allows the sprite to fade in or
        # out over the course of animation, or whatever transparency
        # might be used for.  0 is invisible, 15 is opaque
        #
        ANIM_TRANSPARENCIES    1
        {
            15    15    15    15    15    
            15    15    15    15    15      
        }

    }

    #
    # The Attack animation for this sprite.  As you can see, this 
    # unit doesn't have an Attack animation, so the tag's value is zero.
    # Because this tag's value is zero, there's no sprite action
    # definition block, and no ANIM {} block associated with this action.
    # obviously that was for the cow, this unit has attack animations
    UNIT_SPRITE_ATTACK    1

    UNIT_SPRITE_ATTACK_IS_DIRECTIONAL 0
    {

        SPRITE_NUM_FRAMES    15    # number of frames of animation
        SPRITE_FIRST_FRAME    0    # the index of the first frame
        SPRITE_WIDTH         96    # the width of each sprite image
        SPRITE_HEIGHT        72    # the height of each sprite image
        SPRITE_HOT_POINTS          # the hot points (center points) of
                                   # the sprite for each of the 5 facings
            47 35     # facing 1
            47 35     # facing 2
            47 35     # facing 3
            47 35     # facing 4
            47 35     # facing 5
    }

    ANIM    1
    {
        ANIM_TYPE             1     # what type of animation is this?
                                    # 0 = sequential (play through from
                                    #     the first frame to the last
                                    #     defined frame
                                    # 1 = looped (starts over at the 
                                    #     first frame when it's gone
                                    #     through all of the frames
                                    # 2 = back-n-forth (reverses 
                                    #     direction of playback when
                                    #     it reaches the last frame,
                                    #     and playes back to the first
                                    #     before reversing direction
                                    #     again.
        ANIM_NUM_FRAMES       15    # How many frames of animation?
        ANIM_PLAYBACK_TIME    1000  # How much time does it take to play
                                    # back the animation (in ms.)  This
                                    # is not currently supported.
        ANIM_DELAY            0     # amount of time to repeat the very
                                    # last frame of the animation before
                                    # continuing (when playing looped
                                    # or Back 'n Forth animations)
        ANIM_FRAME_DATA             # the list of the sprite frames to 
            0    1    2    3    4   # to play (must be the same number
            5    6    7    8    9   # as defined in ANIM_NUM_FRAMES)
            10   11   12   13   14

        #
        # The ANIM_MOVE_DELTAS are nudges applied to each frame of
        # animation which bump the draw location the specified offset.
        # They allow an single static frame to be moved around a fixed
        # location, for instance.
        #
        # There's one per frame of animation as defined in 
        # ANIM_NUM_FRAMES
        #
        ANIM_MOVE_DELTAS    1
        {
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0

        }
        
        #
        # This is a 4 bit transparency value, ranged from 0-15, to be
        # applied to each frame.  This allows the sprite to fade in or
        # out over the course of animation, or whatever transparency
        # might be used for.  0 is invisible, 15 is opaque
        #
        ANIM_TRANSPARENCIES    1
        {
            15    15    15    15    15    
            15    15    15    15    15    
            15    15    15    15    15    
        }

    }


    #
    # The Idle animation for this unit.  There's no Idle animation
    # either.
    #
    # If this sprite had an idle animation, the format of the sprite
    # action definition block would be exactly the same as the format
    # of the Move block above
    # like attack
    UNIT_SPRITE_IDLE    1
    {

        SPRITE_NUM_FRAMES    15    # number of frames of animation
        SPRITE_FIRST_FRAME    0    # the index of the first frame
        SPRITE_WIDTH         96    # the width of each sprite image
        SPRITE_HEIGHT        72    # the height of each sprite image
        SPRITE_HOT_POINTS          # the hot points (center points) of
                                   # the sprite for each of the 5 facings
            47 35     # facing 1
            47 35     # facing 2
            47 35     # facing 3
            47 35     # facing 4
            47 35     # facing 5
    }

    ANIM    1
    {
        ANIM_TYPE             1     # what type of animation is this?
                                    # 0 = sequential (play through from
                                    #     the first frame to the last
                                    #     defined frame
                                    # 1 = looped (starts over at the 
                                    #     first frame when it's gone
                                    #     through all of the frames
                                    # 2 = back-n-forth (reverses 
                                    #     direction of playback when
                                    #     it reaches the last frame,
                                    #     and playes back to the first
                                    #     before reversing direction
                                    #     again.
        ANIM_NUM_FRAMES       15    # How many frames of animation?
        ANIM_PLAYBACK_TIME    1000  # How much time does it take to play
                                    # back the animation (in ms.)  This
                                    # is not currently supported.
        ANIM_DELAY            0     # amount of time to repeat the very
                                    # last frame of the animation before
                                    # continuing (when playing looped
                                    # or Back 'n Forth animations)
        ANIM_FRAME_DATA             # the list of the sprite frames to 
            0    1    2    3    4   # to play (must be the same number
            5    6    7    8    9   # as defined in ANIM_NUM_FRAMES)
            10   11   12   13   14

        #
        # The ANIM_MOVE_DELTAS are nudges applied to each frame of
        # animation which bump the draw location the specified offset.
        # They allow an single static frame to be moved around a fixed
        # location, for instance.
        #
        # There's one per frame of animation as defined in 
        # ANIM_NUM_FRAMES
        #
        ANIM_MOVE_DELTAS    1
        {
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0

        }
        
        #
        # This is a 4 bit transparency value, ranged from 0-15, to be
        # applied to each frame.  This allows the sprite to fade in or
        # out over the course of animation, or whatever transparency
        # might be used for.  0 is invisible, 15 is opaque
        #
        ANIM_TRANSPARENCIES    1
        {
            15    15    15    15    15    
            15    15    15    15    15    
            15    15    15    15    15    
        }

    }

    #
    # This Unit DOES have a victory/death animation.  For this sprite
    # action definition block, and this one only (Victory) there's
    # an additional flag field immediately following the 
    # UNIT_SPRITE_VICTORY tag, and that's UNIT_SPRITE_IS_DEATH, which
    # is set to either 0 (indicating that this animation specifies 
    # a Victory animation--an animation to play when this unit wins
    # a battle) or 1 (indicating that this is a death animation, which
    # will play when the unit is killed.)
    #
    UNIT_SPRITE_VICTORY    1
    UNIT_SPRITE_IS_DEATH    1
    {
        SPRITE_NUM_FRAMES     15
        SPRITE_FIRST_FRAME    0
        SPRITE_WIDTH          96
        SPRITE_HEIGHT         72
        SPRITE_HOT_POINT    47 35
    }

    ANIM    1
    {
        ANIM_TYPE             0
        ANIM_NUM_FRAMES       15
        ANIM_PLAYBACK_TIME    1000
        ANIM_DELAY            0
        ANIM_FRAME_DATA
            0    1    2    3    4    
            5    6    7    8    9    
            10   11   12   13   14

        ANIM_MOVE_DELTAS    1
        {
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0

        }
        ANIM_TRANSPARENCIES    1
        {
            15    15    15    15    15    
            15    15    15    15    15    
            15    15    15    15    15    

        }

    }

    #
    # This is the Unit Sprite's Work animation (Special Animation)
    # to be used when doing special attacks or special movement.
    #
    # As you can see, it's not defined.
    #
    UNIT_SPRITE_WORK    0
    {

        SPRITE_NUM_FRAMES    15    # number of frames of animation
        SPRITE_FIRST_FRAME    0    # the index of the first frame
        SPRITE_WIDTH         96    # the width of each sprite image
        SPRITE_HEIGHT        72    # the height of each sprite image
        SPRITE_HOT_POINTS          # the hot points (center points) of
                                   # the sprite for each of the 5 facings
            47 35     # facing 1
            47 35     # facing 2
            47 35     # facing 3
            47 35     # facing 4
            47 35     # facing 5
    }

    ANIM    1
    {
        ANIM_TYPE             1     # what type of animation is this?
                                    # 0 = sequential (play through from
                                    #     the first frame to the last
                                    #     defined frame
                                    # 1 = looped (starts over at the 
                                    #     first frame when it's gone
                                    #     through all of the frames
                                    # 2 = back-n-forth (reverses 
                                    #     direction of playback when
                                    #     it reaches the last frame,
                                    #     and playes back to the first
                                    #     before reversing direction
                                    #     again.
        ANIM_NUM_FRAMES       15    # How many frames of animation?
        ANIM_PLAYBACK_TIME    1000  # How much time does it take to play
                                    # back the animation (in ms.)  This
                                    # is not currently supported.
        ANIM_DELAY            0     # amount of time to repeat the very
                                    # last frame of the animation before
                                    # continuing (when playing looped
                                    # or Back 'n Forth animations)
        ANIM_FRAME_DATA             # the list of the sprite frames to 
            0    1    2    3    4   # to play (must be the same number
            5    6    7    8    9   # as defined in ANIM_NUM_FRAMES)
            10   11   12   13   14

        #
        # The ANIM_MOVE_DELTAS are nudges applied to each frame of
        # animation which bump the draw location the specified offset.
        # They allow an single static frame to be moved around a fixed
        # location, for instance.
        #
        # There's one per frame of animation as defined in 
        # ANIM_NUM_FRAMES
        #
        ANIM_MOVE_DELTAS    1
        {
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0
            0 0

        }
        
        #
        # This is a 4 bit transparency value, ranged from 0-15, to be
        # applied to each frame.  This allows the sprite to fade in or
        # out over the course of animation, or whatever transparency
        # might be used for.  0 is invisible, 15 is opaque
        #
        ANIM_TRANSPARENCIES    1
        {
            15    15    15    15    15    
            15    15    15    15    15    
            15    15    15    15    15    
        }

    }


    #
    # Unit Sprite Attributes Section
    #
    #
    # This section specifies a bunch of unit sprite attributes
    #
    
    #
    # Firepoints
    #
    # This block indicates where on the sprite that ammunition should
    # originate when the unit attacks.  This is currently ignored.
    #
    UNIT_SPRITE_FIREPOINTS    0

    # Work Firepoints
    #
    # This block indicates where on the sprite that the ammunition 
    # should originate when the unit special attacks.  This is also
    # currently ignored.
    #
    UNIT_SPRITE_FIREPOINTS_WORK    0

    # UNIT_SPRITE_MOVEOFFSETS
    #
    # These are sprite nudges to be applied when the unit is moving.
    # They are an alternate way of specifying how many pixels in each
    # direction that unit should move.  There's one pair of offsets 
    # (x,y) for each facing (1-5).
    #
    # These are not currently used in the engine.
    #
    UNIT_SPRITE_MOVEOFFSETS    1
    {
        0 0
        0 0
        0 0
        0 0
        0 0
    }

    # UNIT_SPRITE_SHIELDPOINTS
    #
    # This tag's block, when defined, allows you specify where the
    # unit's herald shield will appear in the sprite for each of the
    # 5 facings, for each of the 5 actions that the unit will perform.
    #
    # Often a fixed shield position wouldn't always work, as the shield
    # might cover up an important part of the sprite.  This block
    # allows specific points to be used.
    #
    UNIT_SPRITE_SHIELDPOINTS    1
    {    
        UNIT_SPRITE_SHIELDPOINTS_MOVE
            82 9
            82 9
            82 9
            82 9
            82 9
        UNIT_SPRITE_SHIELDPOINTS_ATTACK
            48 36
            48 36
            48 36
            48 36
            48 36
        UNIT_SPRITE_SHIELDPOINTS_IDLE
            48 36
            48 36
            48 36
            48 36
            48 36
        UNIT_SPRITE_SHIELDPOINTS_VICTORY
            82 9
            48 36
            48 36
            48 36
            48 36
        UNIT_SPRITE_SHIELDPOINTS_WORK
            48 36
            48 36
            48 36
            48 36
            48 36
    }

}
