Page 1 of 1

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

Posted: Sat Jan 04, 2025 9:06 pm
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 =
          {
 

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

Posted: Sat Jan 04, 2025 11:09 pm
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?

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

Posted: Thu Jan 09, 2025 9:16 pm
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!