recipe with item durability?

Place to get help with not working mods / modding interface.
Pzyckoh
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Oct 13, 2017 2:48 pm
Contact:

recipe with item durability?

Post by Pzyckoh »

I was wondering if it was possible to use up an amount of charge/health/durability on a craft cycle.
similar to how ammo is used on shooting.
for example:
{
{"bobbin-thread", 0.1},
{"cloth",5}
}

would make one item. but the bobbin would remain in the machine just with 10% less durability and is destroyed upon reaching 0%
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: recipe with item durability?

Post by eradicator »

I don't think you can use durability like that. You could however use probability instead which would statistically - over the long run - have the same effect.

{type = "item", name = "bobbin-thread", probability = 0.1}
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Modding help”