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

Topics and discussion about specific mods
Post Reply
User avatar
withers
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Apr 08, 2016 4:54 pm
Contact:

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

Post by withers »

3d_rusty_metal_text_effect.png
3d_rusty_metal_text_effect.png (454.67 KiB) Viewed 15237 times
DESCRIPTION: A hardcore mod which adds wear and tear mechanics to the game, along with automation for replacement, recycling and refurbishment of old machines. Plus a whole lot more....
  • Assembling machines, drills, refineries, pumpjacks, chemical plants, solar panels, steam engines and electric furnaces all age and degrade over time
  • Replacement of old machines can be automated with your construction bots
  • Old machines can be recycled and refurbished.
  • Recyclers and refurbishers have adaptive recipe setting to automatically recycle whatever old machines are brought to it.
  • Increases difficulty and challenge. Your factories must produce replacement parts in addition to everything else.
  • Now includes inhibitor toxin. Inhibit's evolution. When you loot enemies, choose either to make universal replacement parts, or inhibitor toxin.
  • Lots of configuration options.
License: CC-by-NC-ND-4.0
Version: 1.2.4
Release: 2017-02-25
Tested-With-Factorio-Version: 0.15.x
Category: game mechanics, balancing
Tags:
Download-Url: https://mods.factorio.com/mods/withers/WearAndTear
Website: NA
License: https://creativecommons.org/licenses/by-nc-nd/4.0/
Long description

Screen shots
Compatibility and Recommendations
To Do
Version history
Last edited by withers on Fri Sep 22, 2017 4:54 am, edited 42 times in total.

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

Re: [MOD 0.14.x] Wear and Tear

Post by withers »

UPDATE
UPDATED DEMO SAVE-GAME (attached to this post) SHOWCASING THE AUTOMATION of replacing old equipment

This demo is with vanilla factorio and Wear and Tear v1.2.1 installed.
20170627181548_1.jpg
20170627181548_1.jpg (811.39 KiB) Viewed 13449 times
When equipment that is within the orange logistics zone gets old, bots will automatically remove and replace with new machines
20170627181602_1.jpg
20170627181602_1.jpg (741.08 KiB) Viewed 13449 times
The sole purpose of this facility is to make replacement machines. Old machines are brought by the bots to the recycler, which automatically self-adjusts it's recipe to recycle whatever is brought to it.
20170627181740_1.jpg
20170627181740_1.jpg (796.77 KiB) Viewed 13449 times
The fuel station makes solid fuel and petroleum for the main base. But machines at the fuel station also age. Replacement machines for these are brought in by rail and automatically replaced by the bots at this location as well.
Attachments
test.zip
(5.46 MiB) Downloaded 178 times
Last edited by withers on Wed Jun 28, 2017 5:08 am, edited 3 times in total.

User avatar
ZombieMooose
Filter Inserter
Filter Inserter
Posts: 289
Joined: Mon Feb 09, 2015 7:23 am
Contact:

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by ZombieMooose »

Get the following error with angels petrochem

13.406 Error Util.cpp:57: Error while loading recipe prototype "Recycle Old_heavy-pump" (recipe): Recipe Recycle Old_heavy-pump must have at least one product.
Modifications: WearAndTear › angelspetrochem
Last edited by ZombieMooose on Mon Apr 03, 2017 3:13 am, edited 1 time in total.
"men will literally learn everything about ancient Rome instead of going to therapy"

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

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by withers »

diongham wrote:Get the following error with angels petrochem

13.406 Error Util.cpp:57: Error while loading recipe prototype "Recycle Old_heavy-pump" (recipe): Recipe Recycle Old_heavy-pump must have at least one product.
Modifications: WearAndTear › angelspetrochem
Should be fixed now.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by Earendel »

I love the concept of this mod. I think it's something that the game should really have for balance reasons, however the things that I think are most in need of ongoing maintenance mechanics are Solar Panels and active Logistic Robots.

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

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by withers »

