[MOD 0.12.0] endless resources

Topics and discussion about specific mods
khift
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Mar 15, 2016 9:57 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by khift »

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?
This is all I want as well. Mix this with rare, small desposits and you've got my ideal game.

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by SirRichie »

If you want to prevent yield from dropping below 0, set minimum and normal to the same number.
If you already started a game, a safe number is 10.

SuperRoboWizard
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Mar 16, 2016 12:48 am
Contact:

[deleted]

Post by SuperRoboWizard »

[deleted]
Last edited by SuperRoboWizard on Fri May 24, 2019 2:09 pm, edited 1 time in total.

User avatar
MasterBuilder
Filter Inserter
Filter Inserter
Posts: 348
Joined: Sun Nov 23, 2014 1:22 am
Contact:

Re: [MOD 0.12.0] endless resources

Post by MasterBuilder »

SuperRoboWizard wrote:Is there any way to set ores to a silly number like 1 million amount instead of making them like oil?
Something like this:

Code: Select all

for k, v in pairs(data.raw.resource) do
   data.raw.resource[k].minimum  = 1000000
   data.raw.resource[k].normal   = 1000000
end
Just beware that your oil wells will be ridiculously rich. Like 1000000% rich.
Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by SirRichie »

MasterBuilder wrote:
SuperRoboWizard wrote:Is there any way to set ores to a silly number like 1 million amount instead of making them like oil?
Something like this:

Code: Select all

for k, v in pairs(data.raw.resource) do
   data.raw.resource[k].minimum  = 1000000
   data.raw.resource[k].normal   = 1000000
end
Just beware that your oil wells will be ridiculously rich. Like 1000000% rich.
You can exclude oil from this by checking for it (untested):

Code: Select all

for k, v in pairs(data.raw.resource) do
   if v.type == "solid" then
      data.raw.resource[k].minimum  = 1000000
      data.raw.resource[k].normal   = 1000000
   end
end

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [MOD 0.12.0] endless resources

Post by daniel34 »

The folder inside the zip is named endless-resources and not endless-resources_0.3.0, so people trying to extract it to use it will get an error:

Filename of the mod
C:/users/owner/appdata/roaming/factorio/mods/endless-resources
Doesn't match the expected endless-resources_0.3.0 (case sensitive)
quick links: log file | graphical issues | wiki

Siegercz
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Mar 03, 2016 8:52 am
Contact:

Re: [MOD 0.12.0] endless resources

Post by Siegercz »

Hey guys.
Isnt there a way to just set the ores values to be still ?

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by SirRichie »

Here is how it works:

Ore generation is independent of the minimum and normal values.
If a miner mines the ore, the mined resource tile will have its amount reduced by 1.

If, however, the resource is set to infinite, then the amount will never drop below the minimum value.
Infinite resources have a yield value, which is basically a chance that mining (or drilling, in case of oil) the resource is successful. This yield percentage is calculated by comparing the actual amount (which you do not see directly) to the normal value of the resource.

For example:
Set iron-ore to minimum 100 and normal 500. Say the only resource tile under a miner has an amount of 1000.
Now the miner will output one iron ore each mining cycle until it has mined 500 iron ore. At this point, the yield value will slowly. E.g., after another 250 iron ores, the resource tile has an amount of 250, which means yield is 250 / 500 = 50%.
The yield keeps dropping for the next 150 ores, and has then reached 100, resulting in 100 / 500 = 20% yield. It will now stay at this value.

Note that when a miner has access to multiple resource tiles (as it is usually the case) it decides for a tile, BEFORE testing the yield. Thus, a miner with only one resource tile with yield 100% will output more ore than a miner with 2 resource tiles (one at 200% the other at 50%). At least until the first miner's yield drops below 100% ;)

Karones
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Mar 26, 2016 4:43 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by Karones »

SirRichie wrote:Set iron-ore to minimum 100 and normal 500. Say the only resource tile under a miner has an amount of 1000.
Now the miner will output one iron ore each mining cycle until it has mined 500 iron ore. At this point, the yield value will slowly. E.g., after another 250 iron ores, the resource tile has an amount of 250, which means yield is 250 / 500 = 50%.
The yield keeps dropping for the next 150 ores, and has then reached 100, resulting in 100 / 500 = 20% yield. It will now stay at this value.
So to make it have a 100% yield forever, you just have to set the minimum equal or above the normal?

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.0] endless resources

