LUA Exporting Issue Maybe?

Exception: Lua Function Call: DoExport DoExport: [string “d:\workspace\automationcarexport\beamng\autom…”]:2934: bad argument #1 to ‘gsub’ (string expected, got nil)
Stack Traceback

(1) C function ‘function: 0x018d66088fe0’
(2) field C function ‘gsub’
(3) Lua field ‘ExportEngineFile’ at line 2934 of chunk ‘“d:\workspace\automationcarexport\beamng\autom…”]’
Local variables:
CarCalculator = table: 0x018c8bb33300 {SelectedFactory:6, AccelerationDetails:table: 0x018c8bb3c1c0, Stack:table: 0x018c8bb39dc0 (more…)}
CarInfo = table: 0x018c8bb33f00 {TrimInfo:table: 0x018c8bb38180, PlatformInfo:table: 0x018c8bb35a80, Filters:table: 0x018c8bb38bc0 (more…)}
EngineInfo = table: 0x018c8bc0b100 {ModelInfo:table: 0x018ca7f7d240, PlatformInfo:table: 0x018c8bc0bdc0, Scales:table: 0x018c8aca9300 (more…)}
GearboxInfo = table: 0x018c8bb38400 {TargetTopSpeedFraction:0.89999997615814, TargetTopSpeed:226.19465565018 (more…)}
Results = table: 0x018c8acaf140 {PartsFailureInfo:table: 0x018c8aca9b40, PerformanceIndex:158.01193110148 (more…)}
EngineUID = string: “1458B52B4FAE49E65F93A0A5A340625C”
EngineUIDShort = string: “1458B”
TrimUID = string: “7F2854074654968EF5BCC3808A099620”
TrimUIDShort = string: “7F285”
rpmToAV = number: 0.10472
avToRPM = number: 9.5493
peakBoost = number: 0
aspirationSetup = table: 0x018c8246be00 {EngineSection:Aspiration, YearUnlock:1920, Engineering:table: 0x018c82467180 (more…)}
TorqueCurves = table: 0x018c8aca2100 {NATorque:table: 0x018c8aca9ec0, FrictionCrank:table: 0x018c8aca7a40, VolumetricEffeciency:table: 0x018c8aca8680 (more…)}
engineBrakeTorque = number: 76.0016
EngineFriction = number: 76.0016
DynamicFriction = number: 0.0589389
OutputText = string: “{
\9"Camso_Engine_$engineUID$”: {
\9\9"information":{
\9\9\9"authors":“Camshaft Software”,
\9\9\9"name":“6.0L SOHC V8 Engine”,
\9\9}
\9\9"variables": [
\9\9\9[“name”, “type”, “unit”, “category”, “default”, “min”, “max”, “title”, “description”]
\9\9\9["$AfterfireMod", “range”, “”, “Vehicle Advanced Settings”, 1, 0, 10, “Afterfire Modifier”, “Modifier for the amount of engine afterfire”, {“stepDis”:0.1,“subCategory”:“Engine”,“minDis”:0,“maxDis”:1000}],
\9\9\9["$ParticulatesMod", “range”, “”, “Vehicle Advanced Settings”, 1, 0, 100, “Particluates Modifier”, “Modifier for the amount of engine particulates”, {“stepDis”:1,“subCategory”:“Engine”,“minDis”:0,“maxDis”:10000}],
\9\9\9["$EngineOffsetX", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Engine Offset X”, “Lateral engine offset”, {“stepDis”:0.01,“subCategory”:“Engine Offset”}],
\9\9\9["$EngineOffsetY", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Engine Offset Y”, “Longitudinal engine offset”, {“stepDis”:0.01,“subCategory”:“Engine Offset”}],
\9\9\9["$EngineOffsetZ", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Engine Offset Z”, “Vertical engine offset”, {“stepDis”:0.01,“subCategory”:“Engine Offset”}],
\9\9\9["$EngineOffsetXVis", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Visual Engine Offset X”, “Visual lateral engine offset”, {“stepDis”:0.01,“subCategory”:“Engine Offset”}],
\9\9\9["$EngineOffsetYVis", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Visual Engine Offset Y”, “Visual longitudinal engine offset”, {“stepDis”:0.01,“subCategory”:“Engine Offset”}],
\9\9\9["$EngineOffsetZVis", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Visual Engine Offset Z”, “Visual vertical engine offset”, {“stepDis”:0.01,“subCategory”:“Engine Offset”}],
\9\9\9["$ExhaustOffsetX", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Exhaust Offset X”, “Lateral exhaust offset”, {“stepDis”:0.01,“subCategory”:“Exhaust Offset”}],
\9\9\9["$ExhaustOffsetY", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Exhaust Offset Y”, “Longitudinal exhaust offset”, {“stepDis”:0.01,“subCategory”:“Exhaust Offset”}],
\9\9\9["$ExhaustOffsetZ", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Exhaust Offset Z”, “Vertical exhaust offset”, {“stepDis”:0.01,“subCategory”:“Exhaust Offset”}],
\9\9\9["$ExhaustOffsetXVis", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Visual Exhaust Offset X”, “Visual lateral exhaust offset”, {“stepDis”:0.01,“subCategory”:“Exhaust Offset”}],
\9\9\9["$ExhaustOffsetYVis", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Visual Exhaust Offset Y”, “Visual longitudinal exhaust offset”, {“stepDis”:0.01,“subCategory”:“Exhaust Offset”}],
\9\9\9["$ExhaustOffsetZVis", “range”, “+m”, “Vehicle Advanced Settings”, 0, -4, 4, “Visual Exhaust Offset Z”, “Visual vertical exhaust offset”, {“stepDis”:0.01,“subCategory”:“Exhaust Offset”}],
\9\9\9["$EngineInertiaMod", “range”, “”, “Vehicle Advanced Settings”, 1, 0, 5, “Engine Inertia”, “Modifies Engine Inertia”, {“stepDis”:1,“minDis”:0,“maxDis”:500,“subCategory”:“Engine”}]
\9\9],
\9\9"slotType" : “Camso_Engine”,
\9\9"slots": [
\9\9\9[“type”, “default”, “description”],
\9\9\9[“Camso_Intake”, “Camso_Intake”, “Intake”, {“coreSlot”: true}],
\9\9\9[“Camso_Nitrous”, “”, “Nitrous Injection”],
\9\9\9[“Camso_EngineManagement”, “Camso_EngineManagement_$engineUID$”, “Engine Management”, {“coreSlot”: true}],
\9\9\9[“Camso_engine_structure”, “Camso_engine_structure_$trimUID$”, “Engine Structure”, {“coreSlot”: true, “nodeMove”:{“x”:"$EngineOffsetX",“y”:"$EngineOffsetY",“z”:"$EngineOffsetZ"}}],
\9\9\9[“Camso_EngineInternals”, “Camso_EngineInternals_$engineUID$”, “Engine Internals”, {“coreSlot”: true}]
\9\9\9[“Camso_Turbo”,"",“Turbocharger”],
\9\9\9[“Camso_Supercharger”,"",“Supercharger”],
\9\9\9[“Camso_Transmission”,“Camso_Transmission_$trimUID$”, “Transmission”]
\9\9],
\9\9"powertrain" : [
\9\9\9[“type”, “name”, “inputName”, “inputIndex”],
\9\9\9[“combustionEngine”, “mainEngine”, “dummy”, 0]
\9\9],

\9\9"mainEngine": {
\9\9\9"torque":[
\9\9\9\9[“rpm”, “torque”],
\9\9\9\9[0,0],
\9\9\9\9[500, 307.09],
\9\9\9\9[700, 384.33],
\9\9\9\9[800, 395.52],
\9\9\9\9[900, 406.17],
\9\9\9\9[1000, 416.42],
\9\9\9\9[1100, 426.63],
\9\9\9\9[1200, 436.79],
\9\9\9\9[1300, 447.24],
\9\9\9\9[1400, 457.80],
\9\9\9\9[1500, 468.04],
\9\9\9\9[1600, 477.92],
\9\9\9\9[1700, 487.55],
\9\9\9\9[1800, 495.84],
\9\9\9\9[1900, 502.04],
\9\9\9\9[2000, 506.35],
\9\9\9\9[2100, 510.09],
\9\9\9\9[2200, 514.83],
\9\9\9\9[2300, 520.03],
\9\9\9\9[2400, 524.96],
\9\9\9\9[2500, 530.56],
\9\9\9\9[2600, 536.29],
\9\9\9\9[2700, 540.41],
\9\9\9\9[2800, 541.89],
\9\9\9\9[2900, 541.50],
\9\9\9\9[3000, 539.24],
\9\9\9\9[3100, 536.83],
\9\9\9\9[3200, 535.38],
\9\9\9\9[3300, 534.47],
\9\9\9\9[3400, 532.44],
\9\9\9\9[3500, 528.74],
\9\9\9\9[3600, 523.20],
\9\9\9\9[3700, 516.13],
\9\9\9\9[3800, 508.08],
\9\9\9\9[3900, 499.75],
\9\9\9\9[4000, 491.79],
\9\9\9\9[4100, 484.34],
\9\9\9\9[4200, 476.75],
\9\9\9\9[4700, 461.58],
\9\9\9\9[5200, 431.23],
\9\9\9\9[5700, 370.53],
\9\9\9\9[6200, 249.14],
\9\9\9\9[6700, 6.34],

\9\9\9],
\9\9\9//rev limiters have some options
\9\9\9//“revLimiterType”:“rpmDrop”, //Default choice. waits for rpm to fall before torque comes back. Can have long delays in high gears. Uses “revLimiterRPMDrop”.
\9\9\9//“revLimiterType”:“timeBased”, //Waits for “revLimiterCutTime” time window, but also has “revLimiterMaxRPMDrop” fallback, if the rpm falls too much in the time window.
\9\9\9//“revLimiterType:“soft”, //Tapers the the torque off in some range of rpm defined by “revLimiterSmoothOvershootRPM”
\9\9\9"hasRevLimiter”:false, //Disables rev limiter
\9\9\9//“revLimiterRPMDrop”:100,
\9\9\9//engine performance
\9\9\9"idleRPM":602.37257639876,
\9\9\9"idleRPMRoughness":110.36684114806,
\9\9\9"maxRPM":6696.4935848684, //Max RPM before overrev damage is likely
\9\9\9"inertia":"$=0.27354104258348*$EngineInertiaMod", //(kgm/s^2)
\9\9\9"friction":76.001594543457, //Constant friction torque (Nm)
\9\9\9"dynamicFriction":0.058938873691806, //Friction torque that increases with engine speed (Nm/rad/s)
\9\9\9"engineBrakeTorque":76.001594543457, //Constant friction torque (Nm)


\9\9\9"waterDamage": {"[engineGroup]:":[“engine_intake”]}, //Engine hydrolocks when nodes in this group go under water
\9\9\9"radiator": {"[engineGroup]:":[“radiator”]}, //Radiator steam is emitted from nodes in this group
\9\9\9"engineBlock": {"[engineGroup]:":[“engine_block”]}, //Engine thermal mass is taken from nodes in this group
\9\9\9//“fuel”: {"[engineGroup]:":[“fuel”]},
\9\9\9"breakTriggerBeam":“engine”, //Engine breaks if beam with this name is broken

\9\9\9"soundConfigExhaust": “soundConfigExhaust”, //What section name to look for for engine sound information

\9\9\9//Exhaust Settings
\9\9\9"particulates":"$=$particulates$
$ParticulatesMod",
\9\9\9//Exhaust Sound/back fires
\9\9\9"instantAfterFireCoef": “$=$instantAfterFireCoef$$AfterfireMod",
\9\9\9"sustainedAfterFireCoef": "$=$sustainedAfterFireCoef$
$AfterfireMod”,
\9\9\9"instantAfterFireVolumeCoef":$instantVolumeCoef$,
\9\9\9"sustainedAfterFireVolumeCoef":$sustainedVolumeCoef$,
\9\9\9"shiftAfterFireVolumeCoef":$shiftVolumeCoef$,
\9\9\9"instantAfterFireSound": “event:>Vehicle>Afterfire>v8_crossflow_02>muffled>stock_single”,
\9\9\9"sustainedAfterFireSound": “event:>Vehicle>Afterfire>v8_crossflow_02>muffled>stock_multi”,
\9\9\9"shiftAfterFireSound": “event:>Vehicle>Afterfire>v8_crossflow_02>muffled>stock_shift”,
\9\9\9\9
\9\9\9//cooling and oil system,
\9\9\9"thermalsEnabled":true,
\9\9\9"engineBlockMaterial":"$engineBlockMaterial$", //“aluminum”, “aluminium”, “iron”

\9\9\9"starterSample":“event:>Engine>Starter>v8_20xy_eng”,
\9\9\9"starterSampleExhaust":“event:>Engine>Starter>v8_20xy_exh”,
\9\9\9"shutOffSampleEngine":“event:>Engine>Shutoff>v8_20xy_eng”,
\9\9\9"shutOffSampleExhaust":“event:>Engine>Shutoff>v8_20xy_exh”,
\9\9\9"starterVolume":0.67,
\9\9\9"starterVolumeExhaust":0.8,
\9\9\9"shutOffVolumeEngine":0.33,
\9\9\9"shutOffVolumeExhaust":0.4,
\9\9\9\9

\9\9\9//cooling system
\9\9\9"radiatorArea":$radiatorArea$,
\9\9\9"radiatorEffectiveness":$radiatorEffectiveness$,
\9\9\9"coolantVolume":$coolantVolume$,
\9\9\9"radiatorFanType":“electric”,
\9\9\9"radiatorFanTemperature":105
\9\9\9"radiatorFanMaxAirSpeed":2,
\9\9\9"thermostatTemperature":90,

\9\9\9//oil radiator
\9\9\9"oilRadiatorArea":$oilRadiatorArea$,
\9\9\9"oilRadiatorEffectiveness":$oilRadiatorEffectiveness$,
\9\9\9"oilThermostatTemperature":100,
\9\9\9"oilVolume":$oilVolume$, //Litres

\9\9\9//engine durability
\9\9\9"cylinderWallTemperatureDamageThreshold":310, //Cylinder temp (C) over which damage starts to occur to rings
\9\9\9"headGasketDamageThreshold":1700000, //Durability of headgasket
\9\9\9"pistonRingDamageThreshold":1700000, //Durability of headgasket
\9\9\9"connectingRodDamageThreshold":2200000, //Durability of connecting rods

\9\9\9"maxTorqueRating": 659.83655465423,
\9\9\9"maxOverTorqueDamage": 250,

\9\9\9"energyStorage": “mainTank”, //Name of the fuel tank
\9\9\9"requiredEnergyType":“gasoline”, //Type of fuel required
\9\9\9"burnEfficiency": [ //How much fuel energy is converted to work in the cylinders (does not account for engine friction losses)
\9\9\9\9[0.00, 0.21],
\9\9\9\9[0.05, 0.44],
\9\9\9\9[0.40, 0.58],
\9\9\9\9[0.70, 0.72],
\9\9\9\9[1.00, 0.49],

\9\9\9],
\9\9\9"torqueReactionNodes:":[$torqueReactionNodes$]
\9\9},
\9\9"vehicleController": {
\9\9\9//VehicleController - BeamNG
\9\9\9//I will put commonly used values below

\9\9\9//universally useful values
\9\9\9//“calculateOptimalLoadShiftPoints”:true, //The high shift points ones can be auto calculated
\9\9\9//“shiftDownRPMOffsetCoef”:1.3, //Can spread the downshift points for auto calculation if it tends to hunt too much (choose lower number to spread more)

\9\9\9"lowShiftDownRPM":952.37257639876,
\9\9\9//“highShiftDownRPM”:2940,
\9\9\9"lowShiftUpRPM":800,
\9\9\9//“highShiftUpRPM”:4100,

\9\9\9//“topSpeedLimit”:0, //Speed limiter in m/s

\9\9\9//may want to increase values below for ultra high powered cars. On our drag cars they are set to 99999 to effectively disable
\9\9\9//“wheelSlipUpThreshold”:7000, //A wheelspin threshold to stop arcade/auto gearbox from upshifting while spinning the tires or drifting
\9\9\9//“wheelSlipDownThreshold”:10000, //A wheelspin threshold to stop arcade/auto gearbox from downshifting when locking the brakes
\9\9},

\9\9"soundConfigExhaust": {
\9\9\9"sampleName": “$sampleName$”,
\9\9\9"mainGain": $engineVolume$,
\9\9\9"maxLoadMix": 1,
\9\9\9"minLoadMix": 0,
\9\9\9"onLoadGain":1.1,
\9\9\9"offLoadGain":0.8,
\9\9\9"eqLowGain": 0,
\9\9\9"eqLowFreq": 400,
\9\9\9"eqLowWidth": 1,
\9\9\9"eqHighGain": 1.21,
\9\9\9"eqHighFreq": 6000,
\9\9\9"eqHighWidth": 0.5,
\9\9\9"lowCutFreq":80,
\9\9\9//“fundamentalFrequencyCylinderCount”:4,
\9\9\9"eqFundamentalGain": 0
\9\9}

\9},



