[Resolved] How do I make a new liquid?
[Resolved] How do I make a new liquid?
I have tried searching for it and tried dissecting other mods that add liquids, but one issue remains; how do I make the graphic for it? Not the icon, I mean color the liquid a specific color? I can't find where that info is or where it is on the liquids lua file.
Last edited by Starfoth on Fri Oct 28, 2016 3:13 am, edited 1 time in total.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: How do I make a new liquid?
Here's an example of one of the existing liquids, they are all defined in data.raw.fluid
Note the base_color and flow_color properties:
So you'll need to make a table like that for your fluid, obviously with custom name, then
For example:
Note the base_color and flow_color properties:
Code: Select all
{
base_color = {
b = 0,
g = 0,
r = 0
},
default_temperature = 25,
flow_color = {
b = 0.5,
g = 0.5,
r = 0.5
},
flow_to_energy_ratio = 0.59,
heat_capacity = "1KJ",
icon = "__base__/graphics/icons/fluid/crude-oil.png",
max_temperature = 100,
name = "crude-oil",
order = "a[fluid]-b[crude-oil]",
pressure_to_speed_ratio = 0.4,
type = "fluid"
},
Code: Select all
data:extend{ your_liquid_table }
Code: Select all
data:extend {
{
base_color = {
b = 0,
g = 0,
r = 0
},
default_temperature = 25,
flow_color = {
b = 0.5,
g = 0.5,
r = 0.5
},
flow_to_energy_ratio = 0.59,
heat_capacity = "1KJ",
icon = "__YourModName__/graphics/icons/fluid/your-liquid-name-here.png",
max_temperature = 100,
name = "your-liquid-name-here",
order = "a[fluid]-b[crude-oil]",
pressure_to_speed_ratio = 0.4,
type = "fluid"
},
}
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: How do I make a new liquid?
Thank you again for your help