DMV - Directional Movement Vehicles


Vehicles move like players! - W for North - A for West - S for South - D for East And so much more!

Content
1 year, 9 months ago
1.1
736
Transportation

g Help Please :)

1 year, 9 months ago
(updated 1 year, 9 months ago)

I tried installing this mod and when the game restarts it says something like (I made it shorter with ... since I'm typing from a picture I took):

"Failed to load mods: __ DMV_Direc"... "data-updates.lua:47: attempt to index field 'leg_hit_the_ground_trigger' (a nil value)
stack traceback: __DMV_Direc"..."/data-updates.lua:47: in main chunk"

and then it made me disable the mod. I really want to use this mod! is this interacting with another mod? is this something I need to fix? please help :) tysm

1 year, 7 months ago

In data-updates.lua, change this block (lines 45-47)

-- Dust particle trails
local track_particles = table.deepcopy(data.raw.car.car.track_particle_triggers[3].actions) -- sand dust
local tire_dust = table.deepcopy(spidertron.spider_engine.legs[1].leg_hit_the_ground_trigger[1])

to

-- Dust particle trails
local track_particles, tire_dust, p, s

p = data.raw.car.car.track_particle_triggers
if p and p[3] then
  track_particles = table.deepcopy(p[3].actions) -- sand dust
end

s = spidertron.spider_engine
if s and s.legs and s.legs[1] and s.legs[1].leg_hit_the_ground_trigger then
  tire_dust = table.deepcopy(s.legs[1].leg_hit_the_ground_trigger[1])
end

This will check step by step whether a table exists before trying to access any values in it.

1 year, 7 months ago
(updated 1 year, 7 months ago)

Thanks for the help! I tried it on another save I started since then and it works but it turns out it's incompatible with spidertron trails. I think that's the 'leg hit the ground' issue, as it seems this mod probably just takes the spidertron steering and applies it to all vehicles. I got a different error, in game, once I had it working from the start, and it mentioned spidertron. Guessing spidertron trails goes "okay, I'll put the trail where the legs go! ...where are the legs??" Anyhow, sadly got rid of that, and good to go.

Edit: I am starting a new save and I see dust particles mentioned in the mod settings! it's under arachnophobia. So another spidertron thing. all adds up.

New response