Tricky Machines

Tricky Machines

Not enough ratings
How to make vehicles
By test
This is a detailed guide on making your own vehicles for your maps. I will start from the basics and share some tricks that I found that can save some time.
   
Award
Favorite
Favorited
Unfavorite
Intro
Welcome to the guide!
I saw people asking how to make vehicles, and there are no guides for this game after two years so here is the first one.
Making vehicles is pretty easy, should take a few minutes once you know what to do, although there are some traps that might take a lot of time to fix - I will make sure to explain how not to fall into them.
Saving / Loading
I recommend creating a new map for each vehicle, because if you do everything on one map, some operations like scaling or extruding might start to lag due to the amount of objects.

Saving
You can save a vehicle, or any other object, movable or non-movable, by pressing sel by click (R), clicking on the vehicle to select it, and using file > Save selected:
Make sure you press Save selected, not Save.

Loading from file
Use file > Load additional to spawn the vehicle you just saved at camera position on any other map.

Make sure not to accidentally click Load instead of Load additional - it will load vehicle as a map, deleting your current map without confirmation if you haven't saved it!
Moreover, using Load on something that was saved with Save selected appears to be bugged and will make the game crash when you start the map.

Loading from map
Alternatively, you can load a vehicle from any published map:
Open the map with the vehicle you want and press Editor (2):

Now click Add > Add vehicle.... In vehicle index, enter 1 to load 1st vehicle, or any other number if there are more then one vehicles on the map, and press Ok:


Backups
When making your vehicle, try to save your map after every operation, as most map makers probably know the editor tends to crash quite often. It does autosave so you shouldn't have major setbacks, but it is still useful to manually save whenever you do something - it is instantaneous and takes two clicks.


Also be careful with file > New, it will delete your current map if you haven't saved it without confirmation.
Making a vehicle
There are two main ways to make a vehicle - you can start with your car's body and add wheels afterwards, or you can start with the wheels and build the body around them. While the order is different, the process is otherwise exactly the same.

If you start with the body - when you add wheels to existing body, they will have the default parameters appropriate for the weight of the body you have already created. Useful if you don't want to fiddle with the big list of suspension parameters, this approach in general is good for most vehicles. The only disadvantage is that you will have to set the proportions of the body by eye, as you won't have the wheels as reference.

If you start with wheels - you will be able to input relative distance between left and right wheel, wheelbase, and the radius of the wheels. You can take those straight from actual vehicle specification, and then build the body around the wheels. I personally struggle with setting proportions by eye so I am going to use this approach. Note that the distance is in relative units, not meters, so it won't help with overall scale.

Making the vehicle base
Create a cube and make sure it is made of moveable materials:

I highly recommend setting up the default cube as the vehicle first, and only then shaping it into whatever body you want or adding wheels. This is because you don't know where the front and the back are, and there is a chance you make your vehicle backwards, which is pretty much impossible to fix without redoing the whole body.

To set your cube as a vehicle, press properties, select your cube, press vehicle... and then make vehicle, then Apply & close:
Now if you press Play! (tab), your camera will be pointed at the cube - the back of your future vehicle.

Take note of where the front and the back is! Make sure you don't make the body backwards.



Mirroring
In the same properties window you can enable mirror X, which will mirror all changes done to one side to the other side. Cars tend to be symmetrical, if yours is, this option will save a lot of time.

With enabled mirroring, if you press push/pull side(H) and hover over the top of your car, you will see that one of the sides isn't fully highlighted, there is a stripe on it. That side is the mirrored one, so if you try to make any changes to it, it won't do anything - make sure to only work on the original side. If needed, later you can save the symmetric mesh and add asymmetric parts.
Adding wheels
Now I will add the wheels. If you start with body, you can skip to the Shaping the body section and then return to this one.

In the same properties menu, click edit wheels:

A menu will appear, press Add new wheel.

A wheel will appear next to your vehicle, and you will see a big list of parameters in the menu. To set a parameter, enter it, then press enter, and click apply. Changes will only be reflected on your car after you press apply, and apply button will be active only after you press enter.

If you have enabled mirror X like I did, the wheel will be mirrored, so you will be conveniently editing pairs of wheels.

I will begin by modifying the first pair of wheels, and then duplicate it to get the second pair of wheels. For now I am only concerned with putting my wheels in the right place, so only need Pos X, Pos Z, Pos Y, tyre radius, tyre width parameters. The value of all of those parameters is measured in some kind of relative units.

