How to build Custom Tracks

I made a track i went over it a few times in notepad ++ not sure i see anything. maybe i am missing something?.. both track.png and track.lua are in there own folder. image is the correct size also


Lua Error:

tolua++ dbcall failed!: [string “–client\functional\CCustomTrackList.lua…”]:42: F:\Users\ALI\Documents\Automation\Tracks\Bayport\track.lua:19: ‘]’ expected near ‘Object’


–You Can use 0, 1, -1 instead.
local STRAIGHT = 0
local LEFT = 1
local RIGHT = -1

Track = {
Name = “Bayport”,
–Track Image Info
–Track Image must be 1280 x 720
–Start Position on the Image x,y from Top Left
Start = { 707, 713 },

    --How many pixels per meter ( Pixels / Length )
    --Measure a long straight and then manipulate from there
    Scale = 1 / 1,
    Layout = { LEFT, STRAIGHT, LEFT, STRAIGHT, LEFT, LEFT, LEFT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, RIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, STRAIGHT, RIGHT, RIGHT, STRAIGHT, STRAIGHT, RIGHT, LEFT, RIGHT, LEFT, RIGHT, STRAIGHT, STRAIGHT, RIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, LEFT, RIGHT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, STRAIGHT, LEFT, RIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, RIGHT, RIGHT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, },
    LayoutInfo = { 8.5, 256, 10, 128, 83, 3.5, 1, 72, 25, 33, 100, 36, 9, 13, 7, 15, 2, 26, 23, 20, 6, 17, 25, 15, 28, 15, 15, 90, 90, 15, 5, 25, 3, 3, 100, 100, 15, 15, 15, 15, 4, 100, 100, 5, 100, 100, 100, 25, 15, 25, 19, 15, 15, 90, 15, 100, 100, 15, 100, 172, 90, 26, 15, 15, 100, 17, 15, 100, 15, 17, 15, 15, 15, 59, 100, 12, 19, 10, 16, 2, 2, 2, 15, 1, 1, 1, 8, },
    CornerRadius = { 512, 0, 213, 0, 71, 221, 139, 0, 80, 0, 0, 100, 77, 0, 99, 50, 0, 55, 45, 155, 29, 0, 0, 0, 20, 65, 55, 10, 15, 28, 44, 0, 100, 100, 0, 0, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 15, 0, 0, 100, 0, 0, 15, 0, 25, 26, 0, 100, 100, 0, 100, 0, 100, 100, 100, 0, 0, 0, 0, 0, 5, 100, 0, 0, 2, 0, 0, 0, 0, },
    Slope = { [object Object], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [object Object], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Sportiness = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Camber = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Split1 = 45,
    Split2 = ,

}

[quote=“jtreign9097”]I made a track i went over it a few times in notepad ++ not sure i see anything. maybe i am missing something?.. both track.png and track.lua are in there own folder. image is the correct size also


Lua Error:

tolua++ dbcall failed!: [string “–client\functional\CCustomTrackList.lua…”]:42: F:\Users\ALI\Documents\Automation\Tracks\Bayport\track.lua:19: ‘]’ expected near ‘Object’


–You Can use 0, 1, -1 instead.
local STRAIGHT = 0
local LEFT = 1
local RIGHT = -1

