Page 1 of 1

Fluid registration

Posted: Tue Jun 20, 2017 3:38 pm
by Frontrider
I can't seem to get it right. This code won't load:

Code: Select all

  { 
    --gas hydrogen
    type="fluid",
    name = "gas-hydrogen",
    icon = "__mod-name__/graphics/icons/hydrogen-filled.png",
    default_temperature="20",
    max_temperature="20",
    heat_capacity="0",
    pressure_to_speed_ratio="1",
    flow_to_energy_ratio="0.4",
  }
What I need to add for it to load into the game, instead of crashing?

Re: Fluid registration

Posted: Tue Jun 20, 2017 4:28 pm
by Helfima
Frontrider wrote:I can't seem to get it right. This code won't load:

Code: Select all

  { 
    --gas hydrogen
    type="fluid",
    name = "gas-hydrogen",
    icon = "__mod-name__/graphics/icons/hydrogen-filled.png",
    default_temperature="20",
    max_temperature="20",
    heat_capacity="0",
    pressure_to_speed_ratio="1",
    flow_to_energy_ratio="0.4", <= remove last comma
  }
What I need to add for it to load into the game, instead of crashing?
remove last comma

Re: Fluid registration

Posted: Tue Jun 20, 2017 4:34 pm
by Frontrider
Nope, it still crashes.
And its the base mod, whats crashing.

Re: Fluid registration

Posted: Tue Jun 20, 2017 4:48 pm
by prg
Look at how the base mod defines fluid prototypes and add the missing keys and units.

Re: Fluid registration

Posted: Tue Jun 20, 2017 6:25 pm
by Frontrider
Okey, almost asked where do I find it, but got it.

Now it works.