Tool "Durability" needs more flexibility

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Tool "Durability" needs more flexibility

Post by adamwong246 »

TL;DR
https://wiki.factorio.com/Prototype/Tool#durability
1) The Prototype "Tool" has a field "durability". It should support "reverse-durability".
2) Recipes do not allow you to create a Tool with a non-maximum durability.
What ?
1) The Tool prototype has a field "durability" which defines the maximum use you derive from the item. With use, this durability progresses from a maximum to zero, at which the item is destroyed. I need to model the opposite of this- a case where the item can be used until it's "durability" is exhausted, where it simply because useless, rather than being destroyed.
2) Recipes should allow you to take 2 units and combine them into a single unit with a combined "durability".
Why ?
There is a need to measure concepts like "potency" or "concentration" while still supporting infinite research and without incurring UPS loss.

I wish to create a mod that adds "Anti-Science"- the production of science packs also produce tons of useless toxic waste. These Anti-Science Packs waste emit pollution and can really only be dealt with in a few ways
- Sequester it forever
- Release it as pollution
- Refine it into more potent forms which are just as toxic but easier to handle, then sequester it (or launch it into space!)

It's the nature of the mod that the garbage piles up. That's the challenge but at length, endless amounts of Toxic Waste units is going to affect performance. The obvious solution is to make a recipe that turns 100 Toxic Wastes into 1 Extra Toxic Waste, and then another recipe for Extra EXTRA Toxic Waste ad infinitum. But this solution does not scale either- infinite research can only scale machines buffs, not unlock recipes and items.

My solution is a "Garbage Compressor" which takes 2 wastes and compresses them into a single waste unit, with a combined "pollution capacity" of the 2 inputs. Thus the amount of "pollution-potential" in each waste is conserved- the new waste item has as much waste potential as the 2 inputs combined. Infinite (or nearly) amounts of waste can be smushed into one increasingly toxic katamari and infinite research makes this process faster and more efficient.

The "durability" field nearly supports this "pollution capacity" case. However, 2 problems
1) Tools with exhausted durability disappear. I need the tool to remain.
2) Recipes do not support the adding of durabilities. Every item created has max durability.

"Durability" is not quite the right word for this concept. Perhaps a better word is "capacity" or "usefulness".

If I am missing an obvious solution to this problem, please let me know. A solution needs to UPS friendly and support true infinite research ( so no Mark1 Toxic Waste, Mark2 Toxic Waste, ... etc)

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: Tool "Durability" needs more flexibility

Post by adamwong246 »

Once more thing- this could be handled with mods, by tracking the "potency" of waste "outside" the system.
http://afforess.github.io/Factorio-Stdl ... ntity.html

Problems with this solution:
- harder to implement.
- the "durability" field is evident on the item icon. Manually tracking "potency" would require me to make an entirely new GUI element.

Koub
Global Moderator
Global Moderator
Posts: 7231
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Tool "Durability" needs more flexibility

Post by Koub »

[Koub] Moved to modding interface requests.
Koub - Please consider English is not my native language.

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: Tool "Durability" needs more flexibility

Post by adamwong246 »

For anyone arriving here late, Tool "durability" is not the best way to model "potency."

The correct approach is to use EntityWithTags to create an item which represents many items as a number. Please refer to the https://mods.factorio.com/mod/deep-storage-unit for an example of how to compress many items into a singular unit.

For my purposes, this thread may be closed.

Post Reply

Return to “Modding interface requests”