Page 1 of 1
[1.1.76] Incompatible fixed_recipe is ignored
Posted: Mon Feb 20, 2023 11:27 am
by curiosity
To reproduce, change vanilla rocket part recipe with one of the following lines:
Code: Select all
data.raw['recipe']['rocket-part'].category = 'crafting'
data.raw['recipe']['rocket-part'].results = {{type = 'fluid', name = 'water', amount = 100}}
Then place and open a rocket silo. Observe that it has not recipe.
Expected behavior: if the fixed recipe is incompatible with the machine, produce an error on game load. Especially in light of this:
Klonan wrote: Tue Jan 04, 2022 8:15 am
It could be argued one way or another,
But at this time, 'fixed_recipe' or an assembling machine, means it will always have that recipe, regardless of if it is hidden, unlocked, or researched
I will move this to not a bug
Re: [1.1.76] Incompatible fixed_recipe is ignored
Posted: Fri Feb 24, 2023 5:13 pm
by boskid
Thanks for the report. Issue will be fixed in 1.2.
Both cases will be correctly handled with an error message:
Code: Select all
Failed to prepare global: Error while running setup for entity prototype "rocket-silo" (rocket-silo): fixed_recipe="rocket-part" cannot be used on this machine. Reason=DifferentCategory
Code: Select all
Failed to prepare global: Error while running setup for entity prototype "rocket-silo" (rocket-silo): fixed_recipe="rocket-part" cannot be used on this machine. Reason=CannotProvidePipes
There is also a third reason related to AssemblingMachinePrototype::ingredient_count and it will be also handled.
Re: [1.1.76] Incompatible fixed_recipe is ignored
Posted: Sat May 13, 2023 4:58 pm
by adamwong246
Does this mean I should abandon my attempt to alter the "rocket-part" recipe to include fluids?
Re: [1.1.76] Incompatible fixed_recipe is ignored
Posted: Sat May 13, 2023 5:41 pm
by Xorimuth
adamwong246 wrote: Sat May 13, 2023 4:58 pm
Does this mean I should abandon my attempt to alter the "rocket-part" recipe to include fluids?
I think you can still do that, but you have to add a fluidbox and fluid connections to the rocket silo.
Re: [1.1.76] Incompatible fixed_recipe is ignored
Posted: Sat May 13, 2023 6:11 pm
by adamwong246
A solution has thus far eluded me. If I alter the recipe for a rocket-part with a water ingredient, the silo shows that no recipes are available. This is where I am at:
Code: Select all
local rocketSilo = table.deepcopy(data.raw["rocket-silo"]["rocket-silo"])
rocketSilo.fluid_box =
{
{
production_type = "input",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {0, -2} }},
secondary_draw_orders = { north = -1 }
},
};
local rocket = table.deepcopy(data.raw["rocket-silo-rocket"]["rocket-silo-rocket"]);
rocket.emissions_per_second = 1;
local rocketPartRecipe = table.deepcopy(data.raw["recipe"]["rocket-part"]);
rocketPartRecipe.ingredients = {{
type = "item",
name = "rocket-control-unit",
amount = 10
}, {
type = "item",
name = "low-density-structure",
amount = 10
}, {
type = "item",
name = "rocket-fuel",
amount = 10
},
{
type = "fluid",
name = "water",
amount = 10
}};
data:extend{rocketSilo, rocket, rocketPartRecipe}
Re: [1.1.76] Incompatible fixed_recipe is ignored
Posted: Sun May 14, 2023 1:44 am
by Silari
adamwong246 wrote: Sat May 13, 2023 6:11 pm
A solution has thus far eluded me. If I alter the recipe for a rocket-part with a water ingredient, the silo shows that no recipes are available. This is where I am at:
Code: Select all
local rocketSilo = table.deepcopy(data.raw["rocket-silo"]["rocket-silo"])
rocketSilo.fluid_box =
{
{
production_type = "input",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {0, -2} }},
secondary_draw_orders = { north = -1 }
},
};
local rocket = table.deepcopy(data.raw["rocket-silo-rocket"]["rocket-silo-rocket"]);
rocket.emissions_per_second = 1;
local rocketPartRecipe = table.deepcopy(data.raw["recipe"]["rocket-part"]);
rocketPartRecipe.ingredients = {{
type = "item",
name = "rocket-control-unit",
amount = 10
}, {
type = "item",
name = "low-density-structure",
amount = 10
}, {
type = "item",
name = "rocket-fuel",
amount = 10
},
{
type = "fluid",
name = "water",
amount = 10
}};
data:extend{rocketSilo, rocket, rocketPartRecipe}
The property is called "fluid_boxes", you have written "fluid_box". Fix the name, then fix the location of the pipe (it has to be outside the bounding box, so -5 instead of -2) and it works.
Re: [1.1.76] Incompatible fixed_recipe is ignored
Posted: Sun May 14, 2023 8:05 pm
by adamwong246
Thank you for the assist friends. See the outcome here
https://mods.factorio.com/mod/rocket_surgery