Page 1 of 1

[MOD 0.12.x] Minable Rock

Posted: Tue Sep 08, 2015 6:20 pm
by Ranakastrasz
Minable Rock

Description:
  • Allows you to mine large rock entities.
    Obsolete as of 0.13
Details:
  • Factorio Version: 0.12
  • Released: September 8th 2015
  • License: Contact Me
  • Tags: Doodad, Mining, Rock
Download
Minable Rock_0.0.3.zip
(14.06 KiB) Downloaded 441 times
[/b][/color]
LONG DESCRIPTION
CHANGLOG

Re: [MOD 0.12.x] Minable Rock

Posted: Tue Sep 08, 2015 9:29 pm
by SirRichie
0.0.1: First Release
I was already using this mod. So I double-checked and saw that you released this mod back in July.
I assume this is mainly to use the new forum format, but I am curious to know if there are any other changes you made?

Re: [MOD 0.12.x] Minable Rock

Posted: Tue Sep 08, 2015 9:37 pm
by Ranakastrasz
None yet. Not until I figure out how to get those issues fixed. Gonna try to change it into a tree.

Re: [MOD 0.12.x] Minable Rock

Posted: Thu Oct 01, 2015 7:16 pm
by Ranakastrasz
V2:
Rock is now a tree.
Mining hardness,time, and drops are now displaced.
Robots can now pick them up.


Unfortunately, this came with the side effect of it sounding like a tree when mined. I cannot yet do anything about that, and consider it a minor issue compared to allowing robots to pick it up.

Re: [MOD 0.12.x] Minable Rock

Posted: Sat Oct 03, 2015 10:56 am
by Ranakastrasz
Gah. The migration script isn't working. Unless you start a new game with this mod, it won't work. Only newly generated chunks seem to work.

Re: [MOD 0.12.x] Minable Rock

Posted: Fri Oct 09, 2015 3:18 pm
by MrDrummer
Ranakastrasz wrote:Gah. The migration script isn't working. Unless you start a new game with this mod, it won't work. Only newly generated chunks seem to work.
For robots or manual removal of rocks?

Re: [MOD 0.12.x] Minable Rock

Posted: Fri Oct 09, 2015 5:45 pm
by Ranakastrasz
Both. So I suggest using the v1 for now unless starting a new game.

Re: [MOD 0.12.x] Minable Rock

Posted: Sun Oct 11, 2015 10:53 am
by MrDrummer
Okay, thanks for the quick response.

Re: [MOD 0.12.x] Minable Rock

Posted: Mon Oct 12, 2015 6:02 pm
by Gergith
Ranakastrasz wrote:Both. So I suggest using the v1 for now unless starting a new game.
Thanks for this! Was coming back here to give a bug report; Can you update your first post to say that? :)

Thanks for the awesome mod! :D

Re: [MOD 0.12.x] Minable Rock

Posted: Tue Mar 08, 2016 5:46 am
by GotLag

Code: Select all

data.raw["simple-entity"]["stone-rock"] = nil

stone_rock = {
    type = "tree",
    name = "stone-rock",
    flags = {"placeable-neutral", "placeable-off-grid", "not-on-map"},
    minable =
    {
      count = 25,
      hardness = 0.8,
      mining_particle = "stone-particle",
      mining_time = 5,
      result = "stone"
    },
    icon = "__base__/graphics/icons/stone-rock.png",
    subgroup = "grass",
    order = "b[decorative]-k[stone-rock]-a[big]",
    collision_box = {{-1.1, -1.1}, {1.1, 1.1}},
    selection_box = {{-1.3, -1.3}, {1.3, 1.3}},
    render_layer = "object",
    max_health = 200,
    resistances =
    {
      {
        type = "fire",
        percent = 100
      }
    },
    autoplace =
    {
      order = "a[doodad]-a[rock]",
      peaks =
      {
        {
          influence = 0.0002
        },
        {
          influence = 0.002;
          min_influence = 0,
          elevation_optimal = 30000,
          elevation_range = 23000,
          elevation_max_range = 30000,
        }
      }
    },
    pictures =
    {
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-01.png",
        width = 76,
        height = 60,
        shift = {0.1, 0}
      },
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-02.png",
        width = 83,
        height = 86,
        shift = {0.2, 0}
      },
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-03.png",
        width = 126,
        height = 98,
        shift = {0.7, 0}
      },
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-04.png",
        width = 92,
        height = 108,
        shift = {0.1, 0}
      },
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-05.png",
        width = 140,
        height = 99,
        shift = {0.5, 0}
      }
    }
  }

data:extend(
{
  stone_rock
})
As it replaces the base entity it works with existing saves, and the rocks will continue to exist (but not be minable) if the mod is removed.

Re: [MOD 0.12.x] Minable Rock

Posted: Sat May 14, 2016 2:33 pm
by Sacredd
Thanks for this mod.

Fixed
Zwischenablage04.png
Zwischenablage04.png (34.66 KiB) Viewed 12344 times
and increased the version to 0.0.21 mark the difference.

Re: [MOD 0.12.x] Minable Rock

Posted: Fri May 20, 2016 10:10 pm
by Qon
GotLag wrote:

Code: Select all

data.raw["simple-entity"]["stone-rock"] = nil

stone_rock = {
    type = "tree",
    name = "stone-rock",
    flags = {"placeable-neutral", "placeable-off-grid", "not-on-map"},
    minable =
    {
      count = 25,
      hardness = 0.8,
      mining_particle = "stone-particle",
      mining_time = 5,
      result = "stone"
    },
    icon = "__base__/graphics/icons/stone-rock.png",
    subgroup = "grass",
    order = "b[decorative]-k[stone-rock]-a[big]",
    collision_box = {{-1.1, -1.1}, {1.1, 1.1}},
    selection_box = {{-1.3, -1.3}, {1.3, 1.3}},
    render_layer = "object",
    max_health = 200,
    resistances =
    {
      {
        type = "fire",
        percent = 100
      }
    },
    autoplace =
    {
      order = "a[doodad]-a[rock]",
      peaks =
      {
        {
          influence = 0.0002
        },
        {
          influence = 0.002;
          min_influence = 0,
          elevation_optimal = 30000,
          elevation_range = 23000,
          elevation_max_range = 30000,
        }
      }
    },
    pictures =
    {
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-01.png",
        width = 76,
        height = 60,
        shift = {0.1, 0}
      },
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-02.png",
        width = 83,
        height = 86,
        shift = {0.2, 0}
      },
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-03.png",
        width = 126,
        height = 98,
        shift = {0.7, 0}
      },
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-04.png",
        width = 92,
        height = 108,
        shift = {0.1, 0}
      },
      {
        filename = "__base__/graphics/entity/decorative/stone-rock/stone-rock-05.png",
        width = 140,
        height = 99,
        shift = {0.5, 0}
      }
    }
  }

data:extend(
{
  stone_rock
})
As it replaces the base entity it works with existing saves, and the rocks will continue to exist (but not be minable) if the mod is removed.
I guessed at just replacing the Minable Rock_0.0.1\prototypes\entity.lua file contents with your code and it works nicely! Now My bots can take over the world :D
Thanks

Re: [MOD 0.12.x] Minable Rock

Posted: Sat Jun 04, 2016 12:12 am
by Ranakastrasz
@GotLag: YOU CAN DO THAT?
You can overwrite an entire prototype's type classification?
How does that even work?

v3, Applied GotLag's Fix.