Looping recipes

Place to get help with not working mods / modding interface.
Post Reply
MrDrummer
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sat Nov 22, 2014 2:51 pm
Contact:

Looping recipes

Post by MrDrummer »

So I am making a tiny mod that simply adds a new item that represents 10x raw logs (so it compresses it) However, I have hit a snag.

The recipes work and all, but when I have the new item in my inventory, because I have it a reversible recipe (so 10x raw logs = log stack, and 1 log stack = 10 raw logs) it simply uses the logstack to raw log recipe to recreate itself.

It is hard to explain, but I need a way to stop it from uncrafting then recrafting when you are trying to make a fresh craft.

I shall provide the mod so you should see what i mean :)

Is there a tag that i need to add to the recipe or is it something that i could just make private to assemblers? (which i don't want to do really)


Mod:
https://www.dropbox.com/s/e5b5suc1zk6ej ... 0.zip?dl=0

Just give yourself a bunch of logs, craft the stack of logs and then you shall see that the same quantity of logs just crafted appear.

If you have more standard logs with the stack of logs already in the inventory, it will basically uncraft the current stacks of logs into logs then recraft those with the new logs into new stacks instead of just adding on.


Edit: updated dropbox link (i forgot to zip it)
Last edited by MrDrummer on Tue Oct 13, 2015 7:11 pm, edited 1 time in total.

MrDrummer
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sat Nov 22, 2014 2:51 pm
Contact:

Re: Looping recipes

Post by MrDrummer »

This is still an issue, however i have temporarily fixed it by requiring the conversion between stack of logs to 10x raw log to be made in an assembly machine, meaning it cannot be made on the player. Not ideal but it shall have to do until an alternative rises.

Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: Looping recipes

Post by Zeblote »

A bit off topic, but won't this allow you to make infinite wood with productivity modules?

UberWaffe
Fast Inserter
Fast Inserter
Posts: 202
Joined: Mon May 04, 2015 4:53 am
Contact:

Re: Looping recipes

Post by UberWaffe »

@Zeblote: Only if the recipes are added as 'allowed' to productivity modules. Which will not be the case by default (i.e. it would have to be done intentionally).

MrDrummer
Fast Inserter
Fast Inserter
Posts: 131
Joined: Sat Nov 22, 2014 2:51 pm
Contact:

Re: Looping recipes

Post by MrDrummer »

I understand you point though. The idea of it being reversible is so you can still use the wood for its intended purpose, but the stacking is only there for bulk storage. I am able to store 10 steel chests worth of logs in one steel chest (10 logs = 1 stack of logs)

I have now released this mod, and as i mentioned with a temporary fix for requiring it to be uncrafted in an assembler.

Click me for the mod

Post Reply

Return to “Modding help”