player.zoom

Place to get help with not working mods / modding interface.
Post Reply
Kexík
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Mon Dec 01, 2014 12:52 pm
Contact:

player.zoom

Post by Kexík » Sun Apr 26, 2015 1:59 pm

Hi, i wasnt there for few patched, now i got bugreporth about player.zoom so i was looking for api changes on forum and only thing i found was https://forums.factorio.com/forum/vie ... layer+zoom
Does that mean there is no longer any way to control player zoom? (setting min max zoom)

I am in my mod using god mode with zoom limitation for speed. So if there is some workaround please tell me, otherwise i will remove zoom control :/

Rseding91
Factorio Staff
Factorio Staff
Posts: 9977
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: player.zoom

Post by Rseding91 » Sun Apr 26, 2015 11:00 pm

You can set the zoom level but you can't read it.
If you want to get ahold of me I'm almost always on Discord.

Kexík
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Mon Dec 01, 2014 12:52 pm
Contact:

Re: player.zoom

Post by Kexík » Mon Apr 27, 2015 1:18 pm

I dont understand, Is player.zoom variable still availabel but write only (wtf) or is there some new function like setZoom ( maybe even getZoom? )

Rseding91
Factorio Staff
Factorio Staff
Posts: 9977
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: player.zoom

Post by Rseding91 » Tue Apr 28, 2015 5:43 pm

Code: Select all

game.player.zoom = 0.1 -- valid

Code: Select all

game.player.print(game.player.zoom) -- invalid

The zoom level is part of the GUI and as such is not serialized or saved. That means it's not determistic. If you set zoom = 0.1, save and reload the game it will not be at 0.1.
If you want to get ahold of me I'm almost always on Discord.

Kexík
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Mon Dec 01, 2014 12:52 pm
Contact:

Re: player.zoom

Post by Kexík » Tue Apr 28, 2015 8:51 pm

ok thank you

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 343
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: player.zoom

Post by ownlyme » Sat Jul 28, 2018 4:51 pm

there should be a way to make it readable.
would be a helpful api with many use cases (mainly workarounds for other things that don't work)
mods.factorio.com/user/ownlyme
My requests: uiRelative||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||Serializing function refs in global table

Post Reply

Return to “Modding help”

Who is online

Users browsing this forum: osldgoth