Schall Uncraft


Revert a product back to its ingredients. Designed for recycling unused items. (Locale: English, Deutsch, 正體中文, 简体中文, Русский, Português Brasileiro)

Utilities
3 years ago
0.16 - 1.1
4.09K
Manufacturing

g [Solved] Duplication

5 years ago

I haven't tested the mod, but if you craft iron gear wheels, in an assembler with production modules, and de-craft it repeatedly, do you get free iron out of it? If so it might be game breaking

5 years ago

Hmm, right. The problem is there won't be any tag stating an item is made with production modules (or whether with +16%, +24%, +40% or whatever) or not... I can think of the following solutions:
Solution 1: Return only 1/(1+40%)=0.7143=71% of ingredients. The problem is if an user uncraft a single burner inserter, what should I return? 0.71 iron plate and 0.71 iron gear wheel? Should I round it? Ceiling? Or floor? Another problem is with other mods or future versions. Some mods have something like productivity module 4 or extra module slots. Should I put the return ratio to a even lower one, to avoid exploit?
Solution 2: One may say burner inserter cannot benefit from productivity modules. Okay, only limit those to intermediate products... Separating intermediate products from ordinary products makes the code a bit more complicated, but totally doable. Still suffer from the same rounding problem, and max productivity bonus problem.
Solution 3: An option allowing the player or host (in MP game) to set the return percentage. Maybe the most flexible option? But still suffer from the rounding problem when uncrafting single item. In single player game, players who want to exploit will just set to the 100% or max setting anyway. (Or they could exploit better and faster with other mods...) In MP server, the host decides the setting and choice of mods, so not a problem though.
Anyway, it is not entirely free, since the cycle uses some energy, and time of players to do this kind of clicking instead of time to ramp up their production. If this is game breaking, then productivity modules that create extra products are equally game breaking as well. I am not sure what I can do to it...

If just for concern of MP game, solution 3 could be the most effective one. But still how should I deal with the rounding/ceiling/flooring problem when uncrafting small quantity items?

5 years ago

I have 3 solution ideas:

1) (vanilla only) Uncrafting a non-intermediate product returns 50% of its cost. You can't get more than 50% productivity on vanilla I think, and putting a penalty on uncrafting non-intermediate products isn't that important since uncrafting them is not really interesting or useful.
2) Uncrafting an item costs something. Like a fluid for example, so the "duplicating" won't be beneficial anymore.
3) Make decrafting possible only on intermediate products, as mentioned before, they're the ones that are more interesting to uncraft.

Or just leave it as it is and let the player decide whether or not he wants to exploit this. I think it is the right thing to do.

(ps: I didn't install the mod yet, but can you uncraft in an assembler? if not, the process would not be automatic and as you said it wastes time. So a fix wouldn't be necessary imo)

5 years ago

Another solutions just pop up in mind...
Solution 4: Needs some fixed "consumption" for each uncraft. But it cannot be too much, since my very first motivation of this mod is to get rid of burner inserters (which are only 3 iron plates in total each). But if player want to exploit this for expensive things, say rocket control unit...
Solution 5: Scale the "consumption" up with more expensive recipes. But how to determine how "expensive" of each recipe? Using some manual "cost" for each possible ingredient to calculate?

As you can see, there are many ways to deal with duplication, but each of them creates other problems as well... I decided not to include these considerations in the first versions, to keep my code short (128 lines with lots of spaces, comments and lazy seperate function for each hotkey...) and UPS-friendly. But I am open-minded to whatever improvements are necessary. Please let me know what you have in mind.

5 years ago

Since your main goal is to get rid of the burner inserters, allowing uncrafting on intermediate products only would be the best solution. Or just leave it as it is and as I said let the player decide whether he wants to exploit or not.

5 years ago

Ah, didn't see your reply when I was typing... Let me summary up.
The uncrafting is done by hand. So no assemblers are involved. So cannot use fluid as "cost". BTW, your point 2) is my solution 4 and 5.
1) is like my solution 2, separating intermediate products from ordinary products.
3) Make uncraft only possible on intermediate products? Do you mean the opposite? Since my prime motivation of this mod is to get rid of useless products like burner inserters, stone furnaces, etc...

5 years ago

OK, maybe I will add a option to set the return percentage of intermediate products, so it would be good for MP games.

PS: Burner inserters are not intermediate products, as they can be place, right?

5 years ago

Yes, I meant the opposite, lol sorry i'm a bit tired xd, burner inserters aren't intermediate products.
imo the best would be leaving as it is because it's only duplicatable by hand, it's just a waste of time and effort for a few plates that would only matter in the early game, and duplicating is not possible early game.

5 years ago

LOL
Thanks for your posts and replies, since you let me know of potential exploits.
Glad to know it is not a really useful exploit. ;-)

5 years ago

np ;p

3 years ago

In recent release 0.17.3 / 0.18.2, I have added the option to set probabilistic lost on uncraft.
It should be good for your use case.

New response