Remembering mod changes to Player.zoom in Remote View

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
benlove007
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Oct 11, 2025 5:23 pm
Contact:

Remembering mod changes to Player.zoom in Remote View

Post by benlove007 »

Setting player.zoom should update the current remote view history item just like it would if the player changed the zoom with the mouse wheel.

If the zoom level is changed with the mouse wheel, the current zoom level is remembered when traveling backward and forward within the remote view history. Similarly, if the position within the remote view is changed using standard controls (W-A-S-D), the current remote view history entry is updated. However, if a mod changes the zoom level by setting player.zoom directly, the remote view history is not updated. This is not an issue with changing the remote view position, because Player.set_controller already takes a position parameter, and this function appends to the remote view history list, even when the controller type isn't changing.

Alternatively, Player.set_controller could take an initial zoom level to store in the remote view history list. But this isn't as good because it requires appending a new history item just to change the zoom level, which isn't what happens if the player changes zoom level via controls.

Autozoom would benefit from this change. I believe RemoteView.start() in Space Exploration would as well.
Post Reply

Return to “Modding interface requests”