Page 1 of 1

Recipe behavior [kovarex]

Posted: Sat Jan 31, 2015 3:18 pm
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

Re: Recipe behavior

Posted: Sat Jan 31, 2015 3:58 pm
by Gandalf
Mind sharing what this is all about? I've never seen that, looks like a mod...

Re: Recipe behavior

Posted: Sat Jan 31, 2015 5:05 pm
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.

Re: Recipe behavior

Posted: Sat Jan 31, 2015 5:31 pm
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.

Re: Recipe behavior

Posted: Sun Feb 01, 2015 5:57 pm
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.

Re: Recipe behavior

Posted: Mon Feb 02, 2015 9:47 am
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.

Re: Recipe behavior

Posted: Mon Feb 02, 2015 9:50 am
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.

Re: Recipe behavior

Posted: Mon Feb 02, 2015 10:05 am
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?

Re: Recipe behavior

Posted: Tue Feb 03, 2015 3:49 pm
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.

Re: Recipe behavior

Posted: Tue Feb 03, 2015 3:50 pm
by kovarex
Is it working properly in the new 0.11.14?

Re: Recipe behavior

Posted: Tue Feb 03, 2015 3:53 pm
by YuokiTani
unfortunately no

please ignore the previous file, has a missing sprite ...
correct here yi_engines_0.0.8.zip

Re: Recipe behavior [kovarex]

Posted: Tue Feb 10, 2015 1:11 pm
by kovarex
I tried to load the mod, but it doesn't work, are there some hidden dependencies?

Re: Recipe behavior [kovarex]

Posted: Sun Feb 15, 2015 10:52 pm
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.

Re: Recipe behavior [kovarex]

Posted: Mon Feb 16, 2015 6:40 am
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.

Re: Recipe behavior [kovarex]

Posted: Mon Feb 16, 2015 9:35 am
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

Re: Recipe behavior [kovarex]

Posted: Mon Feb 16, 2015 11:09 am
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.

Re: Recipe behavior [kovarex]

Posted: Mon Feb 16, 2015 12:33 pm
by Fatmice
Great, can't wait to test it. :)

Re: Recipe behavior [kovarex]

Posted: Mon Feb 16, 2015 2:54 pm
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

Re: Recipe behavior [kovarex]

Posted: Fri Feb 20, 2015 3:20 pm
by YuokiTani
it works now in 11.16 -> problem solved