Biter Speed Modifier

Place to get help with not working mods / modding interface.
Post Reply
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Biter Speed Modifier

Post by TheSAguy »

Hi,

In my mod I have Decelerate Concrete and the idea was to slow down enemies.
Unfortunately it looks like "walking_speed_modifier" only affects the players speed and not enemy unit speed.

Is there a way I can slow down enemy units?

Code: Select all

	--- Decelerate_concrete
     {
      type = "tile",
      name = "decelerate_concrete",
      needs_correction = false,
      minable = {hardness = 0.2, mining_time = 0.5, result = "stone-brick"}, -- You only get brick back when you mine it...
      mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" },
      collision_mask = {"ground-tile"},
      walking_speed_modifier = 0.5,
      vehicle_friction_modifier = 1,
      layer = 61,
      decorative_removal_probability = 1,
      variants =
      {
        main =
        {
          {
            picture = "__Natural_Evolution_Buildings__/graphics/entities/decelerate_concrete/concrete1.png",
            count = 16,
            size = 1
          },
          {
            picture = "__Natural_Evolution_Buildings__/graphics/entities/decelerate_concrete/concrete2.png",
            count = 4,
            size = 2,
            probability = 0.39,
          },
          {
            picture = "__Natural_Evolution_Buildings__/graphics/entities/decelerate_concrete/concrete4.png",
            count = 4,
            size = 4,
            probability = 1,
          },
        },
        inner_corner =
        {
          picture = "__Natural_Evolution_Buildings__/graphics/entities/decelerate_concrete/concrete-inner-corner.png",
          count = 32
        },
        outer_corner =
        {
          picture = "__Natural_Evolution_Buildings__/graphics/entities/decelerate_concrete/concrete-outer-corner.png",
          count = 16
        },
        side =
        {
          picture = "__Natural_Evolution_Buildings__/graphics/entities/decelerate_concrete/concrete-side.png",
          count = 16
        },
        u_transition =
        {
          picture = "__Natural_Evolution_Buildings__/graphics/entities/decelerate_concrete/concrete-u.png",
          count = 16
        },
        o_transition =
        {
          picture = "__Natural_Evolution_Buildings__/graphics/entities/decelerate_concrete/concrete-o.png",
          count = 1
        }
      },
      walking_sound =
      {
        {
          filename = "__base__/sound/walking/concrete-01.ogg",
          volume = 1.2
        },
        {
          filename = "__base__/sound/walking/concrete-02.ogg",
          volume = 1.2
        },
        {
          filename = "__base__/sound/walking/concrete-03.ogg",
          volume = 1.2
        },
        {
          filename = "__base__/sound/walking/concrete-04.ogg",
          volume = 1.2
        }
      },
      map_color={r=100, g=100, b=100},
      ageing=0,
      
    },


Thanks.

User avatar
Kuxynator
Inserter
Inserter
Posts: 31
Joined: Wed Sep 23, 2020 5:02 pm
Contact:

Re: Biter Speed Modifier

Post by Kuxynator »

Did you find a solution?

Bilka
Factorio Staff
Factorio Staff
Posts: 3139
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Biter Speed Modifier

Post by Bilka »

Set UnitPrototype::affected_by_tiles to true on all enemies.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Modding help”