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

Topics and discussion about specific mods
SunTroll
Inserter
Inserter
Posts: 31
Joined: Sat Feb 04, 2017 5:11 pm
Contact:

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

Post by SunTroll »

Is this mod heavy on ups?

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:Should be fixed now. Looks like non "fast replacable" buildings were losing inventories.
Thats great, thanks for your work :)

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 »

I've updated the demo save-game for factorio V.15 and using Wear and Tear 1.2.1. It's on the second post of this thread.

Check it out! It has aging accelerated and setup for automatic bot replacement of machines that get old. Also includes bringing replacement parts to a satellite "fuel outpost" for bots to replace at that location as well.

I use this as a "stress test" to make sure everything is running properly.

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 »

SunTroll wrote:Is this mod heavy on ups?
You mean "fps"? I think it's pretty light, although I don't have a gargantuan base with 20,000 machines running so maybe someone else can answer better.

There's a one-time script on loading that takes a few seconds, other than that no performance hit for me at all.

Patashu
Fast Inserter
Fast Inserter
Posts: 130
Joined: Mon May 08, 2017 11:57 pm
Contact:

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

Post by Patashu »

UPS is updates per second, specifically referring to how many game ticks the game can process per second. (You can improve FPS by setting graphics to ultralow, shrinking window, etc - so the real performance bottleneck is UPS, which is independent of what the player can see.)

Mods that run too much Lua per tick can cause UPS to drop, hence the question.

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 »

Patashu wrote:UPS is updates per second, specifically referring to how many game ticks the game can process per second. (You can improve FPS by setting graphics to ultralow, shrinking window, etc - so the real performance bottleneck is UPS, which is independent of what the player can see.)

Mods that run too much Lua per tick can cause UPS to drop, hence the question.
Well prior to V1.2.1, this was the extent of my OnTick function:

Code: Select all

if (event.tick % 180 == 0) then 
		weartear.smoke() 
		weartear.scan_recyclers()
	end
if (event.tick % weartear.interval == 0) then weartear.scan_entities() end
All the main calculations are run every 6 seconds (smoke and recyclers scan every 3 seconds) and are run on internal tables (not every entity in the game) which are tracked and limited to the number of actual machines that age. Very small UPS IMHO. Although like I said, someone with a garganutan base might be able to answer better.
As of 1.2.1, I merged in the "Smart Loader" mod. This has more OnTick coding, but still low UPS in my opinion.

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:Although like I said, someone with a garganutan base might be able to answer better.
I have a base with 2k solar panels, 1k assembler like buildings and a big bunch of miners. Wear and Tear is not noticable. Othermods like the wireless charging or YARM still use more time per update than this one.

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 »

Update: 1.2.2

- This update is to make the bot replacement automation work with Angel's Logistics or other mods which add early game construction bots.
- Automated machine replacement now works for machines that are inside the construction zone. (before they had to be in the orange logistics zone)
- Ghost entities are that placed by the automation script no longer have a time limit. (you don't need to research anything).

Coffee Daemon
Inserter
Inserter
Posts: 48
Joined: Tue May 03, 2016 1:02 am
Contact:

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

Post by Coffee Daemon »

withers wrote:Update: 1.2.2
- Ghost entities are that placed by the automation script no longer have a time limit. (you don't need to research anything).
THANK THE MACHINE GOD. I was having issues with the insane junk you accumulate causing my logistics storage to bottleneck. All my robots stopped and stuff timed out.

User avatar
DarkyPupu
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 04, 2017 4:46 pm
Contact:

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

Post by DarkyPupu »

Could there be a way to "repair" the machines without replacing them ? It would help a bit on hard settings servers especially as long as you don't have robots.
The only other option i found so far is to put insanely long ageing to compensate long research + headless always running server, but it may decrease the interest of the mod on the long run. Any ideas ?

+ the range for ageing is max 1000 -> Is there a real reason for that ? I would like to have way more as my server always run even if i'm not connected. Same reason as above, when you don't have roboports yet it's problematic. Currently with 4 x 1000 -> If you're away from your factory 2.8 days everything is destroyed :D

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 »

DarkyPupu wrote:Could there be a way to "repair" the machines without replacing them ? It would help a bit on hard settings servers especially as long as you don't have robots.
The only other option i found so far is to put insanely long ageing to compensate long research + headless always running server, but it may decrease the interest of the mod on the long run. Any ideas ?

+ the range for ageing is max 1000 -> Is there a real reason for that ? I would like to have way more as my server always run even if i'm not connected. Same reason as above, when you don't have roboports yet it's problematic. Currently with 4 x 1000 -> If you're away from your factory 2.8 days everything is destroyed :D
Well with the last update you can get the Angel's Logistics mod and have bot automation almost right at the beginning. It's possible to make machines "repairable" (reverse aging), but it would be kind of a big project to add. I'm still thinking of ways to maybe simplify the process, so it creates less of a logistics bottleneck. ie using some sort of universal component to refurbish old machines.

I'll change the max range to 100,000. Then it would take 280 days. :D

User avatar
DarkyPupu
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 04, 2017 4:46 pm
Contact:

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

Post by DarkyPupu »

If anything the max time limit increase would be enough for me (that was the game-breaker as i may be out of the game for small periods) :D
I sort of guessed the rest would be quite complicated to do...

Thanks !

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 »

UPDATE

1.2.3

- Steam generator aging now depends on use. Generators that work harder will age faster. Generators that are idle will age at the user-defined idle age rate.
- The max range for age time in settings increased to 100,000 minutes. (for people with servers that stay on)

Getting it to read power output on steam engines was a lot of coding for a small detail (since we can't just read the power output directly), but it was bugging me that I felt pressured to wait until the last minute when I need more power before plopping down more generators. Now you don't have to worry so much about wasting generators if you have more of them than you need.

foodfactorio
Filter Inserter
Filter Inserter
Posts: 454
Joined: Tue Jun 20, 2017 1:56 am
Contact:

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

Post by foodfactorio »

hi withers, i was reading most of the posts in this thread, and after a recent post where you were thinking about making things more automated, with some kind of universal item... i had an idea :)

what if every machine simply used an extra item slot (like when a fuel source is used), and if the game allows for that, you could have your Universal Solvent Maintenance Spray become an item that essentially Burns for a long time, and then the building just has it as an extra required item that inserters or robots can bring to it?
(of if easier, your Maintenance could simply maybe be a Maintenance Module? and if there is no maintenance module, it defaults to Negative numbers, like an increased Crafting Time in terms of speed, or an increase in Pollution)

i also like the idea of wear and tear, as not only is that something that all factories actually face, but also it is a good way to act as a resource sink for the later games where lots of resources are stored.
(in one of my games i had to set up a lot of cascading warehouses with a blue loaders, and fast belt feeding system, leading ultimately to an area for Compressing items) :)
had to stop at blue loaders mostly, because anything faster as a loader, caused lag.. a picture is here if you wanted to see)
viewtopic.php?f=97&t=34176&start=20#p294780

