[MOD 0.15] Wear and Tear (plus automated maintenance)

Topics and discussion about specific mods
Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Maglay »

I fear I found the next problem.

The recycle recipes are mixed up, for example the old ore cursher produces an old ore crusher 2; the old ore crusher 2 gives an old mk3 crusher, and only the old mk3 crusher gives its ingredients back.
The same pattern exists for all buildings that have a tier.

This should come from the loop over all data.raw.recipes, at the end of data-final-fixes.lua.

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

Maglay wrote:Just discovered a new thing. When a building gets replaced, the items that are used in the current cycle and those that are stored in the inventories are lost.

In the most cases the amount of lost wares can be ignored, however for the satelitte this is quite expensive. But even worse the kovarex enrichment process now consumes more u235 than it produces.
Without fancy combinator magic, which limits the amount of uran in the inventories, the enchricment process is unusable.

Can the inventory be stored similar to the modules or the recipe in the global replace list, maybe even the progress of the current running cycle?

The quick and dirty solution is to add the centrifuge to the ignore list :)
Items that are in-progress for a current cycle are always lost when a building gets removed or it's recipe reset, even in the vanilla game. Those loses are typically negligible.

For items in storage (not part of it's current cycle), I believe you are mistaken. When an old building gets replaced with a new one, the first step is simply to mark it for deconstruction. When that happens, the items in inventory are moved by robots into storage chests or provider chests (not lost). This is a vanilla feature. Bots always move items that were in the building\s inventory to storage when it gets deconstructed by bots. If there are no storage chests with space you'll get a message telling you this is the case. (again, a vanilla mechanic) You can test this by marking a building for decontructopn manually. The only time this doesn't happen is for liquid ingredients. But, for liquid recipe's any ingredients in storage are going top be negligible since you can't manually insert liquids and the game only pushes the amount liquids in from pipes that are needed for 1 cycle.

Negligible in both cases.
Last edited by withers on Tue Jun 20, 2017 11:18 pm, edited 3 times in total.

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

Maglay wrote:I fear I found the next problem.

The recycle recipes are mixed up, for example the old ore cursher produces an old ore crusher 2; the old ore crusher 2 gives an old mk3 crusher, and only the old mk3 crusher gives its ingredients back.
The same pattern exists for all buildings that have a tier.

This should come from the loop over all data.raw.recipes, at the end of data-final-fixes.lua.
Can you make a screen shot showing this?

Sworn
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sun Apr 03, 2016 8:10 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Sworn »

After the last update, the game doesn't load any more, looks like it is stuck in a loop, it stop at 6% doesn't give any error, just stuck there, looks like a loop because watching the memory monitor its just going up and up and up...

After removing the mod from the folder it loads normal.

No idea why. :'(

I left it loading to see what happens and my pc Freezes.

Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Maglay »

withers wrote:Can you make a screen shot showing this?
Shure
Old Burner Ore Crusher.jpg
Old Burner Ore Crusher.jpg (530.96 KiB) Viewed 7319 times
This is the recycling of the burner ore crusher, it returns an old ore crusher 1. Similar the old ore cursher 1 returns the old ore crusher 2; the old ore cursher 2 returns the old ore crusher 3
Last edited by Maglay on Wed Jun 21, 2017 6:48 am, edited 2 times in total.

Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Maglay »

and here is the recycling of the old ore crusher 3
Old Ore Crusher 3.jpg
Old Ore Crusher 3.jpg (525.24 KiB) Viewed 7319 times
it returns half of the ingriedents, including the new ore cursher 2

Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Maglay »

Sworn wrote:After the last update, the game doesn't load any more, looks like it is stuck in a loop, it stop at 6% doesn't give any error, just stuck there, looks like a loop because watching the memory monitor its just going up and up and up...

After removing the mod from the folder it loads normal.

No idea why. :'(

I left it loading to see what happens and my pc Freezes.
Can you link the mod list please, otherwise its hard to tell what going on

I use the latest version, and except for the problems i mentioned all is working.

I have seen problems with memory usage and freezing like this when using this mod: https://mods.factorio.com/mods/Earendel ... prototypes
Factorio seems to freeze because the memory requirements are so high that the harddisk is used. But it only takes very long.
This occures because this mod keeps track of every element in data.raw in order to provide this information for other mods, e.g. this one: https://mods.factorio.com/mods/OhChirpy/json-tools

Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Maglay »

withers wrote:
Items that are in-progress for a current cycle are always lost when a building gets removed or it's recipe reset, even in the vanilla game. Those loses are typically negligible.

For items in storage (not part of it's current cycle), I believe you are mistaken. When an old building gets replaced with a new one, the first step is simply to mark it for deconstruction. When that happens, the items in inventory are moved by robots into storage chests or provider chests (not lost). This is a vanilla feature. Bots always move items that were in the building\s inventory to storage when it gets deconstructed by bots. If there are no storage chests with space you'll get a message telling you this is the case. (again, a vanilla mechanic) You can test this by marking a building for decontructopn manually. The only time this doesn't happen is for liquid ingredients. But, for liquid recipe's any ingredients in storage are going top be negligible since you can't manually insert liquids and the game only pushes the amount liquids in from pipes that are needed for 1 cycle.

Negligible in both cases.
That is all clear, I know how factorio works (at least I should know after 1400 hours :) ) I'm talking about when an entity ages and changes from "new" to "aging" and not about the deconstruction of old entities by bots and creating the ghost of the new one. The inventory is lost every time an entity degrades.

And you do get back the items that are used in the current cycle if you mine an assembler, e.g. the 40 u235 in the centrifuge.

Losing uranium is definitely not neglectable, the enrichment process has to produce more uranium and not to consume it.

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

Maglay wrote:
withers wrote:
Items that are in-progress for a current cycle are always lost when a building gets removed or it's recipe reset, even in the vanilla game. Those loses are typically negligible.

For items in storage (not part of it's current cycle), I believe you are mistaken. When an old building gets replaced with a new one, the first step is simply to mark it for deconstruction. When that happens, the items in inventory are moved by robots into storage chests or provider chests (not lost). This is a vanilla feature. Bots always move items that were in the building\s inventory to storage when it gets deconstructed by bots. If there are no storage chests with space you'll get a message telling you this is the case. (again, a vanilla mechanic) You can test this by marking a building for decontructopn manually. The only time this doesn't happen is for liquid ingredients. But, for liquid recipe's any ingredients in storage are going top be negligible since you can't manually insert liquids and the game only pushes the amount liquids in from pipes that are needed for 1 cycle.

Negligible in both cases.
That is all clear, I know how factorio works (at least I should know after 1400 hours :) ) I'm talking about when an entity ages and changes from "new" to "aging" and not about the deconstruction of old entities by bots and creating the ghost of the new one. The inventory is lost every time an entity degrades.

And you do get back the items that are used in the current cycle if you mine an assembler, e.g. the 40 u235 in the centrifuge.

Losing uranium is definitely not neglectable, the enrichment process has to produce more uranium and not to consume it.

hmm. I haven't noticed this problem at all. Just tested with assembling machines and ingredients aren't lost when transitioning from new to aging/old. Is there specific machine this is happening to? Or is it all machines in your game?

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

Maglay wrote:and here is the recycling of the old ore crusher 3
Old Ore Crusher 3.jpg
it returns half of the ingriedents, including the new ore cursher 2
That appears to be intended behavior. The recycling recipes are 1/2 the ingredients rounded UP. So an Old Ore Crusher mk3 should yield a new Ore Crusher Mk2. I made it round up deliberately because if you lose the Mk2 from recycling a Mk3, you end getting around 25% less from recycling, which gets worse as you go up the tiers. So there's no incentive to use higher tier machines unless you get a full lower tier from the recycling.

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

Maglay wrote:
withers wrote:Can you make a screen shot showing this?
Shure
Old Burner Ore Crusher.jpg
This is the recycling of the burner ore crusher, it returns an old ore crusher 1. Similar the old ore cursher 1 returns the old ore crusher 2; the old ore cursher 2 returns the old ore crusher 3
That one DOES look wrong. I don't get that in my game. But I think I'm seeing what might be happening. The conflict with AAI Industry was caused because AAI Industry runs a utility on a bunch of recipes that removes (nulls) the "result" (one output) and replaces it with "results" (an array of outputs). My routine looked for the single "result" in recipes that are of type "Assembing machines" and creates aging versions and therefore wasn't detecting machines which had "result" nulled by AAI Industry.

I fixed it by making it look for both "result" and "results". But since the function creates new recycling recipes with "results" it might be in some cases creating extra recycling recipes out of the recycling recipes. Potential endless loop. Might also explain the crashing on startup.

I'll push out an update. Might fix both problems.
Last edited by withers on Wed Jun 21, 2017 4:16 pm, edited 4 times in total.

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

Sworn wrote:After the last update, the game doesn't load any more, looks like it is stuck in a loop, it stop at 6% doesn't give any error, just stuck there, looks like a loop because watching the memory monitor its just going up and up and up...

After removing the mod from the folder it loads normal.

No idea why. :'(

I left it loading to see what happens and my pc Freezes.
Try it now. 1.1.8

I haven't been able to reproduce the freezing but I have a good guess as to the cause. Please let me know if it's still freezing and if the ore crusher and other machines now say "new" in front of them.

Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Maglay »

withers wrote: I fixed it by making it look for both "result" and "results". But since recycling formulas are "results" it might be in some cases creating extra recycling recipes out of the recycling recipes. Potenital endless loop. Might also explain the crashing on started.

I'll push out an update. Might fix both problems.
Can you explain to me, why one can use in the scripts "a_recipe.result" although the mod api does not show these variables: http://lua-api.factorio.com/latest/LuaRecipe.html

From the api i would say "result(s)" should not exist and one has to use "products"
withers wrote: hmm. I haven't noticed this problem at all. Just tested with assembling machines and ingredients aren't lost when transitioning from new to aging/old. Is there specific machine this is happening to? Or is it all machines in your game?
Well it definitely happens with the centrifuges, but these are internally only assemblers, hence it should be the case with all buildings. I will test this again today evening with and without other mods in a new world and debug it on my own. I'll let you know whats happening

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

Maglay wrote:
withers wrote: I fixed it by making it look for both "result" and "results". But since recycling formulas are "results" it might be in some cases creating extra recycling recipes out of the recycling recipes. Potenital endless loop. Might also explain the crashing on started.

I'll push out an update. Might fix both problems.
Can you explain to me, why one can use in the scripts "a_recipe.result" although the mod api does not show these variables: http://lua-api.factorio.com/latest/LuaRecipe.html

From the api i would say "result(s)" should not exist and one has to use "products"
I think the mod api is only for run-time coding used in control.lua. Data.lua is different. There's stuff about recipe prototypes here.

https://wiki.factorio.com/index.php?tit ... ype/Recipe

Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Maglay »

i never realized that difference, many thanks. For some reason google did not come up with the link to the wiki when I searched for "recipe results"

Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Maglay »

Maglay wrote:
withers wrote: hmm. I haven't noticed this problem at all. Just tested with assembling machines and ingredients aren't lost when transitioning from new to aging/old. Is there specific machine this is happening to? Or is it all machines in your game?
Well it definitely happens with the centrifuges, but these are internally only assemblers, hence it should be the case with all buildings. I will test this again today evening with and without other mods in a new world and debug it on my own. I'll let you know whats happening
I have tested version 1.1.8 with no other mods. Indeed an assembler mk2 producing rocket fuel keeps all its items during degrading. Only the enrichment process has this issue.

Sworn
Fast Inserter
Fast Inserter
Posts: 167
Joined: Sun Apr 03, 2016 8:10 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by Sworn »

Maglay wrote:
Sworn wrote:After the last update, the game doesn't load any more, looks like it is stuck in a loop, it stop at 6% doesn't give any error, just stuck there, looks like a loop because watching the memory monitor its just going up and up and up...

After removing the mod from the folder it loads normal.

No idea why. :'(

I left it loading to see what happens and my pc Freezes.
Can you link the mod list please, otherwise its hard to tell what going on

I use the latest version, and except for the problems i mentioned all is working.

I have seen problems with memory usage and freezing like this when using this mod: https://mods.factorio.com/mods/Earendel ... prototypes
Factorio seems to freeze because the memory requirements are so high that the harddisk is used. But it only takes very long.
This occures because this mod keeps track of every element in data.raw in order to provide this information for other mods, e.g. this one: https://mods.factorio.com/mods/OhChirpy/json-tools
yeh sure that I have a lot of mods and other mod may be causing some conflict with this one, I know that.
The mod list was posted on this post here, Page 2 [viewtopic.php?f=94&t=41892&start=20#p290319], don't know how to make multquote.
My guess was this one because it freeze on 6% whiling loading this mod. But no way to be sure about that :'(.
Definitely I have Earendel mods so maybe there is something wrong. Who knows hahahahha.
Any way I got the lasted version on the web site and everything looks great now.

At least for me, I can say that it is working properly.
Thanks!

donoya
Fast Inserter
Fast Inserter
Posts: 119
Joined: Thu Dec 04, 2014 10:55 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by donoya »

I'm getting a recurring error while playing with this mod. It only just started happening for me and I can't ignore it and keep playing. I've attached the log to this post. If you need any more information, let me know.
Attachments
factorio-current.log
(26.18 KiB) Downloaded 98 times

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

donoya wrote:I'm getting a recurring error while playing with this mod. It only just started happening for me and I can't ignore it and keep playing. I've attached the log to this post. If you need any more information, let me know.
Try now. 1.1.9

If it crashes again. Please upload your log again. I added a log command that can help me pinpoint the problem.

User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

Re: [MOD 0.15] Wear and Tear (plus automated maintenance)

Post by withers »

Maglay wrote:[

I have tested version 1.1.8 with no other mods. Indeed an assembler mk2 producing rocket fuel keeps all its items during degrading. Only the enrichment process has this issue.
Should be fixed now. Looks like non "fast replacable" buildings were losing inventories.

Post Reply

Return to “Mods”