Page 1 of 1

"apply_runtime_tint" not working?

Posted: Tue Jul 15, 2025 1:13 am
by Gizzmohammer
Hi, Looking for some advice

"apply_runtime_tint" seems to do nothing.
Both Layers of my animation have tint applied to them regardless of what it's set to

Code below is in data.lua:

Code: Select all

local cargoCrateAnimationLayered = {
  type = "animation",
  name = "cargo-crate-animation-layered",
    layers = {
    {
      filenames = {
        "__alchemy__/CargoCrates/crate-sprite-sheets/crate-base-1.png",
        "__alchemy__/CargoCrates/crate-sprite-sheets/crate-base-2.png",
        "__alchemy__/CargoCrates/crate-sprite-sheets/crate-base-3.png",
        "__alchemy__/CargoCrates/crate-sprite-sheets/crate-base-4.png"
      },
      size = {256,256},
      scale = 0.5,
      shift = {0,-0.5},
      frame_count = 64,
      line_length = 8,
      animation_speed = 1,
      lines_per_file = 8,
      apply_runtime_tint = true,
    },
    {
      filenames = {
        "__alchemy__/CargoCrates/crate-sprite-sheets/crate-rust-1.png",
        "__alchemy__/CargoCrates/crate-sprite-sheets/crate-rust-2.png",
        "__alchemy__/CargoCrates/crate-sprite-sheets/crate-rust-3.png",
        "__alchemy__/CargoCrates/crate-sprite-sheets/crate-rust-4.png"
      },
      size = {256,256},
      scale = 0.5,
      shift = {0,-0.5},
      frame_count = 64,
      line_length = 8,
      animation_speed = 1,
      lines_per_file = 8,
      apply_runtime_tint = false,
    },
  }
 }
then this is in control.lua

Code: Select all

zone.crateSpriteEntity = rendering.draw_animation {
	animation = "cargo-crate-animation-layered",
	animation_speed = 0,
	target = zoneEntity,
	tint = zone.crateColor,
	surface = zoneEntity.surface,
	render_layer = "object"
	}

Re: "apply_runtime_tint" not working?

Posted: Sat Jul 19, 2025 9:04 pm
by Osmo
As far as i know, LuaRendering always tints the whole image, you need to make two animation protoypes and tint only one of them