Search found 153 matches
- 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: 366
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: 366
[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: 328
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: 332
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: 332
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: 332
[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: 290
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: 290
[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: Bug Reports
- Topic: [2.0.70] Requester and Buffer chest tooltip
- Replies: 1
- Views: 154
[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: 208
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: 208
[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: 259
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: 259
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: 972
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: 414
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: 414
[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: 429
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: 429
[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 ...
- Fri Sep 12, 2025 5:41 pm
- Forum: Already exists
- Topic: [2.0.66] Find outstanding requests / requests in flight for an entity (chest)
- Replies: 4
- Views: 662
Re: [2.0.66] Find outstanding requests / requests in flight for an entity (chest)
Cool, thanks! This is a part of the lua api that I have not yet ventured into. I think this is what I was looking for.
- Tue Sep 09, 2025 7:00 pm
- Forum: Already exists
- Topic: [2.0.66] Find outstanding requests / requests in flight for an entity (chest)
- Replies: 4
- Views: 662
Re: [2.0.66] Find outstanding requests / requests in flight for an entity (chest)
I had a user asking whether it is possible to expose that information to the circuit network (https://github.com/hgschmie/factorio-inventory-sensor-improved/issues/4) and I started poking around to see whether this information is available.
I guess having a way to ask a requester or buffer chest ...
I guess having a way to ask a requester or buffer chest ...