wheel position and size
Pos X
Lets start with Pos X. This parameter represents the position of the wheel along left/right. The vehicle I am making has a 1.5 meters distance between the wheels. If I set the parameter to 0.75, the wheel will be 0.75 units left from zero (I will scale the vehicle later to make units into meters). Since I have mirroring enabled, the mirrored wheel will be 0.75 units right from zero, making total width of my vehicle 1.5 units.
If you don't have mirroring enabled, you will have to add a new wheel, and set its Pos X to -0.75. Or you could set the first wheel to 0 and second to 1.5 - whatever you think is more convenient.

Pos Z
Pos Z represents how high the wheel is, positive value means it is above zero, negative - below. Since I haven't made the body yet, I will just leave it at zero, and build the body around the wheels. If you already have a pre-made vehicle body, you will probably have to edit this to move the wheels up or down.

Pos Y
Pos Y - positive value means the wheels position is this amount of meters to the front of zero, negative - to the back of zero. I will leave the first pair of wheels at 0, second pair of wheels will be set to 1.15 since the wheelbase of my vehicle is 1.15 meters.

tyre radius, tyre width
tyre radius, tyre width - self explanatory, although they affect the entire wheel, not just tires. Keep in mind that radius is half the diameter, or half the height of the wheel. I will set them to whatever is close to my vehicle specifications and looks good with the in game wheels model.

Results
Now I will duplicate the first pair of wheels, and edit Pos Y to move the second pair to the front.
Here is my final menu:
Shaping the body
Now that the wheels are in, I will work on the body, using the wheels as reference.
I am making a little bobcat vehicle:

I will start by doing the white part, then I will make the black cabin, and then I will add the scoop.

The main tools you can use to shape the body are pull/push side(H), subtract and merge.

Base
First, press Play! (tab), your camera will be pointed at the back of the vehicle. Make sure to note where the front and the back is, because if you accidentally make the body backwards, you won't be able to fix it.

Here is the initial cuboid I will work with, pulled to be roughly the same size as the white part.


Subtracting
To subtract, select your car with sel by click (R) so that it has a green outline, press subtract, and click on the thing that you want to subtract:



Also when subtracting, instead of moving the cuboid that is being subtracted, try extruding it with pull/push side(H), it is often more convenient to do it this way.

Merging
To merge, select two things that you want to be merged into one thing, and click merge. I will use that to make a slope:


Wheel arches
To make wheel arches, you can subtract a cylinder:

However I won't be doing that because my bobcat doesn't have wheel arches.

Windows
After making the white base part, I will make the cabin with windows as a separate part that can I later either merge with the base, or add it as a detachable piece.
You can subtract long cuboids like this to make windows:


To make windows that have more complex shapes, you can make the thing that you are subtracting into the shape of the window:

Enclaves
To make enclaves, such as a scoop, you can make a copy of the part, scale it down slightly, and subtract the smaller copy from the original:


Scaling
To make sure your vehicle isn't too big or too small, you can spawn default 1x1 meter cubes for reference and use the scale operation on your vehicle to make it properly scaled. I recommend doing this after you add wheels and position them properly. but before you edit all the other wheel parameters because they will change with scale and make the vehicle drive slightly differently.

Result
I will explain how to do moving parts like the scoop later, for now lets get to tweaking engine and wheel parameters.
Engine and wheel parameters
There are many parameters for you to edit, also there is a chance your car is not driveable with the default parameters, especially if it is very heavy or very light.

To edit engine parameters, go to properties... > click on your car > vehicle.... If your car flies away when you press forward, you might need to reduce engine power to something like 0.01. I am also working on a guide that explains each parameter in detail, but this one will focus on the main ones.

To edit wheel parameters, go to properties... > click on your car > edit wheels. If your car explodes when you start the level, the default parameters could be too extreme, for example if you made a tiny RC car. Again, all the parameters will be described in a different guide. Also, when you select a parameter, there is a short description at the bottom.

Tweaking wheel parameters
properties... > click on your car > edit wheels.
First you probably want to make sure your car can steer and break.

Set brake force and hand break force to some value, so that your car can break. 1 is good for normal sized cars, 2-10 for trucks depending on how heavy they are.

Set steering axle dist on front wheels to the length of your vehicle in meters to make your cars steer. You can try setting it to a different value, for example 1, but usually length in meters works well.

