Forum Mod Bakery Docs

Making a car for sale from Gil

Posted in Support
Please login to contribute to the conversation.
Let's assume you've made a car and have everything set up for it to work correctly, you just need to add it to the game now as its own separate vehicle. For your car to work, make sure you have the following files in the following folders:

\art\cars\(name).p3d (Main files of the car)
\art\frontend\dynaload\cars\(name).p3d (Not technically required if you set the \art\cars\ .p3d to be this file also in the Meta file)
\art\frontend\dynaload\images\cars2d\(name).p3d
\art\frontend\dynaload\images\cars2d\(name, damage model).p3d
\scripts\cars\(name).con (Handling file)
\scripts\missions\rewards.mfk

Those are just the required. You will also need Custom Car Support, Custom Text, and your Meta file set up correctly. Find out about them here.

To add the car, open rewards.mfk with a text editor (Such as notepad). It'll look like this:

If you want to add your car to Gil in level 1, for example, add a new line under the cars listed under level one. For this tutorial, I'll be using infer_v.p3d. In that new line, type
BindReward( "infer_v", "art\cars\infer_v.p3d", "car", "forsale", 1, 5, "gil" );
The first two parts are the name and location of the car, 1 tells the game its for sale in level 1, 5 tells the game to sell it for 5 coins, and "gil" tells the game that its for sale from Gill, who is right next to Cletus' house. Using this method, you need to make sure to have the semicolon at the end of each line, or else it will not work. Using this example, it should look like this:

Almost forgot actually, to set up custom star values in the phonebooth, go down to near the bottom of rewards.mfk.
Again, as an example, you would add:
SetCarAttributes( "infer_v", 5, 5, 2, 4.5);
The first 5 is top speed, the second is acceleration, 2 is toughness, and 4.5 is handling. Only use 0-5, with whole numbers and numbers with .5 for a half star

Assuming you have everything set up properly, when you run the game you should now be able to buy your car in-game. This will work for any car that has the proper files, not just custom cars.
Nice tutorial :D