Page 1 of 1

[1.1.85] Icon dump fails for some icons

Posted: Mon Jun 19, 2023 1:48 pm
by ilbJanissary
Likely somewhat related to:
viewtopic.php?f=11&t=106069

1. Attempting to use the --dump-icon-sprites command with the mod "Sea Block Pack" (SeaBlockMetaPack) and its required dependencies, to get icons from this mod for use in FactorioLab.
2. The icon for the "Steel plate" recipe ("steel-plate") is output as an empty PNG image. File location is \script-output\recipe\steel-plate.png.
3. The icons for this recipe appear to be OK in the data set, so I would expect the icons output by the --dump-icon-sprites command to include the steel plate icon.
4. As far as I can tell, this always occurs for only this one icon in this data set, all other icons appear to be OK.
5. To reproduce, install and enable SeaBlockMetaPack, and run factorio.exe --dump-icon-sprites, then check the output.

The raw data for this recipe is below, and the PNG output by the dump command is attached.

Code: Select all

    "steel-plate": 
    {
      "type": "recipe",
      "name": "steel-plate",
      "normal": 
      {
        "ingredients": 
        [
          
          {
            "type": "item",
            "name": "iron-plate",
            "amount": 5
          },
          
          {
            "type": "fluid",
            "name": "gas-oxygen",
            "amount": 50
          }
        ],
        "enabled": false,
        "hidden": true,
        "energy_required": 16,
        "allow_decomposition": false,
        "result": "steel-plate",
        "result_count": 2
      },
      "expensive": 
      {
        "ingredients": 
        [
          
          {
            "type": "item",
            "name": "iron-plate",
            "amount": 5
          },
          
          {
            "type": "fluid",
            "name": "gas-oxygen",
            "amount": 50
          }
        ],
        "enabled": false,
        "hidden": true,
        "energy_required": 16,
        "allow_decomposition": false,
        "result": "steel-plate",
        "result_count": 2
      },
      "category": "chemical-smelting",
      "icons": 
      [
        
        {
          "icon": "__reskins-angels__/graphics/icons/smelting/plates/angels-plate-iron.png",
          "icon_size": 64,
          "icon_mipmaps": 4,
          "scale": 0.21875,
          "shift": 
          [
            -10,
            -10
          ]
        }
      ]
    },

Re: [1.1.85] Icon dump fails for some icons

Posted: Mon Jun 19, 2023 1:59 pm
by ilbJanissary
I can't seem to confirm whether this recipe's icons work in-game, because the recipe is hidden, so if the answer is "this icon specification is invalid," feel free to close this issue, as it may be irrelevant.

Re: [1.1.85] Icon dump fails for some icons

Posted: Mon Jun 19, 2023 2:57 pm
by Rseding91
From that definition it's taking a 64x64 icon (which most likely has transparent pixels around the edges), scaling it down to 14x14, then shifting it up and left 10 pixels. The end result is only 4 pixels worth of the icon will end up rendering which are most likely transparent and then you end up with a fully transparent icon.

Re: [1.1.85] Icon dump fails for some icons

Posted: Mon Jun 19, 2023 3:45 pm
by ilbJanissary
Well that makes sense when you put it that way. Sorry to waste your time :)