[Klonan] [2.0.28] Ammo modifiers don't apply to turrets

User avatar
katastic
Burner Inserter
Burner Inserter
Posts: 17
Joined: Mon Dec 02, 2024 10:06 pm
Contact:

[Klonan] [2.0.28] Ammo modifiers don't apply to turrets

Post by katastic »

Perhaps I did something wrong, but I month or so ago I encountered this while modding and forgot to make a report about it. I was experimenting with ammo modifiers that give range, or fire rate/cooldown, etc.

I put those ammos in turrets and it seems like they don't have any affect at all. I asked on forums and discord and nobody had any answer.

Code: Select all

,{
        type = "ammo",
        name = "medium-rock",
        icon = "__katfire__/graphics/icons/rock3.png",
        subgroup = "terrain",
        order = "a[stone-brick]",
        inventory_move_sound = item_sounds.brick_inventory_move,
        pick_sound = item_sounds.brick_inventory_pickup,
        drop_sound = item_sounds.brick_inventory_move,
        magazine_size = 1,
        stack_size = 10,
        ammo_category = "rocks",
        ammo_type =
        {
          range_modifier = SETTING_RANGE, --does nothing
          cooldown_modiifer = SETTING_COOLDOWN, --does nothing
          action =
          {
 
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: [2.0.28] Ammo modifiers don't apply to turrets

Post by Muche »

I tried to give uranium ammo "range_modifier = 10, cooldown_modifier = 0.1", and gun turrets happily started mowing down biters in 180 tiles radius extra fast.
Although they only woke up if biters were within 150 tiles. That seemed a hardcoded limit, regardless of range.

Does factoriopedia/item tooltip/loaded turret show changed range/speed for your ammo?
User avatar
katastic
Burner Inserter
Burner Inserter
Posts: 17
Joined: Mon Dec 02, 2024 10:06 pm
Contact:

Re: [Klonan] [2.0.28] Ammo modifiers don't apply to turrets

Post by katastic »

Ahh! I just saw this reply! I'll have to verify my code then!

I made a new ammo type called "rocks" and had larger "rocks" have a longer range and it didn't do anything. It could be a bug for non-standard ammo types. But could also just be an error in my code. I'll to verify and report back!
Post Reply

Return to “Assigned”