Nanobots: Early Bots 3.0


Personal construction nanobots: build, repair, upgrade, clear trees and rocks, and supply turret ammunition without a roboport network. Features quality support, vehicle and cargo-wagon materials, construction around your character during remote view, configurable work modes, combat automation, and statistics. Space Age compatible.

Content
a day ago
2.0 - 2.1
9.06K
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.

2 months 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!

a month ago

Still getting this error on version 5.9.4 for Nano-bots

a month 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 month 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

a month 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!

a month ago

Issue seems to be gone now. The Roboports will now occasionally receive and process the pick up items from the interface (once per minute or so). No more lua errors popping up in the console.

Thank you for the quick fix!

a month ago

Great news! I'm glad the Lua errors are gone and the Roboport Interface is working again!

Thank you for testing the update and confirming the fix, especially with your Bob's Logistics and Krastorio 2 setup.

One thing caught my attention: you mentioned that the roboports process item pickup requests roughly once per minute. Is that working as you'd expect, or are you still experiencing unusually long delays?

I'd like to make sure the interface is not just error-free, but also functioning properly.

Thanks again for your help and patience! :)

a month ago

I don't know how often the search for items is supposed to run, and honestly once a minute is personally fine to catch the items that occasionally get dropped .

a month ago

Thanks for clarifying!

Glad to hear the current behavior works well for you and that the Lua errors are completely gone.

I'll keep the scanning frequency in mind for future improvements, but for now I'm happy the Roboport Interface is working again.

Thanks again for your patience and for helping me track down the issue. Enjoy the mod! :)

This thread has been locked.