Material Storage


Factorio mod inspired by Applied Energistics 2 from Minecraft. Store items, smelt plates, craft and disassemble goods and refine oil - all this inside a single chest inventory. Does not support quality

Content
5 months ago
1.1 - 2.1
1.66K
Fluids Logistic network Circuit network Manufacturing Storage

b material-storage 0.5.7 — Material Logistic Chest invisible on Factorio 2.1

4 days ago

material-storage 0.5.7 — Material Logistic Chest invisible on Factorio 2.1

Summary

In material-storage 0.5.7 on Factorio 2.1.24, the placed ms-material-logistic-chest entity is invisible. The item icon, ghost/blueprint, collision box, selection box and logistics behavior work normally; only the placed chest has no sprite. No error or warning is written to factorio-current.log.

Environment

  • Factorio 2.1.24 (build 87808, win64, Steam, Space Age)
  • material-storage 0.5.7 (latest version at the time of this report)
  • Windows 11
  • Reproduced in a normal modded save; the prototype also loads in a minimal environment containing only base + material-storage (tested headless).

Reproduction

  1. Enable material-storage 0.5.7 in Factorio 2.1.24.
  2. Craft and place a Material Logistic Chest (ms-material-logistic-chest).
  3. The placed chest is invisible.

Root cause

In material-storage/prototypes/entities.lua (around lines 243–265), the chest still uses the old pictures property:

        pictures = {
            layers = {
                ...
            }
        },

In Factorio 2.1, a logistic-container renders its chest sprite through robot_door.animation, not through pictures. The property is not used for rendering this entity type, so the chest has no visible sprite, and Factorio does not report an error for it.

Vanilla reference: the buffer-chest prototype in data/base/prototypes/entity/entities.lua (lines 6006–6035) uses:

    robot_door =
    {
      opened_duration = logistic_chest_opened_duration,
      animation =
      {
        layers =
        {
          {
            filename = "__base__/graphics/entity/logistic-chest/buffer-chest.png",
            priority = "extra-high",
            width = 66,
            height = 74,
            frame_count = 7,
            shift = util.by_pixel(0, -2),
            scale = 0.5
          },
          ...
        }
      }
    },

Additional detail: sprite height

The sprite sheet material-storage/graphics/entities/material-logistic-chest.png is 462×74 px (7 frames of 66×74). The current prototype declares height = 72, which does not match the actual frame height. The corrected block below uses height = 74, consistent with the texture and with the vanilla buffer chest.

Suggested fix

Replace the pictures = { ... } block with the following; the rest of the entity definition is unchanged:

        robot_door = {
            opened_duration = 7,
            animation = {
                layers = {
                    {
                        filename = GRAPHICS_PATH .. "entities/material-logistic-chest.png",
                        priority = "extra-high",
                        width = 66,
                        height = 74,
                        frame_count = 7,
                        shift = util.by_pixel(0, -2),
                        scale = 0.5
                    },
                    {
                        filename = GRAPHICS_PATH .. "entities/material-storage-shadow.png",
                        priority = "extra-high",
                        width = 112,
                        height = 46,
                        repeat_count = 7,
                        shift = util.by_pixel(12, 4.5),
                        draw_as_shadow = true,
                        scale = 0.5
                    }
                }
            }
        },

Optional: add animation_sound = { filename = "__base__/sound/metallic-chest-open.ogg", volume = 0.43 }, inside robot_door to match the vanilla chest opening sound. It is not required for rendering.

Exact patch applied locally

--- a/material-storage/prototypes/entities.lua
+++ b/material-storage/prototypes/entities.lua
@@ -240,13 +240,15 @@
         open_sound = {filename = "__base__/sound/metallic-chest-open.ogg", volume=0.43},
         close_sound = {filename = "__base__/sound/metallic-chest-close.ogg", volume = 0.43},
         vehicle_impact_sound = {filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65},
-        pictures = {
-            layers = {
+        robot_door = {
+            opened_duration = 7,
+            animation = {
+                layers = {
                 {
                     filename = GRAPHICS_PATH .. "entities/material-logistic-chest.png",
                     priority = "extra-high",
                     width = 66,
-                    height = 72,
+                    height = 74,
                     frame_count = 7,
                     shift = util.by_pixel(0, -2),
                     scale = 0.5
@@ -261,6 +263,7 @@
                     draw_as_shadow = true,
                     scale = 0.5
                 }
+                }
             }
         },
         circuit_connector = circuit_connector_definitions["chest"],

Verification

  • Patched material-storage/prototypes/entities.lua inside material-storage_0.5.7.zip locally (original backup kept).
  • Loaded the patched mod in Factorio 2.1.24 using --create in headless mode with only base + material-storage: the mod loaded, prototypes validated, and a map was created successfully with no errors.
  • The chest now uses the same robot_door.animation mechanism as the vanilla buffer chest.

Notes

  • The item icon (graphics/icons/ms-material-logistic-chest.png) is unaffected; only the placed entity sprite needs the change.
  • This is a local workaround. A future update of material-storage will overwrite it unless the fix is included in the mod.
  • If the mod is used in multiplayer, the patched mod will cause a checksum mismatch with an unpatched server; the same patched file must be used on both sides.

New response