Cars - SuperCatGaming/Velocity-Redux-Mod-Creator GitHub Wiki

Contents

Cars in Velocity Redux have a lot of parts. It is strongly recommended that you create a new folder for each car.

Get a model

To add a car, you will need a model. It is recommended that the model file is a ".fbx" file. Other formats might work, but are untested. If you are new to modeling, Blender is a free but powerful modeling tool. Learning how to model is out of the scope for this tutorial; you can find a ton of resources to help on YouTube.

Note

Models may have separate parts that can be swapped out per skin. For example, you may want one skin to have a different wing than another skin. For this, the model will need to contain separate objects.

Once you have a model, import it into Unity by dragging it into your folder. You may want to set some default materials so you can get an idea about how the car will look in-game. To do this, click on the model file in Unity, and select the "Materials" tab in the inspector. Then set the materials as you see fit. Read more about materials here.

Create a prefab

The next step is to create a prefab for your car. This must be done very carefully. If you name something incorrectly, the mod may fail to load properly. For this reason, it is recommended to use the menu option [Assets > Create > Mods > Car Prefab].

Important

Make sure you have your model selected when you use that menu option.

This will initialize a prefab for you with all the necessary parts. There is a lot you can change, but there is also a lot you shouldn't.

What you shouldn't do:

  • Rename any objects
  • Delete any objects or components
  • Reorder the hierarchy
  • Add your own custom scripts to objects

Any of the above actions will likely cause the mod to not load properly (except for some outliers which are explained later).

What you can do:

  • Modify the values of components in the inspector
  • Add objects to the hierarchy
  • Add components to objects

Placing the model

After you create your prefab, open it in the scene by double clicking it. You may notice that everything is very small. To snap the viewport to the model, double click on the "Models" object in the hierarchy. Depending on how the model was made, it may need to be scaled to fit in with the other vehicles. To check the scale, drag your prefab into the main scene hierarchy. To zoom in on it, double click it in the hierarchy. You should see another object there called carSize. The black box is the approximate size of an MST Suzuka, and the track is from Cliffside Realm. These are provided for you to scale your vehicle appropriately.

Also note the rotation of the model. The (prefab) scene should have lightbulb icons that depict the location of the headlights and tail lights. If you can't see them, in the upper right corner of the scene is an indicator for your perspective on the scene. The car's front should be in the positive z direction (facing the same direction as the base of the blue cone).

image

Placing the wheels

Once you have the model placed and rotated correctly, you can now place everything else. Let's start with the wheels. There are two objects for each wheel. One is under the "Wheel Colliders" object, and the other is under the "Models > WheelWidthOverride" object. Place the colliders as where you want the wheels to go, and set the radius to the size you want the wheels to be.

image

A green circle is displayed in the scene to show you the approximate size the wheel will be with the given radius. Make sure they are symmetrical (if that's how the car is supposed to be). On the other hand, the wheel objects under "Models" do not have to be precise (in fact, they technically don't have to be placed at all). It is typical to place them in the relative area of the given wheels, and to make them symmetrical if that is intended placement for the wheels. However, the game will position the rim objects where the colliders are, so it isn't really that important.

Note

The "WheelWidthOverride" object is an optional object. It is there for your convenience in the case that all wheels for the vehicle should be made thinner/thicker, which is done by changing the x-scale of this object. Changing the other properties of this object is not recommended. You can leave this object in the hierarchy, but you can also delete it if you wish to. To delete it, select all the child wheel objects and drag them out into the "Models" object. Then you can safely delete it.

Placing the lights

Now let's place the lights. This part is simple compared to the rest! Expand the "Vehicle Lights" object. You should see 4 more objects, 3 of which can be expanded.

Headlights

Under "HeadLights" you will find 2 objects. If your vehicle has one or no headlights, you can delete these as you see fit. You can also create more. To do so just right click one of them and select duplicate. The names do not matter.

image

Important

Be sure that no object that isn't a headlight is placed as a child of the HeadLights object, as that may cause your mod to fail to load.

