Sprite outside of...

Place to get help with not working mods / modding interface.
Post Reply
KillerXDLZ
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Mar 23, 2016 2:48 am
Contact:

Sprite outside of...

Post by KillerXDLZ »

Image

Full code:

Code: Select all

data:extend({
 {
    type = "car",
    name = "bomber",
    icon = "__bomber__/graphics/bomber.png",
    flags = {"pushable", "placeable-neutral", "player-creation"},
    minable = {mining_time = 1, result = "bomber"},
    max_health = 2000,
    corpse = "medium-remnants",
	dying_explosion = "medium-explosion",
	energy_per_hit_point = 0.5,
    resistances = 
    {
      {
        type = "fire",
        percent = 50
      }
    },-- haven't figured out a good resistance set yet...]]
    collision_box = {{-0.7, -1}, {0.7, 1}},
    selection_box = {{-0.7,-1.2},{0.7,1.2}},
	effectivity = 0.75,
    acceleration_per_energy = 0.48,
    breaking_speed = 0.09,
	braking_power = "400kW",
    burner =
    {
      effectivity = 0.5,
      fuel_inventory_size = 2,
      smoke = 
	  {
        {
          name = "smoke",
          deviation = {0.25, 0.25},
          frequency = 350,
          position = {0, 1.5},
          slow_down_factor = 0.9,
          starting_frame = 3,
          starting_frame_deviation = 5,
          starting_frame_speed = 0,
          starting_frame_speed_deviation = 5
        }
      }
    },
    consumption = "6W", -- 1% of the car
    friction = 0.01,
    light =
    {
      {
        type = "oriented",
        minimum_darkness = 0.3,
        picture =
        {
          filename = "__core__/graphics/light-cone.png",
          priority = "medium",
          width = 400,
          height = 400
        },
        shift = {-0.6, -14},
        size = 2,
        intensity = 0.6
      },
      {
        type = "oriented",
        minimum_darkness = 0.3,
        picture =
        {
          filename = "__core__/graphics/light-cone.png",
          priority = "medium",
          width = 400,
          height = 400
        },
        shift = {0.6, -14},
        size = 2,
        intensity = 0.6
      }
    }, -- no lights 
    animation =
    {
      layers =
      {
	    {
		filename = "__bomber__/graphics/entity/bomber-sheet.png",
	    width = 211,
	    height = 211,
	    frame_count = 2,
        width_in_frames = 9,
        height_in_frames = 1,
        shift={0.5, 0},
        axially_symmetrical = false,
		direction_count = 9
		   
		 }	 
		}
	   },
	
	    weight = 250,
		rotation_speed = 0.01,
        inventory_size = 80	
      }	  
	})
How to fix this?

From: https://wiki.factorio.com/index.php?tit ... g_Tutorial "Chapter 8"

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Sprite outside of...

Post by orzelek »

Delete crop-cache.dat and try to start the game again.

KillerXDLZ
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Mar 23, 2016 2:48 am
Contact:

Re: Sprite outside of...

Post by KillerXDLZ »

orzelek wrote:Delete crop-cache.dat and try to start the game again.
Didn't fix.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Sprite outside of...

Post by Adil »

Happens when there's mismatch of image sizes or sprites are changed.
The
at %number%, %number% size %number%,...
surely hints something, I only wish I knew what is it.
In your case it's something with bomber-sheet.png.
Double check the sizes of image files and width\height parameters associated with it.
After that try removing crop-cache.dat.

For completeness, I'll also note that certain types of images must have hardcoded size, icons 32x32 being prominent example.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Sprite outside of...

Post by keyboardhack »

The code you pasted doesn't match the code on in the link.

Code: Select all

{
       filename = "__bomber__/graphics/entity/bomber-sheet.png",
       width = 211,
       height = 211,
       frame_count = 2,
       width_in_frames = 9,
       height_in_frames = 1,
       shift={0.5, 0},
       axially_symmetrical = false,
       direction_count = 9
}
Is supposed to be

Code: Select all

{
        filename = "__BomberTutorial__/graphics/sheet_bomber.png",
        priority = "high",
        frame_width = 211,
        frame_height = 211,
        direction_count = 9
}
which is probably outdated at this point. try this instead

Code: Select all

{
        filename = "__BomberTutorial__/graphics/sheet_bomber.png",
        priority = "high",
        width = 211,
        height = 211,
        direction_count = 9
}
Waste of bytes : P

Post Reply

Return to “Modding help”