Hey all, having a baffling problem while trying to put together a golf cart. (taster chassis image below) I have my basic chassis ingame, and I'm trying to add the rear axle. I have 2 .jbeam files, caddy.jbeam (the main one) and caddy_rear_axle.jbeam. The main .jbeam file contains basic stuff, nodes, beams and a chassis flexbody, and it works just fine and I can bat it around ingame to see it bounce and deform and all that good stuff. The other .jbeam file, for the moment, only contains a few nodes and beams, and the necessary file and slot information to stop the game complaining, but when the game tries to load both it throws a wobbly, stops the simulation and renders all parts of my .DAE file, including ones that haven't been written into the .jbeam files yet. I can't help notice the second error references the drivetrain; so far this thing doesn't have wheels or an engine, and there is no code relating to either. If anyone has any thoughts about what's up I'd be glad to hear them. Thanks, Tango The errors shown in the console: Code: 4251.419590|BEAMNG| INFO| loading vehicle directory:vehicles/caddy/4251.419746|BEAMNG| INFO| * loading jbeam files: 4251.422531|BEAMNG| INFO| * vehicles/caddy//caddy.jbeam with 1 parts 4251.422917|BEAMNG| INFO| * vehicles/caddy//caddy_rear_axle.jbeam with 1 parts 4251.422981|BEAMNG| ERR | got exception: lua/vehicle/beamng.lua:2147: attempt to index a nil value 4251.423498|BEAMNG| ERR | lua/vehicle/drivetrain.lua:245: attempt to index field 'data' (a nil value)
Can you share the actual JBeams with anyone? I did actually come across this issue when altering the pickup, although for the life of me I cannot remember what caused it.
On line 245 the game tries to load engine data IIRC. I would try adding a basic engine to the truck, just copy one of the default ones for now.
Everything in the .jbeam looks right, I think. The only thing is that the main vehicle's slot type should be "main", not "caddy". I don't believe you need an engine section as all the inanimate objects (road signs, etc.) load fine without it. Also make sure your .DAE's filename matches the name of the folder.
Thanks for the replies guys. Turns out Gabe was right about the SlotType thing. Working on wheels now - - - Updated - - - Mmm, progress