Endless resources


Makes all ore deposits infinitely mineable. Includes modded ores, crude oil and modded liquids. Works in multiplayer and in games with multiple surfaces. In contrary to most other endless resource mods, this one does not convert the numbers on the ore patches to percentages and therefore still has ore patches change their size every now and then and let miners show the correct ratios.

Tweaks
7 hours ago
0.17 - 2.0
13.6K
Mining Cheats

i works with mods

4 years ago

just a simple wish, that this mod could work beyond Nauvis, for the sake of SE (Space Exploration by Earendel) mod, but not only.

afaik is the only mod that works with SE on Nauvis, but once you leave surface, its not anymore; thx

4 years ago

It only worked for Nauvis because I personally only play on Nauvis and I didn't think of it again when I uploaded the mod. However I just edited the code and the mod now features multi-surface gameplay. If it doesn't work or you wish something else to be added, feel free to tell me.

4 years ago

for my quick tests, works awesome, greatly THANK YOU!

yet, ive posted link to this mod to SE discord forum, asking for more tests, and possible future expansion of SE mod (afaik, SE are going to have way more resources in future, and possible more plains beyond Nauvis and stuff, so another few thingies may get broken, like most other resource mods)

4 years ago

And now it doesnt work with mods that remove vanilla ore types....

4 years ago

Fixed.

4 years ago

Once again, similar issue, - ER is too slow ;(
Krastorio2 and imersite resource - it is easily possible to mine it too quickly and deplete resource between 1800 tick intervals. It is single node that are mined by single special, way stronger mining device (buildable like oil pumps, directly above resource patch), and after that its so rare, that it is intended to be buffed even more by bacon strips, ugjm, by beacon strips.

Simple making ER pop more often could affect UPS, then unsure if increasing limit when it works (like from 1000 to 10000) wont affect any other balance issues, as afaik some resource may have mining speed based on how big mining node is (or at least some other infinite resource mods doing that). So, making another ER regenerative class based on node type could probably help, dunno.

4 years ago

I just added a second loop of iteration that checks for its resources every 3600 ticks (60 secs). At the moment, it only checks for your "Imersite" resource but if there are any other resources that need to be checked more frequently, feel free to add them by yourself so that you have control over the amount of resources that impact your UPS.

4 years ago

Must say, ddnt expected so quick response, greatly thanks and you are awesome!

Another event function shouldn't affect ups a lot, but some side details: on my not so big (but nearly first galactic transmitter - its like rocket endgame for Krastorio) map, I have no more than 10 patches of imersite resource, and even then, Im using only single one, so not so much to update and ups effect, in opposite to field resources, when single drill can affect 5x5=25 or even 7x7=49 tiles, and whole field can have even 1000s of squares, while we could use many fields at once, so ups could be affected a lot, that is why I wondered about side event solution...

Yet, its still not enough! - its a small, very side effect, and I doubt many players could even find that problematic, even for myself, I did it just for testing purpose, wont play with that, I buffed my drill up to 222.5 items per second with beacons, or 13350 per 3600 ticks (with just Krastorios stuff, no other efficiency mods) - current ER mod settings refreshing imersite nodes once it is on less than 2000, so its over 6.6x not enough :wink.jpg:,

Im gonna tweak that myself; Just gonna write a note about, in case someone else find that could be a problem.

Once again, greatly thanks! stay safe and smile a lot!

4 years ago

If you do loops like this:
for _, resource in pairs(surface.find_entities_filtered{name={"lithia-water", "ground-water", "angels-fissure", "angels-natural-gas"}}) do
if resource.amount < 1501502 then
resource.amount = 1501502 --1000 vorher
end
end
... You should first check if player has any of those mods installed. Searching the whole surface is non-trivial and that function has 10x higher tickrate than ores one.
Why not set ores to 999999999 and do it even less often?

4 years ago

You are absolutly right, but I don't know a thing about LUA (I'm usually working with Java). This mod is not made to be perfect in any way because e.g. I don't know how to check if you have actually installed the mods. If this is a problem for your performance, and in this case I think YOU actually know what you are doing, feel free to remove unused resources from the iteration. Alternatively you can explain to me how I check for certain mods and how I use this information inside the loop.

I don't set the resource amount on a very large number because of the optics they have. Ores have stages of how big patches are displayed ingame and I wanted to use them even with the mod.

4 years ago
(updated 4 years ago)

Sigh, maybe one day i will try to make infinite ores mod if noone else has done a proper one by then but no promises.

To ask if bob's ores is installed is:
if bobmods and bobmods.ores then
...

That is because bobores mod in data.lua defines bobmods.ores = {}, it is seen globally. I hope Angel's and others do similar practises. Those mods must be added as optional dependency in your mod info file, so that they are loaded before yours.

What i would do is define an empty filter and add to it 1 mod at the time, and if that filter ends up being empty then don't enter for-loop at all.
Other than that i guess guys at Discord channel can help in making actual infinite ores mod that doesn't require control.lua while still keeping 100% rate. We should be able to define the variation that ores can spawn in with, so distance from spawn doesn't matter.
For example:
infinite_depletion_amount should be 0
additional_richness also 0?

And maybe these would do something:
regular_rq_factor_multiplier = 1.0, -- default 1.1
starting_rq_factor_multiplier = 1.0, -- default 1.2
https://wiki.factorio.com/Types/AutoplaceSpecification

Or the generation could be changed to set with trillion size patches everywhere and that would still not need control.lua.

I think i will try and go with a quarry mod for now.

4 years ago

Sigh, maybe one day I will understand why this mod isn't "proper"...

Look, from my point of view, there is absolutly no problem with the mod as it is. If people have serious issues with it, they can tell me and I fixed them in the past and will continue to. But I don't get what you want... I know that the mod isn't the perfect solution but it filled the supply gap after the devs broke the old concept with the 17.67 bug fix and people are still using it. I don't understand your problem with the control.lua solution. Altough there is probabably a better solution than iterating through everything in closed intervals, it works fine for most people. And if someone has an issue with UPS drops caused by the mod, they can always tell me and I will try to optimise things or help them to adjust my code for their own solution. If this isn't enough for you, feel free to make your own infinite resources mod.

New response