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

Place to get help with not working mods / modding interface.
maxthestupidguy
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Oct 06, 2024 10:48 pm
Contact:

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

Post 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 333 times
10-06-2024, 19-52-07.png
10-06-2024, 19-52-07.png (198.6 KiB) Viewed 333 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 333 times
10-06-2024, 19-55-52.png
10-06-2024, 19-55-52.png (154.59 KiB) Viewed 333 times
Bilka
Factorio Staff
Factorio Staff
Posts: 3426
Joined: Sat Aug 13, 2016 9:20 am
Contact:

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

Post by Bilka »

If you'd like to keep the large icon file, you could instead set the icon_size to 1024.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Modding help”