Now, simply place the headlights close to where they are on the model. Be sure to keep them in front of the model, or the light will not shine correctly. This doesn't have to be super perfect.

Tail lights

All the same applies for tail lights. This time, make sure the light is slightly behind the model. With tail lights, you also have to add each tail light to the "Tail Light Control Mod" script found on the "TailLights" object. All you have to do is expand the "Tail Lights" object on the script, click the "+", and then drag and drop the new tail light object.

image

You may also notice that you have some options for the light brightness on that script. You can modify these if you wish.

Boost lights

Boost lights are much the same as headlights. Boost lights are the flames that appear when the car is using boost. They are usually placed at the exhaust ports. For these, the rotation matters. The goal is to have the blue arrow on the visual effect object pointing into the exhaust.

image

Tip

Make sure you have the move tool selected so that you can see the location of the visual effect objects

Again, this doesn't have to be perfect. You may also notice a script with a "Turbo Radius" value. This will modify the size of the flame; you can modify this if you wish (usually, a smaller value—something like 0.03—is preferred).

Damage smoke

Finally, damage smoke. Damage smoke is the smoke that appears when the car is damaged (who'd've thunk). This is often placed on the engine, but it can be placed wherever. This object can also be duplicated. The name does matter for these, though. At the very least, they must contain "DamageSmoke". This will already be done for you if you simply duplicate it and leave it, but if you want to rename it for any reason, just be sure the name still contains "DamageSmoke".

Placing the WeaponHandler

The final thing to place is the "WeaponHandler" object. This is where weapons will be placed on the car. This is normally placed on the roof or the hood. This object should sit slightly inside your model, but not too far.

Extra model parts

Some models might have multiple parts that can be swapped out. These have to be skinned differently. To do this, add a new GameObject under the "Models" object by right clicking on "Models" and selecting "Create Empty".

image

It should be named something like "CarPartSkin[Name]", where [Name] is replaced by the name of the part. Then in the inspector, click "Add Component" and search for the script called "Car Part Skin Mod" and add it.

image

Then you need to set the values for the script. The body renderer should be set to the part associated with the game object. To do this, expand the children of the model in the hierarchy and drag the part into the selection box for body renderer. You also need to specify whether the part has Levels Of Detail (LODs). This is explained further down.

If it doesn't have LODs, you can specify the outline material (if none is provided, Outline10 is used, which is the same as the one found in the [Common Resources/Materials/Original] folder). Unfortunately, without RealToon, you cannot provide a different outline material. (It's unlikely that you would want to anyway, as it would stand out from the style of the rest of the game).

Then, you also need to specify any objects that should only be shown with the model part you selected. This can often be left empty. Note that this will not apply the same skin to the objects in the list; this will only toggle their visibility with the body renderer you selected.

LODs

LOD is a method to increase the game's performance by showing less detail the farther away the player is from an object (in this case, the car). If a model has multiple meshes (normally containing "LOD" in the name), then it probably uses LODs. On the model, the LODs are handled by a component called LOD Group.

image

You will have to add and set up this component to make LODs work. When you first create an LOD Group, it looks like this:

image

At the top, you are given 4 LODs represented as a bar. The camera icon on this bar represents the scene camera's distance from the object (the camera icon can be dragged to move the scene camera). You may have more or less LODs; to remove LODs, right click on the LOD you want to remove and select "Delete". If you want to create another, right click where you want it to split, and select "Insert Before".

image

Note

The "Culled" LOD represents when the object should no longer be displayed at all. It has no model attached to it.

Then, for each LOD, add the correct mesh to the "Renderers" section by clicking the "Add" button and selecting the mesh. Remember that you want the highest quality mesh shown when the camera is closer to the model. After you have added the meshes, you can start playing with the distances that you transition between them. The default settings are likely not what you want; in particular, the "Culled" LOD should be much closer to 0%. Each model is different, but LODs are generally closer to the following:

image

Place the transitions where you feel that the loss of detail is not super noticeable.

Settings

