Autodrive

by Pi-C

Car equipment for train avoidance, logistic network integration, circuit network connectivity, fuel refill, ammo reload, vehicle repair, radio control, enemy targeting, and gate control.

Content
2 months ago
0.17 - 1.1
2.98K
Transportation Combat Logistic network Circuit network

b [Fixed] Crash loading scenario in Map Editor

1 year, 10 months ago

Minor issue, but was playing around with map editor testing things out, saved the map I had going, then reloaded and it crashed instantly.

523.999 Error MainLoop.cpp:1288: Exception at tick 854718: The mod Autodrive (1.1.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event autodrive::on_player_joined_game (ID 45)
__autodrive__/scripts/player_functions.lua:443: attempt to index local 'force_researched' (a nil value)
stack traceback:
    __autodrive__/scripts/player_functions.lua:443: in function 'is_unlock_tech_researched'
    __autodrive__/scripts/player_functions.lua:128: in function 'get_user_settings'
    __autodrive__/scripts/player_functions.lua:475: in function 'init_player'
    __autodrive__/scripts/event_handlers.lua:996: in function <__autodrive__/scripts/event_handlers.lua:991>
1 year, 7 months ago

The same thing happens when entering a https://mods.factorio.com/mod/blueprint-sandboxes sandbox.

Autodrive apparently does not like the player not having a body.

1 year, 7 months ago

Autodrive apparently does not like the player not having a body.

That's not correct. The problem is that Blueprint Sandboxes will change the force of players when they enter or leave sandbox mode. In response to on_player_force_changed, my mod checks whether the unlock tech has been researched yet, but somehow I've come to use an unassigned variable.

I've already fixed this for the next version, but it may still be some time before I can release it. In the meantime, you can fix this yourself by changing line 443 of scripts/player_functions from

force_researched[tech] = true

to

mod.force_data[force.name].researched[tech] = true
1 year, 6 months ago

Please try version 1.1.5!

8 months ago

Hey Pi-C, apologies for not replying before. I had just started taking a bit of a break from Factorio about the time you released this fix and as I'm managing all the things I'm subscribed to in the mod portal right now, I'm reminded of this.

I've been using the map editor a lot recently and have not seen this issue reoccur. If I remember correctly, there was nothing special I had to do to cause it last time, so yes, this appears to be fixed.

8 months ago

Hey Pi-C, apologies for not replying before. I had just started taking a bit of a break from Factorio about the time you released this fix and as I'm managing all the things I'm subscribed to in the mod portal right now, I'm reminded of this.

Hi, Fury! No problem, I'm kind of slow replying myself, most of the time. :-)

I've been using the map editor a lot recently and have not seen this issue reoccur. If I remember correctly, there was nothing special I had to do to cause it last time, so yes, this appears to be fixed.

Thanks for the feedback! Marking this as fixed now. :-)

New response