Vehicle Equipment Grids

by Kryzeth

Adds equipment grids to vehicles in a sensible manner (no more exoskeleton legs in cars or trains or boats or planes), and adds a replacement vehicle specific speed booster equipment. Compatible with SE Space Trains, Fusion Trains, Flamethrower Wagon, Aircraft, AAI Vehicles, Cargo Ships, GunEquipment, Radar Equipment (and more!)

Tweaks
15 days ago
1.1 - 2.0
2.79K
Transportation Trains

b [Fixed] Failed to load mods: attempt to index field '?'

24 days ago

The following error occurs on game start
Failed to load mods: kry-vehicle-grids/prototypes/mod-compatability.lua:133: attempt to index field '?' (a nil value)
stack traceback:
kry-vehicle-grids/prototypes/mod-compatability.lua:133: in main chunk
[C]: in function 'require'
kry-vehicle-grids/data.lua:13: in main chunk

Currently testing to see what other mods might be conflicting to cause this.

24 days ago

Issue appears to be related to 5dim_trains.

24 days ago
(updated 24 days ago)

That line does indeed reference 5dim's, specifically their tier 2 locomotive. I can't seem to recreate the error however. Using just this mod and 5dim's trains, then with or without space age, with or without the rest of the 5dim's mods, with or without other vehicle mods.

Possibly some non-default settings, or third-party mod causing the issue? I think the only way that specific line could fail, is if any of their locomotives from tier 2 through tier 10 didn't exist, despite 5dims trains being enabled?

24 days ago

I tried running with just 5dims and Vehicle grids, and default settings. I will do a bit more poking on my end to see if I can solve it.

24 days ago
(updated 24 days ago)

If you want to poke around with the actual mod-compatibility.lua itself, you can probably add a check just before/above line 133:

if not data.raw["locomotive"][locomotive_name] then error(locomotive_name) end

That should give the name of the locomotive that the loop is failing on, which could be a clue. (Edited my first comment for clarity, since line 133 is part of a for loop that runs through locomotives from t2 to t10, and could be failing at any one of those tiers)

23 days ago

I may try that, I have not yet found annother solution, other than uninstalling 5dims trains.

23 days ago

Failed to load mods: kry-vehicle-grids/prototypes/mod-compatability.lua:133: 5d-locomotive-02
stack traceback:
[C]: in function 'error'
kry-vehicle-grids/prototypes/mod-compatability.lua:133: in main chunk
[C]: in function 'require'
kry-vehicle-grids/data.lua:13: in main chunk

Resulting error

23 days ago
(updated 23 days ago)

Hm, well for some reason, the 5d-locomotive-02 entity doesn't appear to exist? In that case, try changing the line to:

if not data.raw["locomotive"][locomotive_name] then error(serpent.block(data.raw["locomotive"][locomotive_name])) end

to see if anything shows up. I'm going to assume that the error will just say "nil" though

23 days ago

as expected

Failed to load mods: kry-vehicle-grids/prototypes/mod-compatability.lua:133: nil
stack traceback:
[C]: in function 'error'
kry-vehicle-grids/prototypes/mod-compatability.lua:133: in main chunk
[C]: in function 'require'

23 days ago
(updated 23 days ago)

Backdating to V2.0.0 of 5Dim New Trains seems to resolve the error, it looks like something with my install and the new update is acting weird. The only thing McGuten appears to have changed in the 2.0.1 update today was "Change game stage load to data-updates". Though I haven't checked through everything there.

23 days ago
(updated 23 days ago)

Ohhh, I thought I had updated to the latest version of that mod, but I must have hit the wrong button. I now see the error, and it might be just that simple; he moved the train creation to data-updates, for some reason.

The mod-compatibility section of this mod runs during data stage still, and those trains won't exist until later, so nil error. I guess I can move the mod-compatibility to data-updates as well, I don't believe there's any specific reason it needs to run during the data stage.

23 days ago
(updated 23 days ago)

Happy to have been a help in finding this.

New response