Page 1 of 1

My fluid icon isn't showing in-game [SOLVED]

Posted: Sun Oct 06, 2024 10:55 pm
by maxthestupidguy
Hello. I am new to modding. I am making a petrochemical mod, and I added oxygen to the game. It works normally, like any other fluid. However, the icon is simply transparent, and not the picture i put in. Please help.

SOLVED:
My file was 1024x1024, which meant that it only showed the corner of the file. I fixed it by downscaling.

data.lua file:

Code: Select all

require ("prototypes.liquids")
prototypes/liquids.lua file:

Code: Select all

data:extend({
    {
        type = "fluid",
        name = "oxygen",
        subgroup = "fluid",
        default_temperature  = "0",
        base_color = { r = 139 / 255, g = 139 / 255, b = 139 / 255 },
        flow_color = { r = 139 / 255, g = 139 / 255, b = 139 / 255 },
        icon = "__petrochem-revamp__/graphics/icons/fluids/molecule-oxygen.png",
        icon_size = 64,
        icon_mipmaps = 4,
        order = "b"
    },
})
My directory for the image and the image:
10-06-2024, 19-51-57.png
10-06-2024, 19-51-57.png (2.88 KiB) Viewed 336 times
10-06-2024, 19-52-07.png
10-06-2024, 19-52-07.png (198.6 KiB) Viewed 336 times
In-game, the barrel or liquid has no image.
10-06-2024, 19-54-35.png
10-06-2024, 19-54-35.png (53.08 KiB) Viewed 336 times
10-06-2024, 19-55-52.png
10-06-2024, 19-55-52.png (154.59 KiB) Viewed 336 times

Re: My fluid icon isn't showing in-game [SOLVED]

Posted: Mon Oct 07, 2024 10:35 am
by Bilka
If you'd like to keep the large icon file, you could instead set the icon_size to 1024.