[MOD 0.15] Robot Mining Site 0.6.3

Topics and discussion about specific mods
Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [MOD 0.14] Robot Mining Site 0.5.0

Post by Anson »

is this mod still maintained ?
last update on the mod portal is 4 months old, this crashbug report is already 2+ months old,
and it just happened to me too ...
Spuds wrote:crash bug: RoboMiningSite_0.5.0.zip
open up circuit connection window. select a signal. Instant crash.
for me, it crashed on singleplayer, on an almost empty new testmap (but with many other mods active).
didn't take the time to do more tests for this crash until i know the author is still around and wants to fix it.
but here is the crash report:

Error while running event on_tick (ID 0)
Unknown item name: signal-0 (i had selected signal 0 and instant crash on that)
stack traceback:
__robotMiningSite__/control/robotMiningSite.lua:283: in fuction 'circuitConditionIsOk'
__robotMiningSite__/control/robotMiningSite.lua:92: in fuction 'checkCondition'
__robotMiningSite__/control/robotMiningSite.lua:68: in fuction 'tick'
__robotMiningSite__/libs/control/entities.lua:130: in fuction 'entities_tick'
__robotMiningSite__/control.lua:71: in fuction '<__robotMiningSite__/control.lua:70'

since all construction robots which are in range of the mining site seem to be converted to some enemy force (to not get intermixed with the player's bots?), i don't know any other method to remove bots and stop the site besides using that decider input.

this also might be considered to be a bug by its own:
placing bots in the world and letting them fly near the site shouldn't automatically convert them, but only those bots which are put in the mining station's bot-chest !
then we also would be able to use the stations signals to control the number of bots, eg to add more bots to the chest when a threshold is not reached, or temporarily stop the station and extract some bots if the station's ore storage gets empty.
judos
Filter Inserter
Filter Inserter
Posts: 267
Joined: Mon Dec 08, 2014 11:17 am
Contact:

Re: [MOD 0.14] Robot Mining Site 0.5.0

Post by judos »

Around yes, but I don't find time right now for factorio.
I tested the decider mostly only with item signals, not with abstract signals. Maybe I made a mistake for that part. Does it work with item signals?
Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [MOD 0.14] Robot Mining Site 0.5.0

Post by Anson »

judos wrote:I tested the decider mostly only with item signals, not with abstract signals.
Maybe I made a mistake for that part.
Does it work with item signals?
tested with lots of items now, and no problems at all.
tested with signal "0" and signal "A" and it crashes: signal-0, signal-A, etc are unknown names.

trying to learn myself ... and i am confused by several things ...

Code: Select all

280:  local network = entity.logistic_network
281:  local actualAmount
282:  if network then
283:      actualAmount = network.get_item_count(checkFirstItem)
284:  else
285:      actualAmount = entity.get_inventory(defines.inventory.chest).get_item_count(checkFirstItem)
286:  end
network376.PNG
network376.PNG (148.04 KiB) Viewed 10457 times
i found that signalID may be of type "item", "fluid", or "virtual", and you do network.get_item_count(checkFirstItem) on the signal, no matter which type it is. (the traceback gave line 283 as the error location)
i also have no idea which (internal) network that "network 376" is, that is connected by default to this conditioncheck.
since it is not connected to a logistic network (opening it shows "not connected"), but only to this network 376, why do you take logistic_network in line 280 and hope to get some result from it ?
and when i connect a wire myself, it shows to be connected to two circuit networks (376, and my own). couldn't that interfere and give false values ?

maybe you didn't expect any wire connections done by the user but only some check like "do i already have enough ore in my logistics network". if only a connection to some logistical network would exist, it would offer no option to set virtual signals, and thus you didn't check for them ?
but on opening that decision, the selection for circuit networks (which allows virtual signals) is automatically enabled and shown since it is connected to network 376 ...


ps: this mod only uses vanilla electric drills as base for its mini-drills. it would be nice to have more powerful drills too, to be able to do mining on other ore types from several mods which require more mining power. i can edit the mining power in this mod for my own use, but (if you have a lot of spare time someday :-) it would be nice to improve that part of the mod and eg match the ores, drills and batteries from angels and bobs, etc, giving us three tiered types of mini-drills which use the three different batteries for recharging :-)
Mormoran
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Feb 04, 2017 10:57 pm
Contact:

Re: [MOD 0.14] Robot Mining Site 0.5.0

Post by Mormoran »

I've encountered a bug, and it's preventing me from accessing the save and the server.

