Here is the second part of my rather chaotic tutorial on how to add more pit boxes to tracks. Everything I write about here I learned from
@slider666 . He took his time and patiently explained everything to me when I was starting my adventure with 3DSimEd and I really wasn’t the brightest student. I barely understood anything before he taught me how to do this properly, so I wanted to thank him immensely and just say that he is awesome. End of emotional comments, time to get back to the tutorial.
After you successfully managed to create as many pit boxes and start positions as you wanted, it’s time to export the kn5 file to the track folder in Assetto Corsa directory, right? Well, yes, but actually no. DO NOT export the entire kn5 track folder and overwrite the original one. Instead, follow this steps:
STEP 1. Go to the "Display" tab and select "Object filter". A window should pop up that has all of the track objects highlighted. Select "All Off" and highlight ONLY your new pit boxes and start positions that you just created. You can do it by holding CTRL key and selecting them one by one or by holding SHIFT key and just selecting the first and the last one, all objects between will be highlighted automatically. Just make sure that you highlight all your new pit boxes and start positions and that you don’t highlight any other objects from the original track file. What you want to see on your screen after this is only your new pits and start positions (only cubes and nothing else).
Next, go to the "Edit" tab and select "All visible" and then "Copy". So far so good, go to the "Home" tab and select "New". Then, in the empty project that you just created, go again to the "Edit" tab and select "Paste" and then "Paste Objects". At this point you should have all of your new pit boxes and start positions in the new project.
STEP 2. Time to export that project containing only your new pit boxes and start positions. I never exported it straight into the track folder in Assetto Corsa directory, but what I did instead is create a new folder in my Documents called "Track edits" or whatever you want it to be called. I copied there the track folders of tracks I wanted to edit and worked on that instead of the original track folder. I recommend doing the same or a similar thing, just to keep track and order of what you are doing. Anyway, export the kn5 file with your pit boxes and start positions there or to the original track folder, how you prefer. Name the kn5 file in a way that will immediately let you know what’s inside, for example I usually named them following the same template: track_name_numberofpits.kn5 (direct example – cadwell_park_28pits.kn5).
STEP 3. Now you have the original track kn5 file and your new pits kn5 file. What you need to do is combine them into a new layout using models.ini file. There are two possibilities - either the track you edited has a models.ini file or it doesn't. If it does, go to STEP 3.1. If it doesn't, go to STEP 3.2.
STEP 3.1. If the track which you edited has a models.ini file, follow this steps:
Copy the models.ini file and rename it to models_track_name_numberofpits.ini (direct example from Cadwell Park again – models_fullcircuit_28pits.ini) or name it how you like.
Open it and add this line to the file:
[MODEL_x]
FILE=track_name_numberofpits.kn5
POSITION=0,0,0
ROTATION=0,0,0
Where x is the number of the last MODEL in that models.ini +1, and FILE is your kn5 file with pit boxes and start positions.
For example, in Jyllands-Ringen there are 3 models (MODEL_0, MODEL_1 and MODEL_2), so when I wanted to add my new kn5 file containing the pit boxes and start positions I just made, I had to name it [MODEL_3] and put this line under it: FILE=jyllandsringen_30pits.kn5.
STEP 3.2. If the track which you edited does not have a models.ini file, follow this steps:
Copy a models.ini file from another track.
Delete everything inside the file and add this two lines instead:
[MODEL_0]
FILE=track_name.kn5
POSITION=0,0,0
ROTATION=0,0,0
[MODEL_1]
FILE=track_name_numberofpits.kn5
POSITION=0,0,0
ROTATION=0,0,0
I will use Valencia Street Circuit as an example this time:
[MODEL_0]
FILE=valencia.kn5
POSITION=0,0,0
ROTATION=0,0,0
[MODEL_1]
FILE=valencia_32pits.kn5
POSITION=0,0,0
ROTATION=0,0,0
^It should basically look like this^
STEP 4. There are only two more things you need to do at this point. First, you need to create a folder for your new layout with extended pit boxes. Make sure to name it the same way you named the models.ini file, otherwise your new layout will not work. Layout folder should be placed inside the main track folder.
In your new layout folder you will need these 3 things: "ai" folder, "data" folder and map.png file. Just copy them from the original track and drop into your new layout folder.
STEP 5. The last thing you need to do to complete your new layout is creating a folder for it in "ui" folder. In "ui" folder, create a folder named the same as your layout folder and models.ini. Just copy outline.png, preview.png and ui_track.json files of the original track and drop them in the folder you just created. I know I repeat "folder" a lot, sorry for that
Very important little thing – make sure to open the ui_track.json file you just copied and change the number of "pitboxes" in it, otherwise the game will not understand that there are more pit boxes and start positions to be used. While you are doing that, I recommend that you also slightly change the “name” and "description" of the track as well, in order to more quickly know which layout is the one with additional pits.
If the track you are editing has multiple layouts, you will need to repeat steps 3, 4 and 5 for each layout separately, unless you only want one layout to have the additional pit boxes, in which case just choose your favourite layout of the track and just do it for that one.
And that should be all. I hope I managed to explain it better than I think I did and that it's reasonably understandable. If not, then I will be happy to help and clear things up.
@Beezer215 @unpierrot @PepperoniAC24 - please let me know if you need me to explan something in more detail.
@slider666 - please feel free to correct me if you find any mistake in what I just wrote.
Everyone else - sorry for yet another wall of text, enjoy your day