Earendel wrote:I love the concept of this mod. I think it's something that the game should really have for balance reasons, however the things that I think are most in need of ongoing maintenance mechanics are Solar Panels and active Logistic Robots.
Thanks for the feedback!

I could extend the functionality to solar panels easily enough. Logistics robots should be doable as well, but would take a little more work.

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

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by withers »

Update:

Version 1.0.7

- Optimized code for significant performance improvement, especially on large factories.
- Extended wear and tear mechanics to solar panels and steam engines.
- You can now configure which machines age in the config file.
- There's now a chance that Dilapidated machines left running for too long will explode. This can be toggled off in the config settings.


Stuff I'm still looking at possibly adding:

- extend wear and tear mechanics to include even more machines. (logistic bots, electric furnaces, etc)
- GUI to get a list of all your machines and their status.
- Address minor issue of "raw ingredients" getting confused by the recycle recipes.
- Better durability for higher-grade materials. (e.g. Bob's tier 4 machines last longer)

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by Earendel »

I had an idea for how to run logistic robot failure.

On a set interval (maybe a randomised interval):
Get the number of active logistic robots.
Calculate the chance or number of logictic robot failures based on number active.
Scan roboports and run the 'robot failure actions' on inactive robots.
If insufficient inactive robots are found then find active robots and run the 'robot failure actions' on them (dropping the carried item?)

The robot failure actions could be downgrading the robot to a Dilapidated one, but for simplicity I think it would be better to just delete it so circuit conditions can make a replacement.

The thing that I really like about Wear and Tear on Logistic robots is that it would promote robot use for high value low quantity jobs, and make things robo stations and like botbases less competitive.

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

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by withers »

Earendel wrote:I had an idea for how to run logistic robot failure.

On a set interval (maybe a randomised interval):
Get the number of active logistic robots.
Calculate the chance or number of logictic robot failures based on number active.
Scan roboports and run the 'robot failure actions' on inactive robots.
If insufficient inactive robots are found then find active robots and run the 'robot failure actions' on them (dropping the carried item?)

The robot failure actions could be downgrading the robot to a Dilapidated one, but for simplicity I think it would be better to just delete it so circuit conditions can make a replacement.

The thing that I really like about Wear and Tear on Logistic robots is that it would promote robot use for high value low quantity jobs, and make things robo stations and like botbases less competitive.

I like this idea. Of course time needs to be a factor in the equation so well. So using lots of bots over an extended time results in failures. The decision loop would be: If your base is poor, use belts and inserters to not worry about breakdowns. Use bots as convenience on low quantity jobs. If your base is wealthy and has lots of replacement parts, use bots as much as you can afford.

EDIT: Looks like automation of replacing bots is already possible in the vanilla game, since you can read bot statistics into the circuit network. So the above is all that would need to be added. I'll put this on my todo list.

kyoj
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Mar 10, 2017 8:58 pm
Contact:

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by kyoj »

could you add to the config to turn off pick up ageing the equipment.
I specifically like to build super compact designs and it requires a lot of picking up and putting down.

I think I just need to delete the lines below...
"
if change_mining_r == true then
data.raw[type][entity_name].minable.result = m_result -- if you remove it, it becomes aging
data.raw[type][entity_name].minable.mining_time = 8 -- increase mining the time to reflect the seriousness of this action
"
and
"
aging_entity.minable.result = m_result -- if you remove it, it becomes old
"

Also I think this is where I can change the idle wear speed here
"
function weartear.addwear(entry, i)
entry.age = entry.age + .25
if entry.entity.type == "solar-panel" then entry.age = entry.age + .25 end -- I like to punish solar panel users...
"

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

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by withers »

kyoj wrote:could you add to the config to turn off pick up ageing the equipment.
I specifically like to build super compact designs and it requires a lot of picking up and putting down.

I think I just need to delete the lines below...
"
if change_mining_r == true then
data.raw[type][entity_name].minable.result = m_result -- if you remove it, it becomes aging
data.raw[type][entity_name].minable.mining_time = 8 -- increase mining the time to reflect the seriousness of this action
"
and
"
aging_entity.minable.result = m_result -- if you remove it, it becomes old
"

Also I think this is where I can change the idle wear speed here
"
function weartear.addwear(entry, i)
entry.age = entry.age + .25
if entry.entity.type == "solar-panel" then entry.age = entry.age + .25 end -- I like to punish solar panel users...
"

It just so happens I've been working on changing this for the next release. The current system of advancing equipment to the next stage of aging when you pick it up was to prevent exploits, where people might continuously remove equipment to restore it's age back to zero.

Under the new system, equipment that is removed from the ground does not age at all but instead takes "damage" that is calculated from it's current age. Since you cannot repair an item while it's in an inventory stack, this damage/age is saved and cannot be altered until you place the item back on the ground. When you place the item back on the ground, the damage is converted back to age again. you will have to heal that damage it this point, but that seems preferable to getting penalized with excessive "wear and tear" every time you move stuff around.

Note any real damage, from biters and such, will be added on top of this, so it's best to repair your equipment before moving, or suffer wear/tear penalties.

Should be getting this release out soon....

EDIT: It's just been changed. See change log. Lots of other juicy new stuff too....

EDIT2: Yes the piece of code you found is where you could change the idle wear/tear speed. It's better to just change it in the config file, but if you want to modify the idle speed relative to non-idle speeds, the the section you found it the right place to do it.

kyoj
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Mar 10, 2017 8:58 pm
Contact:

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by kyoj »

Perfect, I like the change. you got a great mod

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

Re: [MOD 0.14.x] Wear and Tear (now with full automation)

Post by withers »

Now it doesn't cause damage either. :)

No ill effects from moving stuff around whatsoever. It just saves the age information on the item.

wahming
Fast Inserter
Fast Inserter
Posts: 190
Joined: Sun May 17, 2015 8:30 pm
Contact:

Re: [MOD 0.14.x] Wear and Tear (plus automated maintenance)

Post by wahming »

Interesting concept. But -

Image

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

Re: [MOD 0.14.x] Wear and Tear (plus automated maintenance)

Post by withers »

wahming wrote:Interesting concept. But -

Image
Only thing I can think of is you removed an item before the game had a chance to register aging on the item after changing the settings or installing the mod on an old save.

I just uploaded a patch. Try it now.

User avatar
Light
Filter Inserter
Filter Inserter
Posts: 678
Joined: Mon Oct 10, 2016 6:19 pm
Contact:

Re: [MOD 0.14.x] Wear and Tear (plus automated maintenance)

Post by Light »

This mod has certainly come a long way.

Since you've added restoration fluid, I'm wondering if you'd look into a more simplified option of restoration. Where with a config option, you can change the recipes to instead of giving back half of the intermediates, it would instead give you a new machine at the cost of a great deal of restoration fluid instead.

When putting this mod to the test, a lot of varied intermediates were spit out of the restoration area and caused a major logistics mess. This is what prompted me to think "What if I could just repair the machine by having the recipe be the old machine + restoration fluid for a newly repaired machine instead." Which would have eliminated the hundreds of intermediates clogging the system, at the cost of a lot of restoration fluid and maybe repair packs to compensate.

I'm unsure how you'd go about calculating the amount of restoration fluid per machine, how to balance the tiers (time or better fluids/repair packs?), or if it's even easy to do in the first place, but it would be nice to have this sort of simplified system as an option.

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

Re: [MOD 0.14.x] Wear and Tear (plus automated maintenance)

Post by withers »

Light wrote:This mod has certainly come a long way.

Since you've added restoration fluid, I'm wondering if you'd look into a more simplified option of restoration. Where with a config option, you can change the recipes to instead of giving back half of the intermediates, it would instead give you a new machine at the cost of a great deal of restoration fluid instead.

When putting this mod to the test, a lot of varied intermediates were spit out of the restoration area and caused a major logistics mess. This is what prompted me to think "What if I could just repair the machine by having the recipe be the old machine + restoration fluid for a newly repaired machine instead." Which would have eliminated the hundreds of intermediates clogging the system, at the cost of a lot of restoration fluid and maybe repair packs to compensate.

I'm unsure how you'd go about calculating the amount of restoration fluid per machine, how to balance the tiers (time or better fluids/repair packs?), or if it's even easy to do in the first place, but it would be nice to have this sort of simplified system as an option.
Yeah I could do something like that. Probably not use the fluid for that though. I'm thinking some sort of universal replacement part. Maybe old machines could also be disassembled for parts. I'll give it some thought.

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

Re: [MOD 0.14.x] Wear and Tear (plus automated maintenance)

Post by Coffee Daemon »

Having issues running bobs + angels (and a few others) where the bots replace the machines fine, but do not replace the recipe. Using the angels early bots, if that makes a difference.

Mod list:
Alien Biomes
Angel's Addons - Ore Silos
Angel's Addons - Warehouses
Angel's Bio Processing
Angel's Components and Tech [BETA]
Angel's Exploration (BETA)
Angel's Infinite Ores
Angel's Logistics (Beta)
Belt sorter
Big Brother
Bob's Adjustable Inserters
Bob's Assembling machines
Bob's Electronics
Bob's Enemies
Bob's Functions Library mod
Bob's Greenhouse mod
Bob's Logistics mod
Bob's Metals, Chemicals and Intermediate
Bob's Mining
Bob's Modules
Bob's Ores
Bob's Power
Bob's Revamp mod
Bob's Tech
Bob's Vehicle Equipment
Bob's Warfare
Bottleneck
Bottleneck Logistics
Clock
Crafting Speed Research
Explosive Termites
Factorissimo2
Honk
Item Count
Laser beam turrets
Long Reach Research
More_Floors
Moweather
Orbital Ion Cannon
Power Armor MK3
Power Armor MK 4
Precious, precious caffeine
Resource Spawner Overhaul
Score Extended (new rocket score window)
Space Extension Mod
Squeak Through
Stone Water Well
Swarm
Upgrade Builder and Planner
Useful Space industry
Water Fix
Wear and Tear
What is it really used for?
Yet Another Resource Monitor Fork
radarplus for rso
Holy I didnt realise there were so many.

Prime suspects for possible mod conflicts are:
Upgrade builder and Planner
Bottleneck (I've seen biters attacking the bottleneck symbol instead of the actual assembler before, wtf)

Will get a save just before a building gets damaged and try toggling these off.

If you have any ideas or need any more info just ask, cause I LOVE THIS MOD.

User avatar
ZombieMooose
Filter Inserter
Filter Inserter
Posts: 289
Joined: Mon Feb 09, 2015 7:23 am
Contact:

Re: [MOD 0.14.x] Wear and Tear (plus automated maintenance)

Post by ZombieMooose »

Sorry i can't find a forum post about 10x Harder.

I found a potential conflict with your 10x Harder mod with AAI Industries. Machinery doesn't seem to apply on entities affected by motors; in fact it when both are installed it seems to be random which items get what. I tested with creative mode and Bob's+Angel's (don't have a mod list right now).

Also i have a request for the mod, can you turn the config file into settings so we can change the mod in game?

Cheers.
"men will literally learn everything about ancient Rome instead of going to therapy"

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

Re: [MOD 0.14.x] Wear and Tear (plus automated maintenance)

Post by Coffee Daemon »

Ok, update.

The mods I listed as what I thought might be an issue were not, and I tested on a vanilla game to see and yes even on vanilla it refuses to replace recipes.

Post Reply

Return to “Mods”