Modified Track Path Editor + Tracks/Discussion

I've managed to create the track data programmatically & upload it to the servers directly from my laptop , without android or bluestacks :embarrassed:.

It's possible to fine tune the elevation across the whole track :embarrassed:,

This track : https://www.gran-turismo.com/ie/gt6/user/#!/friend/PR1VATEJ0KER/course/2292796/
Follows this exact pattern.
Code:
            List<float> newHeightList = new List<float>();
            int elevation = -200;
            for (int i = 0; i < listHeight.Count; i++)
            {
                if (i > listHeight.Count - 5)
                    elevation += 3;
                else if (i < listHeight.Count / 2)
                    elevation += 1;
                else if (i > listHeight.Count / 2)
                    elevation -= 1;
                newHeightList.Add(elevation);
            }

EDIT: Experimenting with Banking now, it's possible to make the track tilt crazy sideways.
Got an idea for a brilliant figure of 8 track PJ, please can you make it, it'll be an easy 1 I promise. The jump on your track before the S/F straight gave me the idea.
create a figure of 8 on Eifel flat using 2x 600m straights & 2x 270 degree 300r curves like in the picture but make it so we jump across the S/F line.
Screenshot_2016-05-23-22-25-25.png

it took me 2mins to make the track, I'm not sure if you got time modify it but it would be cracking track if you could, add banking to corners aswell if you want :)
 
However, for Andalusia, you can put a resting area pretty much anywhere you want so you can add a little bit of width with that.

Could you possibly shine light on to how you are able to add restaurants?
I've been bashing my brains out trying to get them to generate on my touges.
 
EDIT : A bit of a request here :) could you flatten out all unwanted elevations on my 1960's spa track to make it a little more realistic if possible :)

