Page 1 of 1

"Compound" tiles or layered tile images

Posted: Sun Aug 06, 2017 7:06 pm
by Reika
I am working on adding a tile that should have either transparency (to show the "original" tile underneath) or a variant for each terrain type (the preferred option).

However, I cannot figure out how to generate tiles which have multiple image layers. Normally, specifying an array of multiple image entries would layer them (a la icons and basic entities), but the tile image specification already uses arrays, for a different purpose:

Code: Select all

    variants =
    {
      main =
      {
        {
          picture = "__base__/graphics/terrain/stone-path/stone-path-1.png",
          count = 16,
          size = 1
        },
        {
          picture = "__base__/graphics/terrain/stone-path/stone-path-2.png",
          count = 4,
          size = 2,
          probability = 0.39,
        },
        {
          picture = "__base__/graphics/terrain/stone-path/stone-path-4.png",
          count = 4,
          size = 4,
          probability = 1,
        },
      },
      inner_corner =
      {
        picture = "__base__/graphics/terrain/stone-path/stone-path-inner-corner.png",
        count = 8
      },
      outer_corner =
      {
        picture = "__base__/graphics/terrain/stone-path/stone-path-outer-corner.png",
        count = 1
      },
      side =
      {
        picture = "__base__/graphics/terrain/stone-path/stone-path-side.png",
        count = 10
      },
      u_transition =
      {
        picture = "__base__/graphics/terrain/stone-path/stone-path-u.png",
        count = 10
      },
      o_transition =
      {
        picture = "__base__/graphics/terrain/stone-path/stone-path-o.png",
        count = 10
      }
    },