There is no network 0. The network id is “binary coded” and a set bit means that a station is part of that network. If you want to have distinct networks, you need to use single bits, so 1, 2, 4, 8, 16, and so on.
0 is “no bit set” and a station with that value is not part of any network (no bit ...
Search found 155 matches
- Wed Nov 26, 2025 12:38 am
- Forum: Logistic Train Network
- Topic: Provider cant see inventory
- Replies: 1
- Views: 243
- Tue Nov 18, 2025 7:17 pm
- Forum: Won't implement
- Topic: Hide circuit connections that do not originate from the player
- Replies: 2
- Views: 314
Hide circuit connections that do not originate from the player
With the miniloader redux mod, I have entities that look like this:
Screenshot 2025-11-18 at 11.14.23.png
This is a freshly minted loader just sitting there. If you open the GUI, it opens the circuit network sub-GUI and shows red and green connections. That is because internally, the miniloader ...
Screenshot 2025-11-18 at 11.14.23.png
This is a freshly minted loader just sitting there. If you open the GUI, it opens the circuit network sub-GUI and shows red and green connections. That is because internally, the miniloader ...
- Sat Nov 01, 2025 5:18 pm
- Forum: Bug Reports
- Topic: [2.0.71] Rich Text line breaks in LocalisedStrings (label caption)
- Replies: 3
- Views: 514
Re: [2.0.71] Rich Text line breaks in LocalisedStrings (label caption)
Thanks. Appreciate you pointing those out. This is such a big API, I always learn new things.
- Tue Oct 21, 2025 4:41 am
- Forum: Bug Reports
- Topic: [2.0.71] Rich Text line breaks in LocalisedStrings (label caption)
- Replies: 3
- Views: 514
[2.0.71] Rich Text line breaks in LocalisedStrings (label caption)
I have a localised string that looks like this: open_gui_shift=Open GUI\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Open location on map
When I use this text as a tooltip, it renders like this:
Screenshot 2025-10-20 at 21.33.25.png
but when I use it as a caption for a ...
When I use this text as a tooltip, it renders like this:
Screenshot 2025-10-20 at 21.33.25.png
but when I use it as a caption for a ...
- Mon Oct 20, 2025 5:35 am
- Forum: Modding interface requests
- Topic: custom per-gui element tooltip for minimap
- Replies: 4
- Views: 537
custom per-gui element tooltip for minimap
Hi,
I have a gui with a number of elements (for train stations and trains). I want to be able to hover over a gui element (usually a piece of text like "xyz station" or "abc train") and that should show a minimap of either the train or station position.
There seems to be no rich text element for ...
I have a gui with a number of elements (for train stations and trains). I want to be able to hover over a gui element (usually a piece of text like "xyz station" or "abc train") and that should show a minimap of either the train or station position.
There seems to be no rich text element for ...
- Thu Oct 16, 2025 5:03 pm
- Forum: Not a bug
- Topic: [2.0.70] Robot requests for Robo Ports don't work?
- Replies: 4
- Views: 490
Re: [2.0.70] Robot requests for Robo Ports don't work?
Oh, that was non-obvious to me. Thanks for the explanation!
- Wed Oct 15, 2025 10:50 pm
- Forum: Not a bug
- Topic: [2.0.70] Robot requests for Robo Ports don't work?
- Replies: 4
- Views: 490
Re: [2.0.70] Robot requests for Robo Ports don't work?
Thanks for the explanation. However, then what is the passive provider logistic point within the roboport used for?
- Wed Oct 15, 2025 7:47 pm
- Forum: Not a bug
- Topic: [2.0.70] Robot requests for Robo Ports don't work?
- Replies: 4
- Views: 490
[2.0.70] Robot requests for Robo Ports don't work?
This is a regular roboport. It has an outstanding Robot request for 50 construction robots. It also has 50 logistics robots stored inside that are ready to move things.
Next to the roboport is a storage chest with 50 construction robots. Yet, the request is red and it has satisfaction of 0/50 ...
Next to the roboport is a storage chest with 50 construction robots. Yet, the request is red and it has satisfaction of 0/50 ...
- Wed Oct 15, 2025 12:29 am
- Forum: Fixed for 2.1
- Topic: [2.0.70] defines.logistic_member_index lacks a value for cargo landing pad
- Replies: 2
- Views: 431
Re: [2.0.70] defines.logistic_member_index lacks a value for cargo landing pad
also https://lua-api.factorio.com/latest/cla ... mber_index should probably be defined using defines.logistic_member_index
- Wed Oct 15, 2025 12:26 am
- Forum: Fixed for 2.1
- Topic: [2.0.70] defines.logistic_member_index lacks a value for cargo landing pad
- Replies: 2
- Views: 431
[2.0.70] defines.logistic_member_index lacks a value for cargo landing pad
calling entity.get_logistic_point() on a cargo landing pad entity yields a single LuaLogisticPoint.
However, it is not clear, which constant can be used to call entity.get_logistic_point(defines.logistic_member_index.<mumble>)
It is not defines.logistic_member_index.logistic_container ...
However, it is not clear, which constant can be used to call entity.get_logistic_point(defines.logistic_member_index.<mumble>)
It is not defines.logistic_member_index.logistic_container ...
- Tue Oct 14, 2025 10:08 pm
- Forum: Not a bug
- Topic: [2.0.70] Requester and Buffer chest tooltip
- Replies: 1
- Views: 236
[2.0.70] Requester and Buffer chest tooltip
The requester and buffer chests (which are the only types that can actually request things from the logistics network) show "filter" in their tooltip:
Screenshot 2025-10-14 at 15.05.45.png
Shouldn't that read "requests"? "filter" makes only sense for a storage chest (which has a filter).
Screenshot 2025-10-14 at 15.05.45.png
Shouldn't that read "requests"? "filter" makes only sense for a storage chest (which has a filter).
- Tue Oct 14, 2025 8:34 pm
- Forum: Modding interface requests
- Topic: [2.0.70] package key calculation for require
- Replies: 1
- Views: 326
Re: package key calculation for require
Following up on my own post: Having this would be especially beneficial for using mods in data/settings stage, as those don't have `script` available and there is not a good way to find the current mod name. As `require` works fine in those stages (and the keys in the `package.loaded` table have the ...
- Mon Oct 06, 2025 5:18 am
- Forum: Modding interface requests
- Topic: [2.0.70] package key calculation for require
- Replies: 1
- Views: 326
[2.0.70] package key calculation for require
Both standard lua and the Factorio lua use the package.loaded table to manage files that have already been loaded. However, in Factorio, the standard implementation has been replaced by a custom implementation (it says so at https://lua-api.factorio.com/latest/auxiliary/libraries.html#modified ...
- Mon Sep 29, 2025 5:26 pm
- Forum: Modding help
- Topic: circular dependency management
- Replies: 2
- Views: 395
Re: circular dependency management
What do you want to achieve exactly?
Well, ideally I could do something like this:
local A = {}
package.loaded[package.key(...)] = A
using a hypothetical `package.key` functionthat would create the correct key from the varargs that get passed in.
In vanilla lua, you can do that:
local A ...
- Mon Sep 29, 2025 5:07 am
- Forum: Modding help
- Topic: circular dependency management
- Replies: 2
- Views: 395
circular dependency management
Hi,
so I have two files, A.lua and B.lua:
A.lua:
local A = {}
-- manage circular dependencies
local _pkgname = ...
package.loaded['__' .. script.mod_name .. '__/' .. _pkgname:gsub('%.', '/') .. '.lua'] = A
-- manage circular dependencies
local B = require('some.thing.B')
B.lua:
local B ...
so I have two files, A.lua and B.lua:
A.lua:
local A = {}
-- manage circular dependencies
local _pkgname = ...
package.loaded['__' .. script.mod_name .. '__/' .. _pkgname:gsub('%.', '/') .. '.lua'] = A
-- manage circular dependencies
local B = require('some.thing.B')
B.lua:
local B ...
- Mon Sep 15, 2025 8:54 pm
- Forum: Resolved Requests
- Topic: [2.0.64] LuaGuiElement.add woes with sparse arrays?
- Replies: 11
- Views: 1252
Re: [2.0.64] LuaGuiElement.add woes with sparse arrays?
I’d consider “mark it clearly in the docs” a reasonable outcome. I spent quite some time chasing this and trying to reproduce the problem.
Another possible fix would be “only ever return string keys” but I understand that this would break some existing mods.
Another possible fix would be “only ever return string keys” but I understand that this would break some existing mods.
- Sun Sep 14, 2025 11:51 pm
- Forum: Not a bug
- Topic: [2.0.66] Train Manager does not calculate path from departure station
- Replies: 2
- Views: 522
Re: [2.0.66] Train Manager does not calculate path from departure station
So it seems there is an explanation to the behavior but I still think it is kind of a bug. The station in question looks like this:
Screenshot 2025-09-14 at 16.43.36.png
There are two rails. One straight rail that the station is connected to and a curved rail that connects (on the left side) to ...
Screenshot 2025-09-14 at 16.43.36.png
There are two rails. One straight rail that the station is connected to and a curved rail that connects (on the left side) to ...
- Sun Sep 14, 2025 8:59 pm
- Forum: Not a bug
- Topic: [2.0.66] Train Manager does not calculate path from departure station
- Replies: 2
- Views: 522
[2.0.66] Train Manager does not calculate path from departure station
So I have a train. The train is departing a station (wait_station -> on_the_track) and has a path (and a path_end_rail, but not a path_end_station):
Screenshot 2025-09-14 at 08.52.06.png
If I ask the train manager to calculate the path for the train itself, it works fine:
game.train_manager ...
Screenshot 2025-09-14 at 08.52.06.png
If I ask the train manager to calculate the path for the train itself, it works fine:
game.train_manager ...
- Sat Sep 13, 2025 10:10 pm
- Forum: Not a bug
- Topic: [2.0.66] event state 'wait_station' never fired when changing schedule in an event handler
- Replies: 3
- Views: 545
Re: [2.0.66] event state 'wait_station' never fired when changing schedule in an event handler
<sad>, but not super-surprised. I assumed it would be something like this. Thank you for the thorough explanation, this helps me a lot to understand how the game sends events.
Let me see if I can figure out a workaround for my use-case.
(I don't think there is a way for a mod to register a ...
Let me see if I can figure out a workaround for my use-case.
(I don't think there is a way for a mod to register a ...
- Sat Sep 13, 2025 5:44 am
- Forum: Not a bug
- Topic: [2.0.66] event state 'wait_station' never fired when changing schedule in an event handler
- Replies: 3
- Views: 545
[2.0.66] event state 'wait_station' never fired when changing schedule in an event handler
I have two mods. Let's call them "Logistic Train Network" and "Train Tracker". Both listen to `on_train_changed_state`.
When a train stops at a station (transition from `arrive_station` to `wait_station`), the first mod (Logistic Train Network) receives an event with `old_state` = 5 (arrive_station ...
When a train stops at a station (transition from `arrive_station` to `wait_station`), the first mod (Logistic Train Network) receives an event with `old_state` = 5 (arrive_station ...