Search found 314 matches

by justarandomgeek
Sun Jun 28, 2026 3:20 am
Forum: Bug Reports
Topic: [2.1.8] Crash with LuaDebugAdapter
Replies: 3
Views: 185

Re: [2.1.8] Crash with LuaDebugAdapter

i've submitted a couple patches to help investigate this in more detail (or if we're lucky, maybe just fix it)

mods, if we could adjust the title to "Crash with LuaDebugAdapter when updating breakpoints"
by justarandomgeek
Sat Jun 27, 2026 3:34 pm
Forum: Bug Reports
Topic: [2.1.8] Crash with LuaDebugAdapter
Replies: 3
Views: 185

Re: [2.1.8] Crash with LuaDebugAdapter

Very strange. It looks like you caused a SetBreakpoints request, which then failed at a completely nonsensical spot as it was looking for the corresponding known source file to (re)validate those breakpoints. Can you tell me more about what you were doing before this happened?
by justarandomgeek
Fri Jun 26, 2026 5:30 pm
Forum: Not a bug
Topic: [2.1.7] mod load path caching problems?
Replies: 6
Views: 297

Re: [2.1.7] mod load path caching problems?

i said this on discord yesterday, but just to have it on the record here in the thread: my conclusion is that require is working as intended and that this was a bug in the mod lua that had merely been hidden by previous quirks of loading that no longer apply, and that the fix is for the mod lua to ...
by justarandomgeek
Fri Jun 26, 2026 2:26 am
Forum: Not a bug
Topic: [2.1.7] mod load path caching problems?
Replies: 6
Views: 297

Re: [2.1.7] mod load path caching problems?

