Page 1 of 1

[2.0.9] 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 :D

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.