Now it's time for settings galore!

Audio

Let's start easy. On the "Car Audio Sources" object, you will find a script with a bunch of settings for how the car will sound. Default Sound settings can be listened to in the Main Scene via the "ListenToEngineSounds" object. Just select that object, then select the sound you want to hear in the inspector and click play. You can also change the pitch by modifying the "Pitch" slider on the "Audio Source" component, though this only affects the playback on this object, and will not change it in game.

  • Is Turbo Charger: adds charger sounds when accelerating and winddown sound when letting off the throttle.
  • Is Super Charger: only adds charger sounds when accelerating. Overridden by "Is Turbo Charger"
  • Default Engine Sound: the sound the engine makes while revving (driving)
  • Default Idle Sound: the sound the engine makes at idle (not driving)
  • Default Winddown Sound: the sound the turbo makes when the player lets off the throttle (is only used if "Is Turbo Charger" is checked)
  • Default Skid Sound: the sound the tires make when they skid
  • Engine Pitch Offset: Pitch offset for engine sound (this value is added to all engine pitch values)
  • Engine Pitch Scalar: Engine pitch multiplier (this value is multiplied to all engine pitch values)
  • Idle Pitch: Pitch offset for idle sound
  • Burnout Pitch: Max pitch when performing burnout
  • Burnout Pitch Increment: How quickly it should reach Burnout Pitch
  • Burnout Pitch Backoff: The amount the pitch goes down once the max pitch is reached
  • Audio Gears: The pitch of the engine as it shifts through the gears...
    • Name: Can be whatever; is usually something like "Gear 1"
    • Min Speed: Denotes what speed (of the engine; RPM not MPH) is 0 on the Pitch Curve (not used for shifting). Generally, this should be the same as the Max Speed of the previous gear
    • Max Speed: The speed (of the engine; RPM not MPH) when the next gear should be used
    • Pitch Offset: This value is added to all engine pitch values for this gear
    • Pitch Scalar: This value is multiplied to all engine pitch values for this gear
    • Pitch Curve: The pitch of the engine as the speed moves from Min Speed to Max Speed. Normally, this is linear (a straight line)

Car stats

Select the base object (the one at the top of the hierarchy). In the inspector, there are a ton of stats for you to change to customize the performance of your car. The first thing to modify is located on the Rigidbody component; change the mass to a reasonable amount. You can think of the units as kilograms if it helps. Somewhere in the range of 1000 to 3000 would be fine for most cases; generally between 1200 and 2500 is reasonable. Then, on the Car Move Mod script, there is a ton more stats to change:

  • Car Parts To Skin: This is a list of all objects you added the CarPartSkinMod script to
  • Car Wheel Drive: this affects the car's handling, especially when drifting
  • Acceleration Curve: How quickly the car can accelerate the closer to max speed it is
  • Boost Curve: How quickly the car accelerates while boosting the closer to max boost speed it is
  • Air Boost Curve: The same as boost curve, but when the car is airborne
  • Reverse Curve: How fast the car accelerates when in reverse
  • Steer Curve: Affects how easily the car can steer at different speeds
  • Center of Mass: Changes how gravity affects the car (affects handling)

Tip

If you try driving your car and you notice that it tips over with almost every input, you probably need to lower the "Y" value here.

  • Motor Force: How much force the motor outputs; 1000-2300 is a good range
  • Brake Force: How quickly the vehicle comes to a stop; 10,000-25,000 is a good range
  • Max Steer Angle: Affects turning radius; the higher the angle, the smaller the turning radius (the car will turn sharper)
  • Max Speed: todo WIP

Finally, if you haven't done so already, rename the base object to the name of the car (do the same with the prefab file).

Skins

If you are following the recommended file structure for mods, skins for cars you added should be placed under [Cars/(your car name)/Data] and [Cars/(your car name)/Skins]. Textures and materials will go in the "Skins" folder, and everything else will go in "Data". To add textures, see Adding custom textures/materials

todo WIP

⚠️ **GitHub.com Fallback** ⚠️