HeroTurrets


Turrets are built using salvaged self-learning AI tech from your ship allowing them to get deadlier with practice. Extends turrets via ranking system based on kills. Turrets generated so not limited to vanilla, identifiable by overlaid rank insignia. Rank buffs individual turrets.

Content
1 year, 3 months ago
1.0 - 1.1
55.2K
Combat

b Weird icons on upgraded turrets with icon layers

1 year, 3 months ago

Some of my turrets in RP Warfare have little subscripts on them to indicate they only work for iron, copper, steel, etc. They look good normally but look way too big after leveling up. I think the issue is that the icons array gets reordered by Hero Turrets. Hero Turrets also hard-codes the item prototype's icon_size to 64 which can mess up other scaling steps.

Example non-upgraded icons

[item][molten-uranium-in-steel-slinger].icons = {
  {
    icon = "__rp_wall_turret_1_art__/graphics/wall_turret_1/wall_turret_1_item_icon.png",
    icon_mipmaps = 4,
    icon_size = 64,
    scale = 0.5,
    shift = {
      0,
      0
    }
  },
  {
    icon = "__rp_warfare__/heat/smelting/molten_uranium_icon.png",
    icon_mipmaps = 4,
    icon_size = 64,
    scale = 0.25,
    shift = {
      -8,
      8
    }
  }
}

After upgrading, note that the first two icons changed order and that the "hero" icon is 64x64 and scale=1, while the base icon was 64x64 scale=0.5

[item][hero-turret-1-for-molten-uranium-in-steel-slinger].icons = {
  {
    icon = "__rp_warfare__/heat/smelting/molten_uranium_icon.png",
    icon_mipmaps = 4,
    icon_size = 64,
    scale = 0.25,
    shift = {
      0,
      0
    }
  },
  {
    icon = "__rp_wall_turret_1_art__/graphics/wall_turret_1/wall_turret_1_item_icon.png",
    icon_mipmaps = 4,
    icon_size = 64,
    scale = 0.5,
    shift = {
      0,
      0
    }
  },
  {
    icon = "__heroturrets__/graphics/icons/hero-1-icon.png",
    icon_mipmaps = 4,
    icon_size = 64,
    scale = 1,
    shift = {
      0,
      0
    },
    tint = {
      a = 1,
      b = 1,
      g = 1,
      r = 1
    }
  }
}

New response