Page 1 of 1
LuaPlayer::zoom very limited compared to 1.1
Posted: Wed Oct 23, 2024 10:26 am
by aaargha
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.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Wed Oct 23, 2024 11:59 am
by boskid
Moving to modding interface requests.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Wed Oct 23, 2024 2:26 pm
by aaargha
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.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Wed Oct 23, 2024 2:37 pm
by StrangePan
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
Posted: Wed Oct 23, 2024 2:51 pm
by curiosity
StrangePan wrote: Wed Oct 23, 2024 2:37 pm
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.
And reading zoom level, surely? Since it's now part of the game state.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Wed Oct 23, 2024 3:07 pm
by aaargha
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

Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Tue Oct 29, 2024 10:00 pm
by Wiwiweb
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.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Wed Oct 30, 2024 12:41 pm
by zerwiport
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
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Sat Nov 09, 2024 10:36 am
by leopoldkabouter
StrangePan wrote: Wed Oct 23, 2024 2:37 pm
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.
That is good news, thank you.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Mon Nov 18, 2024 10:41 am
by Kuxynator
_and please make LuaPlayer.zoom readable. _
to make things depends on zoom.
- scan area of the field of view
- walking speed
The approach I have had to use for years is somewhat imprecise and there are undesirable side effects.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Tue Dec 03, 2024 4:10 am
by Nauviax
+1 to having LuaPlayer.zoom readable. Would be very nice for implementing parallax zooming in one of my mods.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Mon Feb 03, 2025 5:26 am
by Cyclonut
StrangePan wrote: Wed Oct 23, 2024 2:37 pm
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.
So, how is the reprogramming coming along. I don't like that when I jump into a jetpack, it changes the zoom level. It is very annoying when combatting biters and the screen zooms in too much. Can it just stay the same as before jumping into a jetpack? When is this expected to be addressed please?
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Fri Feb 07, 2025 3:07 pm
by StrangePan
Cyclonut wrote: Mon Feb 03, 2025 5:26 am
StrangePan wrote: Wed Oct 23, 2024 2:37 pm
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.
So, how is the reprogramming coming along. I don't like that when I jump into a jetpack, it changes the zoom level. It is very annoying when combatting biters and the screen zooms in too much. Can it just stay the same as before jumping into a jetpack? When is this expected to be addressed please?
I'm presently focused on other more pressing tasks, but this is still something I plan on addressing before 2.1.
Re: [2.0.9] LuaPlayer::zoom very limited compared to 1.1
Posted: Tue Mar 04, 2025 1:35 pm
by Stringweasel
+1
Additionally, could the `chart_mode_cutoff` also be configurable with this new API? Meaning the zoom level at which the chart is drawn. This is currently only possible with the
Cutscene Controller.
Re: LuaPlayer::zoom very limited compared to 1.1
Posted: Wed Mar 05, 2025 4:28 pm
by protocol_1903
+1
Re: LuaPlayer::zoom very limited compared to 1.1
Posted: Sat May 17, 2025 8:36 pm
by aaargha
With the new zoom API I can once again fill the screen with a single pixel, all is well in the world
Thanks for working on this!