[MOD 0.12.0] endless resources
-
- Filter Inserter
- Posts: 253
- Joined: Wed Feb 20, 2013 9:35 pm
- Contact:
[MOD 0.12.0] endless resources
Hi, here is my mod
it makes all resources infinite as oil.
https://www.dropbox.com/s/uyp40my30t8p8 ... 0.zip?dl=0
minimum resources are 0.25 instead of 0.1, makes for one ore mined every 4 mining cycles on average (ui shows 0.3 sec, but yeld is 50% and mining time is 2, so you get 0.25sec).
it is pretty crude; on request I made it to infinite every resource in the resource table, but I will revert to hardcoded values if any conflict arise (never tested with other resources adding mod)
it makes all resources infinite as oil.
https://www.dropbox.com/s/uyp40my30t8p8 ... 0.zip?dl=0
minimum resources are 0.25 instead of 0.1, makes for one ore mined every 4 mining cycles on average (ui shows 0.3 sec, but yeld is 50% and mining time is 2, so you get 0.25sec).
it is pretty crude; on request I made it to infinite every resource in the resource table, but I will revert to hardcoded values if any conflict arise (never tested with other resources adding mod)
Last edited by ssilk on Sat Aug 22, 2015 10:05 am, edited 5 times in total.
Reason: Changed title to match board rules http://www.factorioforums.com/forum/viewtopic.php?f=89&t=947
Reason: Changed title to match board rules http://www.factorioforums.com/forum/viewtopic.php?f=89&t=947
Re: [0.9.x] endless resources
If you are not making any other changes then this should be suitable for making all resources infinite, do note that for it to work properly with other mods then you should have it depend (in info.json) upon the mods that add resources (use a ? (ex: "? F-mod") so that they only load first if they do exist, not actually 'required') without the dependency they may not be run before your mod and in that case their resources will not be in data.raw for you to change:LoSboccacc wrote: it is pretty crude, I think it is incompatible with all other resources mods, because I didn't understand how the other way of modding works (that is, I replaced all the ore with copypasta)
Code: Select all
for _, resource in ipairs(data.raw.resource) do
if not resource.infinite then resource.infinite=true end
if not resource.minimum then resource.minimum=20 end
if not resource.maximum then resource.maximum=350 end
end
an alternative method would be:
Code: Select all
if data.raw.resource["copper-ore"] then
if not data.raw.resource["copper-ore"].infinite then data.raw.resource["copper-ore"].infinite=true end
if not data.raw.resource["copper-ore"].min then data.raw.resource["copper-ore"].min=20 end
if not data.raw.resource["copper-ore"].max then data.raw.resource["copper-ore"].max=350 end
end
Also, you don't need a dependency of "scenario-pack", there may well be users who download this that have not paid for the scenario pack (and thus wouldn't be able to use your mod without removing the dependency theirselves).
-
- Filter Inserter
- Posts: 253
- Joined: Wed Feb 20, 2013 9:35 pm
- Contact:
Re: [0.9.x] endless resources
mod updated with the suggested fixes!
same link in the op.
yeld should be a little higher on the low end, allowing actual useful resource patch utilization
same link in the op.
yeld should be a little higher on the low end, allowing actual useful resource patch utilization
-
- Long Handed Inserter
- Posts: 52
- Joined: Sat May 03, 2014 12:45 pm
- Contact:
Re: [0.9.x] endless resources
Thanks for the mod, its really good to hook-up some high efficiency mining drills to an "empty" vein so you don't overproduce pollution and still able to mine that very tiny bit of ore.
Re: [0.9.x] endless resources
BIG THANKS for the mod, I think it is a gread addition to the game. I love bulding big factories and so I never will have to deconstruct large parts due to depleted resources.
I hope the devs try for them themselves and consider to implement it.
I hope the devs try for them themselves and consider to implement it.
Re: [0.9.x] endless resources
Playing with it 16 hours now, seems to be balanced... It doesn't feel "cheaty" because you really have to expand nevertheless.
-
- Filter Inserter
- Posts: 253
- Joined: Wed Feb 20, 2013 9:35 pm
- Contact:
Re: [0.9.x] endless resources
Link down because dropbox, will fix when I get back.
edit:
link updated!
edit:
link updated!
- CorrettoSambuca
- Long Handed Inserter
- Posts: 57
- Joined: Sun May 04, 2014 9:29 am
- Contact:
Re: [0.9.x] endless resources
Would be interesting if it actually made all resources really infinite, oil included...
Option maybe? or different mod altogether?
Option maybe? or different mod altogether?
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.9.x] endless resources
I think if you set resource.minimum to a stupid high number, like 2 billion, then the resources would never be able to fall below 2 billion(unless they are already below said value), and therefore be infinite.CorrettoSambuca wrote:Would be interesting if it actually made all resources really infinite, oil included...
Option maybe? or different mod altogether?
Though keep in mind that a particularly rich vein would spew out resources really fast.
- CorrettoSambuca
- Long Handed Inserter
- Posts: 57
- Joined: Sun May 04, 2014 9:29 am
- Contact:
Re: [0.9.x] endless resources
Exactly!
I'd be fine if I could have oil coming out at 1 speed, but constant...
Also I've been playing with some "limitations": for example the miners must be placed only on the ore, so no exploiting a single ore patch with 4 miners...
I'd be fine if I could have oil coming out at 1 speed, but constant...
Also I've been playing with some "limitations": for example the miners must be placed only on the ore, so no exploiting a single ore patch with 4 miners...
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.9.x] endless resources
That's actually fairly easy, you reduce the resource seeking range, or whatever the actual tag is, on the electric miner to be 1.5 instead of 2.5, half the tile-width of the structure, and therefore it's tile radius. Since a structure can only be placed where the resource seeking range covers a resource, you have to place the building on top of the resource to mine it.CorrettoSambuca wrote:Exactly!
I'd be fine if I could have oil coming out at 1 speed, but constant...
Also I've been playing with some "limitations": for example the miners must be placed only on the ore, so no exploiting a single ore patch with 4 miners...
As for setting it to a minimum speed of 1/s, set minimum to the same value as normal, then a rich field will start at say... 50/s, and slowly depleat untill it hits 1/s, then become infinite.
- CorrettoSambuca
- Long Handed Inserter
- Posts: 57
- Joined: Sun May 04, 2014 9:29 am
- Contact:
Re: [0.9.x] endless resources
What I meant is that the miner has to be above a 3x3 patch of ore, with no clean ground underneath... This makes it so that small patches only allow for two miners at most. Another self-imposed rule is that miners must not touch each other, to further limit the output of bigger ore patches. With the small side-effect of allowing to walk through mining fields, which is otherwise impossible.
-
- Long Handed Inserter
- Posts: 52
- Joined: Sat May 03, 2014 12:45 pm
- Contact:
Re: [0.9.x] endless resources
does this work on 0.10.12?
Re: [0.9.x] endless resources
I had a lot of fun with this mod, seems also quite balanced, but unfortunately not played since a while? Have you just tried activating the mod? Does it produce any error message?
Re: [0.9.x] endless resources
This does work on 10.12, I've been using it the past week or so.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.9.x] endless resources
I was thinking of implementing a feature such as this as an options in my ore mod, so I tried the code from your sugestion FreeER.FreeER wrote:Code: Select all
for _, resource in ipairs(data.raw.resource) do if not resource.infinite then resource.infinite=true end if not resource.minimum then resource.minimum=20 end if not resource.maximum then resource.maximum=350 end end
It didn't work.
I'm not so hot on LUA, so I looked up some examples of iterative code.
The problem is that you should be using pairs, not ipairs, replace that keyword, and it works.
-
- Inserter
- Posts: 23
- Joined: Sat Sep 27, 2014 6:39 am
- Contact:
Re: [0.9.x] endless resources
Hi ,
most of the time I´m just stalking the forum silently.
But this nice mod forces me to show myself to the world.
I really like it .
Thanks.
But I think it is slightly bugged , cause the % value will very slowly degrade until depletion ,
Oil isn't endless , too <- could be changed by an update of the game, and that's why yours aren't endless ,too.
So they are only extreme amount of resources on a tile , but it's limited.
Maybe it always was like this . I started playing only about a month ago.
kind regards
Chronosfear
most of the time I´m just stalking the forum silently.
But this nice mod forces me to show myself to the world.
I really like it .
Thanks.
But I think it is slightly bugged , cause the % value will very slowly degrade until depletion ,
Oil isn't endless , too <- could be changed by an update of the game, and that's why yours aren't endless ,too.
So they are only extreme amount of resources on a tile , but it's limited.
Maybe it always was like this . I started playing only about a month ago.
kind regards
Chronosfear
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.9.x] endless resources
I havn't tried this directly, but did add the option to my own mod.
If it is working propperly, resources depleate down to about 0.3/s then don't depleat
If it is working propperly, resources depleate down to about 0.3/s then don't depleat
-
- Filter Inserter
- Posts: 253
- Joined: Wed Feb 20, 2013 9:35 pm
- Contact:
Re: [0.11.1] endless resources
updated for 0.11.1
Re: [0.11.1] endless resources
many thanks