Track = {
Name = “Bayport”,
–Track Image Info
–Track Image must be 1280 x 720
–Start Position on the Image x,y from Top Left
Start = { 707, 713 },

    --How many pixels per meter ( Pixels / Length )
    --Measure a long straight and then manipulate from there
    Scale = 1 / 1,
    Layout = { LEFT, STRAIGHT, LEFT, STRAIGHT, LEFT, LEFT, LEFT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, RIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, STRAIGHT, RIGHT, RIGHT, STRAIGHT, STRAIGHT, RIGHT, LEFT, RIGHT, LEFT, RIGHT, STRAIGHT, STRAIGHT, RIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, LEFT, RIGHT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, STRAIGHT, LEFT, RIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, RIGHT, RIGHT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, },
    LayoutInfo = { 8.5, 256, 10, 128, 83, 3.5, 1, 72, 25, 33, 100, 36, 9, 13, 7, 15, 2, 26, 23, 20, 6, 17, 25, 15, 28, 15, 15, 90, 90, 15, 5, 25, 3, 3, 100, 100, 15, 15, 15, 15, 4, 100, 100, 5, 100, 100, 100, 25, 15, 25, 19, 15, 15, 90, 15, 100, 100, 15, 100, 172, 90, 26, 15, 15, 100, 17, 15, 100, 15, 17, 15, 15, 15, 59, 100, 12, 19, 10, 16, 2, 2, 2, 15, 1, 1, 1, 8, },
    CornerRadius = { 512, 0, 213, 0, 71, 221, 139, 0, 80, 0, 0, 100, 77, 0, 99, 50, 0, 55, 45, 155, 29, 0, 0, 0, 20, 65, 55, 10, 15, 28, 44, 0, 100, 100, 0, 0, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 15, 0, 0, 100, 0, 0, 15, 0, 25, 26, 0, 100, 100, 0, 100, 0, 100, 100, 100, 0, 0, 0, 0, 0, 5, 100, 0, 0, 2, 0, 0, 0, 0, },
    Slope = { [object Object], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [object Object], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Sportiness = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Camber = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Split1 = 45,
    Split2 = ,

}[/quote]

What are these???

I have a really newbie question or perhaps issue. I’ve downloaded three tracks from three different threads on the forum, placed the tracks in C:\Users[my name]\Documents\Automation\Tracks in their own folders like this:

C:\Users[my name]\Documents\Automation\Tracks\AlbertPark
track.lua
track.png

C:\Users[my name]\Documents\Automation\Tracks\Avus1959
Avus 1959.txt
track.lua
track.png

C:\Users[my name]\Documents\Automation\Tracks\Circuit de Spa-Francorchamps
track.lua
track.png

When I start up the game and loaded a car and then went to “Custom Tracks” and opened the menu, no custom tracks appeared:

What am I doing wrong? Is there another step to activate the custom tracks in the game? This is the Steam version, in case that’s pertinent.

The location of tracks has changed with the implementation of Steam. They are now located in ~/Documents/My Games/Automation/Tracks. Other than this change, they are still the same as they were before.

Thanks, that worked! I guess the old location was from when I had the demo installed.

So I’ve taken up some track modeling recently, and I seem to be having a big problem with big discrepancies between the car in the in-game simulation and the track as drawn in TrackEdit. Does anyone have any tips regarding how to fix this, or does it just come down to “fudge it in the editor”?

What makes this frustrating is that this problem is not consistent whatsoever; some tracks I’ve made work perfectly fine, while others don’t.

[quote=“MrChips”]So I’ve taken up some track modeling recently, and I seem to be having a big problem with big discrepancies between the car in the in-game simulation and the track as drawn in TrackEdit. Does anyone have any tips regarding how to fix this, or does it just come down to “fudge it in the editor”?

What makes this frustrating is that this problem is not consistent whatsoever; some tracks I’ve made work perfectly fine, while others don’t.[/quote]

IIRC this is due to the way the game parses the information from the track editor. I think it’s to do with the approximations of the curve that the track editor uses to draw the line. Both user-generated editors suffered from similar issues.

With the current format, especially in the new versions, there’s no way around it. Worse, all the tracks up to now will, in future tweaks of the simulation, not work (see Der Bayer’s work on BROBOT) as intended either, so all tracks will have to be tweaked a bit, but at least we’d then be able to make tracks that simulate more predictably.

In short, it’s best to wait a few months before making any new tracks.

I am sorry for the error that trackedit produces. The problem is that I don’t know how to make it act like the simulated version, otherwise I would use it. I have some psudo-code for the real thing, but I was never able to figure out exactly what was going on in it.

Edit: I take it back, I am now having great success figuring it out, having recognized what the psudo-code is based off from.

1 Like

Is it still the case that it always starts with the car facing to the right, or can the start direction be changed now?

Thanks, what is the corner coeficient?

I think that’s what’s referred to as sportiness, so think of it as how cautiously the driver would approach that corner due to difficulty in layout, track surface or whatever else

No, that’s a multiplier for the cornering grip. Basically you can adjust the track times with that factor if your layout is good but you cannot match the real world lap times. Higher factor -> higher cornering speeds in general.

Hmm, was it that way around? I thought 5 = super bumpy, 0 = super smooth. I may be wrong of course, should be easy for you to test. :slight_smile:

The Sportiness-factor was 0 = perfect surface and 5 = super bumpy and difficult (it can be set for each track segment differently). Corner_coefficient was the cornering grip multiplier (it can be set only once per track).

Ohh okay, sorry then I missed the point, right, the factor you are talking about is to straight up scale the track times.

And is there a max lengths or segment limit? The track I am working on is the 2015 King of the Hammers and a lap is 85 miles

There is no hard-coded limit, but calculation might take some time for 85 miles :slight_smile:

Why this happens? The line looks perfectly aligned to track in editor.
UPD: Misalignment apears closer to the end of the track.

My guess is one of the turns just before it shows up is wrong, track edit is a beta and doesn’t perfectly match the game.