[2.1.8] LuaSimulation::get_widget_position cannot locate recipe items inside Factoriopedia

Post your bugs and problems so we can fix them.
User avatar
Shemp
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Mon Jan 19, 2026 6:51 pm
Contact:

[2.1.8] LuaSimulation::get_widget_position cannot locate recipe items inside Factoriopedia

Post by Shemp »

zzz-ShempDebug_0.2.1.zip
(1.67 KiB) Downloaded 21 times
zzz-ShempDebug_0.1.0.zip
(1.62 KiB) Downloaded 16 times
Version 0.1.0 of the reproduction mod runs in Factorio 2.0.77 and produces the expected behaviour. Version 0.2.1 of the mod runs in Factorio 2.1.8 and produces incorrect behaviour. The two mods are identical except for info.json.

The mods each do the following:
  • It adds a Tips and Tricks item called "Test Factoriopedia" at the top of the T&T interface.
  • In this simulation, the player opens Factoriopedia on the "Iron chest (Item/Recipe)" page.
  • The simulation attempts to locate the "Iron plate" ingredient in the recipe on the right-hand side of Factoriopedia, using get_widget_position.
  • In 2.0, it will successfully move the cursor and click to open the Iron plate page.
  • In 2.1, a MapPosition is not returned, so it instead shows a flying text to indicate the error.
  • Factoriopedia is closed, and the simulation restarts.
The important part starts at Line 41 of data.lua, where I am treating the recipe item as a "simple-item-slot" in order to locate it.

I have tested using this call with other widget types, such as "label" or "item-group-tab", and they still work from within Factoriopedia.
Post Reply

Return to “Bug Reports”