Extra Zoom


Zoom in/out further than default seamlessly.

Utilities
10 months ago
1.1
2.57K

b is it a bug or is it a spider?

10 months ago
(updated 10 months ago)

screen size: 3840 x 2160
mods: SEK2 plus some SE companion mods and misc utilities

i can't say these are bugs because im ok with them, but they're weird. like spiders.

  • can't zoom in further than default

  • when i zoom out using a keyboard control rather than the mouse wheel it zooms very rapidly, almost all the way instantly.
    factorio does this already to some extent during high lag, but i have near 50 some ups rn and this mod only does this with keyboard controls.

  • what is the difference anyway between the control settings "zoom in/out" and "zoom into/out of world"? this mod only works with the former ones.
    i like this so that i can use this mod and my usual -/= zoom keys still work perfectly

  • changing mod settings does not seem to change mod behavior
    using zoom keys unaffected by mod, zoom limits r 3.053 to 0.572. with mod keys, 3.053 to 0.125 0.035
    edit: not true; actually, it zooms out very fast, sometimes instantly, up to 0.125 and then zooms out in smaller steps which have much lag

  • sometimes with keyboard controls, i can zoom out but only by pressing the key again; holding the key does nothing past 0.152 or ... it varies.
    there's some jank going on here

these sound like bugs for the factorio devs to fix, really

10 months ago

Well, I never knew the interaction of keyboard keys with this mod, and I have no idea how to fix that. The game doesn't tell Lua api the difference between zooming with a keyboard and zooming with mouse. Ouch.
"zoom into/out of world" works both in map view, and in game view. "zoom in/out" doesn't work in maps. This mod only bounds to "zoom in/out", and attempts to modify the game's zoom behavior, when the vanilla zoom cap is reached. Apparently my code doesn't work with keyboard input at all. Oh well.
Are you sure changing settings doesn't change mod behavior? If the zoom limit is greater than vanilla there would be a difference, and if it's smaller than vanilla, the mod would simply not do anything.

10 months ago

yon factorio tooltip say that "zoom .. world" work only on map. we know it's not true. and you tell me that basic zoom no map? but me basic zoom do map

your code totally works it just goes real fast on the out, still usable

i'm not sure. let me, uh... edit

10 months ago

I don't think they are bugs, it's just the modding api wasn't designed with a mod taking over the zooming function in mind. This mod is probably the best I can do (can't detect you're using a keyboard for zooming and make it smooth).

10 months ago

is bug: don't make excuses for their mess! it all tangled up! if their code is doing different things with keyboard and mouse wheel controls, that's going to cause more problems than this

10 months ago
(updated 10 months ago)

Em, no? I think internally their zooming code is properly divided between mouse and keyboard, but it isn't exposed on Lua side, so modding in zoom behavior for both keyboard and mouse would only be possible by reverse engineering their code and add it in via assembly. The game comes with PDB files so it is doable, but this site only allows Lua mod, so it wouldn't be able to be published here.

10 months ago
(updated 10 months ago)

what proper division could it be?
the mouse wheel acts just like a key.
so does the mouse click
and that's just about it
for factorio settings that take the mouse bits

New response