When I made it completely flat, it just crashed my PS3 :( (Never happend before so idk what's going on). But here is one with banking getting deeper as you go along :D.
https://www.gran-turismo.com/us/gt6/user/#!/friend/GTP_Razerman/course/2293724/

How could you steal someone's track ?
I'm uploading a created Ted file.

Is there a way to download a Ted too ?

Yeah, I'm uploading the ted file aswell. Not sure if you can download with the API but you can find the ted unprotected inside the replay.

It's kind of funny that they are protecting it when you upload it but then you can find it unprotected from the replay :D. And well, you can actually upload the unprotected one aswell.

Could you possibly shine light on to how you are able to add restaurants?
I've been bashing my brains out trying to get them to generate on my touges.

Well...

It kind of requires a long tutorial because pretty much all the steps are something I haven't seen public yet.

1: Access the GT6TED -file (Intercept it from the APK, Code yourself a tool to create it from the *.Bin/*.Meta or take it from the replay).
2: Modify the GT6TED -file.
3: Upload the modified GT6TED -file.

The uploading you can achieve by either modifying the apk to load your custom ted or code a uploader.

However, I'm remembering there was a value inside the rail_def -file, which controls how often you see the parking areas. Like if I remember correct, making it higher increases the possibility of it being the parking area.

Yeap, appearance
Code:
<RailGroupItem>
  <name>R09_PARKING_AREA</name>
  <uuid>13027506505615099153</uuid>
  <appearance>0.100000</appearance>
  <flag>0</flag>
</RailGroupItem>
 
Yeah, I'm uploading the ted file aswell. Not sure if you can download with the API but you can find the ted unprotected inside the replay.

It's kind of funny that they are protecting it when you upload it but then you can find it unprotected from the replay :D. And well, you can actually upload the unprotected one aswell.

Haha ! I had no idea about the replay, but it makes sense that it would have to contain the TED File.

I had quite a bit of fun in the past week,
Dumping the TED byte array before it is deflated (Modifying the assembly-csharp.dll with Reflector + Reflexil).
Deconstructing the TED file into classes/structs.
Enable Debug Logging and log the TED Key, dumping the contents of adb logcat to a file(Retrieving the Key for ps2zip).
Using PSNLib to get the accesstoken required by GT6 signin,
Emulating the rest of the track upload procedure by copying what's in the assembly-csharp.dll.

At this point I've just got a console app that can deconstruct the TED file (modify some of it), encrypt and upload it.

Not sure of all things possible yet. So many small eureka moments ! Great fun. :gtpflag:
 
Haha ! I had no idea about the replay, but it makes sense that it would have to contain the TED File.

I thought that what happends if I save a replay and delete the track. Did it and the replay played just fine so I knew it must be there because I was offline (No chance of downloading it) and I knew it's not stored anywhere in the PS3. Only PD:s example tracks are.

Dumping the TED byte array before it is deflated (Modifying the assembly-csharp.dll with Reflector + Reflexil).

Been doing the same thing :D. And I actually have APK which loads custom_upload.ted from the folder if it exists, otherwise it just goes the normal way.

Enable Debug Logging and log the TED Key, dumping the contents of adb logcat to a file(Retrieving the Key for ps2zip).

I searched a bit in the smali files and figured out which library file holds the key and got it from there. There was another key aswell but can't remember for what it was/which file it was anymore :(.

Using PSNLib to get the accesstoken required by GT6 signin,
Emulating the rest of the track upload procedure by copying what's in the assembly-csharp.dll.

Been taking it manually for now because my upload code isn't really good ^^. Don't know much about this server thing so I've been using my APK mod mainly.

Are you using unity? Because of my very little knowledge in this I only managed to get the course list JSON retrieved with C# command line app. For the uploading part I need to use unity.

At this point I've just got a console app that can deconstruct the TED file (modify some of it), encrypt and upload it.

Managed to actually re-compile the Assembly-CSharp.dll long ago. Few sliders didn't work and some colors were off but the apk worked :D. Then I started coding it into a "editor" but never finished it. Though, it can convert *.Bin and *.Meta files into *.Ted. And make a *.obj from the track :).

And btw, just figured out you don't need to encrypt it even though the apk does it :).

My 010 Editor templates that might help you?_?
https://drive.google.com/open?id=0B0kAN8AKZCGjZjVidHhJcEdNSnM
 
Last edited:
I thought that what happends if I save a replay and delete the track. Did it and the replay played just fine so I knew it must be there because I was offline (No chance of downloading it) and I knew it's not stored anywhere in the PS3. Only PD:s example tracks are.

Nice !

Been doing the same thing :D. And I actually have APK which loads custom_upload.ted from the folder if it exists, otherwise it just goes the normal way.

This was my first plan, but signing & aligning the APK was such a pain for me I decided to try get away from it completely.

Are you using unity? Because of my very little knowledge in this I only managed to get the course list JSON retrieved with C# command line app. For the uploading part I need to use unity.

I've tried do some crazy things in unity, like rebuilding the app & creating a small app solely for dumping the TED Key. :D

Managed to actually re-compile the Assembly-CSharp.dll long ago. Few sliders didn't work and some colors were off but the apk worked :D. Then I started coding it into a "editor" but never finished it. Though, it can convert *.Bin and *.Meta files into *.Ted. And make a *.obj from the track :).
I managed to de-compile & recompile back when I was making the web editor, but after recompilation (and all my "repairs") the app behaved very strange, missing textures and alot of crashes even when the dll(s) were built against the Unity .NET Framework Classes.

There must be a bunch of useful stuff in there for manipulating the track.

And btw, just figured out you don't need to encrypt it even though the apk does it :).

No way ! :D
 
Well...

It kind of requires a long tutorial because pretty much all the steps are something I haven't seen public yet.

1: Access the GT6TED -file (Intercept it from the APK, Code yourself a tool to create it from the *.Bin/*.Meta or take it from the replay).
2: Modify the GT6TED -file.
3: Upload the modified GT6TED -file.

The uploading you can achieve by either modifying the apk to load your custom ted or code a uploader.

However, I'm remembering there was a value inside the rail_def -file, which controls how often you see the parking areas. Like if I remember correct, making it higher increases the possibility of it being the parking area.

Yeap, appearance
Code:
<RailGroupItem>
  <name>R09_PARKING_AREA</name>
  <uuid>13027506505615099153</uuid>
  <appearance>0.100000</appearance>
  <flag>0</flag>
</RailGroupItem>

Ah, thankyou, I see it's down to the source code. Makes me want to go back and retake my programming course. A lot of it remindes me of Javascript. Although I can not remember the program we used to code software. Looking at it's appearence number, it's no wonder its rare to get one to pop up. Once I get this figured out, I'll try it out. I've been wanting a touge with a PA either at the end or halfway through.
 
Couldn't even complete a lap lol, the banking gets so steep it just sucks you to the edge of the track, then you're stuck.

Had some hard time trying to complete it aswell :D. But finally managed to get through the last corner and save the track :).

I honestly wish I knew. I happen to take full advantage of the work you guys do.
Ah, thankyou, I see it's down to the source code. Makes me want to go back and retake my programming course. A lot of it remindes me of Javascript. Although I can not remember the program we used to code software. Looking at it's appearence number, it's no wonder its rare to get one to pop up. Once I get this figured out, I'll try it out. I've been wanting a touge with a PA either at the end or halfway through.

When I first looked into these files. All I had done to APK:s previously was decompile and look what's inside them. And for C# assemblies I had only decompiled them with .NET Reflector and nevery modified one of those either. So I started from a scratch aswell ^^.

So go ahead and inspect the files :).

Tools you can use to modify the assembly:
1. 7Zip (To extract the Assembly-CSharp.dll from the APK and put it back after modifying)
2. .NET Reflector (To dissasemble the Assembly-CSharp.dll)
3. Reflexil addon for .NET Reflector (To be able to modify Assembly-CSharp.dll without re-compiling it)
4. APK Signing tool (I have signapk.jar and I use the testkeys)

As for uploading the GT6TED, I would say the interesting files are CompanionPlugin.cs and ps2zip.cs. Altough it appears you don't need to encrypt the GT6TED even though the APK does it. You can just send the unencrypted one and it will still work.

And well you could also just code a application that does the uploading so you don't even need to modify the assembly. The one I build with Unity is taking only 54 lines of code and even that could be squeezed down a bit. You can pretty much use the ready code from the CompanionPlugin.cs, you only need to get the cookie generated. For that you could use the PSNLib @PR1VATEJ0KER mentioned and then the code from the CompanionPlugin.cs to get the Cookie from the AuthenticationToken. Alternatively you could just take it from the cookie storage of your browser :).

As for modifying the GT6TED, I already shared my 010 Editor templates which you can use to figure out what is what.

For the rail_def files, you can just use the Notepad++ for modifying that. The asset file keeps track of the filesize so if it changes, you need to modify them. But you can just keep the filesize intact. Example you want the value 100 to 10, use 010 :). Resign after modifying: https://www.gtplanet.net/forum/thre...racks-discussion.337816/page-15#post-11364770

Have fun :)
 
Is it possible to remove the barriers around the tracks? I mean on the Eifel and Sierra tracks.
 
Is it possible to remove the barriers around the tracks? I mean on the Eifel and Sierra tracks.

Don't think so :(. You can actually remove whole track away from some parts (Driving in the air). And at the same time you will loose the barrier around it but when you drive there, you are out of track and it will soon reset you back. Unfortunately what I guess you want (what I want aswell) doesn't seem like to be possible.

Any update on whether anyone is trying to make that figure of 8 track I proposed at the top of this page ? (PJ, RM) :)

With the above addition of removing the track from the jump part, it would propably be a really cool track :D. Unfortunately I don't really have interest in modifying the elevation as it takes time to make it perfect :/.
 
With the above addition of removing the track from the jump part, it would propably be a really cool track :D. Unfortunately I don't really have interest in modifying the elevation as it takes time to make it perfect :/.


It would be great to have a tool that would display the elevation curve of the track, and if you click on a certain data point you could drag it up or down to change the elevation for that particular point. That way you get a more visual approach than just staring at the data, and it might be easier to model the elevation the way you want it. For additional control and information the tool could include the slope curve as well, and the delta slope curve. I might be able to code such an interface in Python and Tkinter, although it would probably take a while...

Something like this is what I have in mind:

elevation.png
 
It would be great to have a tool that would display the elevation curve of the track, and if you click on a certain data point you could drag it up or down to change the elevation for that particular point. That way you get a more visual approach than just staring at the data, and it might be easier to model the elevation the way you want it. For additional control and information the tool could include the slope curve as well, and the delta slope curve. I might be able to code such an interface in Python and Tkinter, although it would probably take a while...

Edited my Circuit of the Americas elevation with 3DS Max. But when 4 km track contains 514 elevation points, it's a pain in the a** to modify them one by one like that :(.

But still, if you are up for coding a tool like that, I'm sure it will be helpful in track modifying :).

EDIT:

And if possible, mark them by the bank blocks. Like in my templates Bank structure -> int m_divNum is the value where it starts from and uint m_divNum1 is how many height floats it takes.
 
Edited my Circuit of the Americas elevation with 3DS Max. But when 4 km track contains 514 elevation points, it's a pain in the a** to modify them one by one like that :(.

But still, if you are up for coding a tool like that, I'm sure it will be helpful in track modifying :).

EDIT:

And if possible, mark them by the bank blocks. Like in my templates Bank structure -> int m_divNum is the value where it starts from and uint m_divNum1 is how many height floats it takes.

I'm thinking that a "proportional editing" tool could be created, to edit a range of points at the same time. That way you could raise (or lower) an entire section, and then just finetune the individual points that stand out.

Now that I come to think of it, there's a whole lot a fancy tools that could be created :D How about an "add noise" function, that adds random elevation changes to a section to make it bumpier?
 
I'm thinking that a "proportional editing" tool could be created, to edit a range of points at the same time. That way you could raise (or lower) an entire section, and then just finetune the individual points that stand out.

Now that I come to think of it, there's a whole lot a fancy tools that could be created :D How about an "add noise" function, that adds random elevation changes to a section to make it bumpier?

Yeah, so many possibilities :D.

I've actually done quite a lot of partial tools. But the word "partial" is the problem :(. Like one that takes elevation from the GPS files and converts it to the track. Unfortunately that GPS data didn't have all that accurate elevation so it was kind of bumpy, would've needed to add some smoothing calculations there to make it better. Instead of doing that I just started coding a tool that takes it from the *.obj or *.csv which I had done with 3DS Max.

And well that's actually one tool that is "completed". GT6TED -> *.Obj -> 3DS Max edit -> *.CSV -> GT6TED -> Done. The problem with this is that you can't see in what part of the track you are editing at (well you know the position in meters). Should've figured out how to convert that CP so I can make the track into *.obj and that would solve it. Unfortunately I'm too lazy for that.
 
@PR1VATEJ0KER Any chance that there will be an APK that you made with the Rollercoaster track with over 22,000 elevation feet unless you actually edited the .bin with HEX. That would be amazing to try even though it would probably crash my game. :P

I was playing around with the APK yesterday and got a track to a little over 10k but couldn't complete a full lap :lol:

IMG_11601.JPG IMG_11602.JPG
 

Attachments

  • IMG_11603.JPG
    IMG_11603.JPG
    104.7 KB · Views: 37
  • IMG_11704.JPG
    IMG_11704.JPG
    107 KB · Views: 36
  • IMG_11705.JPG
    IMG_11705.JPG
    101.1 KB · Views: 37
@J24681357 that canyon .APK was actually marvelous.

I had been getting constant requests from friends for a Shomaru Pass replica (from Initial D) for months, but I was always adamant to the idea. If you've seen the anime, Shomaru is a special place.

On behalf of LotS and the touge community, many thanks :cheers:
 
I'm trying out the no checks and free start location APK, and since I'm using Bluestacks I can't really scale the background images (not that I've discovered at least), and in case anyone have the same problem I thought I'd give you the default scale of the maps, so that you can correctly scale an image before you import it.

Based on Eifel and Andalusia, the default scale is this:

1 km = 122 pixels

And the full sizes of these locations:

Eifel (12x12 km) = 1464x1464 pixels

Andalusia (7x7 km) = 854x854 pixels

Edit: I added the contour maps for Andalusia and Eifel in these sizes (see the attached .zip-file). I made them black and white only, as the colour I used in the older versions of these maps made it harder to see the lines.

Also, here is a track I made with the help of the contour map. It starts at the bottom of the lowest valley, gradually climbs up to the tallest mountain, and then descends back into the valley.



Download link: https://www.gran-turismo.com/it/gt6/user/#!/friend/eran0004/course/2311752/
 

Attachments

  • countour_maps.zip
    877.3 KB · Views: 43
Last edited:
^Yes, I do not build a course without the contour maps. All my courses are built using them. I could've told ya that scaling reference pictures in Blustacks is a pain in the ass. Sometimes it takes me over an hour to scale it right. Thank you eran for figuring out the actual scale. It will really help when I build another course. Right now I have a 12 mile long course that has a 1,500 ft elevation change. Yet when I go to save it after the test drive, my PS3 locks up.
I also have a new touge. Called Battle Cat Touge.
 
wow, coding a gta mod menu looks way easier than this... i messed around on my apk`s heightmap files (from the straight mod one) and i got a crazy apk that does 90 degrees hillclimbs and downhills...not sure if people would like it but should i release it? it also makes possible stuff like spirals, and i got a 20 miles eifel to work using it
 
wow, coding a gta mod menu looks way easier than this... i messed around on my apk`s heightmap files (from the straight mod one) and i got a crazy apk that does 90 degrees hillclimbs and downhills...not sure if people would like it but should i release it? it also makes possible stuff like spirals, and i got a 20 miles eifel to work using it
Release it :)
 
Back