161.473 Error MainLoop.cpp:788: Exception at tick 18265699: Error while running event on_robot_pre_mined (ID 15)
__robotMiningSite__/libs/control/entities.lua:195: bad argument #2 to '__index' (string expected, got nil)
161.473 Error ClientMultiplayerManager.cpp:90: MultiplayerManager failed: "Error while running event on_robot_pre_mined (ID 15)
__robotMiningSite__/libs/control/entities.lua:195: bad argument #2 to '__index' (string expected, got nil)"

I'm pretty sure it happened when I ordered the deconstruction of the mining roboport (and perhaps my inventory was too full so it couldn't hold all the ores/mining robots.

I'd be happy to have this solved as I actually really like this mod.

I'll keep an eye out for an update on this, thanks!
Cordina
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Aug 12, 2016 4:54 pm
Contact:

Re: [MOD 0.14] Robot Mining Site 0.5.0

Post by Cordina »

Will there be a version for Factorio 0.15, or has the mod really died?
Love to see this in 0.15, been using it for a long time...

*** REVIVED *** :D
Last edited by Cordina on Tue Jul 18, 2017 8:42 am, edited 1 time in total.
judos
Filter Inserter
Filter Inserter
Posts: 267
Joined: Mon Dec 08, 2014 11:17 am
Contact:

Re: [MOD 0.14] Robot Mining Site 0.5.0

Post by judos »

Hi guys!

Thanks to the help of Cordina the mod made it to Factorio 0.15. Also I updated quickly a few things on it:

Update for 0.6.1 / 0.6.2
- 0.6.1 works for Factorio <= 0.15.28 (Cordina)
- 0.6.2 for Factorio > 0.15.28
- added mod setting to reduce costs of mining site (Cordina)
- added languages: nl (Cordina)
- fixed error with virtual signals (v0.6.2), the mining site uses now the native signal evaluation of the control lamp. Notice: Previously the inventory of the mining site was taken into account automatically. This is now no longer the case. You have to connect the mining site tower with a cable to the control lamp!


About liveness of the mod: Since I find little time I would like to have another modder on board to develop it. Feel free to message me!
Wildejackson
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Jul 31, 2016 2:40 am
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.2

Post by Wildejackson »

Interestingly the robots can mine ores that need liquids. But when they do they also mine a big red "X" that disappears when the roboport's inventory is transferred over to the storage.
Cordina
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Aug 12, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.2

Post by Cordina »

Wildejackson wrote:Interestingly the robots can mine ores that need liquids. But when they do they also mine a big red "X" that disappears when the roboport's inventory is transferred over to the storage.
Noticed that already. I'm working on it..
judos
Filter Inserter
Filter Inserter
Posts: 267
Joined: Mon Dec 08, 2014 11:17 am
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.2

Post by judos »

We would probably need to add a rank to the mining site such that mining only happens when fluid is available...

I will look also to add some pollution to the site next..
judos
Filter Inserter
Filter Inserter
Posts: 267
Joined: Mon Dec 08, 2014 11:17 am
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by judos »

