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
5 months ago
0.17 - 1.1
2.98K
Transportation Combat Logistic network Circuit network

b [Fixed] Crash (mod conflict with AbandonedRuins)

10 months ago
(updated 10 months ago)

Crashes when used in combination with AbandonedRuins (aka, The Ruins Mod) when the AbandonedRuins mod attempts to spawn a ruin with (I suspect) a car in it. I've put a map exchange string below that, so far for me, has consistently repro'd it immediately on start, but I have noticed inconsistencies in the deterministic nature of AbandonedRuins before (may only be when in combo with other mods... I don't know) in what it spawns where, so I don't know if it for sure will work for you (if you want to test for yourself). I only noticed it recently when messing around with map editor to test a new build idea outside of my main game (which I started months ago), but I had found cars previously in that game without error, so I'm guessing something happened more recently.

Map Exchange:

>>>eNpjZGBkyGYAgwZ7EOZgSc5PzIHxQJgrOb+gILVIN78oFVmYM
7moNCVVNz8TVXFqXmpupW5SYjGKYo7Movw8dBNYi0vy81BFSopSU
4uRRbhLixLzMktz0fUyMG6/06bd0CLHAML/6xkU/v8HYSDrAdAvI
MzA2ABRCRSDAdbknMy0NAYGBUcgdgJJMzIyVousc39YNcWeEaJGz
wHK+AAVOZAEE/GEMfwccEqpwBgmSOYYg8FnJAbE0hKgFVBVHA4IB
kSyBSTJyNj7duuC78cu2DH+Wfnxkm9Sgj2joavIuw9G6+yAkuwgf
zLBiVkzQWAnzCsMMDMf2EOlbtoznj0DAm/sGVlBOkRAhIMFkDjgz
czAKMAHZC3oARIKMgwwp9nBjBFxYEwDg28wnzyGMS7bo/sDGBA2I
MPlQMQJEAG2EO4yRgjTod+B0UEeJiuJUALUb8SA7IYUhA9Pwqw9j
GQ/mkMwIwLZH2giKg5YooELZGEKnHjBDHcNMDwvsMN4DvMdGJlBD
JCqL0AxCA8kAzMKQgs4gIObmQEBPtgzFGs3ngEAiTmh1A==<<<

Error received:

The mod The Ruins Mod (1.1.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins::on_tick (ID 0)
The mod Autodrive (1.1.11) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event autodrive::script_raised_built (ID 79)
__autodrive__/scripts/vehicle_functions.lua:120: attempt to index field 'vehicles_orig_color' (a nil value)
stack traceback:
    __autodrive__/scripts/vehicle_functions.lua:120: in function 'store_orig_color'
    __autodrive__/scripts/event_handlers.lua:1212: in function <__autodrive__/scripts/event_handlers.lua:1189>
stack traceback:
    [C]: in function 'create_entity'
    __AbandonedRuins__/spawning.lua:45: in function 'spawn_entity'
    __AbandonedRuins__/spawning.lua:94: in function 'spawn_entities'
    __AbandonedRuins__/spawning.lua:172: in function 'spawn_ruin'
    __AbandonedRuins__/spawning.lua:184: in function 'spawn_random_ruin'
    __AbandonedRuins__/control.lua:58: in function <__AbandonedRuins__/control.lua:53>
10 months ago

Thanks for the report! I've forgotten to initialize global.vehicles_orig_color. This kind of worked in my test cases because the table must have been initialized by the time I've placed cars. But on starting a new game, AbandonedRuins may create cars almost immediately so this becomes a problem.

The fix is straightforward, insert the following before line 643 of autodrive/scripts/event_handlers.lua:

  init_table("vehicles_orig_color")

I'll upload a fixed version when I've fixed the other bug that was reported yesterday. :-)

10 months ago
(updated 10 months ago)

I'll try that later tonight and see if it works. To note, though, there are some cases where AbandonedRuins doesn't immediately create one, but then after getting a map chunk to generate where AbandonedRuins does create one, it still crashes. Probably still related/will be fixed by the same thing, but felt it worth pointing out.

My existing playthrough that didn't crash that I mentioned, I haven't actually expanded and explored in quite some time. I don't know if I was and to find a car there if the issue would still happen or not. I've only tested against new maps.

10 months ago

Yup, looking good!

9 months ago

Should be fixed in version 1.1.12!

New response