[solved] The productivity effect is not working.

Place to get help with not working mods / modding interface.
User avatar
yaim904
Fast Inserter
Fast Inserter
Posts: 140
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

[solved] The productivity effect is not working.

Post by yaim904 »

The idea behind this MOD is to create an object, entities, and others. I want the recipes to be affected by the productivity module, but it is not creating them; it counts them as creating, but does not create them.

(1).png
(1).png (1.6 MiB) Viewed 212 times
(2).png
(2).png (1.59 MiB) Viewed 212 times

If you do not understand, please ask specific questions to clarify any doubts.

I am really interested in knowing the reason for the problem.

I look forward to any response.

I am attaching a functional code of the error and some images.

Code: Select all

---------------------------------------------------------------------------------------------------
-- data-final-fixes.lua
---------------------------------------------------------------------------------------------------

local Coins = {
    {
        ['type'] = 'item',
        ['name'] = 'YAIM0425-d27b-coin',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['icons'] = {
            [1] = {
                ['icon'] = '__base__/graphics/icons/coin.png',
                ['icon_size'] = 64
            },
            [2] = {
                ['icon'] = '__base__/graphics/icons/signal/signal_1.png',
                ['shift'] = {
                    [1] = 8,
                    [2] = -8
                },
                ['scale'] = 0.25
            }
        },
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[coin]',
        ['stack_size'] = 1000
    },
    {
        ['type'] = 'item',
        ['name'] = 'YAIM0425-d27b-coin-k',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['icons'] = {
            [1] = {
                ['icon'] = '__base__/graphics/icons/coin.png',
                ['icon_size'] = 64
            },
            [2] = {
                ['icon'] = '__base__/graphics/icons/signal/signal_K.png',
                ['shift'] = {
                    [1] = 8,
                    [2] = -8
                },
                ['scale'] = 0.25
            }
        },
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[coin]',
        ['stack_size'] = 1000
    },
    {
        ['type'] = 'item',
        ['name'] = 'YAIM0425-d27b-coin-M',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['icons'] = {
            [1] = {
                ['icon'] = '__base__/graphics/icons/coin.png',
                ['icon_size'] = 64
            },
            [2] = {
                ['icon'] = '__base__/graphics/icons/signal/signal_M.png',
                ['shift'] = {
                    [1] = 8,
                    [2] = -8
                },
                ['scale'] = 0.25
            }
        },
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[coin]',
        ['stack_size'] = 1000
    },
    {
        ['type'] = 'item',
        ['name'] = 'YAIM0425-d27b-coin-G',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['icons'] = {
            [1] = {
                ['icon'] = '__base__/graphics/icons/coin.png',
                ['icon_size'] = 64
            },
            [2] = {
                ['icon'] = '__base__/graphics/icons/signal/signal_G.png',
                ['shift'] = {
                    [1] = 8,
                    [2] = -8
                },
                ['scale'] = 0.25
            }
        },
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[coin]',
        ['stack_size'] = 1000
    }
}
data:extend(Coins)

local Category = {
    { type = "recipe-category", name = 'YAIM0425-d27b-sell' },
    { type = "recipe-category", name = 'YAIM0425-d27b-buy' }
}
data:extend(Category)

