Internal change to resources - Multiple minable types

Post your ideas and suggestions how to improve the game.
Post Reply
Hexicube
Fast Inserter
Fast Inserter
Posts: 194
Joined: Wed Feb 24, 2016 9:50 pm
Contact:

Internal change to resources - Multiple minable types

Post 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.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Internal change to resources - Multiple minable types

Post 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?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Post Reply

Return to “Ideas and Suggestions”

Who is online

Users browsing this forum: No registered users