Garry’s Mod How to make your own simfphys vehicle

Garry’s Mod How to make your own simfphys vehicle 1 - steamsplay.com
Garry’s Mod How to make your own simfphys vehicle 1 - steamsplay.com
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!

 
 

Basic information

 
This tutorial is meant for this addon 
https://steamcommunity.com/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

YouTube player

 
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. 
  • 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. 
 
 

Conversion: 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

 
 

Written by super_tense.png

Hope you enjoy the post for Garry’s Mod How to make your own simfphys vehicle, If you think we should update the post or something is wrong please let us know via comment and we will fix it how fast as possible! Thank you and have a great day!


1 Comment

Leave a Reply

Your email address will not be published.


*