local Recipes = {
    {
        ['type'] = 'recipe',
        ['name'] = 'YAIM0425-d27b-d27b-sell-coin-k',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['localised_description'] = {
            [1] = ''
        },
        ['energy_required'] = 1,
        ['hide_from_player_crafting'] = true,
        ['hidden_in_factoriopedia'] = true,
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[k]',
        ['ingredients'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1,
                ['name'] = 'YAIM0425-d27b-coin-k',
                ['ignored_by_stats'] = 1
            }
        },
        ['results'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1000,
                ['name'] = 'YAIM0425-d27b-coin',
                ['ignored_by_stats'] = 1000
            }
        },
        ['category'] = 'YAIM0425-d27b-sell'
    },
    {
        ['type'] = 'recipe',
        ['name'] = 'YAIM0425-d27b-d27b-buy-coin-k',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['localised_description'] = {
            [1] = ''
        },
        ['energy_required'] = 1,
        ['hide_from_player_crafting'] = true,
        ['hidden_in_factoriopedia'] = true,
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[k]',
        ['ingredients'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1000,
                ['name'] = 'YAIM0425-d27b-coin',
                ['ignored_by_stats'] = 1000
            }
        },
        ['results'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1,
                ['name'] = 'YAIM0425-d27b-coin-k',
                ['ignored_by_stats'] = 1
            }
        },
        ['category'] = 'YAIM0425-d27b-buy'
    },
    {
        ['type'] = 'recipe',
        ['name'] = 'YAIM0425-d27b-d27b-sell-coin-M',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['localised_description'] = {
            [1] = ''
        },
        ['energy_required'] = 1,
        ['hide_from_player_crafting'] = true,
        ['hidden_in_factoriopedia'] = true,
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[M]',
        ['ingredients'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1,
                ['name'] = 'YAIM0425-d27b-coin-M',
                ['ignored_by_stats'] = 1
            }
        },
        ['results'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1000,
                ['name'] = 'YAIM0425-d27b-coin-k',
                ['ignored_by_stats'] = 1000
            }
        },
        ['category'] = 'YAIM0425-d27b-sell'
    },
    {
        ['type'] = 'recipe',
        ['name'] = 'YAIM0425-d27b-d27b-buy-coin-M',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['localised_description'] = {
            [1] = ''
        },
        ['energy_required'] = 1,
        ['hide_from_player_crafting'] = true,
        ['hidden_in_factoriopedia'] = true,
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[M]',
        ['ingredients'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1000,
                ['name'] = 'YAIM0425-d27b-coin-k',
                ['ignored_by_stats'] = 1000
            }
        },
        ['results'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1,
                ['name'] = 'YAIM0425-d27b-coin-M',
                ['ignored_by_stats'] = 1
            }
        },
        ['category'] = 'YAIM0425-d27b-buy'
    },
    {
        ['type'] = 'recipe',
        ['name'] = 'YAIM0425-d27b-d27b-sell-coin-G',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['localised_description'] = {
            [1] = ''
        },
        ['energy_required'] = 1,
        ['hide_from_player_crafting'] = true,
        ['hidden_in_factoriopedia'] = true,
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[G]',
        ['ingredients'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1,
                ['name'] = 'YAIM0425-d27b-coin-G',
                ['ignored_by_stats'] = 1
            }
        },
        ['results'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1000,
                ['name'] = 'YAIM0425-d27b-coin-M',
                ['ignored_by_stats'] = 1000
            }
        },
        ['category'] = 'YAIM0425-d27b-sell'
    },
    {
        ['type'] = 'recipe',
        ['name'] = 'YAIM0425-d27b-d27b-buy-coin-G',
        ['localised_name'] = {
            [1] = '',
            [2] = {
                [1] = 'item-name.coin'
            }
        },
        ['localised_description'] = {
            [1] = ''
        },
        ['energy_required'] = 1,
        ['hide_from_player_crafting'] = true,
        ['hidden_in_factoriopedia'] = true,
        ['subgroup'] = 'intermediate-product',
        ['order'] = 'z[G]',
        ['ingredients'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1000,
                ['name'] = 'YAIM0425-d27b-coin-M',
                ['ignored_by_stats'] = 1000
            }
        },
        ['results'] = {
            [1] = {
                ['type'] = 'item',
                ['amount'] = 1,
                ['name'] = 'YAIM0425-d27b-coin-G',
                ['ignored_by_stats'] = 1
            }
        },
        ['category'] = 'YAIM0425-d27b-buy'
    }
}
for _, recipe in pairs(Recipes) do
    recipe.allow_productivity = true
    recipe.maximum_productivity = 100
end
data:extend(Recipes)

---------------------------------------------------------------------------------------------------