in 2.0 the package.loaded cache got reset to an earlier state between each top level data stage file, it appears this is no longer the case and it is now more like normal require caching behavior (the main deviation from upstream behavior now is the use of resolved name rather than requested name ...
by justarandomgeek
Thu Jun 25, 2026 10:52 pm
Forum: Not a bug
Topic: [2.1.7] mod load path caching problems?
Replies: 6
Views: 297

Re: [2.1.7] mod load path caching problems?

in inventory sensor data-updates, you do:

require('lib.init')
Framework.post_data_updates_stage()


`lib.init` resolves correctly but is already cached from your earlier call in data, so it does nothing, and you discard the returned reference. You then call into the global var Framework, which ...
by justarandomgeek
Thu Jun 25, 2026 12:15 am
Forum: Resolved Problems and Bugs
Topic: [2.1.7] Crash viewing particular planet backdrops (PlatformBackdropRenderLogic::renderPlanet)
Replies: 2
Views: 199

Re: [2.1.7] Crash viewing particular planet backdrops (PlatformBackdropRenderLogic::renderPlanet)

yeah i was waiting for it to be merged (which it now has been) to confirm that it's fixed for next release :)
by justarandomgeek
Sun Dec 28, 2025 6:34 pm
Forum: Resolved Requests
Topic: LuaEntity::neighbours incorrect dict type
Replies: 1
Views: 483

LuaEntity::neighbours incorrect dict type

the dict type option for LuaEntity::neighbours is listed as dictionary[string → array[LuaEntity]], but it appears all the dict-shaped results are actually dictionary[string → LuaEntity]
by justarandomgeek
Mon Nov 17, 2025 10:05 pm
Forum: Not a bug
Topic: [2.0.72] Rocket Silo max inventory index 11 vs 12
Replies: 1
Views: 548

[2.0.72] Rocket Silo max inventory index 11 vs 12

get_max_inventory_index() on a rocket silo returns 12, but get_inventory(12) seems to always be nil, and the largest defined index is 11:

fuel=1
rocket_silo_input=crafter_input=2
rocket_silo_output=crafter_output=3
rocket_silo_modules=crafter_modules=4
unnamed =5
burnt_result=6
crafter_trash=8 ...
by justarandomgeek
Mon Nov 17, 2025 9:59 pm
Forum: Resolved Problems and Bugs
Topic: [2.0.72] Rocket Silo inventory index 5 has no defines.inventory/name
Replies: 1
Views: 572

[2.0.72] Rocket Silo inventory index 5 has no defines.inventory/name

get_inventory(5) on a rocket silo returns an inventory, but that inventory has an empty `name`, and there is no corresponding defines.inventory value. From discussion with Bilka, this seems to be `rocketInventoryIndex`, the inventory of the attached cargo pod.
by justarandomgeek
Tue Nov 04, 2025 6:22 pm
Forum: Resolved Problems and Bugs
Topic: [2.0.72] Crash and weirdness with game.simulation.write (BlueprintLibraryGui::rebuildGui)
Replies: 3
Views: 856

Re: [2.0.72] Crash and weirdness with game.simulation.write (BlueprintLibraryGui::rebuildGui)

Just to confirm, the other pr (#7998 re: LuaPlayer.blueprints) does not in fact fix this - but i don't understand this one enough to do anything more helpful
by justarandomgeek
Tue Aug 12, 2025 4:50 pm
Forum: Documentation Improvement Requests
Topic: Package Load Preference
Replies: 0
Views: 774

Package Load Preference

https://lua-api.factorio.com/latest/aux ... cture.html

would be nice to specify the preference when multiple packages of the same mod exist (zipped/unzipped) which one will be loaded
by justarandomgeek
Wed Jul 09, 2025 6:33 pm
Forum: Modding discussion
Topic: is https://github.com/Rseding91/Factorio-Lua up to date?
Replies: 7
Views: 1935

Re: is https://github.com/Rseding91/Factorio-Lua up to date?


It is now. thank you. also it seems that i cant compile it? it says that trio.h is not found? is there a dependency im missing or something?


we use https://daniel.haxx.se/projects/trio/ for a printf that actually works correctly on every platform (which, amazingly, is not something you can ...
by justarandomgeek
Thu Nov 07, 2024 7:49 pm
Forum: Documentation Improvement Requests
Topic: Use overload signatures where possible instead of union return types
Replies: 1
Views: 796

Use overload signatures where possible instead of union return types

for example, https://lua-api.factorio.com/latest/classes/LuaEntity.html#get_logistic_point could trivially be a function with two overloads: fun():LuaLogisticPoint, fun(index):dictionary, and we could in turn generate overload tags for LuaLS to correctly determine which return it got from a given ...
by justarandomgeek
Wed Oct 23, 2024 3:21 pm
Forum: Resolved Requests
Topic: The 'quality' field is not documented for SignalID
Replies: 3
Views: 1305

Re: The 'quality' field is not documented for SignalID

in the mean time, SignalFilter is probably the type you're actually looking for!
by justarandomgeek
Fri Dec 08, 2023 6:16 am
Forum: Development tools
Topic: Workaround for broken mouse click functionality when debugging Factorio in a mouse event
Replies: 2
Views: 3323

Re: Workaround for broken mouse click functionality when debugging Factorio in a mouse event

If anyone has any suggestions for how I can detect, from the debugger (in TS), that this has occurred (or is likely to occur in a given environment), i can also offer to set the setting for the future.
by justarandomgeek
Sun Nov 26, 2023 12:31 am
Forum: Documentation Improvement Requests
Topic: Specify key type for index[] operators
Replies: 0
Views: 834

Specify key type for index[] operators

The runtime classes with index[] operators currently only specify the values returned by that operator, not the key types to use with it. LuaLS tags require a key type for these as well, which i'm currently filling in with special cases.
by justarandomgeek
Wed May 31, 2023 4:10 pm
Forum: Development tools
Topic: Factorio Modding Tool Kit: Debugging, LSP for Locale and Changelog, Packaging and more
Replies: 1
Views: 7937

Factorio Modding Tool Kit: Debugging, LSP for Locale and Changelog, Packaging and more

FMTK provides a growing collection of tools for VSCode and other editors. It is available as a VSCode Extension , and a standalone npm cli tool

Tools include:

Debugging, with breakpoints, stepping, variable inspection etc (for any DAP-compatible editor)
JSON Validation of various files ...
by justarandomgeek
Thu Dec 08, 2022 3:01 am
Forum: Mod portal Discussion
Topic: [Public] Mod images API
Replies: 3
Views: 2603

Re: [Public] Mod images API

What's the lifetime of an image that is uploaded and then un-referenced?

Could we have a flag for "hidden"/unlisted images in the gallery to not be shown in the image-strip on the mod page, for use in the markdown description/faq pages?

Go to advanced search