Nanobots: Early Bots 3.0


Personal construction nanobots with smart automation, auto-defense, and quality support! Build, repair, and defend your factory with portable nanobots — no roboport network required! Features automated turret ammo delivery, quality-aware automation, combat modes, statistics, and performance optimizations. Factorio 2.1 adds quick Nano/Thermite switching and smarter ammo warnings. Supports Factorio 2.0 (5.8.x) and 2.1 (5.9.x), including Space Age.

Content
21 hours ago
2.0 - 2.1
7.11K
Logistic network

g Roboport Interface: `LuaConstantCombinatorControlBehavior::parameters` removed in 2.0 — interface reads no signals

2 months ago

Hi, thanks for keeping this mod alive — the 5.8.x performance work is noticeable.

Reporting a repeating script error on 5.8.8.

Environment
- Factorio 2.0.77 (build 84539, win64, steam, space-age)
- Nanobots3 5.8.8
- stdlib2 2.0.1
- Space Age enabled

Error (repeats whenever a Roboport Interface is polled)

Script @__stdlib2__/stdlib/core.lua:45: Nanobots3:LuaConstantCombinatorControlBehavior doesn't contain key parameters.

Cause

scripts/roboport-interface.lua line 199:

local parameters = get_parameters(behaviour.parameters)

LuaConstantCombinatorControlBehavior::parameters was removed in the 2.0 API. Signals now live in logistic sections — behaviour.sections, each LuaLogisticSection having filters, where each filter has .value (SignalFilter) and .min (the count).

Because get_parameters receives nil, the interface reads no signals at all, so its network jobs (find items, chop trees, gather fish, deconstruct depleted miners) silently do nothing. Construction and repair are unaffected.

This looks like the sibling of the two calls handled in 5.8.1 under "Factorio 2.0 API Compatibility" — get_upgrade_direction() and get_upgrade_quality() were both addressed there, but this one wasn't.

Suggested patch

scripts/roboport-interface.lua, replacing get_parameters at line 70:

local function get_parameters(behaviour)
    local parameters = {}
    if not (behaviour and behaviour.valid) then
        return parameters
    end
    for _, section in pairs(behaviour.sections or {}) do
        if section.valid and section.active then
            local multiplier = section.multiplier or 1
            for _, filter in pairs(section.filters or {}) do
                local signal = filter.value
                if signal and signal.name then
                    parameters[signal.name] = (parameters[signal.name] or 0) + ((filter.min or 0) * multiplier)
                end
            end
        end
    end
    return parameters
end

And at line 199:

local parameters = get_parameters(behaviour)

The section.active and section.multiplier handling is new behaviour with no 1.1 equivalent; drop it if you'd rather keep the change minimal.

I've been running this locally without the error returning, though I haven't stress-tested the interface's job scheduling.

Note that 5.8.9 and 5.9.0 both target 2.1, so 2.0.x users are currently on 5.8.8 with no path to a release containing this change.

a month ago

Thanks again for the detailed report and for providing the patch!

We've now released Nanobots3 5.8.9 specifically for Factorio 2.0 users, with this issue fixed. The updated version is already available on the Mod Portal.

The Roboport Interface now reads signals through logistic sections instead of the removed LuaConstantCombinatorControlBehavior::parameters API.

So, for anyone staying on Factorio 2.0, please update to Nanobots3 5.8.9.
Nanobots3 5.9.0 remains the current version for Factorio 2.1.

Thanks for catching this and helping us get it fixed!

2 days ago

Still getting this error on version 5.9.4 for Nano-bots

2 days ago

Hi! Thanks for reporting this!

Could you please share the exact error message or a screenshot of it, along with your Factorio version?

The original issue in this thread was related to the Roboport Interface accessing an API property that was removed in Factorio 2.0. Since you're using Nanobots3 5.9.4, I'd like to confirm whether you're encountering the same issue or a different one.

If possible, please also let me know whether you're using any other mods that interact with the Roboport Interface.

Thanks for helping me track this down!

a day ago

I get the lua error with the interface placed. Error persists on 5.9.7 (didn't see this message until after I updated mod)
LuaConstantCombinatorControlBehavior doesn't contain key parameters.

As for other mods that may be interacting it, the only ones that have any potential impact as far as I can guess would be the following two. I don't think any other mods I have add or modify robots at all.

Bob's Logistics,
Krastorio 2 / Spaced out

21 hours ago

Hi ReignOfMagic!

Thanks for the additional details and for your patience!

I tracked down the issue. The Factorio 2.1 branch was still using the old LuaConstantCombinatorControlBehavior.parameters API in the Roboport Interface, even though this had already been fixed in the Factorio 2.0 branch.

I've now released Nanobots3 5.9.8 for Factorio 2.1, which fixes this issue by reading signals through logistic sections instead of the removed API property.

I also performed a broader API compatibility review and fixed several additional issues, particularly with entity revival and Roboport Interface operations.

Both updated versions are now available on the Mod Portal:
- 5.9.8 — Factorio 2.1
- 5.8.13 — Factorio 2.0

The changes have passed code-level checks, but I haven't been able to test every scenario in-game.

When you have a chance, could you please update to 5.9.8 and check whether the Roboport Interface now works correctly with your Bob's Logistics and Krastorio 2 / Spaced Out setup?

I'd really appreciate your confirmation, especially if the error is completely gone.

Thanks again for helping improve the mod!

New response