[1.1.76] Incompatible fixed_recipe is ignored

Post Reply
curiosity
Filter Inserter
Filter Inserter
Posts: 407
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

[1.1.76] Incompatible fixed_recipe is ignored

Post 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

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2326
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.76] Incompatible fixed_recipe is ignored

Post 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.

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: [1.1.76] Incompatible fixed_recipe is ignored

Post by adamwong246 »

Does this mean I should abandon my attempt to alter the "rocket-part" recipe to include fluids?

Xorimuth
Filter Inserter
Filter Inserter
Posts: 639
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: [1.1.76] Incompatible fixed_recipe is ignored

Post 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.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: [1.1.76] Incompatible fixed_recipe is ignored

Post 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}

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 506
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: [1.1.76] Incompatible fixed_recipe is ignored

Post 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.

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: [1.1.76] Incompatible fixed_recipe is ignored

Post by adamwong246 »

Thank you for the assist friends. See the outcome here https://mods.factorio.com/mod/rocket_surgery

Post Reply

Return to “Fixed for 2.0”