Vehicle Modding Common Problems

Vehicle Modding Common Problems

From BeamNG

Revision as of 22:41, 17 October 2017 by EcoNadder77 (talk | contribs) (Spelling + Grammar (there may be more grammar issues within the final section of this page))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page is meant to be an overview of the more common errors people make while modding with a plausible solution. By extending this list you'll make it easier for other people finding solutions to their problems. A small guide how to solve common issues is provided as well.

Common Issues:

The game freezes upon loading the vehicle

(note that parts and vehicles in the common directory will always be loaded, independent of the chosen vehicle. Thereby the default vehicle, the Pickup, spawns directly at start)

  • Enter the console, search for errors, often at the top of the list or red lines. If it shows an invalid input at a line, the cause doesn't necessarily have to be on that line, but might be a line just above or below that one.
  • Alternatively, one can look into the BeamNG.log file found in the Documents\BeamNG folder. Errors are shown with '|E|'.
  • The line "unable to get original node position" often isn't related to the real cause, but is a byproduct of the real cause.
  • Especially people unfamiliar with programming may a comma or bracket too many or too few. A few examples are listed below (the errors were put in on purpose):


Error when a ']' is missing

###.###|E|libbeamng.lua.V.jbeam.loadDirectories|unable to decode JSON: vehicles/van/van_body.jbeam
###.###|E|libbeamng.lua.V.jbeam.loadDirectories|JSON decoding error: lua/common/json.lua:126: Invalid input at line 1575. Last line was:"triangles": [

Error when a '}' is missing

###.###|E|libbeamng.lua.V.jbeam.loadDirectories|unable to decode JSON: vehicles/van/van_body.jbeam
###.###|E|libbeamng.lua.V.jbeam.loadDirectories|JSON decoding error: lua/common/json.lua:177: bad argument #1 to 'find' (string expected, got nil)

Error when a " is missing

###.###|E|libbeamng.lua.V.jbeam.loadDirectories|unable to decode JSON: vehicles/van/van_body.jbeam
###.###|E|libbeamng.lua.V.jbeam.loadDirectories|JSON decoding error: lua/common/json.lua:126: Error reading 'false' at line 1572. Last line was:["fr4l","f1ll"],

Error when a symbol or text is written after a regular line

###.###|E|libbeamng.lua.V.jbeam.loadDirectories|unable to decode JSON: vehicles/van/van_body.jbeam
###.###|E|libbeamng.lua.V.jbeam.loadDirectories|JSON decoding error: lua/common/json.lua:126: Error reading 'true' at line 318. Last line was:["v7ll","v8ll"],text


The vehicle does show up, but spike(s) appear often after a crash:

  • Nodes are not located well enough compared to the flexbodies' vertices > check
  • Nodes are flipped around each other. This often occurs when nodes are very close to each other. Moving them a bit further apart and stiffen the structure might solve it
  • One or more nodes included in nodegroup breaks loose from the structure. The mesh stays attached to these nodes, causing spikes. Making beams unbreakable or taking the node out of the nodegroup should solve this issue.


