modding error "Sprite outside of"

Place to get help with not working mods / modding interface.
hyperkiller
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Apr 05, 2016 4:08 pm
Contact:

modding error "Sprite outside of"

Post by hyperkiller »

I keep getting this error. (i already tried deleting my crop-cache.dat and my picture is 32x32)

17.527 Error Util.cpp:58: Sprite outside of "__hyperkiller-addons__/graphics/icons/uranium-ore.png" (at 31, 63, size 1x1 of 32x32).

my code is

data:extend({
{
type = "autoplace-control",
name = "uranium-ore",
richness = true,
order = "z"
},
{
type = "noise-layer",
name = "uranium-ore"
},
{
type = "resource",
name = "uranium-ore",
icon = "__hyperkiller-addons__/graphics/icons/uranium-ore.png",
flags = {"placeable-neutral"},
order="z",
map_color = {r = 0, g = 0.375, b = 0},
minable =
{
hardness = 2,
mining_particle = "stone-particle",
mining_time = 5,
result = "uranium-ore"
},
collision_box = {{ -0.1, -0.1}, {0.1, 0.1}},
selection_box = {{ -0.5, -0.5}, {0.5, 0.5}},
autoplace =
{
control = "uranium-ore",
sharpness = 1,
richness_multiplier = 2,
richness_base = 5,
size_control_multiplier = 0.06,
peaks =
{
{
influence = 0.15,
starting_area_weight_optimal = 0,
starting_area_weight_range = 0,
starting_area_weight_max_range = 2,
},
{
influence = 0.65,
noise_layer = "uranium-ore",
noise_octaves_difference = -2.4,
noise_persistence = 0.35,
starting_area_weight_optimal = 0,
starting_area_weight_range = 0,
starting_area_weight_max_range = 2,
},
},
},
stage_counts = {1000, 600, 400, 200, 100, 50, 20, 1},
stages =
{
sheet =
{
filename = "__hyperkiller-addons__/graphics/icons/uranium-ore.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 4,
variation_count = 8
}
},
},
{
type = "item",
name = "uranium-ore",
icon = "__hyperkiller-addons__/graphics/icons/uranium-ore.png",
flags = {"goes-to-main-inventory"},
subgroup = "hyper-ore",
order = "z",
stack_size = 20
},
})
keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: modding error "Sprite outside of"

Post by keyboardhack »

Looks like the image you use here ("__hyperkiller-addons__/graphics/icons/uranium-ore.png") doesn't have the correct size.
frame_count = 4 means that "uranium-ore.png" has to be 4 x 32 = 128 pixels wide.
variation_count = 8 means that "uranium-ore.png" has to be 8 x 32 = 256 pixels high.
Waste of bytes : P
Post Reply

Return to “Modding help”