Recursive manufacturing

Discussions about modding and share your mods with other players in this forum.
Post Reply
saffgee
Mod Expert
Mod Expert
Posts: 302
Joined: Sat Jan 28, 2017 2:28 pm

Recursive manufacturing

Post by saffgee »

I have encountered some problems with the mod I've been building. Essentially the errors I keep encountering are flagged as follows: <Product A> has recursive linkages - the input item is linked back to the parent in some way.

I just want to clarify what this means exactly. For example, would these be valid chains ?

Process1
1x Intermediate chemicals = 3x Oil

Process2
1x Polypropylene = 2xIntermediate Chems + 1xMinerals (A natural resource)

Process3
1xPlastic bottle = 2x Polypropylene

If these are ok, at what point do the products become recursive ?
Example, if I tried to use the following additional chain, would this be recursive ?
Process 4
1xDetergent = 1xIntermediate Chems + 1xPlasbott

or would it only be recursive if process 3 read as follows instead ?
1xPlastic bottle = 2x Polypropylene + 1xDetergent
thus creating a sort of endless recursive loop in the sense that now a plastic bottle can only be created using a plastic bottle.

The reason I ask is because the complexity of production is the whole point of my mod and the proliferation of plastic is a key part of that and currently (I might be wrong) it feels like version 1 above is being flagged as recursive which I don't think it is. Using the process examples above, you could of course ultimately say this instead:
1x Detergent = 3xOil + 1xMinerals
but I find that version far less satisfying and I'd like to use chems and plastics to bridge those production logic gaps (its kind of the whole reason for calling the mod "Modern" World).

Can you shed some light on how this is currently implemented and what the check is for recursiveness ?
User avatar
David
Community and Marketing Manager at Enlight
Posts: 9414
Joined: Sat Jul 03, 2010 1:42 pm
Has thanked: 13 times
Been thanked: 35 times

Re: Recursive manufacturing

Post by David »

Our programmer has traced it and identified the following problem:

bleach requires plastic bottles

plastic bottles require labels

labels require paper

BUT paper requires bleach again, forming a infinite recursive loop.
saffgee
Mod Expert
Mod Expert
Posts: 302
Joined: Sat Jan 28, 2017 2:28 pm

Re: Recursive manufacturing

Post by saffgee »

Yes I found that one, thanks. I think the problem is there are quite a few more ;) I'll make some changes and build a checking programme that allows me to ensure that won't happen again.

Your answer pretty much confirmed that it's only the infinite loops that get flagged, which should help me track down the offenders quite easily now. My worry was that some of the other very complex chains were also (false) flagging.
saffgee
Mod Expert
Mod Expert
Posts: 302
Joined: Sat Jan 28, 2017 2:28 pm

Re: Recursive manufacturing

Post by saffgee »

I'm stuck again - I've sent you a PM. Something is not error flagging correctly unless I am going mad (which is admittedly possible...).
Post Reply