Garry's Mod

Garry's Mod

80 ratings
How to make your own simfphys vehicle
By playmobilbus
Did you ever request a vehicle to a simfphys creator, hoping that the creator would make it for you? Are you tired of waiting months for it? Do you want to make your own conversions? If the answer is yes, then this is the perfect guide for you!
2
2
   
Award
Favorite
Favorited
Unfavorite
Basic information
This tutorial is meant for this addon
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=771487490
The directory were you are supposed to start is:
...\steamapps\common\GarrysMod\garrysmod\addons
For a tutorial on how to get there by video, click here

You can use notepad to follow this tutorial, but it's recommended to use Notepad++ or Sublime Text.
Convertion
Here you will create new folders and a file that contains a basic script.

Creating Folders
  • Create a new folder wearing whatever name you desire. In this example, I will use the name "my_first_simfphys_car"
  • In the folder that you created, you create another folder called "lua".
    Important note: All letters should be lowercase!
  • Enter the "lua" folder that you created and create a new folder called "autorun".
    Again, All letters lowercase.
  • Go in the last folder that you created.
My path looks like this right now:
...\steamapps\common\GarrysMod\garrysmod\addons\my_first_simfphys_car\lua\autorun

Creating The File
  • Create a txt file called as you prefer, in my example that would be "my_first_simfphys_car".
  • Change the file extention from .txt to .lua. The name of the file should look like this right now: "my_first_simfphys_car.lua". This option is turned off by default, and if it is turned off, make sure to have it turned on.
  • Open the file, copy and paste what's in the category called Conversion: File content and paste its content in your .lua file.
Changing Model In The File
    In order to follow the next steps, you're supposed to start in-game
  • Go to your Spawn Menu
  • Click Browse
  • Open Addons
  • Select the addon of the model you would like to use
  • Right-Click on the thumbnail of the model and press Copy to clipboard
  • Open your .lua file and replace "models/buggy.mdl" with whatever model you will use
