Problem with wall signs

Place to get help with not working mods / modding interface.
Kajiryu
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat May 17, 2014 12:36 pm
Contact:

Problem with wall signs

Post by Kajiryu »

Hi there! I am creating a simple small mod for signs to place around your factories. I am using the "wall"-Prototype and changing its graphics and size. Everything works fine until I place a normal wall on the marked positions in the image attachment. Only there the game crashes.

I guess it has something to do with the different width/grid width? In the code below I tried using the default wall images and size parameters for example in t_up, straight_vertical_under_ending, etc, so that it reverts to a normal wall when this case happens. But no luck.

Code: Select all

data:extend({
	{
    type = "corpse",
    name = "wallsign-remnants",
    icon = "__wallsigns__/graphics/wallsign-remnants.png",
    flags = {"placeable-neutral", "not-on-map"},
    subgroup="remnants",
    order="d[remnants]-c[wall]",
    selection_box = {{-3, -0.5}, {3, 0.5}},
    selectable_in_game = false,
    time_before_removed = 60 * 60 * 15, -- 15 minutes
    final_render_layer = "remnants",
    animation = 
    {
      {
        frame_width = 192,
        frame_height = 32,
        frame_count = 1,
        direction_count = 1,
        filename = "__wallsigns__/graphics/wallsign-remnants.png"
      }
    }
  },
	{
    type = "wall",
    name = "wall-sign-research",
    icon = "__wallsigns__/graphics/wallsign-research-icon.png",
    flags = {"placeable-neutral", "player-creation"},
    collision_box = {{-2.99, -0.49}, {2.99, 0.49}},
    selection_box = {{-3, -0.5}, {3, 0.5}},
    minable = {mining_time = 1, result = "wall-sign-research"},
    max_health = 850,
    corpse = "wallsign-remnants",
    repair_sound = { filename = "__base__/sound/manual-repair-simple.wav" },
    mined_sound = { filename = "__base__/sound/deconstruct-bricks.wav" },
    resistances =
    {
      {
        type = "physical",
        decrease = 3,
        percent = 20
      },
      {
        type = "explosion",
        decrease = 10,
        percent = 30
      },
      {
        type = "fire",
        percent = 100
      },
      {
        type = "laser",
        percent = 70
      }
    },
    pictures =
    {
      single =
      {
        {
          filename = "__wallsigns__/graphics/wallsign-research-single.png",
          priority = "extra-high",
          width = 192,
          height = 58,
          shift = {0.0, 0.1}
        }
      },
      straight_vertical =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-straight-vertical-1.png",
          priority = "extra-high",
          width = 51,
          height = 32,
          shift = {0.296875, 0}
        },
        {
          filename = "__base__/graphics/entity/wall/wall-straight-vertical-2.png",
          priority = "extra-high",
          width = 51,
          height = 32,
          shift = {0.296875, 0}
        }
      },
      straight_vertical_under_ending =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-straight-vertical-under-ending.png",
          priority = "extra-high",
          width = 51,
          height = 32,
          shift = {0.296875, 0}
        }
      },
      straight_horizontal =
      {
        {
          filename = "__wallsigns__/graphics/wallsign-research.png",
          priority = "extra-high",
          width = 192,
          height = 58,
          shift = {0.0, 0.1}
        },
        {
          filename = "__wallsigns__/graphics/wallsign-research.png",
          priority = "extra-high",
          width = 192,
          height = 58,
          shift = {0.0, 0.1}
        },
        {
          filename = "__wallsigns__/graphics/wallsign-research.png",
          priority = "extra-high",
          width = 192,
          height = 58,
          shift = {0.0, 0.1}
        }
      },
      corner_right_up =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-corner-right-up.png",
          priority = "extra-high",
          width = 32,
          height = 53,
          shift = {0, 0.171875}
        }
      },
      corner_right_down =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-corner-right-down.png",
          priority = "extra-high",
          width = 32,
          height = 42,
          shift = {0, -0.15625}
        }
      },
      corner_left_down =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-corner-left-down.png",
          priority = "extra-high",
          width = 46,
          height = 42,
          shift = {0.21875, -0.15625}
        }
      },
      corner_left_up =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-corner-left-up.png",
          priority = "extra-high",
          width = 51,
          height = 58,
          shift = {0.296875, 0.03125}
        }
      },
      t_up =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-t-up.png",
          priority = "extra-high",
          width = 32,
          height = 53,
          shift = {0.0, 0.1}
        }
      },
      t_down =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-t-down.png",
          priority = "extra-high",
          width = 32,
          height = 53,
          shift = {0.0, 0.1}
       }
      },
      t_right =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-t-right.png",
          priority = "extra-high",
          width = 51,
          height = 38,
          shift = {0.296875, -0.09375}
        }
      },
      t_left =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-t-left.png",
          priority = "extra-high",
          width = 32,
          height = 38,
          shift = {0, -0.09375}
        }
      },
      cross =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-cross.png",
          priority = "extra-high",
          width = 32,
          height = 38,
          shift = {0, -0.09375}
        }
      },
      ending_up =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-ending-up.png",
          priority = "extra-high",
          width = 64,
          height = 47,
          shift = {0.5, 0.234375}
        }
      },
      ending_down =
      {
        {
          filename = "__base__/graphics/entity/wall/wall-ending-down.png",
          priority = "extra-high",
          width = 51,
          height = 36,
          shift = {0.296875, -0.0625}
        }
      },
      ending_right =
      {
        {
          filename = "__wallsigns__/graphics/wallsign-research-left-open.png",
          priority = "extra-high",
          width = 192,
          height = 58,
          shift = {0.0, 0.1}
        }
      },
      ending_left =
      {
        {
          filename = "__wallsigns__/graphics/wallsign-research-right-open.png",
          priority = "extra-high",
          width = 192,
          height = 58,
          shift = {0.0, 0.1}
        }
      }
    }
  }
})
Attachments
wallsigns.zip
FullMod
(105.63 KiB) Downloaded 129 times
Wall problem
Wall problem
wallProblem.png (19.24 KiB) Viewed 2590 times
Post Reply

Return to “Modding help”