Guest User

A-Chassis Tune

a guest
Mar 12th, 2021
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.88 KB | None | 0 0
  1. --[[
  2.         ___      _______                _       _______
  3.        / _ |____/ ___/ /  ___ ____ ___ (_)__   /__  __/
  4.       / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<     / /
  5.      /_/ |_|   \___/_//_/\_,_/___/___/_/___/    /_/  
  6. ]]
  7.  
  8. local Tune = {}
  9.  
  10. --[[Misc]]
  11.     Tune.LoadDelay      = .1        -- Delay before initializing chassis (in seconds)
  12.     Tune.AutoStart      = false     -- Set to false if using manual ignition plugin
  13.     Tune.AutoFlip       = true      -- Set to false if using manual flip plugin
  14.    
  15. --[[Wheel Alignment]]
  16.     --[Don't physically apply alignment to wheels]
  17.     --[Values are in degrees]
  18.     Tune.FCamber        = 1
  19.     Tune.RCamber        = 1
  20.     Tune.FCaster        = 0
  21.     Tune.FToe           = 0
  22.     Tune.RToe           = 0
  23.    
  24. --[[Weight and CG]]
  25.     Tune.Weight         = 3214      -- Total weight (in pounds)
  26.     Tune.WeightBSize    = {         -- Size of weight brick (dimmensions in studs ; larger = more stable)
  27.      --[[Width]]        6       ,
  28.      --[[Height]]       4       ,
  29.      --[[Length]]       15      }
  30.     Tune.WeightDist     = 51        -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
  31.     Tune.CGHeight       = .8        -- Center of gravity height (studs relative to median of all wheels)
  32.     Tune.WBVisible      = false     -- Makes the weight brick visible
  33.    
  34.     --Unsprung Weight
  35.     Tune.FWheelDensity  = 1     -- Front Wheel Density
  36.     Tune.RWheelDensity  = 1     -- Rear Wheel Density
  37.     Tune.FWLgcyDensity  = 1         -- Front Wheel Density [PGS OFF]
  38.     Tune.RWLgcyDensity  = 1         -- Rear Wheel Density [PGS OFF]
  39.    
  40.     Tune.AxleSize       = 2         -- Size of structural members (larger = MORE STABLE / carry more weight)
  41.     Tune.AxleDensity    = 3     -- Density of structural members
  42.    
  43. --[[Susupension]]
  44.     Tune.SusEnabled     = true      -- Sets whether suspension is enabled for PGS
  45.    
  46.     --Front Suspension
  47.     Tune.FSusDamping    = 500       -- Spring Dampening
  48.     Tune.FSusStiffness  = 9000      -- Spring Force
  49.     Tune.FAntiRoll      = 50        -- Anti-Roll (Gyro Dampening)
  50.    
  51.     Tune.FSusLength     = 2         -- Suspension length (in studs)
  52.     Tune.FPreCompress   = .3        -- Pre-compression adds resting length force
  53.     Tune.FExtensionLim  = .3        -- Max Extension Travel (in studs)
  54.     Tune.FCompressLim   = .1        -- Max Compression Travel (in studs)
  55.     Tune.FSusAngle      = 80        -- Suspension Angle (degrees from horizontal)
  56.        
  57.     Tune.FWsBoneLen     = 5         -- Wishbone Length
  58.     Tune.FWsBoneAngle   = 0         -- Wishbone angle (degrees from horizontal)
  59.     Tune.FAnchorOffset  = {         -- Suspension anchor point offset (relative to center of wheel)
  60.      --[[Lateral]]      -.4     ,   -- positive = outward
  61.      --[[Vertical]]     -.5     ,   -- positive = upward
  62.      --[[Forward]]      0       }   -- positive = forward
  63.    
  64.     --Rear Suspension
  65.     Tune.RSusDamping    = 500       -- Spring Dampening
  66.     Tune.RSusStiffness  = 9000      -- Spring Force
  67.     Tune.RAntiRoll      = 50        -- Anti-Roll (Gyro Dampening)
  68.  
  69.     Tune.RSusLength     = 2         -- Suspension length (in studs)
  70.     Tune.RPreCompress   = .3        -- Pre-compression adds resting length force
  71.     Tune.RExtensionLim  = .3        -- Max Extension Travel (in studs)
  72.     Tune.RCompressLim   = .1        -- Max Compression Travel (in studs)
  73.     Tune.RSusAngle      = 80        -- Suspension Angle (degrees from horizontal)
  74.        
  75.     Tune.RWsBoneLen     = 5         -- Wishbone Length
  76.     Tune.RWsBoneAngle   = 0         -- Wishbone angle (degrees from horizontal)
  77.     Tune.RAnchorOffset  = {         -- Suspension anchor point offset (relative to center of wheel)
  78.      --[[Lateral]]      -.4     ,   -- positive = outward
  79.      --[[Vertical]]     -.5     ,   -- positive = upward
  80.      --[[Forward]]      0       }   -- positive = forward
  81.  
  82.     --Aesthetics   
  83.     Tune.SusVisible     = false         -- Spring Visible
  84.     Tune.WsBVisible     = false         -- Wishbone Visible
  85.     Tune.SusRadius      = .2            -- Suspension Coil Radius
  86.     Tune.SusThickness   = .1            -- Suspension Coil Thickness
  87.     Tune.SusColor       = "Bright red"  -- Suspension Color [BrickColor]
  88.     Tune.SusCoilCount   = 6             -- Suspension Coil Count
  89.     Tune.WsColor        = "Black"       -- Wishbone Color [BrickColor]
  90.     Tune.WsThickness    = .1            -- Wishbone Rod Thickness
  91.  
  92. --[[Wheel Stabilizer Gyro]]
  93.     Tune.FGyroDamp      = 100       -- Front Wheel Non-Axial Dampening
  94.     Tune.RGyroDamp      = 100       -- Rear Wheel Non-Axial Dampening
  95.    
  96. --[[Steering]]
  97.     Tune.SteerInner     = 50        -- Inner wheel steering angle (in degrees)
  98.     Tune.SteerOuter     = 50        -- Outer wheel steering angle (in degrees)
  99.     Tune.SteerSpeed     = .05       -- Steering increment per tick (in degrees)
  100.     Tune.ReturnSpeed    = .1        -- Steering increment per tick (in degrees)
  101.     Tune.SteerDecay     = 320       -- Speed of gradient cutoff (in SPS)
  102.     Tune.MinSteer       = 10        -- Minimum steering at max steer decay (in percent)
  103.     Tune.MSteerExp      = 1         -- Mouse steering exponential degree
  104.    
  105.     --Steer Gyro Tuning
  106.     Tune.SteerD         = 1000      -- Steering Dampening
  107.     Tune.SteerMaxTorque = 50000     -- Steering Force
  108.     Tune.SteerP         = 100000    -- Steering Aggressiveness
  109.    
  110. --[[Engine]]
  111.  
  112.     --      [TORQUE CURVE VISUAL]
  113.     --      https://www.desmos.com/calculator/nap6stpjqf
  114.     --      Use sliders to manipulate values
  115.     --      Edit everything as if your car is NATURALLY aspirated, or as if it lacks a turbo.
  116.    
  117.     Tune.Horsepower     = 10000
  118.     Tune.IdleRPM        = 700
  119.     Tune.PeakRPM        = 6000
  120.     Tune.Redline        = 7000
  121.     Tune.EqPoint        = 5252
  122.     Tune.PeakSharpness  = 20
  123.     Tune.CurveMult      = 0.2
  124.    
  125.     Tune.InclineComp    = 1.2       -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
  126.    
  127.     --Turbo Settings
  128.     Tune.Aspiration     = "Super"                                               --[[
  129.     [Aspiration]
  130.         "Natural"       : N/A, Naturally aspirated engine
  131.         "Single"        : Single turbocharger
  132.         "Double"        : Twin turbocharger
  133.         "Super"         : Supercharger                                              ]]
  134.    
  135.     Tune.Boost          = 5         --Max PSI (If you have two turbos and this is 15, the PSI will be 30)
  136.     Tune.TurboSize      = 80        --Turbo size; the bigger it is, the more lag it has.
  137.     Tune.CompressRatio  = 9         --The compression ratio (look it up)
  138.     Tune.Sensitivity    = 0.05      --How quickly the Supercharger (if appllied) will bring boost when throttle is applied. (Increment applied per tick, suggested values from 0.05 to 0.1)
  139.    
  140.     --Misc
  141.     Tune.RevAccel       = 300       -- RPM acceleration when clutch is off
  142.     Tune.RevDecay       = 75        -- RPM decay when clutch is off
  143.     Tune.RevBounce      = 500       -- RPM kickback from redline
  144.     Tune.IdleThrottle   = 3         -- Percent throttle at idle
  145.     Tune.ClutchTol      = 250       -- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
  146.    
  147. --[[Drivetrain]]   
  148.     Tune.Config         = "AWD"     --"FWD" , "RWD" , "AWD"
  149.     Tune.TorqueVector   = 0.5           --AWD ONLY, "-1" has a 100% front bias, "0" has a 50:50 bias, and "1" has a 100% rear bias. Can be any number between that range.
  150.    
  151.     --Differential Settings
  152.     Tune.FDiffSlipThres = 50        -- 1 - 100%             (Max threshold of applying full lock determined by deviation from avg speed)
  153.     Tune.FDiffLockThres = 50        -- 0 - 100%             (0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
  154.     Tune.RDiffSlipThres = 80        -- 1 - 100%
  155.     Tune.RDiffLockThres = 20        -- 0 - 100%
  156.     Tune.CDiffSlipThres = 50        -- 1 - 100%             [AWD Only]
  157.     Tune.CDiffLockThres = 50        -- 0 - 100%             [AWD Only]
  158.    
  159.     --Traction Control Settings
  160.     Tune.TCSEnabled     = true      -- Implements TCS
  161.     Tune.TCSThreshold   = 20        -- Slip speed allowed before TCS starts working (in SPS)
  162.     Tune.TCSGradient    = 20        -- Slip speed gradient between 0 to max reduction (in SPS)
  163.     Tune.TCSLimit       = 10        -- Minimum amount of torque at max reduction (in percent)
  164.    
  165. --[[Transmission]]
  166.     Tune.TransModes     = {"Auto"}                                              --[[
  167.     [Modes]
  168.         "Auto"      : Automatic shifting
  169.         "Semi"      : Clutchless manual shifting, dual clutch transmission
  170.         "Manual"    : Manual shifting with clutch
  171.        
  172.         >Include within brackets
  173.             eg: {"Semi"} or {"Auto", "Manual"}                             
  174.         >First mode is default mode                                                 ]]
  175.    
  176.     --Automatic Settings
  177.     Tune.AutoShiftMode  = "Speed"                                               --[[
  178.     [Modes]
  179.         "Speed"     : Shifts based on wheel speed
  180.         "RPM"       : Shifts based on RPM                                           ]] 
  181.     Tune.AutoUpThresh   = -200      -- Automatic upshift point  (relative to peak RPM, positive = Over-rev)
  182.     Tune.AutoDownThresh = 1400      -- Automatic downshift point (relative to peak RPM, positive = Under-rev)
  183.     Tune.ShiftTime = .3             -- The time delay in which you initiate a shift and the car changes gear
  184.    
  185.     --Gear Ratios
  186.    
  187.     Tune.FinalDrive     = 4.5           -- Gearing determines top speed and wheel torque
  188.     Tune.Ratios         = {             -- Higher ratio = more torque, Lower ratio = higher top speed
  189.         --[[Reverse]]   3.70        ,   -- Copy and paste a ratio to add a gear
  190.         --[[Neutral]]   0           ,   -- Ratios can also be deleted
  191.         --[[ 1 ]]       3.53        ,   -- Reverse, Neutral, and 1st gear are required
  192.         --[[ 2 ]]       2.04        ,
  193.         --[[ 3 ]]       1.38        ,
  194.         --[[ 4 ]]       1.03        ,
  195.         --[[ 5 ]]       0.81        ,
  196.         --[[ 6 ]]       0.64        ,
  197.     }
  198.     Tune.FDMult         = 3         -- Ratio multiplier (keep this at 1 if car is not struggling with torque)
  199.    
  200. --[[Brakes]]
  201.     Tune.ABSEnabled     = true      -- Implements ABS
  202.     Tune.ABSThreshold   = 20        -- Slip speed allowed before ABS starts working (in SPS)
  203.  
  204.     Tune.FBrakeForce    = 30000     -- Front brake force
  205.     Tune.RBrakeForce    = 100000        -- Rear brake force
  206.     Tune.PBrakeForce    = 30000     -- Handbrake force
  207.    
  208.     Tune.FLgcyBForce    = 15000     -- Front brake force [PGS OFF]
  209.     Tune.RLgcyBForce    = 10000     -- Rear brake force [PGS OFF]
  210.     Tune.LgcyPBForce    = 15000     -- Handbrake force [PGS OFF]
  211.    
  212. --[[[Default Controls]]
  213.     --Peripheral Deadzones
  214.     Tune.Peripherals = {
  215.         MSteerWidth             = 67        ,   -- Mouse steering control width (0 - 100% of screen width)
  216.         MSteerDZone             = 10        ,   -- Mouse steering deadzone (0 - 100%)
  217.        
  218.         ControlLDZone           = 5         ,   -- Controller steering L-deadzone (0 - 100%)
  219.         ControlRDZone           = 5         ,   -- Controller steering R-deadzone (0 - 100%)
  220.     }
  221.    
  222.     --Control Mapping
  223.     Tune.Controls = {
  224.        
  225.     --Keyboard Controls
  226.         --Mode Toggles
  227.        
  228.         --Primary Controls
  229.         Throttle                = Enum.KeyCode.Up                   ,
  230.         Brake                   = Enum.KeyCode.Down                 ,
  231.         SteerLeft               = Enum.KeyCode.Left                 ,
  232.         SteerRight              = Enum.KeyCode.Right                ,
  233.        
  234.         --Secondary Controls
  235.         Throttle2               = Enum.KeyCode.W                    ,
  236.         Brake2                  = Enum.KeyCode.S                    ,
  237.         SteerLeft2              = Enum.KeyCode.A                    ,
  238.         SteerRight2             = Enum.KeyCode.D                    ,
  239.        
  240.         --Manual Transmission
  241.         ShiftUp                 = Enum.KeyCode.RightBracket                 ,
  242.         ShiftDown               = Enum.KeyCode.LeftBracket                  ,
  243.         Clutch                  = Enum.KeyCode.LeftShift            ,
  244.        
  245.         --Handbrake
  246.         PBrake                  =   Enum.KeyCode.Ampersand                              ,
  247.        
  248.     --Mouse Controls
  249.         MouseThrottle           = Enum.UserInputType.MouseButton1   ,
  250.         MouseBrake              = Enum.UserInputType.MouseButton2   ,
  251.         MouseClutch             = Enum.KeyCode.W                    ,
  252.         MouseShiftUp            = Enum.KeyCode.E                    ,
  253.         MouseShiftDown          = Enum.KeyCode.Q                    ,
  254.         MousePBrake             = Enum.KeyCode.LeftShift            ,
  255.        
  256.     --Controller Mapping
  257.         ContlrThrottle          = Enum.KeyCode.ButtonR2             ,
  258.         ContlrBrake             = Enum.KeyCode.ButtonL2             ,
  259.         ContlrSteer             = Enum.KeyCode.Thumbstick1          ,
  260.         ContlrShiftUp           = Enum.KeyCode.ButtonY              ,
  261.         ContlrShiftDown         = Enum.KeyCode.ButtonX              ,
  262.         ContlrClutch            = Enum.KeyCode.ButtonR1             ,
  263.         ContlrPBrake            = Enum.KeyCode.ButtonL1             ,
  264.         ContlrToggleTMode       = Enum.KeyCode.DPadUp               ,
  265.         ContlrToggleTCS         = Enum.KeyCode.DPadDown             ,
  266.         ContlrToggleABS         = Enum.KeyCode.DPadRight            ,
  267.     }
  268.    
  269. --[[Standardized Values: Don't touch unless needed]]
  270.    
  271.     --[WEIGHT // Cubic stud : pounds ratio]
  272.     Tune.WeightScaling = 1/50   --Default = 1/50 (1 cubic stud = 50 lbs)
  273.     Tune.LegacyScaling = 1/10   --Default = 1/10 (1 cubic stud = 10 lbs) [PGS OFF]
  274.    
  275. return Tune
Advertisement
Add Comment
Please, Sign In to add comment