Page 1 of 1

Internal change to resources - Multiple minable types

Posted: Mon Oct 17, 2016 4:38 pm
by Hexicube
Currently a defined ore contains this (taken from crude oil):

Code: Select all

category = "basic-fluid",
minable =
{
  hardness = 1,
  mining_time = 1,
  results =
  {
    {
      type = "fluid",
      name = "crude-oil",
      amount_min = 1,
      amount_max = 1,
      probability = 1
    }
  }
}
The issue here is that the resource category (which affects what can mine it) is defined outside of the minable object, which means it can only ever be part of one category. Instead, I propose that the category goes into the minable object, and that multiple minable objects can be declared (provided they don't use the same category). Copper ore could end up looking like this:

Code: Select all

minable =
{
  category = "basic-solid",
  hardness = 0.4,
  mining_particle = "copper-ore-particle",
  mining_time = 2,
  result = "copper-ore"
},
minable =
{
  category = "advanced-solid",
  hardness = 1,
  mining_time = 1,
  results =
  {
    {
      type = "fluid",
      name = "copper-ore-fluid",
      amount_min = 1,
      amount_max = 1,
      probability = 1
    }
  }
}
This is a required change for the planned dirty ore mechanic, as that would then use the "advanced-solid" category that gives a different result to "basic-solid" that is currently used on the 4 normal ores. Doing it now would allow modders to exploit the mechanic before an official implementation, and may also help with demonstrating the planned feature so that feedback can be collected in advance of said official implementation.

Re: Internal change to resources - Multiple minable types

Posted: Mon Oct 17, 2016 6:11 pm
by aubergine18
The title of OP is misleading. If I comprehend correctly, you want to set the category of items/fluids, rather than have categories defined by recipes?

Dirty ores are already implemented in several mods IIRC, such as Bobs and Angels mods. Set resource patches to provide dirty ores, then have a machine that takes the dirty ore and any other required stuff to produce refined ore, etc.

Is there something different that you're trying to achieve?