Page 1 of 1

Failed to load mods: ... does not match any enabled mod

Posted: Sun Oct 29, 2017 2:55 am
by comwarrior
I am making my first item mod, I'm trying to make 'green' belts, undergrounds and splitters that go twice as fast as blue ones...
I grabbed all the relevant code from the base game and worked through the issues but this one has me stumped, I don't know what it's problem is.

Code: Select all

6.607 Mods to disable:Failed to load mods: Path __green-belt__/graphics/entity/turbo-splitter/turbo-splitter-east.png does not match any enabled mod.: __green-belt__/graphics/entity/turbo-splitter/turbo-splitter-east.png
The PNG file in question is referenced in entities.lua as follows

Code: Select all

  {
    type = "splitter",
    name = "turbo-splitter",
    icon = "__green-belt__/graphics/icons/turbo-splitter.png",
    flags = {"placeable-neutral", "player-creation"},
    minable = {hardness = 0.2, mining_time = 0.5, result = "turbo-splitter"},
    max_health = 190,
    corpse = "medium-remnants",
    resistances =
    {
      {
        type = "fire",
        percent = 60
      }
    },
    collision_box = {{-0.9, -0.4}, {0.9, 0.4}},
    selection_box = {{-0.9, -0.5}, {0.9, 0.5}},
    animation_speed_coefficient = 32,
    structure_animation_speed_coefficient = 1.2,
    structure_animation_movement_cooldown = 10,
    belt_horizontal = turbo_belt_horizontal, -- specified in transport-belt-pictures.lua
    belt_vertical = turbo_belt_vertical,
    ending_top = turbo_belt_ending_top,
    ending_bottom = turbo_belt_ending_bottom,
    ending_side = turbo_belt_ending_side,
    starting_top = turbo_belt_starting_top,
    starting_bottom = turbo_belt_starting_bottom,
    starting_side = turbo_belt_starting_side,
    ending_patch = ending_patch_prototype,
    fast_replaceable_group = "splitter",
    speed = 0.09375,
    structure =
    {
      north =
      {
        filename = "__green-belt__/graphics/entity/turbo-splitter/turbo-splitter-north.png",
        frame_count = 32,
        line_length = 16,
        priority = "extra-high",
        width = 83,
        height = 36,
        shift = {0.21875, 0},
        hr_version =
        {
          filename = "__green-belt__/graphics/entity/turbo-splitter/hr-turbo-splitter-north.png",
          frame_count = 32,
          line_length = 8,
          priority = "extra-high",
          width = 164,
          height = 70,
          shift = {0.265625, 0},
          scale = 0.5
        }
      },
      east =
      {
        filename = "__green-belt__/graphics/entity/turbo-splitter/turbo-splitter-east.png",
        frame_count = 32,
        line_length = 16,
        priority = "extra-high",
        width = 51,
        height = 80,
        shift = {0.109375, -0.03125},
        hr_version =
        {
          filename = "__green-belt__/graphics/entity/turbo-splitter/hr-turbo-splitter-east.png",
          frame_count = 32,
          line_length = 8,
          priority = "extra-high",
          width = 93,
          height = 157,
          shift = {0.148438, -0.179688},
          scale = 0.5
        }
      },
      south =
      {
        filename = "__green-belt__/graphics/entity/turbo-splitter/turbo-splitter-south.png",
        frame_count = 32,
        line_length = 16,
        priority = "extra-high",
        width = 85,
        height = 35,
        shift = {0.140625, -0.015625},
        hr_version =
        {
          filename = "__green-belt__/graphics/entity/turbo-splitter/hr-turbo-splitter-south.png",
          frame_count = 32,
          line_length = 8,
          priority = "extra-high",
          width = 168,
          height = 67,
          shift = {0.140625, 0.0234375},
          scale = 0.5
        }
      },
      west =
      {
        filename = "__green-belt__/graphics/entity/turbo-splitter/turbo-splitter-west.png",
        frame_count = 32,
        line_length = 16,
        priority = "extra-high",
        width = 51,
        height = 78,
        shift = {0.296875, -0.03125},
        hr_version =
        {
          filename = "__green-belt__/graphics/entity/turbo-splitter/hr-turbo-splitter-west.png",
          frame_count = 32,
          line_length = 8,
          priority = "extra-high",
          width = 94,
          height = 154,
          shift = {0.203125, -0.109375},
          scale = 0.5
        }
      },
    }
  },
All i have done is changed the names ready to change recipes and colour so I don't know where the issue is.

Any help appreciated.

Re: Failed to load mods: ... does not match any enabled mod

Posted: Sun Oct 29, 2017 4:01 am
by Rseding91
It's saying that "__green-belt__" is not a mod that exists and is enabled.

Did you change it to "green-belt"? Because it should reference what ever mod has the sprite you're trying to reference.

Re: Failed to load mods: ... does not match any enabled mod

Posted: Sun Oct 29, 2017 12:50 pm
by comwarrior
Hi Rseding, thank you for the reply.
I have just copied the lua files into a directory in the mods folder and that is where i have edited the files.
The thought has just occurred to me... I know factorio is reading my lua files and the json but is there anything I need to do to 'enable' my mod, I've looked at a few other mods and can not see anything.

Re: Failed to load mods: ... does not match any enabled mod

Posted: Sun Oct 29, 2017 5:02 pm
by galibert
comwarrior wrote:Hi Rseding, thank you for the reply.
I have just copied the lua files into a directory in the mods folder and that is where i have edited the files.
The thought has just occurred to me... I know factorio is reading my lua files and the json but is there anything I need to do to 'enable' my mod, I've looked at a few other mods and can not see anything.
It's enabled, otherwise it would not crash.

To reformulate RS' answer: the game does not find a mod called "green-belt" to look for the file in. Did you use the exact name "green-belt" as the "name" field in info.json? Beware that - and _ are different, and that case is taken into accoumt. Also, did you name the directory green-belt_x.y.z with x y and z version numbers, like green-belt_0.1.0 ?

OG.

Re: Failed to load mods: ... does not match any enabled mod

Posted: Sun Oct 29, 2017 11:09 pm
by comwarrior
[Bangs head on desk]

Json file the case was correct... Green-Belt
LUA files were ... green-belt

DOH!

So I changed everything to lower case and now I have a missing sound file... It's ok, Its one i want to modify anyway....

Thanks for the help