i guess the only thing that might make me pause a bit before using a mod like this, is the part about manual configs as am still learning how to modify files etc and would be worried about making a mistake, especially when i read some of the posts mentioning the buildings explode and shower the factory with parts? :D
(also me from the mod portal - im not dustine lol) = https://mods.factorio.com/mods/Dustine/ ... ssion/9108
my 1st Mod Idea :) viewtopic.php?f=33&t=50256

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 »

foodfactorio wrote:hi withers, i was reading most of the posts in this thread, and after a recent post where you were thinking about making things more automated, with some kind of universal item... i had an idea :)

what if every machine simply used an extra item slot (like when a fuel source is used), and if the game allows for that, you could have your Universal Solvent Maintenance Spray become an item that essentially Burns for a long time, and then the building just has it as an extra required item that inserters or robots can bring to it?
(of if easier, your Maintenance could simply maybe be a Maintenance Module? and if there is no maintenance module, it defaults to Negative numbers, like an increased Crafting Time in terms of speed, or an increase in Pollution)

i also like the idea of wear and tear, as not only is that something that all factories actually face, but also it is a good way to act as a resource sink for the later games where lots of resources are stored.
(in one of my games i had to set up a lot of cascading warehouses with a blue loaders, and fast belt feeding system, leading ultimately to an area for Compressing items) :)
had to stop at blue loaders mostly, because anything faster as a loader, caused lag.. a picture is here if you wanted to see)
viewtopic.php?f=97&t=34176&start=20#p294780

i guess the only thing that might make me pause a bit before using a mod like this, is the part about manual configs as am still learning how to modify files etc and would be worried about making a mistake, especially when i read some of the posts mentioning the buildings explode and shower the factory with parts? :D
Hi food. :D

I'm not sure an extra slot is possible. The entities are defined by the "type" which I believe is hard-coded in the game. (ie, you have type = generator, boiler, crafting_machine, etc). You can customize energy source, which would then make a slot for fuel if you specify coal, but there doesn't seem to be any flexibility in setting up a custom slot that's not fuel. I guess I could use the module slots and change it all to be based on modules, but that would be like re-inventing the whole mod and I don't want to go there.

I've been thinking more on how to simplify rebuilding. I think I've settled on a "refurbish" model, unlocked by tech. So after you get, say, automation-3, you get access to a refurbish machine. This would have a similar function as the "recyclers", it automatically detects old machines and sets it's own recipe. (so you only need one to handle ALL machine rebuilds) But instead of recycling all the ingredients, it builds a brand new machine out of the old one, but also requiring one or two additional ingredients, so there's still a resource sink.

This seems to be the solution in my own game I'm currently playing. Currently the biggest problem I face is managing and transferring the large variety of "junk" you get from recycling and rebuilding old machines. With "refurbishment", all the junk goes away and instead you just need one or two special items to turn old machines into new ones.

The biggest challenge for me now is to manage how to setup all the "refurbish" recipes. They need to be a function of how much resources went into the brand new machine. (if that makes any sense).

Thanks for the feedback. :D

foodfactorio
Filter Inserter
Filter Inserter
Posts: 454
Joined: Tue Jun 20, 2017 1:56 am
Contact:

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

