Page 1 of 1

Steam recipe

Posted: Sat Apr 21, 2018 9:24 pm
by darkfrei
Hi all! How the game makes steam?

I've wrote this debug code:

Code: Select all

-- is possible to make it?
local bad_list = {}
for key, ingredients_list in pairs (all_ingredients) do
  for i, ingredient_name in pairs (ingredients_list) do
    if all_results and all_results[key] then
      if not (is_value_in_list (ingredient_name, all_results[key])) then
        if not bad_list[key] then bad_list[key] = {} end
        bad_list[key][#bad_list[key]+1] = ingredient_name
      end
    end
  end
end

log ('bad_list: ' .. serpent.block (bad_list))
And get items and fluids, that can't be produced in the game (vanilla 0.16.36, data.lua):

Code: Select all

bad_list: {
  fluid = {
    "crude-oil",
    "water",
    "steam"
  },
  item = {
    "copper-ore",
    "iron-ore",
    "stone",
    "raw-wood",
    "coal",
    "uranium-ore",
    "used-up-uranium-fuel-cell"
  }
}
And here is no steam recipe definition in data.raw.

Re: Steam recipe

Posted: Sat Apr 21, 2018 9:50 pm
by eradicator
The boiler and heat-exachanger have

Code: Select all

output_fluid_box.filter = "steam"
that might be related?

Re: Steam recipe

Posted: Sun Apr 22, 2018 12:24 pm
by darkfrei
eradicator wrote:The boiler and heat-exachanger have

Code: Select all

output_fluid_box.filter = "steam"
that might be related?
Ohh, yes.

Code: Select all

for t_name, t_prot in pairs (data.raw) do
  for e_name, e_prot in pairs (t_prot) do
    if e_prot.fluid_box and e_prot.fluid_box.filter and e_prot.fluid_box.filter == "steam" then
      log ('fluid_box '..t_name .. ' ' .. e_name .. ' - success')
      e_prot.fluid_box.filter = "crude-oil"
    end        
    if e_prot.output_fluid_box and e_prot.output_fluid_box.filter and e_prot.output_fluid_box.filter == "steam" then
      log ('output_fluid_box '..t_name .. ' ' .. e_name .. ' - success')
      e_prot.output_fluid_box.filter = "crude-oil"
    end
  end
end
Now this boiler makes crude oil. But generator can't produce electricity with this fluid.

Re: Steam recipe

Posted: Sun Apr 22, 2018 12:48 pm
by Bilka
darkfrei wrote:Now this boiler makes crude oil. But generator can't produce electricity with this fluid.
Give the fluid a fuel_value and it can. KS Power and bobs both use that mechanic, if you need inspiration.

Re: Steam recipe

Posted: Mon Apr 23, 2018 9:40 am
by bobingabout
I would sugest a fuel_value of 3.8MJ. because, IRL fuel value of the fluid is around 38MJ/kg, and before the x10 on everything, 1 unit of fluid was 1kg, so it's currently 1 unit of fluid being about 100g.

but since the base game steam engine produces 900kW of power, that basically means you want to be consuming around a quater of a unit of fluid a second.