Finally, to make sure your car is rear wheel drive or full wheel drive or whichever drive it is, edit actuation amount. It defines how much power gets delivered to that wheel. For example, for rear wheel drive, the value on front wheels should be zero. For vehicles that don't have an engine, like soapbox cars, you can set all wheels to 0.

Now you can start tweaking all the other parameters, in particular:
  • spring constant - affects how hard the suspension is - the higher - the harder;
  • wheel mass - scales dampening, meaning the higher it is, the less bouncy your car will be;
  • tyre friction constant - affect the tire grip, lower values will make the car drift/slide.
  • height offset - this makes car higher or lower. Suspension makes the car a bit lower than it is in the editor, and this parameter is supposed to offset that.
If you find good combination of those values, you might not need to tweak anything else.

Here are my final values for my bobcat:

Tweaking engine parameters
properties... > click on your car > vehicle...
Here you can set engine type. 0 means diesel, 1 - petrol, 2 - electric engine. If you use electric engine, make sure to set max speed, or your car won't drive with the default 0.

Engine power is self explanatory. Traction control will stop throttling whenever your car tries to drift, preventing the drift.

Gear ratio must be above 1, lower gear ratio and first gear are good for tractors or offroad vehicles. They make the vehicle output more power, but max speed will be lower.

Here are my values. I reduced power to 0.2 because bobcat is a light vehicle.
Improving driveability
At this stage you probably have a vehicle that can drive, however it might be too unstable, too bouncy, have a weird suspension, or the vibrating wheels bug. Here are the common ways to improve the driveability.

improving stability
Pay attention to the materials your vehicle is made of. They differ not ontly by texture, they also have different weights. If you vehicle is too top heavy, it will easily tip over.

A simple way to improve stability of your car is to add heavy metal plates to the bottom or to the middle.
Here I have a metal_heavy plate hidden in the bottom of the body


Sometimes, if your vehicle is already too heavy, you might want to add multiple plates in the same spot.

You can also make the inside of the vehicle hollow using subtraction. Make the roof as thin as possible and make the bottom thick, so that there is more weight at the bottom. That can reduce and redistribute weight, and metal plates will be more effective.

Stabilizer spring constant is supposed to improve stability, so try it. But i haven't noticed any difference with different values.

Car is too wobbly
If the suspension is bouncy/wobbly, there is probably not enough dampening. The dampening up and dampening down parameters must be under 0.5 and they often aren't enough to make your car less bouncy.

The most effective way to reduce dampening is to increase wheel mass, although too much wheel mass can cause wheel vibration bug. If you get that bug, there is a section below on how to reduce it, but that often means giving up other characteristics, so you have to find a good balance.

Another way is increasing the weight of your vehicle, by changing the material or adding metal plates.

Reducing spring constant will also reduce bounciness, although it will make suspension softer which is not always desirable. To offset this, try setting travel limit up to a lower value.

Car will also bounce when it shifts gears - if you have too many gears and the gear ratio is too low, it will switch gears a lot and therefore bounce a lot.

Car is too jumpy
Jumpy car occurs when tyre elasticity is too high, suspension is too hard, wheel mass / dampening is too low, or the vehicle is too light.

wheels go sideways
If your wheels go sideways into the body, or outwards, bottom link body X is too low or too high. Although I am not entirely sure what it does, if you get this issue, that parameter should be a lower for small vehicles, and bigger for giant vehicles.

If your wheels go to the front or to the back, that is due to the bottom link body Y. Set it to the default value of 0.

Suspension is too hard, ignores spring constant
This happens when you set bottom link body X to 0 or a very low value. It can also happen if spring constant is too high, or travel limit up is too low/

Vibrating wheel bug
The game automatically detects vibrating wheel bug and notifies you of it. I haven't noticed any difference in how the car behaves with and without it so I don't know what it is, but I still try to avoid it.
If you get it, you can:
  • increase vehicle mass
  • reduce wheel mass
  • reduce suspension constant or make suspension softer in any other way
  • reduce tyre elasticity
  • reduce tyre friction constant

Wheels go through the ground
That means tyre elasticity is too low for vehicle weight.

Car is stuck on 1st gear
gear ratio diff must be above 1.

Car doesn't move
If you have electric engine, make sure max speed isn't 0
Joints and moving parts
Joints allow you to add detachable parts, for example if you want your car to be breakable into pieces. You can also make all kinds of moving parts, such as pistons, scoops, cranes, manipulators, etc. You can even make a wheel out of a cylinder and a rotating joint.