Post by foodfactorio »

thanks withers for the info about the building slots and game, :)
maybe refurbishment is the way to go, (in terms of if you have an item, like a hard drive, usually the sheet metal casing never gets worn out, but the mechanical part inside it do wear out), or with a modem/router, a couple of components on a circuit board break, but the plastic housing and screws etc dont, so it is actually only some of the parts which need replacing/fixing, )

it could still be fun to have to manage the so called "junk" items though, like maybe have a mini junk sorting facility, that the player can set-up, to do high-level basic recycling, so that all junk is put into it, and it sorts metal and non metal parts, and the metal parts can be simply turned into metal plates again. (similar to the crysalisation process i think used in angels mod, which takes a type of item in, and has a percentage chance of making a particular item out....

in this case it could just be something as follows:
- takes in all Junk
- outputs (iron plate unit x 0.3) (copper plate x 0.2) (aluminium plate x 0.2) (gold plate x 0.1) & (plastic x 0.2)
(for example, at best, the process end up with outputs of 1 of each of these 5 items, with iron having the highest chance of a 20% chance for example...or the numbers could have a 1.x value too if better)

i best stop here as i havent actually tried the mod yet, and i may need some more time, though when i get some i will try and get all the new mods and older version (current) games, into my 0.15 version, to then try out the wear and tear mod with all my buildings and can let you know how it goes.
(also me from the mod portal - im not dustine lol) = https://mods.factorio.com/mods/Dustine/ ... ssion/9108
my 1st Mod Idea :) viewtopic.php?f=33&t=50256

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 »

NEW UPDATE

1.2.4

- Added Refurbishers (game changing tech which can refurbish old machines into new ones, automatically sets recipe to refurbish machines brought to it)
- Added Recycling and Refurbishing Technology
- Added Alien Goo which aliens drop as loot
- Added Alien Liquefied Goo and Universal Spare Parts
- Balanced Recycling recipes

This update fixes the main complaint I had about my own mod. That is the overwhelming complexity of trying to automate the recycling and re-crafting of potentially dozens of different kinds of machines. With the new refurbishing technology, the process is greatly simplified. You only need to set up one refurbisher (since it automatically adjusts it's own recipe) and only need to supply it with universal spare parts. The qty of spare parts needed is a function of how many resource go into a brand new machine.

The original goal of this mod was to present an interesting new "resource sink" to the game and a new challenging problem to overcome, while at the same time providing a way to solve this problem through automation. I feel like this latest update achieves this goal. :D

miturion
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Mon Aug 03, 2015 5:46 pm
Contact:

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

Post by miturion »

withers wrote:NEW UPDATE

1.2.4

- Added Refurbishers (game changing tech which can refurbish old machines into new ones, automatically sets recipe to refurbish machines brought to it)
- Added Recycling and Refurbishing Technology
- Added Alien Goo which aliens drop as loot
- Added Alien Liquefied Goo and Universal Spare Parts
- Balanced Recycling recipes

This update fixes the main complaint I had about my own mod. That is the overwhelming complexity of trying to automate the recycling and re-crafting of potentially dozens of different kinds of machines. With the new refurbishing technology, the process is greatly simplified. You only need to set up one refurbisher (since it automatically adjusts it's own recipe) and only need to supply it with universal spare parts. The qty of spare parts needed is a function of how many resource go into a brand new machine.

The original goal of this mod was to present an interesting new "resource sink" to the game and a new challenging problem to overcome, while at the same time providing a way to solve this problem through automation. I feel like this latest update achieves this goal. :D
This sounds likea good solution to me. Good work.

Wildejackson
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sun Jul 31, 2016 2:40 am
Contact:

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

Post by Wildejackson »

There's an issue with the current version (1.2.5) and Bio-Industries. Wear and Tear throws a stack overflow error during the plate recipe lookup phase (last logged recipe being looked up is crushed-stone from BI). Interestingly though the crash only occurs when angels refining is installed.

I believe it might be something to do with the fact that both mods have crushed stone or something along those lines. When only two of the three mods mentioned (Wear and Tear, Bio Industries and Angels Refining) are installed, the mod will boot fine. A fix is a little above my skill range so I'm not to sure of the actual cause. I've included the relevant crash-log as well.

https://pastebin.com/BwQkTWB7

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 »

miturion wrote:
This sounds likea good solution to me. Good work.
Thanks. :)
Wildejackson wrote:There's an issue with the current version (1.2.5) and Bio-Industries. Wear and Tear throws a stack overflow error during the plate recipe lookup phase (last logged recipe being looked up is crushed-stone from BI). Interestingly though the crash only occurs when angels refining is installed.

I believe it might be something to do with the fact that both mods have crushed stone or something along those lines. When only two of the three mods mentioned (Wear and Tear, Bio Industries and Angels Refining) are installed, the mod will boot fine. A fix is a little above my skill range so I'm not to sure of the actual cause. I've included the relevant crash-log as well.

https://pastebin.com/BwQkTWB7
Fixed it. Thanks for the report.

Post Reply

Return to “Mods”