2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
factoriouzr
Filter Inserter
Filter Inserter
Posts: 671
Joined: Sat Jun 06, 2015 2:23 am
Contact:

2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0

Post by factoriouzr »

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
Factorio Staff
Factorio Staff
Posts: 14244
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0

Post by Rseding91 »

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.
factoriouzr
Filter Inserter
Filter Inserter
Posts: 671
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

Post by factoriouzr »

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
Rseding91
Factorio Staff
Factorio Staff
Posts: 14244
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: 2.0.12 minimum value not respected for a resource that is made infinite like in pre 2.0

Post by Rseding91 »

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.
Post Reply

Return to “Pending”