Detachable / breakable parts
First, I am going to make the roof of my bobcat detachable. I haven't merged it with the body, if you have but want to make it detachable, you can always unmerge.
Since cabin is going to be a separate object, I don't want it to intersect with the body, so I simply subtract the body from the cabin:

However for moving parts like the scoop, to avoid physics bugs, it is often better to disable the collision between moving part and the body, meaning moving part can go through the body and is held only by the joint. In that case you it doesn't matter if there is intersection.

To add a joint, select two things that you want to connect using the joint using sel by click (R), and press Add... > Add joint


Now you can set the joint parameters. In the future, to edit an existing joint, click Edit/delete joint and select the joint you want to edit. For a detachable part I am going to use elastic dislocation.

I also enabled self-collide so that the cabin collides with the body and sits on top of it, and slightly increased position spring, which controls how strongly the joint is holding the part in place. Position dampening can make the joint less bouncy, but I don't need it now.

To move the joint, press move joint, and then move X/Y/Z. Joint is basically the place where the body and the cabin are connected, so place it somewhere where they connect, it isn't that important for a detachable part.

Here are my final settings:

Moving parts
I am going to make the thing go up and down, and the scoop on the thing will go up and down separately as well:


Now it is important to move the joint to the axis, along which it will rotate.

For rotation, I will use joint type axle rotation. If you use One point, your joint will rotate along multiple axes, which can be good for something like a hand that can go rotate up/down and left/right. Piston pushes the thing. But the scoop can only go up/down, so axle rotation is appropriate.

Under joint type, set the coordinates that you want your joint to rotate along. For example if you set X to 1, it will rotate along the X axis. It can be hard to determine what axis you want your think to rotate along, so just try all of them.

For moving parts, it is often better to disable self-collide, otherwise you can get physics bugs.

Set rot.friction to some value, like 1 or 0.1, otherwise your scoop won't move. This parameter appears to control the power with which the part moves.

Now, in Motion control, I will set input type to Input: angle change. It means when I press the button, the thing moves and then stays in that position.

angle fix means when player presses the button, the thing starts moving, when player releases the button, it goes back into the original position. You can use that, for example, to add steering to custom wheels.

angular vel. means the thing will keep moving with a given velocity and player can control that velocity, would be good for helicopter rotors if flight was possible.

Move time affects how long it takes to get from lowest to highest position, I set it to 10 seconds because the scoop moves slowly.

Finally, choose what button should trigger the movement, I will use aux 1 which is R/F keys.

Here is what my screen looks like:

using multiple joints
If you have mirroring enabled, all your joints will be mirrored by default, and you can disable that with Mirror con.obj in joint settings.

I have two white hands going to one scoop, and if I mirror the white thing, it will also mirror the scoop - not what I want, so I have to disable mirroring and manually make the other white hand and add a joint to it as well, with exactly the same settings.

Now I added a non-colliding rotating joint between one of the white hands and the scoop. Even though bobcat has two white hands, I only added the rotating scoop joint with only one of them, otherwise rotating can desynchronize and lead to physics bugs.

I also added a one-point joint between two hands to make sure they are synchronized.

Finally, if you don't want two moving parts to collide, add an elastic dislocation joint between them with the default parameters. For example, I don't want the second white hand to collide with the scoop, so this is what I did.
Finishing touches
In vehicle properties you can disable edgemarks - makes curvy vehicles look nicer.

If you have mirroring enabled and want to add asymmetrical parts - in vehicle properties press mirror permanently, and add your parts - they won't be mirrored anymore. Be warned that sometimes game crashes when you press mirror permanently. If it keeps doing that, you might have to add the asymmetrical parts using joints instead, as you can disable mirroring in joint settings.

Add first person camera by using set drivers cam... in vehicle properties. You can use arrow keys to rotate your camera, ctrl to make it move faster, Q/E to go up/down, WASD to move. Just move your camera to desired position and press save.

In game, you can use 1st person camera using F2, and switch back to 3rd person by pressing F3.

Here you go, you've got a vehicle you can use in your maps! Just don't forget to save it!
3 Comments
jokirby 5 Jul, 2024 @ 4:24am 
very good !
Chessiecat96 9 Apr, 2024 @ 11:50am 
Fantastic guide!
Sumo 30 Apr, 2023 @ 7:04am 
This is an EXCELLENT guide, well done!