Weapon Parameter not working [kind-of solved]

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Sigma1
Fast Inserter
Fast Inserter
Posts: 232
Joined: Mon Nov 21, 2016 5:25 pm
Contact:

Weapon Parameter not working [kind-of solved]

Post by Sigma1 »

Wasn't exactly sure if this is a bug or a mod issue so I put it here. Anyway, the "min_range"-parameter seems to do nothing on a handheld flamethrower type weapon.

Here is the code I'm using:

Code: Select all

data:extend
({
--heavy flamethrower
	{
    type = "gun",
    name = "heavy-flame-thrower",
    icon = "__military-extended__/graphics/weapons/heavy-flame-thrower.png",
    flags = {"goes-to-main-inventory"},
    subgroup = "gun",
    order = "b[flame-thrower]-b[heavy]",
    attack_parameters =
    {
      type = "stream",
      ammo_category = "flame-thrower",
      cooldown = 1,
      movement_slow_down_factor = 0.6,
      projectile_creation_distance = 0.6,
      gun_center_shift = { 0, -1 },
      range = 25,
      gun_barrel_length = 3,
			direction_deviation = 100.0,
      min_range = 20,
      cyclic_sound =
      {
        begin_sound =
        {
          {
            filename = "__base__/sound/fight/flamethrower-start.ogg",
            volume = 0.9
          }
        },
        middle_sound =
        {
          {
            filename = "__base__/sound/fight/flamethrower-mid.ogg",
            volume = 0.9
          }
        },
        end_sound =
        {
          {
            filename = "__base__/sound/fight/flamethrower-end.ogg",
            volume = 0.9
          }
        }
      }
    },
    stack_size = 1
  }
})
Any help is appreciated
Last edited by Sigma1 on Mon Dec 05, 2016 11:32 am, edited 1 time in total.
she/they

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Weapon Parameter not working

Post by aubergine18 »

Isn't min_range specific to either turrets or maybe ammo type?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

User avatar
Sigma1
Fast Inserter
Fast Inserter
Posts: 232
Joined: Mon Nov 21, 2016 5:25 pm
Contact:

Re: Weapon Parameter not working

Post by Sigma1 »

aubergine18 wrote:Isn't min_range specific to either turrets or maybe ammo type?
It is indeed used only in the flame turret in the code but I thought it might work with handheld guns too, apparently not though.
she/they

Post Reply

Return to “Modding help”