Page 3 of 5

Re: [0.11.1] endless resources

Posted: Mon Mar 02, 2015 10:57 am
by Nagshell
How can I make it work with DyTech ores and gems? I'd love to get more of those (*_* )

Re: [0.11.1] endless resources

Posted: Mon Mar 02, 2015 11:35 am
by MasterBuilder
Nagshell wrote:How can I make it work with DyTech ores and gems? I'd love to get more of those (*_* )
Given the way it loops it should work with any resource ever. Only issue is load order.
If you make sure DyTech loads first, then this mod, it will alter DyTech's ores.

Easiest way do do this is add optional dependencies; something like:

Code: Select all

"dependencies": ["base >= 0.11.1", "? DyTech >= 0.0.0"]
(The '?' signifies that it's optional. And this isn't the right name or version, just an example.)

Do this for every mod that adds a resource and you're golden. (Most mods that add resources usually have "./prototypes/resources.lua".)

Re: [0.11.1] endless resources

Posted: Tue Mar 10, 2015 2:16 pm
by kovarex
No, the proper way is to use the data-updates.lua instead of data.lua, so it is alwyas loaded after all the mods are initialised no matter what they are.

Re: [0.11.1] endless resources

Posted: Fri Mar 13, 2015 1:02 pm
by bobingabout
in ANY mod(this one or otherwise), make a data-updates.lua (as suggested by Korvarex) which contains the following content

Code: Select all

