Post by Brett's Mods on Oct 27, 2008 18:14:15 GMT -5
Here is a very well written tutorial by X45 (PTTM Modder). He has a forum here. A nice little site. Anyway, on with the tutorial:
Installing trailers in PttM isn't as hard as it seems. It can be very confusing to the beginner but after you do it a few times it isn't hard at all . To install trailers you must have your base.scs file extracted. If you haven't done that yet, see this thread clubpttm.proboards.com/index.cgi?board=tuts&action=display&thread=12.
The first thing to do if of course download the trailer you want. for this demonstration, I will be installing a trailer from pete379jp site (pete379jp.s69.xrea.com/).
Open the .rar archive with WinRAR. Now, drag and drop the skin templates onto your desktop or some other location. If you decide to make a skin for the trailer later these will be very helpful. Then, drag and drop the trailer folder into your My Docs/PttM folder.
Most trailers just come with their own folder. Then you'll have to drag and drop them into your My Docs/PttM/makes/trailer folder. However, this one already comes with that folder path so it's not necessary here.
If we open up the game we see the trailer in the show room. But we find that under the cargo dropdown there is a "0%" symbol. This means that no cargo is assigned to the trailer and therefore will not show up in game.
The first thing we do is we go makes/trailer/fbs2_side_kit/base. Inside there is file named "!desc". Open this Notepad.
Once you have the !desc file open, count the number of materials (something.mat) are on any of the given material lines. Subtract 1 from that number and write down the difference. We will need the number in a minute. Also note the name of the main texture, fbs2.mat. You don't really need to remember this, I made a mistake in the picture and told you to but nevermind that ;D. DO remember that number though.
Next, go to your defs/cargos folder and open up one of the cargo files. It really doesn't matter which one so take your pick and open it up with Notepad.
When you have it open in Notepad there are several things you need to do. First of all, change the name on the "trailer" line to the name of the trailer's folder. In this case, "fbs2_side_kit". Then, change the name to what you want it to appear as in game. Try to keep it short though and make sure it is between the @'s (ex. @@topsoil@@). Then you will want to change the "varient" to that number I had you remember earlier. Make sure it's between the quotation marks! The last thing then is to change the icon name to the name of the icon we will make next. I'm going to make it "dirt.mat". You may also note that I have the line "can_overweight:1" in there. That makes the cargo overweight but it is optional.
After all that's done, File>Save As "something.def". Name it whatever you want but make sure you add the extension ".def" and make sure Notepad is set to "All Files" when you save it. Otherwise it saves it as a .txt document and it will not work.
Now we're cookin'! the next thing to do is make a 64x64 pixel, .png image for the cargo. This will appear in game next to the cargo in the planner. Save it as "dirt" to your materials/ui/cargo folder and make sure you save it as .png!
Now we go to our materials/ui/cargo folder and open up one of the regular .mat files. Again, it doesn't matter which so pick one and open it in Notepad. We change the name to "dirt.tobj".
Now we save it as "dirt.mat" with Notepad again set to "All Files". Make sure you save it as "dirt.mat" because that's what we put it down as in the cargo.def file.
Now we open up a .tobj file and change it to say "dirt.png" in the proper spot.
Then we save it as "dirt.tobj".
Next we open up one of the 3d .mat files and edit it so it says "dirt.tobj".
Then we save it as "dirt_3d.mat".
Now the last thing to do is go to our defs/companies folder and open up the various company.def files. I have custom companies in my game so yours will look a bit different but we will add the cargos the same way.
To the produce line we add "newtopsoil:1". Remember, "newtopsoil" was the name of our cargo.def file so that's why we use it here. Make sure you separate the entries like you see for the other ones with these symbols ( | ) and make sure to keep everything between the quotation marks. By adding it to this line we make the cargo appear at this company's terminals.
Now we add the cargo name to the accept line. Again using these symbols ( | ) to seperate the entries as you see for the other ones. By adding the cargo to the accept line we make it so we can deliver the cargo to this company. After you're done, hit File>Save and you are done. Unless of course you'd like to add the cargo to more companies. Then go ahead and do that the same way you did this one.
And now for the finished product. When you go into the showroom the "0%" has been replaced with our cargo name. Now it will appear in game at the companies you added it to.
[green]If you can't get it to work the first time don't worry. It took me a long time before I could confidently make cargos but keep working on it and you will succeed .[/green]
Installing trailers in PttM isn't as hard as it seems. It can be very confusing to the beginner but after you do it a few times it isn't hard at all . To install trailers you must have your base.scs file extracted. If you haven't done that yet, see this thread clubpttm.proboards.com/index.cgi?board=tuts&action=display&thread=12.
The first thing to do if of course download the trailer you want. for this demonstration, I will be installing a trailer from pete379jp site (pete379jp.s69.xrea.com/).
Open the .rar archive with WinRAR. Now, drag and drop the skin templates onto your desktop or some other location. If you decide to make a skin for the trailer later these will be very helpful. Then, drag and drop the trailer folder into your My Docs/PttM folder.
Most trailers just come with their own folder. Then you'll have to drag and drop them into your My Docs/PttM/makes/trailer folder. However, this one already comes with that folder path so it's not necessary here.
If we open up the game we see the trailer in the show room. But we find that under the cargo dropdown there is a "0%" symbol. This means that no cargo is assigned to the trailer and therefore will not show up in game.
The first thing we do is we go makes/trailer/fbs2_side_kit/base. Inside there is file named "!desc". Open this Notepad.
Once you have the !desc file open, count the number of materials (something.mat) are on any of the given material lines. Subtract 1 from that number and write down the difference. We will need the number in a minute. Also note the name of the main texture, fbs2.mat. You don't really need to remember this, I made a mistake in the picture and told you to but nevermind that ;D. DO remember that number though.
Next, go to your defs/cargos folder and open up one of the cargo files. It really doesn't matter which one so take your pick and open it up with Notepad.
When you have it open in Notepad there are several things you need to do. First of all, change the name on the "trailer" line to the name of the trailer's folder. In this case, "fbs2_side_kit". Then, change the name to what you want it to appear as in game. Try to keep it short though and make sure it is between the @'s (ex. @@topsoil@@). Then you will want to change the "varient" to that number I had you remember earlier. Make sure it's between the quotation marks! The last thing then is to change the icon name to the name of the icon we will make next. I'm going to make it "dirt.mat". You may also note that I have the line "can_overweight:1" in there. That makes the cargo overweight but it is optional.
After all that's done, File>Save As "something.def". Name it whatever you want but make sure you add the extension ".def" and make sure Notepad is set to "All Files" when you save it. Otherwise it saves it as a .txt document and it will not work.
Now we're cookin'! the next thing to do is make a 64x64 pixel, .png image for the cargo. This will appear in game next to the cargo in the planner. Save it as "dirt" to your materials/ui/cargo folder and make sure you save it as .png!
Now we go to our materials/ui/cargo folder and open up one of the regular .mat files. Again, it doesn't matter which so pick one and open it in Notepad. We change the name to "dirt.tobj".
Now we save it as "dirt.mat" with Notepad again set to "All Files". Make sure you save it as "dirt.mat" because that's what we put it down as in the cargo.def file.
Now we open up a .tobj file and change it to say "dirt.png" in the proper spot.
Then we save it as "dirt.tobj".
Next we open up one of the 3d .mat files and edit it so it says "dirt.tobj".
Then we save it as "dirt_3d.mat".
Now the last thing to do is go to our defs/companies folder and open up the various company.def files. I have custom companies in my game so yours will look a bit different but we will add the cargos the same way.
To the produce line we add "newtopsoil:1". Remember, "newtopsoil" was the name of our cargo.def file so that's why we use it here. Make sure you separate the entries like you see for the other ones with these symbols ( | ) and make sure to keep everything between the quotation marks. By adding it to this line we make the cargo appear at this company's terminals.
Now we add the cargo name to the accept line. Again using these symbols ( | ) to seperate the entries as you see for the other ones. By adding the cargo to the accept line we make it so we can deliver the cargo to this company. After you're done, hit File>Save and you are done. Unless of course you'd like to add the cargo to more companies. Then go ahead and do that the same way you did this one.
And now for the finished product. When you go into the showroom the "0%" has been replaced with our cargo name. Now it will appear in game at the companies you added it to.
[green]If you can't get it to work the first time don't worry. It took me a long time before I could confidently make cargos but keep working on it and you will succeed .[/green]
ONCE AGAIN, FULL CREDIT FOR THIS TUTORIAL IS GIVEN TO X45. Visit his forum today!