Player Request Crafting Layout


A way for players to apply their crafting item layout to their logistics window

Utilities
3 years ago
0.18 - 1.1
1.00K

b [limitation] list cutoff

3 years ago

Is there a limit on the length of the logistic request list? It cuts off for me before it gets all of the items. I'm playing with Space exploration, which adds a LOT of stuff.

3 years ago

I don't have a limit, so there must be a core Factorio limit.
With the list I make being often non full rows, that probably doesn't help with any total slot limit.

If i expand this mod to offer more options those would likely help manage very large lists.

3 years ago

SE adds a LOT of items. excluding certain categories would be useful.

3 years ago

I really like the default layout with the empty slots/rows to organize the request layout.

But since I also miss some (not much items from my last tab) I'd really like a "make it dense" option: Just put the requests in the list without any empty spaces. For larger modded games it seems the best solution imho. To find stuff there is still CTRL+F (which I have to use to find it in the craftings tabs in the first place).

3 years ago

An option to exclude certain subgroups/groups would be nice.
As is, I used the Trash slots mod to adjust it.

3 years ago

The limit seems to be 100 rows, so a total max of 1000 requests.

For now I just squashed my requests back to back without any blanks.

2 years ago

In the meantime (until the mod receives an update) I just found my used cheat command to make dense list without any empty fields:

/c local groups = {}
for _, item in pairs(game.item_prototypes) do
    if (item.flags == nil or item.flags["hidden"] ~= true) and (item.type ~= "blueprint" and item.type ~= "deconstruction-item" and item.type ~= "upgrade-item" and item.type ~= "blueprint-book") then
        groups[item.group.name] = groups[item.group.name] or {name = item.group.name, order = item.group.order, subgroups = {}}
        local group = groups[item.group.name]
        group.subgroups[item.subgroup.name] = group.subgroups[item.subgroup.name] or {name = item.subgroup.name, order = item.subgroup.order, items = {}}
        local subgroup = group.subgroups[item.subgroup.name]
        subgroup.items[item.name] = {name = item.name, order = item.order}
    end
end

local sortedGroups, rows = {}, 0
for _, group in pairs(groups) do
    local sortedGroup = {name = group.name, order = group.order, subgroups = {}}
    for _, subgroup in pairs(group.subgroups) do
        local sortedSubgroup = {name = subgroup.name, order = subgroup.order, items = {}}
        for _, item in pairs(subgroup.items) do
            table.insert(sortedSubgroup.items, item)
        end
        table.sort(
            sortedSubgroup.items,
            function(itemA, itemB)
                if itemA.order < itemB.order then
                    return true
                else
                    return false
                end
            end
        )
        rows = rows + math.ceil(#sortedSubgroup.items / 10)
        table.insert(sortedGroup.subgroups, sortedSubgroup)
    end
    table.sort(
        sortedGroup.subgroups,
        function(subgroupA, subgroupB)
            if subgroupA.order < subgroupB.order then
                return true
            else
                return false
            end
        end
    )
    table.insert(sortedGroups, sortedGroup)
end
table.sort(
    sortedGroups,
    function(groupA, groupB)
        if groupA.order < groupB.order then
            return true
        else
            return false
        end
    end
)
local oldValues = {}
for i = 1, game.player.character.request_slot_count do
    local oldValue = game.player.get_personal_logistic_slot(i)
    if oldValue.name ~= nil then
        oldValues[oldValue.name] = oldValue
    end
    game.player.clear_personal_logistic_slot(i)
end
local slotIndex = 0
for _, group in pairs(sortedGroups) do
    for _, subgroup in pairs(group.subgroups) do
        for _, item in pairs(subgroup.items) do
            slotIndex = slotIndex + 1
            local oldValue = oldValues[item.name] or {}
            game.player.set_personal_logistic_slot(slotIndex, {name = item.name, min = oldValue.min, max = oldValue.max})
        end
    end
end

This can be copied & pasted into the ingame chat (will disable achievements).

New response