I am trying to do something and I almost made it but there is one thing that I just cannot get to work properly and I am coming here to seek for help. I have been trying on my own, reading, looking at stuff, but I can't figure it out. I am asking because I am honestly stuck
What am I trying to do?
I am trying to create an assembly machine that looks like the steam-turbine and animates when it crafts. The assembly is supposed to have one steam input and one water output, crafting steam back into water (and animating and making smoke like the steam turbine in the process).
Why is it not working?
Here is my code, maybe you can tell me why
Code: Select all
type = "assembling-machine",
name = "steam-to-water-assembly",
icon = "__base__/graphics/icons/steam-turbine.png",
icon_size = 32,
flags = {"placeable-neutral", "placeable-player", "player-creation"},
minable = {hardness = 0.2, mining_time = 1, result = "steam-to-water-assembly"},
max_health = 300,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
alert_icon_shift = util.by_pixel(0, -12),
resistances =
{
{
type = "fire",
percent = 70
}
},
fluid_boxes =
{
{
base_area = 1,
height = 2,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_connections =
{
{ type = "input", position = {0, 3} },
},
production_type = "input",
filter = "steam",
},
{
base_area = 1,
height = 2,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_connections =
{
{ type = "output", position = {0, -3} },
},
production_type = "output",
},
off_when_no_fluid_recipe = true
},
fast_replaceable_group = "steam-engine",
collision_box = {{-1.35, -2.35}, {1.35, 2.35}},
selection_box = {{-1.5, -2.5}, {1.5, 2.5}},
animation = make_4way_animation_from_spritesheet({ layers =
{
{
filename = "__base__/graphics/entity/steam-turbine/steam-turbine-H.png",
width = 160,
height = 123,
frame_count = 1,
shift = util.by_pixel(0, -2.5),
hr_version = {
filename = "__base__/graphics/entity/steam-turbine/hr-steam-turbine-H.png",
width = 320,
height = 245,
frame_count = 1,
shift = util.by_pixel(0, -2.75),
scale = 0.5
}
},
{
filename = "__base__/graphics/entity/steam-turbine/steam-turbine-H-shadow.png",
width = 217,
height = 74,
frame_count = 1,
draw_as_shadow = true,
shift = util.by_pixel(28.75, 18),
hr_version = {
filename = "__base__/graphics/entity/steam-turbine/hr-steam-turbine-H-shadow.png",
width = 435,
height = 150,
frame_count = 1,
draw_as_shadow = true,
shift = util.by_pixel(28.5, 18),
scale = 0.5
}
},
{
filename = "__base__/graphics/entity/steam-turbine/steam-turbine-V.png",
width = 108,
height = 173,
frame_count = 1,
shift = util.by_pixel(5, 6.5),
hr_version = {
filename = "__base__/graphics/entity/steam-turbine/hr-steam-turbine-V.png",
width = 217,
height = 347,
frame_count = 1,
shift = util.by_pixel(4.75, 6.75),
scale = 0.5
},
},
{
filename = "__base__/graphics/entity/steam-turbine/steam-turbine-V-shadow.png",
width = 151,
height = 131,
repeat_count = 8,
frame_count = 1,
line_length = 1,
draw_as_shadow = true,
shift = util.by_pixel(39.5, 24.5),
hr_version = {
filename = "__base__/graphics/entity/steam-turbine/hr-steam-turbine-V-shadow.png",
width = 302,
height = 260,
repeat_count = 8,
frame_count = 1,
line_length = 1,
draw_as_shadow = true,
shift = util.by_pixel(39.5, 24.5),
scale = 0.5
},
},
}}),
working_visualisations =
{
{
animation =
{
filename = "__base__/graphics/entity/steam-turbine/steam-turbine-H.png",
width = 160,
height = 123,
frame_count = 8,
line_length = 4,
shift = util.by_pixel(0, -2.5),
hr_version = {
filename = "__base__/graphics/entity/steam-turbine/hr-steam-turbine-H.png",
width = 320,
height = 245,
frame_count = 8,
line_length = 4,
shift = util.by_pixel(0, -2.75),
scale = 0.5
}
},
light = {intensity = 0.4, size = 6, shift = {0.0, 1.0}, color = {r = 1.0, g = 1.0, b = 1.0}}
},
{
animation =
{
filename = "__base__/graphics/entity/steam-turbine/steam-turbine-V.png",
width = 108,
height = 173,
frame_count = 8,
line_length = 4,
shift = util.by_pixel(5, 6.5),
hr_version = {
filename = "__base__/graphics/entity/steam-turbine/hr-steam-turbine-V.png",
width = 217,
height = 347,
frame_count = 8,
line_length = 4,
shift = util.by_pixel(4.75, 6.75),
scale = 0.5
}
},
smoke =
{
{
name = "turbine-smoke",
north_position = {0.0, -1.0},
east_position = {0.75, -0.75},
frequency = 10 / 32,
starting_vertical_speed = 0.08,
slow_down_factor = 1,
starting_frame_deviation = 60
}
}
}
},
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/steam-engine-90bpm.ogg",
volume = 0.6
},
},
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
apparent_volume = 1.5,
},
crafting_categories = {"crafting-with-fluid"},
crafting_speed = 1,
energy_source =
{
type = "electric",
usage_priority = "secondary-input",
emissions = -1.5 / 4
},
energy_usage = "10kW",
ingredient_count = 1,
},
What happens is that the custom assembly can be placed but it cannot be rotated. And it looks like as if the horizontal and vertical steam turbine are overlapping on one another? Oh and it also creates no smoke.
I am trying to have the steam-to-water assembly so it can be rotated like the steam-turbine can be rotated. I wonder where I am going wrong
I have got everything working, I only need to get the graphics/animation part right now.
Thank you for reading and thank you in advance if you are considering to help me.