Page 1 of 1

sprite load error

Posted: Fri Jul 17, 2015 3:27 am
by kain184
having trouble with the biter animation gives me a sprite outside error on biter attack #3 cannot findc he reason on debuging can anyone help me. the full error is sprite outside "_base_/graphics/entity/biter/biter-attack-3.png" at 52,61 size 103X108 of 0x0 my code is as follows

Code: Select all

function biterrunanimation(scale, tint1, tint2)
  return
  {
    layers=
    {
      {
        width = 169,
        height = 114,
        frame_count = 16,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 0.714844, scale * -0.246094},
        scale = scale,
        stripes =
        {
         {
          filename = "__base__/graphics/entity/biter/biter-run-1.png",
          width_in_frames = 8,
          height_in_frames = 16,
         },
         {
          filename = "__base__/graphics/entity/biter/biter-run-2.png",
          width_in_frames = 8,
          height_in_frames = 16,
         }
        }
      },

      {
        filename = "__base__/graphics/entity/biter/biter-run-mask1.png",
        width = 105,
        height = 81,
        frame_count = 16,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 0.117188, scale * -0.867188},
        scale = scale,
        tint = tint1
      },

      {
        filename = "__base__/graphics/entity/biter/biter-run-mask2.png",
        line_length = 16,
        width = 95,
        height = 81,
        frame_count = 16,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 0.117188, scale * -0.855469},
        scale = scale,
        tint = tint2
      }
    }
  }
end

function biterattackanimation(scale, tint1, tint2)
  return
  {
    layers=
    {
      {
        width = 279,
        height = 184,
        frame_count = 11,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 1.74609, scale * -0.644531},
        animation_speed = 0.3,
        scale = scale,
        stripes =
        {
         {
          filename = "__base__/graphics/entity/biter/biter-attack-1.png",
          width_in_frames = 6,
          height_in_frames = 8,
         },
         {
          filename = "__base__/graphics/entity/biter/biter-attack-2.png",
          width_in_frames = 5,
          height_in_frames = 8,
         },
         {
          filename = "__base__/graphics/entity/biter/biter-attack-3.png",
          width_in_frames = 6,
          height_in_frames = 8,
         },
         {
          filename = "__base__/graphics/entity/biter/biter-attack-4.png",
          width_in_frames = 5,
          height_in_frames = 8,
         }
        }
      },

      {
        filename = "__base__/graphics/entity/biter/biter-attack-mask1.png",
        width = 125,
        height = 108,
        frame_count = 11,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 0.117188, scale * -1.11328},
        scale = scale,
        tint = tint1,
      },

      {
        filename = "__base__/graphics/entity/biter/biter-attack-mask2.png",
        width = 114,
        height = 100,
        frame_count = 11,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 0.117188, scale * -1.06641},
        scale = scale,
        tint = tint2
      }
    }
  }
end

function biterdieanimation(scale, tint1, tint2)
  return
  {
    layers=
    {
      {
        width = 190,
        height = 129,
        frame_count = 17,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 0.621094, scale * -0.1875},
        scale = scale,
        stripes =
        {
          {
            filename = "__base__/graphics/entity/biter/biter-die-1.png",
            width_in_frames = 9,
            height_in_frames = 8,
          },
          {
            filename = "__base__/graphics/entity/biter/biter-die-2.png",
            width_in_frames = 8,
            height_in_frames = 8,
          },
          {
            filename = "__base__/graphics/entity/biter/biter-die-3.png",
            width_in_frames = 9,
            height_in_frames = 8,
          },
          {
            filename = "__base__/graphics/entity/biter/biter-die-4.png",
            width_in_frames = 8,
            height_in_frames = 8,
          }
        }
      },

      {
        filename = "__base__/graphics/entity/biter/biter-die-mask1.png",
        width = 120,
        height = 109,
        frame_count = 17,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 0.117188, scale * -0.574219},
        scale = scale,
        tint = tint1
      },

      {
        filename = "__base__/graphics/entity/biter/biter-die-mask2.png",
        width = 115,
        height = 108,
        frame_count = 17,
        axially_symmetrical = false,
        direction_count = 16,
        shift = {scale * 0.128906, scale * -0.585938},
        scale = scale,
        tint = tint2
      }
    }
  }
end

Re: sprite load error

Posted: Fri Jul 17, 2015 4:27 am
by DaveMcW
Are you using a mod?

If not, the usual solutions are to reinstall the game or reduce graphics settings.

Re: sprite load error

Posted: Fri Jul 17, 2015 8:49 am
by keyboardhack
Basicly the game expects an image that is 279 * 6, 184 * 8 = 1674, 1472 but apperently the size if the image the game is using is only 103, 108.
Looks like something happened to that specific image when you downloaded the game. redownload the game and you should be able to play.

Re: sprite load error

Posted: Thu Jul 23, 2015 9:34 am
by cube
Another thing to try is to delete crop-cache.dat file and re-run factorio.