Page 1 of 1

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

Posted: Fri Jun 26, 2026 6:43 pm
by Shemp
zzz-ShempDebug_0.2.1.zip
(1.67 KiB) Downloaded 21 times
zzz-ShempDebug_0.1.0.zip
(1.62 KiB) Downloaded 17 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.