RoboTank

by smcpeak

RoboTank is a tank that drives and shoots automatically, following the lead of a manually piloted commander vehicle.

Content
3 years ago
0.15 - 1.1
4.98K
Combat

b Crash on save game load.

5 years ago

Really looked forward to using this mod and I hope this crash issue can be resolved as soon as you have time.

62.408 Error MainLoop.cpp:1142: Exception at tick 35931324: The mod RoboTank caused a non-recoverable error.
Please report this error to the mod author.

Error while running event RoboTank::on_player_driving_changed_state (ID 26)
__RoboTank__/control.lua:175: attempt to index field 'force_to_controllers' (a nil value)
stack traceback:
    __RoboTank__/control.lua:175: in function 'find_entity_controller'
    __RoboTank__/control.lua:1303: in function <__RoboTank__/control.lua:1296>
  62.408 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod RoboTank caused a non-recoverable error.
Please report this error to the mod author.

Error while running event RoboTank::on_player_driving_changed_state (ID 26)
__RoboTank__/control.lua:175: attempt to index field 'force_to_controllers' (a nil value)
stack traceback:
    __RoboTank__/control.lua:175: in function 'find_entity_controller'
    __RoboTank__/control.lua:1303: in function <__RoboTank__/control.lua:1296>"
5 years ago

Hmmm. Seems like the events must be happening in a different order from what I've seen in my testing. Is this with multiplayer? And what version of Factorio and RoboTank?

4 years ago
(updated 4 years ago)

RoboTank: 0.4.0
Factorio: 0.17.23

I can sand you a save game file if you think it would be helpful.

And yes, it is loading the game as a multiplayer session. Though I have tried loading it in multiplayer and single player and have gotten the same crash.

Saved Game: https://drive.google.com/file/d/1PfBHynmZGPEjA4w6gH-osP8vi7et0mcm/view?usp=sharing

4 years ago

Ok, thanks for the saved game. I'm away from my development machine for a couple days but I should be able to look at it after that. Assuming I can reproduce it (and the saved game should make that easy), I will fix the crash. But be aware that RoboTank hasn't been tested with multiplayer at all yet, so making it really work (as opposed to just not crash) in multiplayer will take longer.

4 years ago

I reproduced the problem and fixed it in 0.4.2.

The problem was caused by having a map where another player was in a vehicle when it was saved, prior to RoboTank being enabled. On startup, Factorio sent events as if the other player left its vehicle before any ticks ran, and RT was unable to handle that event sequence.

BTW, I have now done some light multiplayer testing and it seems to work, subject to the limitation that each force (faction, side) can only have one commander tank. So if you're playing with your friends, you'll have to coordinate regarding who is the commander. Failure to do so may cause the RoboTanks to become confused and, for example, suddenly rush from one commander to another, possibly across the entire map.

New response