Factorio

Factorio

View Stats:
JustSmile Nov 7, 2024 @ 1:51pm
Parametrised blueprint mat selection formula
I need a tip on what formula to use to parametrise requested mat amounts for a requester chest tied to an assembler's recipe to emulate vanilla behaviour when copying the recipe onto one; that behaviour being chest requesting enough for multiple crafts with short craft time and enough for one with long craft times.

Using (1/(p0_t/30))p0_i1 gets me close enough for most cases, but when using it for something like an Mk3 module it'll request 0 of some materials since it divides 1 by 2 and rounds down.

If I go up enough for a 60s recipe to request enough for one craft, some expensive recipes get TOO requesty.

Essentially, what I want is for the recipe to request (1/(p0_t/30))p0_i1 OR just p0_i1, depending on which one is larger - but I don't know if it's possible to express in a notation Factorio parametrisation UI will be able to parse.

This is the current design:
0eNrFl9uOmzAQhl8l8tWuBLuclyD1HareVivEwSRWjc3aJmoU8e4dQ6A0Qd5CpeYObM/3D/bPDFxQTlvcCMIUSi6IFJxJlHy/IEkOLKN6jGU1RgnKpMR1Tgk72HVWHAnDto86CxFW4p8ocbt3C2GmiCJ4IPQ355S1dY4FLLCMJAs1XEIwZ1oTgHb8ElroDBfOSwg6Ahek0eFNJoCjsLAdNA6nH21GQQ2mGRc1JN5Zdxl4UwYSVlCbZnVj0HVBdoHiT5S8pT9swiQWkMwCaG8GBX8NepuBLFQSeOZhOl7AhhO2gY0mJ2w3gp9ICftVHLFUhkS95USjiSjwRwsIA+pthrLG9WlFKARJvUgOuQ8WGb1joWnFH6PTg4wn7oLk3VFbqOC1XqM4ZIu+9AOtNrSrn+aK8xZw3jqcN8P5Czh/Hc6f4YIFXLAOF8xw4QIuXIcLZ7hoARetw0Xdu64QSmTymDKu0tFLJUqUaPHMLILXad5WVe8HPdf1kYReC8ut51xnqBNwPL+NWkFZKW0oZ4WAdPtycGf7bWHxtrAxS3ebnLtNztmk5mwTczcdwLYN2bgf2w7bGAXenN6KwaDq3DcqUqIp7FvfpnYSU6h/XBd5mL3tZdfXSbPLKYvP37G+Zs81b9DuP6B1fz8IXBLoCTavblL+RNh7lLD/KOHgUcLho4Sj/yF8/RKxxosEaU9XwG1pBndP7utT46Tq1Xeen+GC6OkSNxjal24+fRMx4TwzzluJ8804fyUuMOOClbjQjAtX4iIzLlrAQckkCtf603f6+7AQzXIMfxzo62ACQSQudzlXu+sPQy97giLbOyyMvH2w34eB78exG3fdL2PHNLc=
Last edited by JustSmile; Nov 7, 2024 @ 1:54pm
< >
Showing 1-4 of 4 comments
JustSmile Nov 8, 2024 @ 7:38am 
How? I don't see a way to feed the selector(or any other combinator for that matter) values such as recipe crafting time or each ingredient's amount from blueprint parameters.
JustSmile Nov 8, 2024 @ 7:54am 
With that said, I figured the issue out. Will leave it here for posterity - the formula is
max((1/(p0_t/20))p0_i1,p0_i1)
with variables and exact numbers adjusted to need.
scaarab Nov 8, 2024 @ 8:24am 
Ohh~ U can do it that way too~ Nice~ I just use multiplication machine and set it as M for multiplication and then set it as a variable. When I plomp it down I get a prompt for the recipe and a multiplier for the request~
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Nov 7, 2024 @ 1:51pm
Posts: 4