for _, resource in pairs(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
This will make all minable resources infinite.

Re: [0.11.1] endless resources

Posted: Tue May 12, 2015 11:45 am
by Nedreow
I have been trying to increase the minimum yield of the patches but it seems like the yield goes down when i make it higher, how can I make it so that the mining never slows down?

Re: [0.11.1] endless resources

Posted: Tue May 12, 2015 11:57 am
by SirRichie
My own tests indicate that setting the minimum attribute of a resource achieves that.

However, a minimum of 100 does not mean 100% yield. When using endless resources, the values shown in Factorio are not accurate, as yield is calculated per resource tile, but drills usually access multiple resources tiles. In my experience, the default values of endless resources are good. If you do not want your resources to drop below ~100% yield, try 350 as the minimum.

Re: [0.11.1] endless resources

Posted: Tue May 12, 2015 4:45 pm
by orzelek
I'm using the mod with slight modification and while maximum value won't work directly (due to richness calculations I think) minimum value is respected exactly. So 25 minimum means that resource will get to 25% on map per tile.

Re: [0.11.1] endless resources

Posted: Thu May 21, 2015 9:18 pm
by Trev_lite
when i use endless resources the oil wells show 3-6k% instead of the normal 200-300%. is this normal?

Re: [0.11.1] endless resources

Posted: Thu May 21, 2015 9:21 pm
by SirRichie
I haven't verified this, but I don't think it is normal. endless resources does not change a single bit in the oil resource definitions, it just changes ores (oil is already endless...)
Are you sure you do not have any other mods?

Re: [0.11.1] endless resources

Posted: Thu May 21, 2015 9:36 pm
by orzelek
As I recently found out actual displayed percent depends on normal value for given ore. So mod can actually affect %-ages displayed.

Re: [0.11.1] endless resources

Posted: Fri May 22, 2015 1:22 am
by Trev_lite
SirRichie wrote:I haven't verified this, but I don't think it is normal. endless resources does not change a single bit in the oil resource definitions, it just changes ores (oil is already endless...)
Are you sure you do not have any other mods?
i have RSO mod but the guys over there said it was a problem with endless resources.

fake double post:

i have a sugesttion for the fix
replace

Code: Select all

for k, v in pairs(data.raw.resource) do
   data.raw.resource[k].infinite = true
   data.raw.resource[k].minimum  = 175
   data.raw.resource[k].normal   = 350
end
with something like

Code: Select all

for k, v in pairs(data.raw.resource) do
   if not data.raw.resouces[k].infinite then
        data.raw.resource[k].infinite = true
        data.raw.resource[k].minimum  = 175
        data.raw.resource[k].normal   = 350
    end
end

Re: [0.11.1] endless resources

Posted: Fri May 22, 2015 8:33 am
by SirRichie
Shame on me, it does change oil!
I had this vague memory that it only changed ores... guess I was wrong

Re: [0.11.1] endless resources

Posted: Fri May 22, 2015 4:37 pm
by orzelek
I'm using similar but with minimum set to 25 and normal to 100 :D
This one will stop at 50% but there might be lower generated from start I think.

Re: [0.12.0] endless resources

Posted: Fri Jul 24, 2015 9:27 pm
by Darloth
It's worth noting that even though things say 3000% yield, miners can't actually go any faster than 100%. The yield is the percentage chance to produce a lump of ore, but they can only ever produce at most 1 lump at a time, even if the "yield" is 3000%.

As such, setting a high normal figure should mean that the yield starts to drop off (reaches less than 100%) earlier, but each percentage point of drop takes longer to occur, so the higher you set the normal, the more oil-like and the less ore-like it behaves. I haven't extensively tested that though.

Re: [0.12.0] endless resources

Posted: Fri Jul 24, 2015 9:39 pm
by orzelek
I'm currently testing with min = 200 and normal = 1000.
It should stabilize at 20% which means that you can continue to work the field but finding new ones will be necessary to keep the throughput up.

If someone wants to play around I'm attaching it here. It's also modified to affect all ores (added by mods for example) and don't touch oil.

Re: [0.12.0] endless resources

Posted: Sun Aug 02, 2015 8:18 pm
by Boun6000
LoSboccacc wrote: (never tested with other resources adding mod)
it works with resource adding mods

Re: [MOD 0.12.0] endless resources

Posted: Mon Nov 23, 2015 7:30 pm
by zampa
Hey guys, I just started using endless resources in a marathon game, figured it'd be fun to play through, but I just now noticed that the yield actually drops the longer you mine a specific patch, can I change it to somehow always have stardard yield (like a normal game) but JUST endless quantity... I spend a good amount of hours in this marathon game and it would suck to have to find new patches far away from my base...

Edit: I tried setting " data.raw.resource[k].minimum" to all kind of values between 10 and 10,000 (highest yield seem to be the lower number i go to (e.g. 10), but still fields seem to drop to a lower and lower yield rate. I just want to get 1 resource every cycle :/


So tl:dr:
Can I keep the yield the same, and just have limitless resources?

Re: [MOD 0.12.0] endless resources

Posted: Mon Nov 23, 2015 9:19 pm
by SirRichie
I haven't tested, but what you would want to have are values where .minimum equals .normal
Of course, that won't help you with a game already in progress where resources have dropped below .normal (anything below .normal will decrease the yield below 100%).

So for a running game, probably something like
.normal = 10 and .minimum = 10
might work.

Re: [MOD 0.12.0] endless resources

Posted: Thu Nov 26, 2015 2:12 am
by MasterBuilder
zampa wrote:Hey guys, I just started using endless resources in a marathon game, figured it'd be fun to play through, but I just now noticed that the yield actually drops the longer you mine a specific patch, can I change it to somehow always have stardard yield (like a normal game) but JUST endless quantity... I spend a good amount of hours in this marathon game and it would suck to have to find new patches far away from my base...

Edit: I tried setting " data.raw.resource[k].minimum" to all kind of values between 10 and 10,000 (highest yield seem to be the lower number i go to (e.g. 10), but still fields seem to drop to a lower and lower yield rate. I just want to get 1 resource every cycle :/


So tl:dr:
Can I keep the yield the same, and just have limitless resources?
You can, but, not easily for an existing save.
Basically, all 'endless' resources have a min & max yield. Raising the min will not stop the yield from dropping, just from going below that threshold. If you set the min & max the same the yield should, in theory, never change.
When the fields are generated they use & save the current min/max values. Changing the minimum will only work for NEWLY generated resources.

If you want this to happen on existing resources you'll have to regenerate them.
IIRC there is a command to regenerate all resources but this may cause more problems that it will solve if your map was created using an older resource generation algorithm OR if mods have added resources since the initial generation.

EDIT: Just made this (untested) and I don't know if it works on endless resources. (Wiki page only shows 'amount' for the resource entity but this could just be out of date.)
Pasting this into the console should work. Or maybe it will destroy your game. Or maybe nothing. Use at your own risk.

Code: Select all

/c for _,ore in pairs(game.player.surface.find_entities_filtered({area = {{game.player.position.x+20, game.player.position.y+20}, {game.player.position.x-20, game.player.position.y-20}}, type="resource"})) do
	ore.amount = 200
end
If it works it will set the 'amount' of any resource entity within a 40^2 tile area around the player.

Re: [MOD 0.12.0] endless resources

Posted: Mon Mar 14, 2016 1:04 am
by BronyTheGamer
Could someone please make this compatible with Yuoki ores?