Kuxynator's Zooming Reinvented Running


3.3.x ALL ZOOM FEATURES BACK (Factorio >=2.0.46 required) This mod allows to heavily customise the zooming behaviour. Running speed depends on zoom level. Zoom out to run faster, zoom in to run slower.

Tweaks
11 months ago
1.1 - 2.0
2.52K
Transportation Cheats

g Crash When using Map while in Train

5 months ago
(updated 5 months ago)

I did see the post from the user reporting a crash with the mini-trains mod, but logging a new issue as it crashes with all trains. If you switch to the map view, while in a train game crashes with the following error:

The mod Kuxynator's Zooming Reinvented Running (3.3.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Kux-ZoomRunning::Kux-ZoomRunning-toggle-map (ID 225)
Entity is not car or spider-vehicle or cargo-pod.
stack traceback:
    [C]: in function 'get_passenger'
    __Kux-ZoomRunning__/events/toggle-map.lua:87: in function <__Kux-ZoomRunning__/events/toggle-map.lua:71>
5 months ago

Actually, you can switch to the map view while in a train just fine, it's when you switch back from the map view it crashes. It's very annoying, even with auto-saves I've lost hours of total game time forgetting this cashes a crash and killing my game. Would love a fix :-)

3 months ago
(updated 3 months ago)

having this issue as well, crashes when closing map in train
the escape key doesnt do it just m to close the map

19 hours ago
(updated 19 hours ago)

I got this fixed with the help with ChatGPT ... lol

Replace lines 85–87 in events/toggle-map.lua.

Original lines:

local physical_vehicle = player.physical_vehicle --[[@as LuaEntity]] --BUG docu means a MapPosition, but it is a LuaEntity
local driver = physical_vehicle and physical_vehicle.get_driver() or nil
local passenger = physical_vehicle and physical_vehicle.get_passenger() or nil

Replace with this:

local physical_vehicle = player.physical_vehicle --[[@as LuaEntity]] --BUG docu means a MapPosition, but it is a LuaEntity

local is_vehicle_with_seats =
    physical_vehicle
    and physical_vehicle.valid
    and (
        physical_vehicle.type == "car"
        or physical_vehicle.type == "spider-vehicle"
        or physical_vehicle.type == "cargo-pod"
    )

local driver = is_vehicle_with_seats and physical_vehicle.get_driver() or nil
local passenger = is_vehicle_with_seats and physical_vehicle.get_passenger() or nil

and then Line 100 (it will actually be further down if you replace the lines above first)
Original code:

if physical_vehicle then

replace with:

if is_vehicle_with_seats then

However - be warned that if you are traveling at high speeds in the train, when you depart map view - you will be ejected from the train and the train with keep going at high speeds lol so be prepared to try to JUMP BACK ON!

New response