Post by orzelek »

Minimum and normal set to same value is 100%.
If you use some low value (10 for both) then initial amounts will be in high %-ages, if you use big ones(1000) then most of initial values might be below 100% on spawn.

sibe94
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Apr 02, 2016 4:49 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by sibe94 »

This is my first try to mod something in factorio and im not sure what i do wrong:

I dont want to set resources to infinity, i tried to set everything to a high amount. I added this:

Code: Select all

for k, v in pairs(data.raw.resource) do
   data.raw.resource[k].minimum  = 1000000
   data.raw.resource[k].normal   = 1000000
   data.raw.resource[k].amount   = 1000000
end
But when i reload my game all amounts are still on their old number. What am i doing wrong?

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.12.0] endless resources

Post by orzelek »

To make resource effectively endless you'd need to take above mod and change it to have normal and minimum amount for resource to same small amount like 10/10.
Already spawned resources have their amount set so they won't increase. There is no amount property in prototype.

NumbpaD
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Apr 11, 2016 5:55 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by NumbpaD »

Can you please do this mod work bith bob's mod ore?

seanfc
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Apr 24, 2016 7:49 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by seanfc »

Hello,

May i ask what's assign for the Variable K and V, I just wan't to understand what it's holding

K = ? (IS IT ORE)
V = ? (IS IT OIL)

for k, v in pairs(data.raw.resource)
do

data.raw.resource[k].infinite = true

data.raw.resource[k].minimum = 100

data.raw.resource[k].normal = 500


end



Many Thank's

Best Regard's
Lee Wi Tat
Malaysian Gamer
Last edited by seanfc on Sun Apr 24, 2016 9:12 pm, edited 1 time in total.

seanfc
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Apr 24, 2016 7:49 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by seanfc »

hello,

I have change the Syntax (Program Grammar) hope it help, but I still can't understand the K, V Variable what's it assign for.

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

Many Thank's

Best Regard's
Lee Wi Tat
Malaysian Gamer

TheOnlyJacky
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Apr 25, 2016 11:26 am
Contact:

Re: [MOD 0.12.0] endless resources

Post by TheOnlyJacky »

When ever i try to launch the game after installing this it wont work. Please help :shock:

seanfc
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Apr 24, 2016 7:49 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by seanfc »

for windows 7 the folder is in C:\Users\user\AppData\Roaming look for the name Factorio folder then open it put the endless-resources zip file into the mod folder it will run. hope it help


make sure you download the endless-resource zip file.

Xorpherion
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue May 03, 2016 8:59 am
Contact:

Re: [MOD 0.12.0] endless resources

Post by Xorpherion »

Hello!
I just stumbled upon the problem, that the endless resources mod doesn't work with the 5dim mod ores out of the box. The problem is the loading order. I solved this by adding a dependency to "5dim_ores" in the info.json of the endless mod resource. Additionally i changed the name of the data.lua to data-final-fixes.lua.
The dependency change makes sure the endless resources mod is loaded after the 5dim ores mod. The file name change from data.lua to data-final-fixes.lua is needed because the 5dim ores mod loads its ores in the data-update.lua file which is executed after all data.lua files. Thus i used the data-final-fixes.lua filename to make sure the endless resources mod is loaded last :-) Hope this helps someone. Good luck and happy automation!

Ubertwink
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Sun Oct 18, 2015 5:47 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by Ubertwink »

I am trying to update this mod to 0.13, but I can't find the place where the required game version is specified. Changing the dependancies to 0.13 does not help.
Image

Ubertwink
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Sun Oct 18, 2015 5:47 pm
Contact:

Re: [MOD 0.12.0] endless resources

Post by Ubertwink »

Nvm, here is the updated mod:
endless-resources_0.3.1.zip
(794 Bytes) Downloaded 771 times
Topic may be moved to 0.13 mods.

Post Reply

Return to “Mods”