My Infinizoom mod uses the zoom API to allow players to zoom in or out as much as the engine allows far beyond what is possible in vanilla 1.1. In 2.0.9 (only 2.x version I've tested) the API no longer allows zooming beyond the vanilla limits.
I can't find anything explicit about this in the change log so it might be an unintended consequence of some other change?
To test compare the results of
/c game.player.zoom = 0.05
in 1.1 and 2.0
While the rendering was pretty broken when approaching the limits of the engine, the functionality still has been useful enough when placing very large blueprints.
[2.0.9] LuaPlayer::zoom very limited compared to 1.1
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Moving to modding interface requests.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
I did a quick search on the mod portal and the (undocumented) API-change seems to break about 5-10 mods, though in some cases only partially. Going by download numbers for the "pure" zoom mods, this affects something like 30k users.
-
- Factorio Staff
- Posts: 122
- Joined: Fri Dec 07, 2018 3:41 pm
- Contact:
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Yes, zooming in the game has changed; it's essentially been completely rewritten and moved to game state. Now that 2.0 is released and the features have stabilised, I plan to go back and reintroduce a formal modding API for manipulating player zoom levels and zoom ranges.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
And reading zoom level, surely? Since it's now part of the game state.StrangePan wrote: ↑Wed Oct 23, 2024 2:37 pmYes, zooming in the game has changed; it's essentially been completely rewritten and moved to game state. Now that 2.0 is released and the features have stabilised, I plan to go back and reintroduce a formal modding API for manipulating player zoom levels and zoom ranges.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Interesting! I figured there'd be changes brought on by the remote view etc. but not that they were that comprehensive.
I'll look forward to reworked API (or perhaps even configuration?) support for zooming. As I've been hacking around the limitations of the current API since 0.14, I'll try to be patient
I'll look forward to reworked API (or perhaps even configuration?) support for zooming. As I've been hacking around the limitations of the current API since 0.14, I'll try to be patient
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
This also affects the Jetpack mod.
In 2.0, changing controller resets the zoom. Since LuaPlayer::zoom is write-only, we cannot read the original value to reset the zoom back to how it was before the controller change.
In 2.0, changing controller resets the zoom. Since LuaPlayer::zoom is write-only, we cannot read the original value to reset the zoom back to how it was before the controller change.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
At least to me it would be enough to extend support of some LuaPlayer.set_controller(...) parameters instead of limiting them only to cutscene.
character: start_zoom, chart_mode_cutoff
remote: start_position, start_zoom, chart_mode_cutoff
character: start_zoom, chart_mode_cutoff
remote: start_position, start_zoom, chart_mode_cutoff
-
- Burner Inserter
- Posts: 9
- Joined: Tue Oct 03, 2023 6:46 am
- Contact:
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
That is good news, thank you.StrangePan wrote: ↑Wed Oct 23, 2024 2:37 pmYes, zooming in the game has changed; it's essentially been completely rewritten and moved to game state. Now that 2.0 is released and the features have stabilised, I plan to go back and reintroduce a formal modding API for manipulating player zoom levels and zoom ranges.