Hey, there's another way to have fun with a broken plane mod: drop it from a high altitude and let it fly itself. Since aerodynamics are part of this game's physics engine, the wings still generate lift even if all the control surfaces are broken. I think the minimum height I got it to where it could just scrape the ground at the vertex of its fall was around 4800 feet. Then, I put a car in the cargo hold and managed to drive out of the plane as it crashed after completing it's parabolic arc and stalling. Somehow, the car sustained minimal damage for being in a literal plane crash. See, who says you can't have fun with broken mods?
Please update your Mod!!! I have reeinstalled Beamng. Its says "This is often caused by broken Mods". I cant fly the plane!
Hello Everyone! I got the mod working on BeamNG.drive v0.21. I will first state off that I'm in no way a coder or programmer, but I do know where to look in the logs when things go wrong. In the current state, the Log spits this out when the mod loads: 65.74385|E|libbeamng.Lua.Exception|=============== Stack Traceback >> START >> 65.74391|E|libbeamng.Lua.Exception|(1) metamethod C function '__mul' 65.74395|E|libbeamng.Lua.Exception|(2) Lua function 'update' at file '/vehicles/an12//lua/controller/groundeffect.lua:191' (best guess) 65.74401|E|libbeamng.Lua.Exception| Local variables: 65.74408|E|libbeamng.Lua.Exception| upDir = userdata: 0x01e916389c60 65.74415|E|libbeamng.Lua.Exception| speed = number: 0.439696 65.74422|E|libbeamng.Lua.Exception| (for generator) = C function: next 65.74428|E|libbeamng.Lua.Exception| (for state) = table: 0x01e91647bdf8 {wing_l:table: 0x01e91647b7d0, wing_r:table: 0x01e91647ae38} 65.74436|E|libbeamng.Lua.Exception| (for control) = userdata: 0xfffb81ff00000001 65.74442|E|libbeamng.Lua.Exception| _ = string: "wing_l" 65.74447|E|libbeamng.Lua.Exception| group = table: 0x01e91647b7d0 {effectiveRange:10, lastRaycastDistance:4.4757232666016, nodes:table: 0x01e91647b818 (more...)} 65.74453|E|libbeamng.Lua.Exception| verticalAdjustment = number: 0.999999 65.74457|E|libbeamng.Lua.Exception| raycastFac = number: 0.552428 65.74462|E|libbeamng.Lua.Exception| force = number: 30.3698 65.74470|E|libbeamng.Lua.Exception| (for generator) = C function: next 65.74476|E|libbeamng.Lua.Exception| (for state) = table: 0x01e91647b818 {1:table: 0x01e9163e4df0, 2:table: 0x01e9163e5bc8, 3:table: 0x01e9163e49f0 (more...)} 65.74482|E|libbeamng.Lua.Exception| (for control) = userdata: 0xfffb81ff00000002 65.74488|E|libbeamng.Lua.Exception| _ = number: 1 65.74492|E|libbeamng.Lua.Exception| node = table: 0x01e9163e4df0 {chemEnergy:500, globalSkin:BNG, slotType:main, containerBeam:false, firstGroup:48 (more...)} 65.74495|E|libbeamng.Lua.Exception| (*temporary) = userdata: 0x01e9163894d8 65.74498|E|libbeamng.Lua.Exception| (*temporary) = number: 1.03787e-311 65.74501|E|libbeamng.Lua.Exception| (*temporary) = table: 0x01e90edd6068 {__newindex:function: 0x01e90edd6250, ___type:static_class<float3>, ___getters:table: 0x01e90edd6288 (more...)} 65.74505|E|libbeamng.Lua.Exception| (*temporary) = number: 30.3698 65.74508|E|libbeamng.Lua.Exception| (*temporary) = number: 30.3698 65.74511|E|libbeamng.Lua.Exception| (*temporary) = number: 30.3698 65.74515|E|libbeamng.Lua.Exception| (*temporary) = string: "attempt to perform arithmetic on local 'upDir' (a userdata value)" 65.74521|E|libbeamng.Lua.Exception|(3) Lua field 'update' at file 'lua/vehicle/controller.lua:71' 65.74527|E|libbeamng.Lua.Exception| Local variables: 65.74531|E|libbeamng.Lua.Exception| dt = number: 0.0005 65.74536|E|libbeamng.Lua.Exception| (for index) = number: 3 65.74543|E|libbeamng.Lua.Exception| (for limit) = number: 4 65.74548|E|libbeamng.Lua.Exception| (for step) = number: 1 65.74553|E|libbeamng.Lua.Exception| i = number: 3 65.74560|E|libbeamng.Lua.Exception|(4) Lua function 'onPhysicsStep' at file 'lua/vehicle/main.lua:69' (best guess) 65.74566|E|libbeamng.Lua.Exception| Local variables: 65.74571|E|libbeamng.Lua.Exception| dtSim = number: 0.0005 65.74575|E|libbeamng.Lua.Exception|--------------- << END << 65.74581|E|libbeamng.Lua.Exception|****************************************** 65.74585|E|libbeamng.Lua.Exception|*** DISABLING VEHICLE DUE TO EXCEPTION *** 65.74589|E|libbeamng.Lua.Exception|****************************************** 65.74592|E|libbeamng.Lua.Exception|*** vehicle/object error Now knowing where to first look (line 191 in the groundeffect.lua) I went into the an12.zip folder and from there went to /vehicles/an12/lua/controller/ and double clicked on the groundeffect.lua script. I modified the code so instead of it saying this: for _,group in pairs(groups) do if group.lastRaycastResult then local verticalAdjustment = getVA(upDir) local raycastFac = ((group.effectiveRange - group.lastRaycastDistance) / group.effectiveRange) local force = group.force * raycastFac * speed * verticalAdjustment --if pFrameCount == 1000 then --print("Adding force to group " .. group.name .. " : " .. tostring(force) .. " with vA " .. tostring(verticalAdjustment) .. " with rF " .. tostring(raycastFac)) --print("rD " .. tostring(group.lastRaycastDistance)) --end for _,node in pairs(group.nodes) do local fVec = (upDir * float3(force, force, force)) obj:applyForceVector(node.cid, fVec) end end end it said this (just practically commenting out line 190-192) for _,group in pairs(groups) do if group.lastRaycastResult then local verticalAdjustment = getVA(upDir) local raycastFac = ((group.effectiveRange - group.lastRaycastDistance) / group.effectiveRange) local force = group.force * raycastFac * speed * verticalAdjustment --if pFrameCount == 1000 then --print("Adding force to group " .. group.name .. " : " .. tostring(force) .. " with vA " .. tostring(verticalAdjustment) .. " with rF " .. tostring(raycastFac)) --print("rD " .. tostring(group.lastRaycastDistance)) --end --for _,node in pairs(group.nodes) do --local fVec = (upDir * float3(force, force, force)) --obj:applyForceVector(node.cid, fVec) end end end I then saved the file, closed BeamNG, rezipped, relaunched BeamNG, and huzzah, mod now works, at least as far as I can tell. I can turn on/off engines, load cargo, and of course, fly! In case you don't want to do this, or you don't want to screw something else up, you can just use this file with the modification already made. If there are any lua people out there, that's where the problem is.
Dude I was so confused why it wasn't working but my beamng was just not updated Thank you so much, this mod was the reason why I enjoyed this game so much and this made the game better again