judos / robotMiningSite

A factorio mod
GNU General Public License v3.0
5 stars 2 forks source link

Mining infinite ore #11

Closed BerndVertommen closed 7 years ago

BerndVertommen commented 7 years ago

Mining infinite ore patches seems to result in robots generating a lot of fake resources. 95% of the robots is picking up these fake resources.

Using version 0.5 on factorio 0.14

judos commented 7 years ago

This is actually intentional. The actual yield is defined inside the mod libs/resources.lua:

--NOTE: The minimum_resource_amount is calculated wrongly and the normal_resource_amount isn't available at all --See interface request here: https://forums.factorio.com/viewtopic.php?f=28&t=24202&p=152421#p152421 --local yield = resource.amount / (10* resource.prototype.minimum_resource_amount) local yield = 0.333

So basically 66% of all items mined on infinite ores, are garbage on purpose, compensating for the fact that you have infinite ore. As the interface request is pretty old it might be that for factorio 0.15 this will be possible to implement properly. However currently I didn't find the time to update this mod. Any developer is welcome to help me update it...

mikeskey commented 7 years ago

I am having this exact same issue. I see where you said it's intentional but is there any way we can fix this ourselves so we don't get so many wasted trips with no ore? I don't do any modding personally but I have figured out how to change config files and such in games like minecraft and ark before. I have no clue if factorio is as easy to change however as I haven't tried before.

judos commented 7 years ago

For factorio 0.15 I should actually check whether there is a new API the mod could use to calculate the actual yield. This was not possible back in 0.14. If you want to change it manually for now, unzip the mod and check the libs/resources.lua file. In there you can see the line: "local yield = 0.333" which currently defines that an ore is only mined in 33.3% cases.

judos commented 7 years ago

Even though my interface request was never answered factorio 0.15.33 provides exactly what I required to implement this. The issue will be fixed with the next release.