This simfphys vehicle is immediately accessible in-game when starting a new game. In case you're reading this while being in-game, you're supposed to restart your game in order to access it.
Convertion: File content
AddCSLuaFile() local light_table = { ModernLights = false, -- Modern or Old lights? True or false R_HeadLampPos = Vector(0,0,0), -- the location of the headlights (Right - R) R_HeadLampAng = Angle(180,-90,0), -- the angle of the headlights L_HeadLampPos = Vector(0,0,0), -- the location of the headlights (Left - L) L_HeadLampAng = Angle(180,-90,0), -- the angle of the headlights R_RearLampPos = Vector(0,0,0), -- the location of the rear lights R_RearLampAng = Angle(0,-90,0), -- the angle of the rear lights L_RearLampPos = Vector(0,0,0), -- the location of the rear lights L_RearLampAng = Angle(0,-90,0), -- the angle of the rear lights Headlight_sprites = { {pos = Vector(0,0,0), size = 100, material = "sprites/light_ignorez",color = Color(255,255,255,255)}, }, Headlamp_sprites = { }, FogLight_sprites = { }, Rearlight_sprites = { }, Brakelight_sprites = { }, Reverselight_sprites = { }, Turnsignal_sprites = { Right = { }, Left = { }, } } list.Set( "simfphys_lights", "template", light_table) -- here you need to change "template", for example you can change it to "myfrstsimfcar" local V = { Name = "Template Vehicle", -- Name of the vehicle in-game Model = "models/buggy.mdl", -- Vehicle model (in the tab add-ons and prop auto) Category = "Your Category", -- category of the vehicle Members = { Mass = 1700, -- the mass of your vehicle LightsTable = "template", -- name of light_table AirFriction = -1000, FrontWheelRadius = 21, -- how big is your front wheel? (those are physical, not visual) RearWheelRadius = 21, -- how big is your rear wheel? (those are physical, not visual) CustomMassCenter = Vector(0,0,-6), SeatOffset = Vector(-8,0,-6), -- the position of the driver seat SeatPitch = 0, SpeedoMax = 100, -- The maximum speed on the speedometer PassengerSeats = { -- where will the passengers sit? { pos = Vector(0,0,0), ang = Angle(0,0,14) }, }, ExhaustPositions = { -- where are your exhausts? { pos = Vector(0,0,0), ang = Angle(90,-90,0), }, }, StrengthenSuspension = false, FrontHeight = 10, -- the height of the front suspension FrontConstant = 43000, -- if it's higher, the suspension is set higher and will move less FrontDamping = 3000, -- if it's higher, the suspension will move less. watch out, don't set too high otherwise your wheels will act weird. FrontRelativeDamping = 1700, -- just copy the setting above RearHeight = 10, -- the height of the rear suspension RearConstant = 43000, -- if it's higher, the suspension is set higher and will move less RearDamping = 3000, -- if it's higher, the suspension will move less. watch out, don't set too high otherwise your wheels will act weird. RearRelativeDamping = 1700, -- just copy the setting above FastSteeringAngle = 10, -- how sharp it will turn until it reaches a paticular speed SteeringFadeFastSpeed = 535, -- yeah kinda the paticular speed TurnSpeed = 6, -- how fast will it turn? higher is faster. default is 8, but in my opinion, 6 is better. MaxGrip = 60, -- watch out, otherwise your car will slip or will roll over its head. Efficiency = 1, -- how fast you car will accelerate. GripOffset = -2, -- negative is for the rear and the positive for the front BrakePower = 35, -- If set really high, there's a chance your car will fly over his head IdleRPM = 750, -- just let it 720, it doesn't matter anyway LimitRPM = 8000, -- this is the limit. you can't go higher than the limit Revlimiter = false, -- If true - When the speedometer reaches of the red designation, it does not pass on, if false it is ignored PeakTorque = 140, -- how fast your wheels spin PowerbandStart = 1500, -- when will you transmit first? if set to 1000, it will transmit for the first time at 2000. just take the half of the powerband end PowerbandEnd = 6500, -- this is the red limit. Turbocharged = false, -- gives whistle sound and increases horsepower when active Supercharged = false, -- gives a miscellaneous sound and increases horsepower when active Backfire = false, -- will you car bang bang pew pew out of the exhaust? FuelFillPos = Vector(-33.61,-45.1,37.7), -- where can you fill your tank? FuelType = FUELTYPE_PETROL, -- type of fuel FuelTankSize = 80, -- size of fuel tank PowerBias = 1, -- if positive, it's rear wheel drive, if negative, it's front wheel drive. for example, a ford mustang is rear wheel drive (1) and lamborghini are mostly all wheel drive (0) EngineSoundPreset = -1, snd_pitch = 1, -- how high will it sound? snd_idle = "simulated_vehicles/jeep/jeep_idle.wav", -- if you start your vehicle, this is the sound it will make. snd_low = "simulated_vehicles/jeep/jeep_low.wav", -- if you drive underneath 3000 rpm, this is your engine sound snd_low_revdown = "simulated_vehicles/jeep/jeep_revdown.wav", -- if you release your forward button and don't use the brake snd_low_pitch = 0.8, -- how high will it sound? snd_mid = "simulated_vehicles/jeep/jeep_mid.wav", -- this is the first sound you will hear from the moment you start driving snd_mid_gearup = "simulated_vehicles/jeep/jeep_second.wav", -- after the first transmission, you will hear this. snd_mid_geardown = "simulated_vehicles/jeep/jeep_second.wav", -- you will hear this sounds when you shift down. snd_mid_pitch = 0.8, -- how high will it sound?$ -- if EngineSoundPreset is 0 in-game then Sound_Idle = "simulated_vehicles/misc/nanjing_loop.wav", -- if you start your vehicle, this is the sound it will make. Sound_IdlePitch = 1, Sound_Mid = "simulated_vehicles/misc/m50.wav", -- if your rpm (in percentage) is below "Sound_MidFadeOutRPMpercent", you will hear this sound Sound_MidPitch = 0.9, -- how high will it sound? Sound_MidVolume = 1, -- how loud will it sound? Sound_MidFadeOutRPMpercent = 100, -- when this sound will fade out Sound_MidFadeOutRate = 1, --0.25 -- how fast it will fade out Sound_High = "simulated_vehicles/misc/v8high2.wav", -- if your rpm (in percentage) is above "Sound_HighFadeInRPMpercent", you will hear this sound Sound_HighPitch = 0.8, -- how high will it sound? Sound_HighVolume = 1, -- how loud will it sound? Sound_HighFadeInRPMpercent = 55, -- when this sound will fade in Sound_HighFadeInRate = 0.40, -- how fast it will fade in Sound_Throttle = "common/null.wav", -- how higher rpm, how louder it will sound. Sound_ThrottlePitch = 0, -- how high will it sound? Sound_ThrottleVolume = 0, -- how loud will it sound? snd_horn = "simulated_vehicles/horn_7.wav", -- if you push the button for the horn -- ForceTransmission = 0, DifferentialGear = 0.5, -- experiment with it. Gears = {-0.1,0,0.12,0.22,0.3,0.4} -- how many gears do you want? } } if (file.Exists( "models/buggy.mdl", "GAME" )) then -- name of the model (".mdl") list.Set( "simfphys_vehicles", "sim_fphys_template", V ) -- change to any name (for example - sim_fphys_lalala) end
End
You are free to repost this guide, however you must credit me as the creator of the guide.

Thank you for reading.
79 Comments
SK8BoredERrr 2015 26 Aug @ 5:43pm 
K thanks pally
playmobilbus  [author] 26 Aug @ 8:50am 
To select the model you want, you need to have the addon installed and activated, for then to copy its path. I am confused what TF2 has to do with it, and in what sense you had to isolate.
playmobilbus  [author] 26 Aug @ 8:45am 
The custom wheel size does not apply in cases of custom wheels, only to prop_vehicle_jeep models.
SK8BoredERrr 2015 30 Jul @ 5:20am 
Also a few questions how do I make it the model I want and will I need to make like a short cut for Gmod cause I once did some modding and then it some how messed up tf2 and I had to isolate it so will I have to do this with Gmod?
SK8BoredERrr 2015 29 Jul @ 2:52pm 
Here's the cars if anyone wants to help or give advice then here's the mod https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=593710774
SK8BoredERrr 2015 29 Jul @ 1:30pm 
Yes I did I found a cool crown Victoria but I wanted to have it on simplifys but I could get some one to do here I am plus there's a bunch of other cars I want to have too
playmobilbus  [author] 10 Jun @ 1:06pm 
I'm not sure since I have not heard of that before. What model are we talking about?
Aspen Willow 10 Jun @ 7:22am 
The car spawns ignoring the custom wheel size, but changing the wheels (including to the original wheels) causes them to be right size. What would cause this?
Crino 23 Jul, 2024 @ 7:51am 
also i added you since i have a few questions