Update for 0.6.3
- Uranium mining gives uranium rubble which has to be processed with sulfuric acid to Uranium ore (Cordina)
- Correct support for infinite ores (yield is now calculated correctly

- Pollution is now spread per mining! (Guard your outposts now!)
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by Airat9000 »

Developer hello, I have a question, but you can not make robots mined under the building? but then I look they get only where it is free - where the building does not go there.

разработчик привет, у меня вопрос, а нельзя сделать чтобы роботы добывали под зданием? а то смотрю они добыывают лишь где свободно - где стоит здание туда не идут.
elkillo
Burner Inserter
Burner Inserter
Posts: 12
Joined: Fri Feb 17, 2017 1:40 pm
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by elkillo »

question for you is there a reason to use mining bots over construction bots? they seem to have the exact same mining speed, with the mining robots being more costly in both materials and energy usage.
abordoli
Fast Inserter
Fast Inserter
Posts: 131
Joined: Thu May 25, 2017 1:19 am
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by abordoli »

Will the mining bots mine UNDER stone boulders? I know this is a weird question, but I have a use case where I want to preserve the stone boulders.
Regards,
~B
Tarradax
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Jun 01, 2016 1:44 pm
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by Tarradax »

Great concept but the bots don't benefit from the mining productivity percentage - Can that be added? I'd love to use this mod but not at the expense of extra ores.
Gryffen1971
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Nov 03, 2017 6:56 am
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by Gryffen1971 »

First off this is a great mod. Now, the bad news. I get an error message saying, "Error while running event robotMiningSite::on_tick (ID 0)
__robotMiningSite__/libs/control/resources.lua:11: bad argument #1 to 'pairs' (table expected, got nil)." I have posted a report on Git Hub with the full file that lists the error. I have attached the file with the error(s).

Thanks.
Gryffen1971
Attachments
factorio-current.log
Log of game run on 11/6/2017 @5:04am ET
(14.21 KiB) Downloaded 142 times
User avatar
Thorvin
Inserter
Inserter
Posts: 22
Joined: Tue Jul 18, 2017 5:44 pm
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by Thorvin »

Hi there, Judos !

As you probably know, your mining robots do not consider required mining fluids other that vanilla's uranium ore.

This is somewhat cheaty with other mods that use mining fluids for their new ores. I really wanted to make my mods work with Robot Mining Site. I actually require it in one of them. So I went to the code and noticed the resourceMapping table in config.lua. Obviously, adding new ores in that file works perfectly but this table is unfortunately inaccessible by other mods at the control stage, and config.lua is included in at the control stage. I guess you made it this way to be able to access it both at the data stage and at the control stage but that makes it impossible for another mod to implement its own rubble items and recipe.

Also, I felt like it would be a good thing if mining fluids of any ores would be considered by default. So, I experimented a bit with your code and figured a way to make this work :

config.lua

Code: Select all

-- stop using this

-- resourceMapping = {
-- 	["uranium-ore"] = "uranium-rubble"
-- }
control/robotMiningSite.lua

Code: Select all

-- Remove this

-- if resourceMapping[itemStack["name"]] then
-- 	itemStack["name"] = resourceMapping[itemStack["name"]]
-- end

-- Check actual game data for fluid requirement and replace the item name with ore_name-rubble

if game.entity_prototypes[itemStack["name"]] and game.entity_prototypes[itemStack["name"]].mineable_properties.required_fluid then
	itemStack["name"] = string.gsub(itemStack["name"], "-ore", "").."-rubble"
end
prototypes.rubble-defaults.lua
(Require this file in data-updates.lua)

Code: Select all

for i, ore in pairs(data.raw.resource) do

  -- loop through all ores requiring fluids

  if ore.minable.required_fluid then
    rubble_name = string.gsub(ore.name, "-ore", "").."-rubble"

    -- if there is not already a item with the name "my_ore_name-rubble", create a default item for it
    -- if another mod wants to implement a custom item, it is possible and this will be ignored.
    -- Just create an item named "my_ore_name-rubble" and change the icon, the stack size or whatever

    if not data.raw.item[rubble_name] then
      item =
      {
        name = rubble_name,
        type = "item",
        icon = data.raw.item[ore.name].icon,
        subgroup = "raw-resource-rubble",
        order = data.raw.item[ore.name].order,
        stack_size = data.raw.item[ore.name].stack_size,
        flags = {
          "goes-to-main-inventory"
        }
      }
      data:extend({item})
    end

    recipe_name = rubble_name.."-cleaning"

    -- Same thing with the cleaning recipe. Create a recipe named "my_ore_name-rubble-cleaning" or this default recipe will be created.
    -- The default recipe is the rubble + the required fluid in the same amounts as if they were mined normally.

    if not data.raw.recipe[recipe_name] then
      recipe =
      {
        name = recipe_name,
        category = "crafting-with-fluid",
        type = "recipe",
        enabled = false,
        energy_required = 5,
        ingredients = {
          {rubble_name, 10},
          {
            name = ore.minable.required_fluid,
            amount = ore.minable.fluid_amount,
            type = "fluid"
          }
        },
        result = ore.name,
        result_count = 10
      }
      data:extend({recipe})

      -- If you do not specify a custom recipe, the default recipe is added to the existing rubble technology.
      -- If you specify a custom recipe, you will have to add it to a technology manually.
      table.insert(data.raw.technology["uranium-rubble-processing"].effects,
        {
          type = "unlock-recipe",
          recipe = recipe_name
        }
      )
    end

  end
end
prototypes/miningRobot.lua

Code: Select all

data:extend(
{

-- create a raw-resource-rubble subgroup to organize all rubble related items and recipes
{
    type = "item-subgroup",
    name = "raw-resource-rubble",
    group = "intermediate-products",
    order = "c-a"
 },

{
    type = "item",
    name = "uranium-rubble",
    icon = "__robotMiningSite__/graphics/icons/uranium-rubble.png", -- The default item is not used because we want to user the uranium rubble icon
    flags = {"goes-to-main-inventory"},
    subgroup = "raw-resource-rubble", -- uranium-rubble is now in the new subgroup
    order = "a[uranium-rubble]",
    stack_size = 50
 }

 })

-- This is no longer necessary as the default recipe is exactly the same as this

--  data:extend({
--   {
--     type = "recipe",
--     name = "uranium-rubble-cleaning",
-- 	category = "crafting-with-fluid",
-- 	energy_required = 5,
-- 	enabled = false,
--     ingredients = {
-- 		{"uranium-rubble", 10},
-- 		{type="fluid", name = "sulfuric-acid", amount = 10}},
--     result = "uranium-ore",
-- 	result_count = 10
--   }
-- })
prototypes/technology.lua

Code: Select all

effects =
{
   -- The recipe is added by default to this technology

   -- {
   --   type = "unlock-recipe",
   --   recipe = "uranium-rubble-cleaning"
   -- }
},


What do you think about this ? I hope that you are not offended that I messed with your code.
My mods really depends on this to work, I will probably be waiting for this this to work before I publish them.
Let me now if you intend to implement my upgrade of fix this issue in another way.

And, of course, thanks for this really cool mod !
Cordina
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Aug 12, 2016 4:54 pm
Contact:

Re: [MOD 0.16] Robot Mining Site 0.7.0

Post by Cordina »

Thorvin wrote:Hi there, Judos !

As you probably know, your mining robots do not consider required mining fluids other that vanilla's uranium ore.

This is somewhat cheaty with other mods that use mining fluids for their new ores. I really wanted to make my mods work with Robot Mining Site. I actually require it in one of them. So I went to the code and noticed the resourceMapping table in config.lua. Obviously, adding new ores in that file works perfectly but this table is unfortunately inaccessible by other mods at the control stage, and config.lua is included in at the control stage. I guess you made it this way to be able to access it both at the data stage and at the control stage but that makes it impossible for another mod to implement its own rubble items and recipe.



What do you think about this ? I hope that you are not offended that I messed with your code.
My mods really depends on this to work, I will probably be waiting for this this to work before I publish them.
Let me now if you intend to implement my upgrade of fix this issue in another way.

And, of course, thanks for this really cool mod !
I'm currently looking into your piece of code. For now it's not (yet) included in the factorio 0.16 update.
Until recently I hadn't encountered other ores which required fluids for mining, but last week i did, so I'll test your code with the most recent update and factorio version.
If everything works as expected, it may be included in the next update.
puigcerver23
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Apr 04, 2018 8:01 pm
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by puigcerver23 »

Hi,

I love this mod and I would like to see it grow and add new features.

Here are some ideas I've been thinking and it would be great to have in the mod.
- Take into account the mining productivity so you don't loss resources if compared with the drill.
- Add more speed to the mining robots vie infinite research. I was using a 2 drill with passive provider chest and I can get more speed than the currently supported with the mod.
- Filter the kind of resource to be mined. A minor possible feature upgrade.

I'm a programmer and I'll try learn how to implement mods and try to help with the development, but I'm afraid it can take some time until I could help.
Cordina
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Aug 12, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by Cordina »

puigcerver23 wrote:Hi,

I love this mod and I would like to see it grow and add new features.

Here are some ideas I've been thinking and it would be great to have in the mod.
- Take into account the mining productivity so you don't loss resources if compared with the drill.
- Add more speed to the mining robots vie infinite research. I was using a 2 drill with passive provider chest and I can get more speed than the currently supported with the mod.
- Filter the kind of resource to be mined. A minor possible feature upgrade.

I'm a programmer and I'll try learn how to implement mods and try to help with the development, but I'm afraid it can take some time until I could help.
A new version has been released, which adds support for multiple tiers of mining robots and more speed research.
I'm working on the productivity bonus, just looking how to effectively implement it (possible as a chance of mining a double ore from a single mining action).
groovybluedog
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Jul 22, 2018 4:18 pm
Contact:

Re: [MOD 0.15] Robot Mining Site 0.6.3

Post by groovybluedog »

I've just installed this mod and am getting this repeating message on game load:

Error loading mods
Failed to load mods: __robotMiningSite__/data.lua:8: attempt to index field 'useRobRobotics' (a nil value)
Mods to be disabled:
robotMiningSite

In the mods menu, it shows 3 optional Bob dependancies, which I have none of.

Hmmm....
Post Reply

Return to “Mods”