Entity graphic issues
Posted: Fri Aug 23, 2019 5:51 pm
So I created a spritesheet for a machine and wanted to take a look into the game but it was too big so I added
Later I discovered whenever I use a value below 1 I get that error and whenever I use a value above 1 the entity goes invisible. Why does this happen and how to fix it? Following is the code for the entity, the spritesheet and the error message.
Thanks for the help in advance
and then I got an error saying that the Spritesheets width is not in the valid range (1-4096) but I didn't change anything there and even if it would just get smaller, right?size = 0.5
Later I discovered whenever I use a value below 1 I get that error and whenever I use a value above 1 the entity goes invisible. Why does this happen and how to fix it? Following is the code for the entity, the spritesheet and the error message.
Thanks for the help in advance
Code: Select all
{
type = "assembling-machine",
name = "crusher",
icon = "__base__/graphics/icons/assembling-machine-1.png",
icon_size = 32,
flags = {"placeable-neutral", "placeable-player", "player-creation"},
minable = {mining_time = 0.2, result = "crusher"},
max_health = 300,
dying_explosion = "medium-explosion",
corpse = "medium-remnants",
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
fast_replaceable_group = "crusher",
--next_upgrade = "crusher-2",
alert_icon_shift = util.by_pixel(-3, -12),
allowed_effects = {"speed", "productivity"},
module_specification =
{
module_slots = 1,
},
animation =
{
layers =
{
{
filename = "__grundoxores__/graphics/entity/crusher/crusher.png",
priority = "high",
width = 125,
height = 216,
line_length = 8,
frame_count = 32,
shift = {0.421875, 0},
hr_version =
{
filename = "__grundoxores__/graphics/entity/crusher/hr-crusher.png",
priority = "high",
width = 125,
height = 216,
frame_count = 32,
line_length = 8,
shift = util.by_pixel(0.75, 5.75),
size = 0.5
}
}
}
},
crafting_categories = {"crushing"},
crafting_speed = 1,
energy_source =
{
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = 4
},
energy_usage = "100kW",
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
working_sound =
{
sound =
{
{
filename = "__base__/sound/assembling-machine-t1-1.ogg",
volume = 0.8
},
{
filename = "__base__/sound/assembling-machine-t1-2.ogg",
volume = 0.8
}
},
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
apparent_volume = 1.5
}
}