How to set request_slot_count on a logistic-container?

Place to get help with not working mods / modding interface.
thislooksfun
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Aug 31, 2014 10:27 pm
Contact:

How to set request_slot_count on a logistic-container?

Post by thislooksfun »

Hello, I'm trying to make a custom "logistic-container" entity, and I would like it to have more than the default 10 logistic request slots. I found the "request_slot_count" property, but it's read-only.
I then tried "request_slot_count = 20" in my "entity.lua" file, but nothing changed.

Is there some way of setting this property that I'm missing?

Thanks,
-tlf
Rseding91
Factorio Staff
Factorio Staff
Posts: 14363
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: How to set request_slot_count on a logistic-container?

Post by Rseding91 »

You can't change it runtime. It's a read-only property that's defined in the prototype.
If you want to get ahold of me I'm almost always on Discord.
thislooksfun
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Aug 31, 2014 10:27 pm
Contact:

Re: How to set request_slot_count on a logistic-container?

Post by thislooksfun »

Yes, but how do I change it in the prototype? Like I said, I tried setting "request_slot_count = 20", but it didn't do anything.

Full prototype code:

Code: Select all

data:extend({
    {
        type = "logistic-container",
        name = "one-time-request-dummy-chest",
        icon = "__base__/graphics/icons/logistic-chest-requester.png",
        flags = {},
        max_health = 0,
        corpse = "small-remnants",
        collision_box = {{0, 0}, {0, 0}},
        selection_box = {{-0.25, -0.25}, {0.25, 0.25}},
        collision_mask = {"not-colliding-with-itself"},
        order = "z",
        inventory_size = 100,
        logistic_mode = "requester",
        request_slot_count = 20,
        picture =
        {
            filename = "__OneTimeRequest__/graphics/null.png",
            priority = "low",
            width = 1,
            height = 1,
            shift = {0, 0}
        },
        circuit_wire_max_distance = 0
    }
})
thislooksfun
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Aug 31, 2014 10:27 pm
Contact:

Re: How to set request_slot_count on a logistic-container?

Post by thislooksfun »

Thanks to the IRC, I found the problem: the prototype key is "num_logistic_slots", not "request_slot_count".
myricaulus
Long Handed Inserter
Long Handed Inserter
Posts: 84
Joined: Mon May 08, 2017 3:33 pm
Contact:

Re: How to set request_slot_count on a logistic-container?

Post by myricaulus »

I also hit the same problem, but i got still the same "Error while loading entity prototype "warehouse-requester" (logistic-container): A requester-type chest with zero request slots makes no sense.", although i now set num_logistic_slots = 10
Rseding91
Factorio Staff
Factorio Staff
Posts: 14363
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: How to set request_slot_count on a logistic-container?

Post by Rseding91 »

myricaulus wrote:I also hit the same problem, but i got still the same "Error while loading entity prototype "warehouse-requester" (logistic-container): A requester-type chest with zero request slots makes no sense.", although i now set num_logistic_slots = 10
It's "logistic_slots_count" in 0.16.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding help”