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 »

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: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: player.zoom

Post by Rseding91 »

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 »

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: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: player.zoom

Post by Rseding91 »

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 »

ok thank you

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

Re: player.zoom

Post by ownlyme »

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: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Post Reply

Return to “Modding help”