\9"Camso_Transmission_$trimUID$": {
\9\9"information":{
\9\9\9"authors":“Camshaft Software”,
\9\9\9"name":“5-Speed Manual Transmission”
\9\9}
\9\9"slotType" : “Camso_Transmission”,
\9\9"slots": [
\9\9\9[“type”, “default”, “description”],
\9\9\9[“Camso_TransferCase”, “$TransferCaseName$”, “Transfer Case”],
\9\9\9$TransmissionSlots$
\9\9],
\9\9
\9\9"variables": [
\9\9\9[“name”, “type”, “unit”, “category”, “default”, “min”, “max”, “title”, “description”],
\9\9\9\9["$whineMult", “range”, “”, “Gearing”, 1, 0, 5, “Whine Volume”, “Gearbox whine volume multiplier”,{“subCategory”: “Transmission”, “stepDis”: 1, “minDis”: 0, “maxDis”: 500}],

\9\9\9["$gear_R", “range”, “:1”, “Gearing”, 2.56, 0.1, 10, “Gear R”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_1", “range”, “:1”, “Gearing”, 2.43, 0.1, 10, “Gear 1”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_2", “range”, “:1”, “Gearing”, 1.64, 0.1, 10, “Gear 2”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_3", “range”, “:1”, “Gearing”, 1.21, 0.1, 10, “Gear 3”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_4", “range”, “:1”, “Gearing”, 0.94, 0.1, 10, “Gear 4”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_5", “range”, “:1”, “Gearing”, 0.75, 0.1, 10, “Gear 5”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}]
\9\9],

\9\9"controller": [
\9\9\9[“fileName”],
\9\9\9$ControllerLogic$
\9\9],
\9\9"gearbox": {
\9\9\9//ManualGearbox - BeamNG
\9\9\9//“gearDamageThreshold”:3000, //Multiplier for tolerance to smashing gears (no clutch + mismatched rpm)
\9\9\9"gearRatios":["$=-$gear_R", 0, “$gear_1”, “$gear_2”, “$gear_3”, “$gear_4”, “$gear_5”],
\9\9\9"friction": 0, //Constant friction torque on input shaft
\9\9\9"gearboxNode:":[“engine0”], //node used to play gear damage sound

\9\9\9"gearWhineCoefsInput": ["$=$whineMult * 0.60", 0, “$=$whineMult * 0.25”, “$=$whineMult * 0.25”, “$=$whineMult * 0.25”, “$=$whineMult * 0.25”, “$=$whineMult * 0.25”],
\9\9\9"gearWhineCoefsOutput": [0, 0, “$=$whineMult * 0.24”, “$=$whineMult * 0.24”, “$=$whineMult * 0.24”, “$=$whineMult * 0.24”, “$=$whineMult * 0.24”],
\9\9\9"gearWhineInputEvent": “event:>Vehicle>Transmission>helical_01>twine_in”,
\9\9\9"gearWhineOutputEvent": “event:>Vehicle>Transmission>helical_01>twine_out”,
\9\9},
\9\9"clutch": {
\9\9\9//“thermalsEnabled”:true
\9\9\9//“clutchMass”:10, //Thermal mass representing clutch disc and PP/Clutch surfaces
\9\9\9//“coolingCoef”:1, //Multiplier to tweak how fast it cools
\9\9\9//“warningTemp”:200, //Temp for UI warning
\9\9\9//“maxSafeClutchTemp”:300, //Temp after which torque limit decreases (but may recover if left to cool)
\9\9\9//“clutchOverheatRange”:100, //Additional temp before clutch is pretty wrecked and won’t recover much
\9\9\9//“maxClutchTemp”:500, //Clutch will never recover at all if it hits this temp
\9\9},


\9\9"vehicleController":
\9\9{
\9\9\9 //manual transmission useful values
\9\9\9"clutchLaunchStartRPM":702.37257639876, //RPM where launching behavior starts
\9\9\9"clutchLaunchTargetRPM":1202.3725763988, //RPM it tries to maintain while launching
\9\9\9"transmissionShiftDelay":0.05, //Time taken in between clutching actions
\9\9\9"revMatchThrottle":0.65, //Controls shift rev matching assist. Reduce this value to as much as 0.25 for high powered engines
\9\9\9"clutchInRate":9, //Controls shift assist clutching speed (value of 5 will be take 1/5 seconds to complete)
\9\9\9"clutchOutRate":9, //Controls shift assist clutching speed (value of 5 will be take 1/5 seconds to complete)
\9\9\9"calculateOptimalLoadShiftPoints":true, //The high shift points ones can be auto calculated
\9\9},

\9\9"powertrain" : [
\9\9\9[“type”, “name”, “inputName”, “inputIndex”],
\9\9\9[“frictionClutch”, “clutch”, “mainEngine”, 1],
\9\9\9[“manualGearbox”, “gearbox”, “clutch”, 1],

\9\9]
\9},
\9
\9"Camso_Transmission_Sequential_$trimUID$": {
\9\9"information":{
\9\9\9"authors":“Camshaft Software”,
\9\9\9"name":“5-Speed Sequential Transmission”,
\9\9}
\9\9"slotType" : “Camso_Transmission”,
\9\9"slots": [
\9\9\9[“type”, “default”, “description”],
\9\9\9[“Camso_TransferCase”, “$TransferCaseName$”, “Transfer Case”],
\9\9\9
\9\9],
\9\9
\9\9"variables": [
\9\9\9[“name”, “type”, “unit”, “category”, “default”, “min”, “max”, “title”, “description”],
\9\9\9["$whineMult", “range”, “”, “Gearing”, 1, 0, 5, “Whine Volume”, “Gearbox whine volume multiplier”,{“subCategory”: “Transmission”, “stepDis”: 1, “minDis”: 0, “maxDis”: 500}],
\9\9\9["$gear_R", “range”, “:1”, “Gearing”, 2.56, 0.1, 10, “Gear R”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_1", “range”, “:1”, “Gearing”, 2.43, 0.1, 10, “Gear 1”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_2", “range”, “:1”, “Gearing”, 1.64, 0.1, 10, “Gear 2”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_3", “range”, “:1”, “Gearing”, 1.21, 0.1, 10, “Gear 3”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_4", “range”, “:1”, “Gearing”, 0.94, 0.1, 10, “Gear 4”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_5", “range”, “:1”, “Gearing”, 0.75, 0.1, 10, “Gear 5”, “Gear ratio”, {“subCategory”: “Transmission”, “stepDis”: 0.01}]
\9\9],

\9\9"controller": [
\9\9\9[“fileName”],
\9\9\9$ControllerLogic$
\9\9],
\9\9"gearbox": {
\9\9\9//ManualGearbox - BeamNG
\9\9\9//“gearDamageThreshold”:3000, //Multiplier for tolerance to smashing gears (no clutch + mismatched rpm)
\9\9\9"gearRatios":["$=-$gear_R", 0, “$gear_1”, “$gear_2”, “$gear_3”, “$gear_4”, “$gear_5”],
\9\9\9"friction": 0, //Constant friction torque on input shaft
\9\9\9"gearboxNode:":[“engine0”], //node used to play gear damage sound

\9\9\9"gearWhineCoefsInput": ["$=$whineMult * 0.60", 0, “$=$whineMult * 0.25”, “$=$whineMult * 0.25”, “$=$whineMult * 0.25”, “$=$whineMult * 0.25”, “$=$whineMult * 0.25”],
\9\9\9"gearWhineCoefsOutput": [0, 0, “$=$whineMult * 0.24”, “$=$whineMult * 0.24”, “$=$whineMult * 0.24”, “$=$whineMult * 0.24”, “$=$whineMult * 0.24”],
\9\9\9"gearWhineInputEvent": “event:>Vehicle>Transmission>helical_01>twine_in”,
\9\9\9"gearWhineOutputEvent": “event:>Vehicle>Transmission>helical_01>twine_out”,
\9\9},
\9\9"clutch": {
\9\9\9//“thermalsEnabled”:true
\9\9\9//“clutchMass”:10, //Thermal mass representing clutch disc and PP/Clutch surfaces
\9\9\9//“coolingCoef”:1, //Multiplier to tweak how fast it cools
\9\9\9//“warningTemp”:200, //Temp for UI warning
\9\9\9//“maxSafeClutchTemp”:300, //Temp after which torque limit decreases (but may recover if left to cool)
\9\9\9//“clutchOverheatRange”:100, //Additional temp before clutch is pretty wrecked and won’t recover much
\9\9\9//“maxClutchTemp”:500, //Clutch will never recover at all if it hits this temp
\9\9},


\9\9"vehicleController":
\9\9{
\9\9\9 //manual transmission useful values
\9\9\9"clutchLaunchStartRPM":702.37257639876, //RPM where launching behavior starts
\9\9\9"clutchLaunchTargetRPM":1202.3725763988, //RPM it tries to maintain while launching
\9\9\9"transmissionShiftDelay":0.05, //Time taken in between clutching actions
\9\9\9"revMatchThrottle":0.65, //Controls shift rev matching assist. Reduce this value to as much as 0.25 for high powered engines
\9\9\9"clutchInRate":20, //Controls shift assist clutching speed (value of 5 will be take 1/5 seconds to complete)
\9\9\9"clutchOutRate":20, //Controls shift assist clutching speed (value of 5 will be take 1/5 seconds to complete)
\9\9\9"calculateOptimalLoadShiftPoints":true, //The high shift points ones can be auto calculated
\9\9},

\9\9"powertrain" : [
\9\9\9[“type”, “name”, “inputName”, “inputIndex”],
\9\9\9[“frictionClutch”, “clutch”, “mainEngine”, 1],
\9\9\9[“sequentialGearbox”, “gearbox”, “clutch”, 1],

\9\9],
\9},

\9"Camso_Transmission_Race": {
\9\9"information":{
\9\9\9"authors":“Camshaft Software”,
\9\9\9"name":“Race 6-Speed Sequential Transmission”
\9\9}
\9\9"slotType" : “Camso_Transmission”,
\9\9"slots": [
\9\9\9[“type”, “default”, “description”],
\9\9\9[“Camso_TransferCase”, “$TransferCaseName$”, “Transfer Case”],
\9\9\9$TransmissionSlots$
\9\9],
\9\9
\9\9"variables": [
\9\9\9[“name”, “type”, “unit”, “category”, “default”, “min”, “max”, “title”, “description”]
\9\9\9["$whineMult", “range”, “”, “Gearing”, 1, 0, 5, “Whine Volume”, “Gearbox whine volume multiplier”,{“subCategory”: “Transmission”, “stepDis”: 1, “minDis”: 0, “maxDis”: 500}],
\9\9\9["$gear_R_race", “range”, “:1”, “Gearing”, 2.95, 0.5, 5, “Gear R”, “Gear ratio”,{“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_1_race", “range”, “:1”, “Gearing”, 3.65, 0.5, 5, “Gear 1”, “Gear ratio”,{“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_2_race", “range”, “:1”, “Gearing”, 2.37, 0.5, 5, “Gear 2”, “Gear ratio”,{“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_3_race", “range”, “:1”, “Gearing”, 1.67, 0.5, 5, “Gear 3”, “Gear ratio”,{“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_4_race", “range”, “:1”, “Gearing”, 1.28, 0.5, 5, “Gear 4”, “Gear ratio”,{“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_5_race", “range”, “:1”, “Gearing”, 1.02, 0.5, 5, “Gear 5”, “Gear ratio”,{“subCategory”: “Transmission”, “stepDis”: 0.01}],
\9\9\9["$gear_6_race", “range”, “:1”, “Gearing”, 0.82, 0.5, 5, “Gear 6”, “Gear ratio”,{“subCategory”: “Transmission”, “stepDis”: 0.01}]
\9\9],

\9\9"controller": [
\9\9\9[“fileName”],
\9\9\9$ControllerLogic$
\9\9],

\9\9"gearbox": {
\9\9\9"uiName":“Gearbox”,
\9\9\9"gearRatios":["$=-$gear_R_race", 0, “$gear_1_race”, “$gear_2_race”, “$gear_3_race”, “$gear_4_race”, “$gear_5_race”, “$gear_6_race”],
\9\9\9"friction":1.39,
\9\9\9"dynamicFriction":0.0014,
\9\9\9"torqueLossCoef": 0.013,
\9\9\9"gearboxNode:":[“engine0”],

\9\9\9"gearWhineCoefsInput": ["$=$whineMult * 0.32", 0.00, “$=$whineMult * 0.32”, “$=$whineMult * 0.32”, “$=$whineMult * 0.32”, “$=$whineMult * 0.32”, “$=$whineMult * 0.32”, “$=$whineMult * 0.32”],
\9\9\9"gearWhineCoefsOutput": [0.00, 0.00, “$=$whineMult * 0.60”, “$=$whineMult * 0.60”, “$=$whineMult * 0.60”, “$=$whineMult * 0.60”, “$=$whineMult * 0.60”, “$=$whineMult * 0.60”],
\9\9\9"gearWhineInputEvent": “event:>Vehicle>Transmission>straight_01>twine_in_race”,
\9\9\9"gearWhineOutputEvent": “event:>Vehicle>Transmission>straight_01>twine_out_race”
\9\9},

\9\9"clutch": {
\9\9\9"clutchFreePlay":0.75,
\9\9\9"lockSpringCoef":0.3
\9\9},

\9\9"vehicleController": {
\9\9\9"calculateOptimalLoadShiftPoints": true,
\9\9\9"shiftDownRPMOffsetCoef":1.17,
\9\9\9//“aggressionSmoothingDown”:0.05
\9\9\9"aggressionHoldOffThrottleDelay":3,
\9\9\9//“lowShiftDownRPM”:[0,0,0,1600,1900,1800,1600,1500],
\9\9\9//“lowShiftUpRPM”:[0,0,3500,3300,3150,3000,2900],
\9\9\9"lowShiftDownRPM":952.37257639876,
\9\9\9"lowShiftUpRPM":800,
\9\9\9//“wheelSlipUpThreshold”:100,
\9\9\9"clutchLaunchStartRPM":702.37257639876, //RPM where launching behavior starts
\9\9\9"clutchLaunchTargetRPM":1202.3725763988 //RPM it tries to maintain while launching
\9\9},

\9\9"powertrain" : [
\9\9\9[“type”, “name”, “inputName”, “inputIndex”],
\9\9\9[“frictionClutch”, “clutch”, “mainEngine”, 1],
\9\9\9[“sequentialGearbox”, “gearbox”, “clutch”, 1]
\9\9]
\9},

$TransferCase$

\9"Camso_FuelTank_$trimUID$": {
\9\9"information":{
\9\9\9"name":“Gasoline Fuel Tank”,
\9\9\9"value":250
\9\9},\

Part 1

Sorry, couldn’t post the rest of it, lost track of where I was …

You can paste it into a text file and upload it

I just figured this out

  1. Work on a project and miss your sleep/rest
  2. If you are rested, not even well, just rested, you will most likely
    notice the bright red flashing “Fix It” sign before you try to export
    to BeamNG and end up with an error in both games.
  3. Just observing …
1 Like