A Flexbody doesn't show up:

  • Typo; check the mesh's name in the jbeam flexbody section corresponds to the part in.DAE
  • Typo; check the mesh's nodegroup name in the jbeam flexbody section corresponds with the nodegroups in the jbeams node section.
  • The console mentioned an error; VY-node not found. There are too few nodes assigned to a mesh, the nodes are too close to each, or the nodes are to close to each other wrt a single axis, move the nodes further apart in the other directions.
  • There are no nodes assigned to a nodegroup. (This doesn't return an error) Maybe there's a wrong nodegroup assigned?
  • The normals of the flexbody are flipped
  • There isn't a material assigned to the flexbody. (This is different than a wrong material or the having the material not defined in the materials.cs)
  • Make sure your nodes section has this as the first line: ["id", "posX", "posY", "posZ"],


Error the name of the mesh isn't right

###.###|E|TorqueResourceContainer::getTSMeshByName| >>> ERROR: mesh in no .dae found: 'van_body3'
...(showing all available meshes)
###.###|E|TorqueFlexMesh::preFinalizeShape|Failed to get render mesh van_body3

Error there are too few nodes assigned to a mesh, or are too close to a single axis w.r.t. each other. NOTE: No nodes assigned won't show any error!

###.###|E|flexmesh|FLEXBODY ERROR on mesh van_body: VY node not found

A wrong/weird material shows up (or a orange colored "no texture")

  • The proper material isn't listed in the materials list
  • The material assigned in a deformgroup (after a crash e.g.) or glowmap (when the lights are turned on e.g.) aren't properly listed
  • A deformgroup isn't properly closed.
  • The normals of the flexbody can be flipped


The vehicle explodes/implodes/eats itself after spawn or after a little while (vehicle instability);

  • Too less weight assigned to (a) node(s) or too large values assigned to beamspring or beamdamp. How severe a part of the vehicle is vibrating depends how much the beamspring/nodeweight or beamdamp/nodeweight ratio is off. The lengths of the beams and the number of beams attached to a node influences this limit. Increase the nodeweight or lower the beamspring and/or beamdamp. It is useful to slow down the physics and show the nodes in-game to see which node(s) causes the issue.
  • The vehicle uses parts with different beamscale and/or nodescale values. As of version 0.5.0.0 all values of official vehicles are set to 1. Older mods or mods based on older official vehicles can still have beamscale and/or nodescale values other than one.
  • There's a value put after the regular line in a jbeam


Error when a number (in this case an '8') is put after a regular line

###.###|W|libbeamng.lua.V.processTableWithSchema|*** Invalid table row: 8
###.###|E|libbeamng.lua.V.engine.buildExhaustTree|No exhaust end nodes found
###.###|E|libbeamng.lua.V.engine.initThermals|Building the exhaust tree failed, please look above for the actual reason

vibrating parts, or parts slightly moving after spawn

  • The nodeweight of a single or more nodes is a little too low or the beamspring and/or beamdamp values a little too high.
  • Multiple nodes with selfCollision enabled are too close to each other.
  • A node with selfCollison enabled is too close to a collision triangle.

Things unexpectedly disappearing after a crash:

  • 'disablemeshbreaking' is not enabled.
  • A breakgroup isn't properly closed, breaking other beams in other parts as well.


Problem Solving:

When having a problem and you can't seem to find the cause of it, there are several ways how to solve it:

  • enter the debug modes. One can show the nodes (Press 'CTRL N'), advanced node (Press 'CTRL M') beam (Press 'CTRL B'), coltri (Press 'CTRL T') and/or center of gravity (COG) (Press 'CTRL O') visualization.
  • Nodes visible
  • Advanced Nodes visible
  • Beams visible
  • Coltris visible
  • Center of gravity visible
  • One can press 'CTRL -' to decrease the visualization of the flexbody ('CTRL +' to increase)
  • Flexbody completely visible
  • Flexbody partially visible
  • Flexbody completely invisible
  • All these modes can be used in combination with each other:
  • All debug modes enabled, but with the flexbody invisible
  • All debug modes enabled and the flexbody fully visible
  • Slow down the physics by pressing "ALT+ARROW DOWN", or even pause it by pressing 'J'.
  • Enable 'Free Camera' to search for the area.
  • Look for the beams which behave unexpected. Enable the 'Broken Only' beam visualization mode to easily spot broken beams, the "stress" and/or "deformation" visualizations to see which beams might be under stress or deformed.
  • Enabling the advanced node visualization and choosing then 'velocity' (shows the combined velocity vector) and/or 'force' (shows the combined force vector) mode can also help finding instabilities.
  • If it is hard to spot the right beams, one can add a line to the beam to have shown up in all the beam visualization modes. The first six digits mean the HEX color (so in this case pure red) and the last two is the alpha channel, so how well it is visible (00 being invisible, ff being full visible)
          ["node1","node2"{"highlight":{"radius":0.005, "col":"#ff0000ff" }}],
  • If you still haven't found the issue, you can disable a section of the jbeam to try and rule out the problem. '//' disables a single line, '/*... */' disables a section. Remember that:
    • Take care that section still have to be closed; for every 'active' opening bracket there should still be a 'active' closing bracket.
    • Take care to still end break- and deformgroups.
    • It isn't allowed to have a disabled section within a disabled section, although a disabled line within a disabled section is permitted.
          /*
          ...
          /*
          This isn't permitted
          */
          ...
          //... This is
          */
  • If a breakGroup keep getting triggered, one can disable the breakgroup by adding '//' in front of the breakgroup.
  • If materials unexpectedly change after a crash, besides check the materials assigned to the breakgroup and check the deformgroups itself. This can visually in the deformgroup beam visualization mode.
  • If beams unexpectedly break crash, check the breakgroups. This can visually in the breakgroup beam visualization mode.