1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.35 Bug Reporting thread
    Solutions and more information may already be available.

Drift Spots/Zones Tutorial - how to i apply them on a level?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by gkovalski58, May 8, 2025 at 8:23 PM.

  1. gkovalski58

    gkovalski58
    Expand Collapse

    Joined:
    May 15, 2016
    Messages:
    34
    i was thinking about applying some drift spots on my level, but i didn't really understand how it works, is there a tutorial somewhere? couldn't find any ..
     
  2. MegaKnight

    MegaKnight
    Expand Collapse

    Joined:
    Sep 12, 2024
    Messages:
    212
    I'll try to write a tutorial. I hope it's helpful to you (or anyone else stumbling upon this later on).

    How to create a Drift Spot

    First of all, I'm gonna assume you already have some kind of markings for the start lines. If not, it's not a huge problem, as they're not needed for the drift spot to work. It just makes the creation process a little easier. You can find the blue drift spot sign at /art/shapes/objects/s_sign_drift.dae in the asset browser. I'm using a decal road with 'ChaulkLine' as material for the road markings.

    To create your drift spot, you first need to open the drift data editor (see image). Navigate to the drift spots editor and enter a unique name for your spot. Click on 'create new drift spot'.
    open_editor.png

    You should see an interface like this:
    editor_window.png
    • lineOne and lineTwo are the two start lines (or end lines) of your spot
    • the drift detection boxes are where your vehicle has to drift through in order to trigger the spot
    • the start direction is the rough direction your vehicle has to drift towards to trigger the spot (it shouldn't trigger when your driving away from the spot, so a directional indicator is needed)
    • 'Raw Data' toggles an additional window which displays data like position, direction, ... in a json-like format - it's not really needed for this tutorial
    • the drift spot's path is where your vehicle has to drift along to gain points - the road/path connecting the two starting lines
    • the drift spot's bounds is the area your vehicle has to stay within during the drifting - if you leave the area, the drift spot is cancelled
    Start by placing the detection box of lineOne on one of your starting lines. Scale the box so it covers the whole road width. Don't make it too thin, as that can lead to issues with the detection system - fast driving cars could be missed. You can use one of the icons next to the checkmark to align the box's rotation with the terrain. When you're done placing the box, click on the green checkmark. Here's an example of how a correctly placed and scaled detection box should/could look like:
    place_triggerbox.png

    Now, place the direction indicator next to the detection box. The indicator should be placed in the direction you have to drive to reach the second start line. I hope the following screenshot makes clear what I mean. Don't mess around with the rotation of the indicator. Only the placement relative to the detection box matters.
    place_directional_indicator.png

    Repeat this process for lineTwo. Place the second detection box on the second start line. The second indicator should be placed in the direction you have to drive to reach the first start line. Remember to save your progress regularly, in case bad things happen.

    Next up, you have to create the spot's path. Click on 'Open Race Editor'. Select the Pathnodes tab. Create the fist node (Shift-Click) after lineOne facing in the direction you have to drive to reach lineTwo. Move along the path and create more pathnodes along the way. They should all face the way you have to drive (the orientation is displayed by the arrow inside the sphere, see screenshot). The final node should be placed shortly before reaching lineTwo (so not directly on top of the line, but a with bit of distance. Same goes for lineOne). You should have a result like this:
    race_editor.png

    Switch to the Track Layout tab and define start and end node. The start node should be the one next to lineOne, the end node should be next to lineTwo. All other parameters are not required. You don't need any start positions or other stuff. Save the file as 'race.race.json' at userfolder/levels/your_level/driftSpots/your_spot/race.race.json - you only have to enter 'race' as the filename, the .race.json is added automatically.

    After that, you have to create the spot's bounds. Click on 'Open Sites Editor' and switch to the Zones tab. Create a new zone. The name doesn't matter. This zone will define the area your vehicle has to stay within during the drifts. Start by creating the first bollard (don't know what to call them) near lineOne (Shift-Click). Move along the path and create more bollards along one side of the road. You can change the color of the bollards to increase visiblity - their color doesn't affect anything regarding the drift spot. Leave a bit of room around the detection boxes and keep some distance to the road. When you reach lineTwo, make your way back along the other side of the road. This method worked best for me - alternating between both sides didn't work.
    zone_done.png

    Save your zone as 'bounds.sites.json' at the same location: userfolder/levels/your_level/driftSpots/your_spot/bounds.sites.json - again, the .sites.json will be added automatically, you only have to enter 'bounds' as the name.

    Finally, you can edit the info.json (same folder) to change the display name of your spot, add career rewards and change the required points for bronze/silver/gold medals. I've attached a template info.json at the bottom of this post. You can also add an image named 'preview.jpg' or 'preview.png' as a preview, which will be displayed when selecting your spot from the map view. The preview should be quite small, as big images take longer to load and bloat the size of your mod.

    That should be it. Reload the lua using Ctrl+L and your drift spot should work. You should also be able to view it within map mode.
    finished.png

    If you want to pack your drift spots as a mod, you can create a temporary folder somewhere on your PC and copy the files from userfolder/levels over. Remove all level folders that don't contain driftSpots and remove all unnecessary files. You only need the files located within the driftSpots folders (and the files within main-folders as well as main.decals.json and all forest-related stuff if you want to keep your map changes too (markings, signs and stuff)). After that, pack the levels folder into a zip file. That zip file is your mod.

    I hope this is helpful :)
     

    Attached Files:

    • Like Like x 1
  3. gkovalski58

    gkovalski58
    Expand Collapse

    Joined:
    May 15, 2016
    Messages:
    34
    that's awesome, but for some reason, after following all the steps, creating the path, starting lines and creating zone limits, it doesn't seem to work, saved everything yet nothing appeared on the map even after restarting the game,neither if i drift through the starting point
     
  4. MegaKnight

    MegaKnight
    Expand Collapse

    Joined:
    Sep 12, 2024
    Messages:
    212
    That's weird. Maybe you could send me your files so I can take a look at them and try?
     
  5. gkovalski58

    gkovalski58
    Expand Collapse

    Joined:
    May 15, 2016
    Messages:
    34
    do i have to create a mission for it or just leave it as it is to work? it's just not showing on radar, actually nothing appears
     
    #5 gkovalski58, May 9, 2025 at 7:44 PM
    Last edited: May 9, 2025 at 7:54 PM
  6. MegaKnight

    MegaKnight
    Expand Collapse

    Joined:
    Sep 12, 2024
    Messages:
    212
    You don't need a mission for it. It should work as it is.
     
  7. gkovalski58

    gkovalski58
    Expand Collapse

    Joined:
    May 15, 2016
    Messages:
    34
    odd, i'll give it a try in another map, this is not the first time this map i'm making gave me headaches, your tutorial seems very complete afterall, thanks
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice