Recipe behavior [kovarex]

This subforum contains all the issues which we already resolved.
YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Recipe behavior [kovarex]

Post by YuokiTani »

Image

right assembly should have same inputs as left - only should switch lubricant to water in recipe
fluid recipes
assembly input and outputs
and no - random behavoir counts not as feature ... in my opinion
User avatar
Gandalf
Filter Inserter
Filter Inserter
Posts: 294
Joined: Fri Dec 19, 2014 10:15 pm
Contact:

Re: Recipe behavior

Post by Gandalf »

Mind sharing what this is all about? I've never seen that, looks like a mod...
OS: Linux Mint 19 x64 | desktop: Awesome 4.2  |  Intel Core i5 8600k  |  16GB DDR4  |  NVidia GTX 1050 Ti (driver version: 410.104)    (2019-03)
YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Recipe behavior

Post by YuokiTani »

yes it's for a mod, but same recipes with minor differences should work equal.
it's nearly same as the refinery switches randomly input (water, oil) with advanced refining. maybe later would be added a different fluid-source then flips input random, and you can't be sure is water-input always left or right.

sure i can simply drop the recipe complete, if i use a different recipe (original) then a harder to solve error turns up.
if you would also make a mod, you need to trust that b comes after a ... and z is last and not third or at random position.

i assume thats no time for solve this problems, but i don't understand (i do not even) why game-internal fluid-inputs and fluids shifted around and not stay in a sorted array/object-list.

apart that it's possible to solve or not - i think most modders live with these obscures and code around or avoid them. for me thats the way to abstract and illogical solutions.
Nemoricus
Filter Inserter
Filter Inserter
Posts: 300
Joined: Mon Jan 19, 2015 7:48 am

Re: Recipe behavior

Post by Nemoricus »

I wonder if the best solution might not be to have input pipes be agnostic about what inputs they actually want. IE, refineries using advanced processing don't ask for water in one specific pipe, oil in the other. They just request oil and water and let you decide which input to hook them up to.
YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Recipe behavior

Post by YuokiTani »

Nemoricus wrote:I wonder if the best solution might not be to have input pipes be agnostic about what inputs they actually want. IE, refineries using advanced processing don't ask for water in one specific pipe, oil in the other. They just request oil and water and let you decide which input to hook them up to.
if you have 1 recipe no problem because its always the same. if you have 2 then go things random.
I guess not, if you i request 3 different fluids.

ok maybe i'am to exactly - at the end the vanilla-game has not this problems - who cares about mods.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Recipe behavior

Post by kovarex »

YuokiTani wrote:it's nearly same as the refinery switches randomly input (water, oil) with advanced refining. maybe later would be added a different fluid-source then flips input random, and you can't be sure is water-input always left or right.
Really? I'm not aware of that, I just tried it, and it seems to never switch.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Recipe behavior

Post by kovarex »

Nemoricus wrote:I wonder if the best solution might not be to have input pipes be agnostic about what inputs they actually want. IE, refineries using advanced processing don't ask for water in one specific pipe, oil in the other. They just request oil and water and let you decide which input to hook them up to.
Not really. Am I missing something here? When you let the water go to the oil pipe, it just never gets in.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Recipe behavior

Post by kovarex »

But .. I found one strange thing that might have randomized the order in some special cases. I made a change, that the order of the individual fluid boxes is preserved from the lua.

Could you give me working version of the mod so I could test it on it?
YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Recipe behavior

Post by YuokiTani »

sure, place the gearbox and set the recipe, after setting switch recipes ... inputs should be the same (water/lubricant left/right) but it changes wrong.
i would drop water but because i can't output in first order, i can't access output from lua in array[1] ... this crashs game because output not found that's also wrong because 1 output is always there only the input was removed (water).
i noticed it should be fixed but i think it's not after testing.

i prefer a clear rule, maybe outputs declared first in lua and the entitys keep the order. in recipes first output-fluid = first output at entity.
at the moment fills random or starts with the first ingredient ?

in mod output is declared in lua-first but access from code needs fluid-box 3.
Last edited by YuokiTani on Tue Feb 03, 2015 4:02 pm, edited 2 times in total.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Recipe behavior

Post by kovarex »

Is it working properly in the new 0.11.14?
YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Recipe behavior

Post by YuokiTani »

unfortunately no

please ignore the previous file, has a missing sprite ...
correct here yi_engines_0.0.8.zip
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Recipe behavior [kovarex]

Post by kovarex »

I tried to load the mod, but it doesn't work, are there some hidden dependencies?
Fatmice
Filter Inserter
Filter Inserter
Posts: 808
Joined: Thu Dec 04, 2014 11:03 pm
Contact:

Re: Recipe behavior [kovarex]

Post by Fatmice »

Hi is this problem solved?

I also encounter something like this with my recipe, however, I was able to fix it in 0.11.13 by simply increase rank of the fluid in question to be above water. Water order is a-a, so the order of the fluid in question was changed to 1a, which will sort before a-a.
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Recipe behavior [kovarex]

Post by kovarex »

Fatmice wrote:Hi is this problem solved?

I also encounter something like this with my recipe, however, I was able to fix it in 0.11.13 by simply increase rank of the fluid in question to be above water. Water order is a-a, so the order of the fluid in question was changed to 1a, which will sort before a-a.
Not solved yet, as I don't have the way to reproduce it.
Fatmice
Filter Inserter
Filter Inserter
Posts: 808
Joined: Thu Dec 04, 2014 11:03 pm
Contact:

Re: Recipe behavior [kovarex]

Post by Fatmice »

kovarex wrote: Not solved yet, as I don't have the way to reproduce it.
I can help you with that. Download my mod, edit the file .\prototype\fluid\fluid.lua and change the "order" from 1a to say d and reset recipes. You will see that the same fluids will occupy different fluidboxes. It stands to reason that the fluids are sorted by the order and will fill the fluidboxes in that order. When a fluid is sorted before water (1a sorts before a-a, which is water's sort position), it will fill the lower left corner.

Code: Select all

	{
		type = "fluid",
		name = "pressurised-water",
		subgroup = "uranium-heatexchangerecipes",
		default_temperature = 15,
		max_temperature = 300,
		heat_capacity = "1.5KJ",
		base_color = {r=0, g=0.34, b=0.6},
		flow_color = {r=0.7, g=0.7, b=0.7},
		icon = "__UraniumPower__/graphics/icons/pressurized-water.png",
		pressure_to_speed_ratio = 0.4,
		flow_to_energy_ratio = 0.59,
		order = "1d"
	},
When order is 1a
When order is d
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Recipe behavior [kovarex]

Post by kovarex »

Ok, it is fixed for 0.11.16.

The ingredients and product are not going to be sorted anymore, this gives the modder full freedom of setting the outputs/inputs positions by specifying the order in the recipe vs fluid boxes. I tested doing two entities with different order of fluid boxes or 2 recipes with different order of products to have 2 variants of the positions of the inputs and it worked fine for me.
Fatmice
Filter Inserter
Filter Inserter
Posts: 808
Joined: Thu Dec 04, 2014 11:03 pm
Contact:

Re: Recipe behavior [kovarex]

Post by Fatmice »

Great, can't wait to test it. :)
Maintainer and developer of Atomic Power. See here for more information.
Current release: 0.6.6 - Requires 0.14.x
Example build - Requires 0.14.x
YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Recipe behavior [kovarex]

Post by YuokiTani »

kovarex wrote:I tried to load the mod, but it doesn't work, are there some hidden dependencies?
I should link to my forum-section ... for actual mods-version.
and yes, i discover a dependency to late, because it's more a addon to main-mod no more standalone. next time i post a better link.

if it's fixed, then it's good. i see it in gameplay then.

only for order
base: Base-Mod
addon: Addon with Gearbox and Recipe Issuses
forum-thread: Forum-Section
YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Recipe behavior [kovarex]

Post by YuokiTani »

it works now in 11.16 -> problem solved
Post Reply

Return to “Resolved Problems and Bugs”