local Item = {
    ['type'] = 'item',
    ['name'] = 'YAIM0425-A00A-market',
    ['icon'] = '__base__/graphics/icons/assembling-machine-2.png',
    ['subgroup'] = 'production-machine',
    ['color_hint'] = {
        ['text'] = '2'
    },
    ['order'] = '521',
    ['inventory_move_sound'] = {
        ['filename'] = '__base__/sound/item/mechanical-inventory-move.ogg',
        ['volume'] = 0.7,
        ['aggregation'] = {
            ['max_count'] = 1,
            ['remove'] = true
        }
    },
    ['pick_sound'] = {
        ['filename'] = '__base__/sound/item/mechanical-inventory-pickup.ogg',
        ['volume'] = 0.8,
        ['aggregation'] = {
            ['max_count'] = 1,
            ['remove'] = true
        }
    },
    ['drop_sound'] = {
        ['filename'] = '__base__/sound/item/mechanical-inventory-move.ogg',
        ['volume'] = 0.7,
        ['aggregation'] = {
            ['max_count'] = 1,
            ['remove'] = true
        }
    },
    ['place_result'] = 'YAIM0425-A00A-market',
    ['stack_size'] = 500,
    ['icons'] = {
        [1] = {
            ['icon'] = '__base__/graphics/icons/assembling-machine-2.png'
        },
        [2] = {
            ['icon'] = '__base__/graphics/icons/signal/signal_black.png',
            ['scale'] = 0.25,
            ['shift'] = {
                [1] = 0,
                [2] = -5
            }
        },
        [3] = {
            ['icon'] = '__base__/graphics/icons/signal/signal-star.png',
            ['scale'] = 0.25,
            ['shift'] = {
                [1] = 0,
                [2] = -5
            }
        }
    },
    ['localised_name'] = {
        [1] = '',
        [2] = {
            [1] = 'entity-name.market'
        }
    },
    ['localised_description'] = {
        [1] = '',
        [2] = {
            [1] = 'entity-description.assembling-machine-2'
        }
    }
}

local Recipe = {
    ['type'] = 'recipe',
    ['name'] = 'YAIM0425-A00A-market',
    ['enabled'] = true,
    ['ingredients'] = {},
    ['results'] = {
        [1] = {
            ['type'] = 'item',
            ['name'] = 'YAIM0425-A00A-market',
            ['amount'] = 1
        }
    },
    ['energy_required'] = 0.002,
    ['subgroup'] = 'production-machine',
    ['order'] = '520',
    ['localised_name'] = {
        [1] = '',
        [2] = {
            [1] = 'entity-name.market'
        }
    },
    ['localised_description'] = {
        [1] = '',
        [2] = {
            [1] = 'entity-description.assembling-machine-2'
        }
    },
    ['allow_productivity'] = true,
    ['maximum_productivity'] = 100,
    ['icons'] = {
        [1] = {
            ['icon'] = '__base__/graphics/icons/assembling-machine-2.png'
        },
        [2] = {
            ['icon'] = '__base__/graphics/icons/signal/signal_black.png',
            ['scale'] = 0.25,
            ['shift'] = {
                [1] = 0,
                [2] = -5
            }
        },
        [3] = {
            ['icon'] = '__base__/graphics/icons/signal/signal-star.png',
            ['scale'] = 0.25,
            ['shift'] = {
                [1] = 0,
                [2] = -5
            }
        }
    }
}

