Item Cam 2


Follow an item as it's processed, like in the Factorio trailer. Spiritual successor to DaveMcW's Item Cam

Utilities
4 days ago
2.0
717
Cheats

g [Resolved] Crash with Tile upgrade Planner

4 months ago
(updated 4 months ago)

Hi, cool mod.

Unfortunately, it seems to cause a crash every single time I attempt to select an item to follow while the mod Tile Upgrade Planner is enabled:
https://mods.factorio.com/mod/tile-upgrade-planner

The mod Tile Upgrade Planner (20.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event tile-upgrade-planner::on_player_selected_area (ID 55)
tile-upgrade-planner/script/planner.lua:80: attempt to index local 'planner' (a nil value)
stack traceback:
tile-upgrade-planner/script/planner.lua:80: in function 'selected_area'
tile-upgrade-planner/script/planner.lua:130: in function <tile-upgrade-planner/script/planner.lua:130>

Since the mod is a hard requirement for Muluna, I can't just disable it for my current playthrough.
Removing the upgrade mod and testing the item follow function on a new save works perfectly, though.

Factorio log pastebin: https://pastebin.com/nMgiQgZU
Reproduced on an entirely fresh sandbox save with only this mod, space age and tile upgrade planner.

4 months ago
(updated 4 months ago)

Hi thank you for the report. Tile Upgrade Planner is to blame here. When you select something to follow, Item Cam 2 deals with that event first, clearing the selection item in cursor. After comes Tile Upgrade Planner, which doesn't properly check if there's an item in cursor, erroring out. It's a very unfortunate nitpick because it wouldn't error out if you were in any other state than with a "ghost" controller, which is only used when you're waiting for respawn timer... and here, to prevent you from being able to accidentally click GUIs etc while following.

I'll report its issue in mod's discussion. For now I've made it a hidden dependency so that hopefully my mod gets the event last. Try using 0.8.1

4 months ago

Thanks, that seems to have fixed it. Now that I can test it properly, I can now present you with a new crash:

The mod Item Cam 2 (0.8.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event item-cam-2::on_object_destroyed (ID 174)
LuaEntity belongs to surface fulgora (index 14) but a LuaEntity belonging to surface nauvis (index 1) was expected.
stack traceback:
[C]: in function 'set_controller'
item-cam-2/script/focus-behavior.lua:100: in function 'stop_following'
item-cam-2/control.lua:36: in function 'stop_item_cam'
item-cam-2/control.lua:125: in function 'update_focus'
item-cam-2/control.lua:132: in function <item-cam-2/control.lua:128>

It seems to happen whenever I exit the item view after using it on a planet I am not currently on - I am currently on Fulgora, and everything works there. But if I remote view to another planet, it will error out when I try to exit the item view.

4 months ago

This should be fixed in 0.8.2, thank you for the report

4 months ago

Since the creator of tile upgrade planner appears AWOL, and I view it as essential to making certain parts of Muluna work, I have created a fork of tile-upgrade-planner made specifically to work with Muluna. In this fork, I have fixed this issue so that nothing happens if the cursor stack is empty.

New response