minimum resource value not respected for a resource that is made infinite like in pre 2.0 and infinite_depletion_amount doesn't do anything.
I want to make all ores infinite but so that the decrease to a minimum percentage value like 10%. The problem is that the following code no longer works properly for other planets:
for k, v in pairs(data.raw.resource) do
data.raw.resource[k].infinite = true
data.raw.resource[k].minimum = 10
data.raw.resource[k].normal = 100
end
how can I make all resources on all planets infinite but degrade to their minimum value and stay there? Ie ores, scrap etc.
I want all ores, scrap etc to start at say 100% yield and decrade to say 10%, or 20% yield (whatever I set it to) and then stay there permanently and never go lower. The issue seems to be that setting the starting yield by setting the following:
resource.initial_amount
resource.amount
will result in the yield starting at 100% but then never decrease to the 20%. If you don't set the above then each miner will produce like 70 ore per second.
Thanks
[Rseding91] 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0
-
- Filter Inserter
- Posts: 689
- Joined: Sat Jun 06, 2015 2:23 am
- Contact:
Re: 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0
Thanks for the report however I am not aware of any changes around resource entities in 2.0/space-age. Can you please post a mod that shows the issue you're having, along with steps to reproduce it, and what you expect to have happen when doing those steps?
If you want to get ahold of me I'm almost always on Discord.
-
- Filter Inserter
- Posts: 689
- Joined: Sat Jun 06, 2015 2:23 am
- Contact:
Re: 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0
Setting the infinite, minimum and normal values only, seems to have a reasonable result and works as it did before, so this part doesn't need changing.
I discovered that the issue is that setting one or both of the following values will result in the resource not degrading to the minimum value set in the code I provided above. I would expect that even if you set the values below, the minimum value will still take effect and the resource will degrade until it reaches the minimum and then not degrade/decay any further.
resource.initial_amount = resource.prototype.normal_resource_amount
resource.amount = resource.prototype.normal_resource_amount
Thanks
I discovered that the issue is that setting one or both of the following values will result in the resource not degrading to the minimum value set in the code I provided above. I would expect that even if you set the values below, the minimum value will still take effect and the resource will degrade until it reaches the minimum and then not degrade/decay any further.
resource.initial_amount = resource.prototype.normal_resource_amount
resource.amount = resource.prototype.normal_resource_amount
Thanks
Re: 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0
Can you provide a save file and mod that shows the issue you're describing?
If you want to get ahold of me I'm almost always on Discord.
Re: 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0
Hello Rseding91, i can give a list of 2 known affected mods by this issue, relevant discussions and provide reproduction steps.
Mods affected by this bug were used by a sizable amount of people and i can personally confirm this bug has very negatively affected my enjoyment of 2.0
This post's title is misleading as to the root cause of the problem. The real issue is that ***Mining yields below 100% give no ressource at all***, which isnt how it worked before 2.0 and restricts enjoyable ways to mod the game for no reason.
-=What did you do?
-Installed "infinite ressource-depletion" mod
or "Infinite Resources - Normal Yields (with optional depletion)" mod (https://mods.factorio.com/mod/InfiniteR ... dDepletion)
-then configured mining yields in these mod's config to be able to go below 100% (but still above 0)
-=What happened?
-Mining yields below 100% give no ressource at all, while yields at and above 100% are calculated properly (ex: 150% gives 1 ressource + 50% chance of another)
-This is a bug with factorio and not the mod, as they don't contain any code regarding yield behavior
-=What did you expect to happen instead?
-Before 2.0, yields below 100% would be calculated as a chance to give you a ressource ex: 50% yields gave you a ressource half the time, nothing the other.
-=Does it happen always, once, or sometimes?
-All the time with any factorio configuration as reported by many users on affected mod's pages.
I personally tried to port the mod to 2.0 and failed to get it working as intended as there absolutely is a bug with factorio 2.0 that breaks it.
https://mods.factorio.com/mod/InfiniteR ... 043ef5e766
its the same bug as this: 121172
Let me know if you still need a save file, or anything else
Mods affected by this bug were used by a sizable amount of people and i can personally confirm this bug has very negatively affected my enjoyment of 2.0
This post's title is misleading as to the root cause of the problem. The real issue is that ***Mining yields below 100% give no ressource at all***, which isnt how it worked before 2.0 and restricts enjoyable ways to mod the game for no reason.
-=What did you do?
-Installed "infinite ressource-depletion" mod
or "Infinite Resources - Normal Yields (with optional depletion)" mod (https://mods.factorio.com/mod/InfiniteR ... dDepletion)
-then configured mining yields in these mod's config to be able to go below 100% (but still above 0)
-=What happened?
-Mining yields below 100% give no ressource at all, while yields at and above 100% are calculated properly (ex: 150% gives 1 ressource + 50% chance of another)
-This is a bug with factorio and not the mod, as they don't contain any code regarding yield behavior
-=What did you expect to happen instead?
-Before 2.0, yields below 100% would be calculated as a chance to give you a ressource ex: 50% yields gave you a ressource half the time, nothing the other.
-=Does it happen always, once, or sometimes?
-All the time with any factorio configuration as reported by many users on affected mod's pages.
I personally tried to port the mod to 2.0 and failed to get it working as intended as there absolutely is a bug with factorio 2.0 that breaks it.
https://mods.factorio.com/mod/InfiniteR ... 043ef5e766
its the same bug as this: 121172
Let me know if you still need a save file, or anything else
Last edited by Psilo on Mon Nov 25, 2024 6:45 pm, edited 3 times in total.
Re: 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0
Thanks for the additional information. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
-
- Filter Inserter
- Posts: 689
- Joined: Sat Jun 06, 2015 2:23 am
- Contact:
Re: [Rseding91] 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0
Thanks Psilo and Rseding91.