local Entity = {
    ['type'] = 'assembling-machine',
    ['name'] = 'YAIM0425-A00A-market',
    ['icon'] = '__base__/graphics/icons/assembling-machine-2.png',
    ['flags'] = {
        [1] = 'placeable-neutral',
        [2] = 'placeable-player',
        [3] = 'player-creation'
    },
    ['minable'] = {
        ['mining_time'] = 0.002,
        ['result'] = 'assembling-machine-2',
        ['results'] = {
            [1] = {
                ['type'] = 'item',
                ['name'] = 'YAIM0425-A00A-market',
                ['amount'] = 1
            }
        }
    },
    ['max_health'] = 350,
    ['corpse'] = 'assembling-machine-2-remnants',
    ['dying_explosion'] = 'assembling-machine-2-explosion',
    ['icon_draw_specification'] = {
        ['shift'] = {
            [1] = 0,
            [2] = -0.3
        }
    },
    ['circuit_wire_max_distance'] = 9,
    ['circuit_connector'] = {
        [1] = {
            ['sprites'] = {
                ['connector_main'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04a-base-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 52,
                    ['height'] = 50,
                    ['scale'] = 0.5,
                    ['x'] = 104,
                    ['y'] = 100,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.8125
                    }
                },
                ['connector_shadow'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04b-base-shadow-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_shadow'] = true,
                    ['width'] = 60,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 120,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 1.171875,
                        [2] = 1.046875
                    }
                },
                ['wire_pins'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04c-wire-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 62,
                    ['height'] = 58,
                    ['scale'] = 0.5,
                    ['x'] = 124,
                    ['y'] = 116,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.8125
                    }
                },
                ['wire_pins_shadow'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04d-wire-shadow-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_shadow'] = true,
                    ['width'] = 68,
                    ['height'] = 54,
                    ['scale'] = 0.5,
                    ['x'] = 136,
                    ['y'] = 108,
                    ['shift'] = {
                        [1] = 1.25,
                        [2] = 1.078125
                    }
                },
                ['led_blue'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04e-blue-LED-on-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 60,
                    ['height'] = 60,
                    ['scale'] = 0.5,
                    ['x'] = 120,
                    ['y'] = 120,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_blue_off'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04f-blue-LED-off-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 46,
                    ['height'] = 44,
                    ['scale'] = 0.5,
                    ['x'] = 92,
                    ['y'] = 88,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_green'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04h-green-LED-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 48,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 96,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_red'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04i-red-LED-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 48,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 96,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_light'] = {
                    ['intensity'] = 0,
                    ['size'] = 0.9
                },
                ['blue_led_light_offset'] = {
                    [1] = 0.75,
                    [2] = 1.03125
                },
                ['red_green_led_light_offset'] = {
                    [1] = 0.75,
                    [2] = 0.875
                }
            },
            ['points'] = {
                ['wire'] = {
                    ['red'] = {
                        [1] = 1,
                        [2] = 0.8125
                    },
                    ['green'] = {
                        [1] = 1.0625,
                        [2] = 1.03125
                    }
                },
                ['shadow'] = {
                    ['red'] = {
                        [1] = 1.6875,
                        [2] = 1.25
                    },
                    ['green'] = {
                        [1] = 1.5625,
                        [2] = 1.3125
                    }
                }
            }
        },
        [2] = {
            ['sprites'] = {
                ['connector_main'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04a-base-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 52,
                    ['height'] = 50,
                    ['scale'] = 0.5,
                    ['x'] = 104,
                    ['y'] = 100,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.8125
                    }
                },
                ['connector_shadow'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04b-base-shadow-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_shadow'] = true,
                    ['width'] = 60,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 120,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 1.171875,
                        [2] = 1.046875
                    }
                },
                ['wire_pins'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04c-wire-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 62,
                    ['height'] = 58,
                    ['scale'] = 0.5,
                    ['x'] = 124,
                    ['y'] = 116,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.8125
                    }
                },
                ['wire_pins_shadow'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04d-wire-shadow-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_shadow'] = true,
                    ['width'] = 68,
                    ['height'] = 54,
                    ['scale'] = 0.5,
                    ['x'] = 136,
                    ['y'] = 108,
                    ['shift'] = {
                        [1] = 1.25,
                        [2] = 1.078125
                    }
                },
                ['led_blue'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04e-blue-LED-on-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 60,
                    ['height'] = 60,
                    ['scale'] = 0.5,
                    ['x'] = 120,
                    ['y'] = 120,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_blue_off'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04f-blue-LED-off-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 46,
                    ['height'] = 44,
                    ['scale'] = 0.5,
                    ['x'] = 92,
                    ['y'] = 88,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_green'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04h-green-LED-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 48,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 96,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_red'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04i-red-LED-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 48,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 96,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_light'] = {
                    ['intensity'] = 0,
                    ['size'] = 0.9
                },
                ['blue_led_light_offset'] = {
                    [1] = 0.75,
                    [2] = 1.03125
                },
                ['red_green_led_light_offset'] = {
                    [1] = 0.75,
                    [2] = 0.875
                }
            },
            ['points'] = {
                ['wire'] = {
                    ['red'] = {
                        [1] = 1,
                        [2] = 0.8125
                    },
                    ['green'] = {
                        [1] = 1.0625,
                        [2] = 1.03125
                    }
                },
                ['shadow'] = {
                    ['red'] = {
                        [1] = 1.6875,
                        [2] = 1.25
                    },
                    ['green'] = {
                        [1] = 1.5625,
                        [2] = 1.3125
                    }
                }
            }
        },
        [3] = {
            ['sprites'] = {
                ['connector_main'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04a-base-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 52,
                    ['height'] = 50,
                    ['scale'] = 0.5,
                    ['x'] = 104,
                    ['y'] = 100,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.8125
                    }
                },
                ['connector_shadow'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04b-base-shadow-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_shadow'] = true,
                    ['width'] = 60,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 120,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 1.171875,
                        [2] = 1.046875
                    }
                },
                ['wire_pins'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04c-wire-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 62,
                    ['height'] = 58,
                    ['scale'] = 0.5,
                    ['x'] = 124,
                    ['y'] = 116,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.8125
                    }
                },
                ['wire_pins_shadow'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04d-wire-shadow-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_shadow'] = true,
                    ['width'] = 68,
                    ['height'] = 54,
                    ['scale'] = 0.5,
                    ['x'] = 136,
                    ['y'] = 108,
                    ['shift'] = {
                        [1] = 1.25,
                        [2] = 1.078125
                    }
                },
                ['led_blue'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04e-blue-LED-on-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 60,
                    ['height'] = 60,
                    ['scale'] = 0.5,
                    ['x'] = 120,
                    ['y'] = 120,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_blue_off'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04f-blue-LED-off-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 46,
                    ['height'] = 44,
                    ['scale'] = 0.5,
                    ['x'] = 92,
                    ['y'] = 88,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_green'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04h-green-LED-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 48,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 96,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_red'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04i-red-LED-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 48,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 96,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_light'] = {
                    ['intensity'] = 0,
                    ['size'] = 0.9
                },
                ['blue_led_light_offset'] = {
                    [1] = 0.75,
                    [2] = 1.03125
                },
                ['red_green_led_light_offset'] = {
                    [1] = 0.75,
                    [2] = 0.875
                }
            },
            ['points'] = {
                ['wire'] = {
                    ['red'] = {
                        [1] = 1,
                        [2] = 0.8125
                    },
                    ['green'] = {
                        [1] = 1.0625,
                        [2] = 1.03125
                    }
                },
                ['shadow'] = {
                    ['red'] = {
                        [1] = 1.6875,
                        [2] = 1.25
                    },
                    ['green'] = {
                        [1] = 1.5625,
                        [2] = 1.3125
                    }
                }
            }
        },
        [4] = {
            ['sprites'] = {
                ['connector_main'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04a-base-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 52,
                    ['height'] = 50,
                    ['scale'] = 0.5,
                    ['x'] = 104,
                    ['y'] = 100,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.8125
                    }
                },
                ['connector_shadow'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04b-base-shadow-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_shadow'] = true,
                    ['width'] = 60,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 120,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 1.171875,
                        [2] = 1.046875
                    }
                },
                ['wire_pins'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04c-wire-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 62,
                    ['height'] = 58,
                    ['scale'] = 0.5,
                    ['x'] = 124,
                    ['y'] = 116,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.8125
                    }
                },
                ['wire_pins_shadow'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04d-wire-shadow-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_shadow'] = true,
                    ['width'] = 68,
                    ['height'] = 54,
                    ['scale'] = 0.5,
                    ['x'] = 136,
                    ['y'] = 108,
                    ['shift'] = {
                        [1] = 1.25,
                        [2] = 1.078125
                    }
                },
                ['led_blue'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04e-blue-LED-on-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 60,
                    ['height'] = 60,
                    ['scale'] = 0.5,
                    ['x'] = 120,
                    ['y'] = 120,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_blue_off'] = {
                    ['filename'] =
                    '__base__/graphics/entity/circuit-connector/ccm-universal-04f-blue-LED-off-sequence.png',
                    ['priority'] = 'low',
                    ['width'] = 46,
                    ['height'] = 44,
                    ['scale'] = 0.5,
                    ['x'] = 92,
                    ['y'] = 88,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_green'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04h-green-LED-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 48,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 96,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_red'] = {
                    ['filename'] = '__base__/graphics/entity/circuit-connector/ccm-universal-04i-red-LED-sequence.png',
                    ['priority'] = 'low',
                    ['draw_as_glow'] = true,
                    ['width'] = 48,
                    ['height'] = 46,
                    ['scale'] = 0.5,
                    ['x'] = 96,
                    ['y'] = 92,
                    ['shift'] = {
                        [1] = 0.75,
                        [2] = 0.78125
                    }
                },
                ['led_light'] = {
                    ['intensity'] = 0,
                    ['size'] = 0.9
                },
                ['blue_led_light_offset'] = {
                    [1] = 0.75,
                    [2] = 1.03125
                },
                ['red_green_led_light_offset'] = {
                    [1] = 0.75,
                    [2] = 0.875
                }
            },
            ['points'] = {
                ['wire'] = {
                    ['red'] = {
                        [1] = 1,
                        [2] = 0.8125
                    },
                    ['green'] = {
                        [1] = 1.0625,
                        [2] = 1.03125
                    }
                },
                ['shadow'] = {
                    ['red'] = {
                        [1] = 1.6875,
                        [2] = 1.25
                    },
                    ['green'] = {
                        [1] = 1.5625,
                        [2] = 1.3125
                    }
                }
            }
        }
    },
    ['alert_icon_shift'] = {
        [1] = 0,
        [2] = -0.375
    },
    ['resistances'] = {
        [1] = {
            ['type'] = 'fire',
            ['percent'] = 70
        }
    },
    ['fluid_boxes'] = {
        [1] = {
            ['production_type'] = 'input',
            ['pipe_picture'] = {
                ['north'] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-N.png',
                    ['priority'] = 'extra-high',
                    ['width'] = 71,
                    ['height'] = 38,
                    ['shift'] = {
                        [1] = 0.0703125,
                        [2] = 0.421875
                    },
                    ['scale'] = 0.5
                },
                ['east'] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png',
                    ['priority'] = 'extra-high',
                    ['width'] = 42,
                    ['height'] = 76,
                    ['shift'] = {
                        [1] = -0.765625,
                        [2] = 0.03125
                    },
                    ['scale'] = 0.5
                },
                ['south'] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-S.png',
                    ['priority'] = 'extra-high',
                    ['width'] = 88,
                    ['height'] = 61,
                    ['shift'] = {
                        [1] = 0,
                        [2] = -0.9765625
                    },
                    ['scale'] = 0.5
                },
                ['west'] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png',
                    ['priority'] = 'extra-high',
                    ['width'] = 39,
                    ['height'] = 73,
                    ['shift'] = {
                        [1] = 0.8046875,
                        [2] = 0.0390625
                    },
                    ['scale'] = 0.5
                }
            },
            ['pipe_covers'] = {
                ['north'] = {
                    ['layers'] = {
                        [1] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-north.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5
                        },
                        [2] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-north-shadow.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5,
                            ['draw_as_shadow'] = true
                        }
                    }
                },
                ['east'] = {
                    ['layers'] = {
                        [1] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-east.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5
                        },
                        [2] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-east-shadow.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5,
                            ['draw_as_shadow'] = true
                        }
                    }
                },
                ['south'] = {
                    ['layers'] = {
                        [1] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-south.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5
                        },
                        [2] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-south-shadow.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5,
                            ['draw_as_shadow'] = true
                        }
                    }
                },
                ['west'] = {
                    ['layers'] = {
                        [1] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-west.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5
                        },
                        [2] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-west-shadow.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5,
                            ['draw_as_shadow'] = true
                        }
                    }
                }
            },
            ['volume'] = 1000,
            ['pipe_connections'] = {
                [1] = {
                    ['flow_direction'] = 'input',
                    ['direction'] = 0,
                    ['position'] = {
                        [1] = 0,
                        [2] = -1
                    }
                }
            },
            ['secondary_draw_orders'] = {
                ['north'] = -1
            }
        },
        [2] = {
            ['production_type'] = 'output',
            ['pipe_picture'] = {
                ['north'] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-N.png',
                    ['priority'] = 'extra-high',
                    ['width'] = 71,
                    ['height'] = 38,
                    ['shift'] = {
                        [1] = 0.0703125,
                        [2] = 0.421875
                    },
                    ['scale'] = 0.5
                },
                ['east'] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png',
                    ['priority'] = 'extra-high',
                    ['width'] = 42,
                    ['height'] = 76,
                    ['shift'] = {
                        [1] = -0.765625,
                        [2] = 0.03125
                    },
                    ['scale'] = 0.5
                },
                ['south'] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-S.png',
                    ['priority'] = 'extra-high',
                    ['width'] = 88,
                    ['height'] = 61,
                    ['shift'] = {
                        [1] = 0,
                        [2] = -0.9765625
                    },
                    ['scale'] = 0.5
                },
                ['west'] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png',
                    ['priority'] = 'extra-high',
                    ['width'] = 39,
                    ['height'] = 73,
                    ['shift'] = {
                        [1] = 0.8046875,
                        [2] = 0.0390625
                    },
                    ['scale'] = 0.5
                }
            },
            ['pipe_covers'] = {
                ['north'] = {
                    ['layers'] = {
                        [1] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-north.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5
                        },
                        [2] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-north-shadow.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5,
                            ['draw_as_shadow'] = true
                        }
                    }
                },
                ['east'] = {
                    ['layers'] = {
                        [1] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-east.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5
                        },
                        [2] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-east-shadow.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5,
                            ['draw_as_shadow'] = true
                        }
                    }
                },
                ['south'] = {
                    ['layers'] = {
                        [1] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-south.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5
                        },
                        [2] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-south-shadow.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5,
                            ['draw_as_shadow'] = true
                        }
                    }
                },
                ['west'] = {
                    ['layers'] = {
                        [1] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-west.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5
                        },
                        [2] = {
                            ['filename'] = '__base__/graphics/entity/pipe-covers/pipe-cover-west-shadow.png',
                            ['priority'] = 'extra-high',
                            ['width'] = 128,
                            ['height'] = 128,
                            ['scale'] = 0.5,
                            ['draw_as_shadow'] = true
                        }
                    }
                }
            },
            ['volume'] = 1000,
            ['pipe_connections'] = {
                [1] = {
                    ['flow_direction'] = 'output',
                    ['direction'] = 8,
                    ['position'] = {
                        [1] = 0,
                        [2] = 1
                    }
                }
            },
            ['secondary_draw_orders'] = {
                ['north'] = -1
            }
        }
    },
    ['fluid_boxes_off_when_no_fluid_recipe'] = true,
    ['collision_box'] = {
        [1] = {
            [1] = -1.2,
            [2] = -1.2
        },
        [2] = {
            [1] = 1.2,
            [2] = 1.2
        }
    },
    ['selection_box'] = {
        [1] = {
            [1] = -1.5,
            [2] = -1.5
        },
        [2] = {
            [1] = 1.5,
            [2] = 1.5
        }
    },
    ['damaged_trigger_effect'] = {
        ['type'] = 'create-entity',
        ['entity_name'] = 'spark-explosion',
        ['offset_deviation'] = {
            [1] = {
                [1] = -0.5,
                [2] = -0.5
            },
            [2] = {
                [1] = 0.5,
                [2] = 0.5
            }
        },
        ['offsets'] = {
            [1] = {
                [1] = 0,
                [2] = 1
            }
        },
        ['damage_type_filters'] = 'fire'
    },
    ['graphics_set'] = {
        ['animation'] = {
            ['layers'] = {
                [1] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2.png',
                    ['priority'] = 'high',
                    ['width'] = 214,
                    ['height'] = 218,
                    ['frame_count'] = 32,
                    ['line_length'] = 8,
                    ['shift'] = {
                        [1] = 0,
                        [2] = 0.125
                    },
                    ['scale'] = 0.5
                },
                [2] = {
                    ['filename'] = '__base__/graphics/entity/assembling-machine-2/assembling-machine-2-shadow.png',
                    ['priority'] = 'high',
                    ['width'] = 196,
                    ['height'] = 163,
                    ['frame_count'] = 32,
                    ['line_length'] = 8,
                    ['draw_as_shadow'] = true,
                    ['shift'] = {
                        [1] = 0.375,
                        [2] = 0.1484375
                    },
                    ['scale'] = 0.5
                }
            }
        }
    },
    ['open_sound'] = {
        ['filename'] = '__base__/sound/machine-open.ogg',
        ['volume'] = 0.5
    },
    ['close_sound'] = {
        ['filename'] = '__base__/sound/machine-close.ogg',
        ['volume'] = 0.29
    },
    ['impact_category'] = 'metal',
    ['working_sound'] = {
        ['sound'] = {
            ['filename'] = '__base__/sound/assembling-machine-t2-1.ogg',
            ['volume'] = 0.45,
            ['audible_distance_modifier'] = 0.5
        },
        ['fade_in_ticks'] = 4,
        ['fade_out_ticks'] = 20
    },
    ['crafting_categories'] = {
        [1] = 'YAIM0425-d27b-sell',
        [2] = 'YAIM0425-d27b-buy'
    },
    ['crafting_speed'] = 0.75,
    ['energy_source'] = {
        ['type'] = 'void'
    },
    ['energy_usage'] = '0.01W',
    ['module_slots'] = 2,
    ['allowed_effects'] = {
        [1] = 'consumption',
        [2] = 'speed',
        [3] = 'productivity',
        [4] = 'pollution',
        [5] = 'quality'
    },
    ['icons'] = {
        [1] = {
            ['icon'] = '__base__/graphics/icons/assembling-machine-2.png'
        },
        [2] = {
            ['icon'] = '__base__/graphics/icons/signal/signal_black.png',
            ['scale'] = 0.25,
            ['shift'] = {
                [1] = 0,
                [2] = -5
            }
        },
        [3] = {
            ['icon'] = '__base__/graphics/icons/signal/signal-star.png',
            ['scale'] = 0.25,
            ['shift'] = {
                [1] = 0,
                [2] = -5
            }
        }
    },
    ['localised_name'] = {
        [1] = '',
        [2] = {
            [1] = 'entity-name.market'
        }
    },
    ['localised_description'] = {
        [1] = '',
        [2] = {
            [1] = 'entity-description.assembling-machine-2'
        }
    }
}

data:extend({ Item, Recipe, Entity })
Last edited by yaim904 on Sat Nov 22, 2025 11:59 am, edited 1 time in total.
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by Deepl.
:D
computeraddict
Filter Inserter
Filter Inserter
Posts: 412
Joined: Sat Oct 07, 2023 6:44 am
Contact:

Re: The productivity effect is not working.

Post by computeraddict »

The input is the same as the output? I'd wager they're all getting treated as catalysts.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4301
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: The productivity effect is not working.

Post by boskid »

https://lua-api.factorio.com/latest/typ ... oductivity

Since you set 'ignored_by_stats' to be 1000 and it propagates to ignored_by_productivity due to a default value, all product is treated as catalyst and as such productivity applies to 0 items
User avatar
yaim904
Fast Inserter
Fast Inserter
Posts: 140
Joined: Wed Nov 17, 2021 11:26 pm
Contact:

Re: The productivity effect is not working.

Post by yaim904 »

boskid wrote: Sat Nov 22, 2025 10:04 am
You were absolutely right, the ignored_by_stats option was the problem.

I thought that the ignored_by_stats option was only used for manufacturing statistics, I didn't understand that.
Thanks for the clarification
Solo entiendo español, pero si tu también lo entiendes, escríbeme
:D
Everything i write in English is translated by Deepl.
:D
Post Reply

Return to “Modding help”