Forum Postings 2009 August&September

http://www.mircx.com/cgi-bin/forum.cgi?forum=Tracked

collected and (very little) formatted by addie walti


Threads

The start of a thread is on top right below the title

GP4 Command Library
List of all GP4 track commands
PreRelease Alpha of TE - Limitations
Kerb Editor
Total Number Of Track Commands

fly-over

end of file


Index

GP4 Command Library

I made a Command Library of all GP4 commands. The explanations are based on addie's great GP2/3 command library.

Grand Prix 4 Trackediting - Command Library

0x86 Connect Pit Lane Start, 1 arg
0x87 Connect Pit Lane End, 1 arg


a1: Offset Into Sector

With these two cmds the pitlane is attached to the track. The beginning of the first sector of the pitlane is attached to the beginning of the track sector including the cmd 0x86. The end of the last pit lane sector is attached to the beginning of the track sector including the cmd 0x87.

0x96 Speed Limiter On, 1 arg
0x97 Speed Limiter Off, 1 arg


a1: Offset Into Sector

With these two cmds you define the speed limited zone in the pit lane.

0x9b Pit Lane Begin Offset, 1 arg

a1: Offset Into Sector (offset to visible pit lane start)

This cmd defines the offset of the visible pit lane start to the beginning of the track-sector with the cmd 0x86. But the ACTUAL pit lane beginning is at the beginning of the track-sector with 0x86 anyway !

0x9e Pit Lane End Length, 1 arg

a1: Offset Into Sector (Length of visible rest of pit lane)

To set how much of the rest of the pit lane should be visible

0xad Track Banking, 3 args

a1: Offset Into Sector ?
a2: Transition Length (of rising/lowering bank)
a3: Amount Of The Banking; + is for left banking, -ve for right banking.

You'll have to insert two commands in two different sectors.
First one to get the banking to begin. (i.e. Length: 10, Height: -1000). Then another where you want to end it again. (i.e. Length: 10, Height 0)

0xae, 'Corrects' pit lines, 2 args

a1: always 0
a2: Location: 16384: right; -32767: left; -16384; both lines

This command moves the yellow pit lines to the side of the track, so the whole line is visible.

0xb4 Track Width To Left, 3 args
0xb5 Track Width To Right, 3 args


a1: Offset Into Sector ?
a2: Transition Length; typical values: 2 ..13;
a3: New Width; typical values: 880 (narrow) .. 1300 (regular) .. 3800 (la source spa)

With these two cmds You can change the track width on one side of the (imagined) centerline.
TrackWidth_Meter = (TrackWidth_GP4 / x) * 4.87
x = 32768/30 (track)
x = 32768/20 (pitlane)

0xbd Light Source (Sun) Position, 3 args

a1: always 0
a2: Direction; (0..65535 means 0..360 degrees)
a3: Angle of Sun Above Horizon; typical values: 7000 .. 12500

0xca Define Kerb Profile, 9 args

a1: Offset Into Sector ?
a2: Selector (0=left A, 1=right A, 2=left B, 3=right B)
a3: Distance to Height1 ?
a4: Distance to Height2 ?
a5: Height1 ?
a6: Height2 ?
a7: Unk
a8: Unk
a9: Unk

0xcc Adjust Horizon, 3 args

a1: always 0
a2: Rotating scenery (like track start angle); values 0..65535
a3: Horizon vertical shift; strong effect with values +-500 .. 1000

0xde Black Flag Area Left, 4 args
0xdf Black Flag Area Right, 4 args


a1: always 0
a2: Start of black flag area, DFS; for valid range see cumlative length in track data table
a3: End of black flag area, DFS; for valid range see cumlative length in track data table
a4: Speed limit in black flag area; typical values: 45 .. 150 (mph)

To define black flag areas. In original tracks they are always inserted in t0.

0xe8 Map jip onto track surface, 10 args

a1 Offset Into Sector
a2 Unit Length / Number of repeats
a3 Units between repeats (0/1 is a line, 2 means every two units a jip, etc)
a4 Jip ID
a5 Position of start of repeat
A start line may have a5 = -128, a8 = 4 but the zebra crossings in Monaco have a5=0, a8=8 a7=32. a8xa9 = 256. ie. covers whole of repeating area.
If | to | is 256:
|-a----|-b----|-c----|
then putting a dash at a will put one at b,c too. But 256 'units' is a track width of about 1792 (x7).
a6: vertical offset
a7: always 0 ?
a8 number of horizontal repeats...
a9 distance from start of first jip to start of second jip etc. So if jip width = 32, a9 = 16 will only show the second half of the second repeat.
a10: always 0 ?

0xf2 Left Kerbs 5 args
0xf3 Right Kerbs 5 args


a1 always 0 ?
a2 always 0 ?
a3 Length of Kerb ?
a4 Unk
a5 Unk

0xf5 Fence ? 8 args

a1 always 0 ?
a2 Fence Side (32768=left, 16384=right)
a3 Fence distance from track
a4 unk
a5 unk
a6 unk
a7 unk (perhaps height of fence ?)
a8 always 840 ?

This commands sets a fence at the left or right side of the track.
The command is missing e.g. at the pitlane entrance sectors.

0xf7 Unk 9 args

a1 always 0 ?
a2 unk, small values (2, 4, 21)
a3 always 0 ?
a4 always 0 ?
a5 always 0 ?
a6 unk, common values 2048, 2072
a7 always 0 ?
a8 always 0 ?
a9 always 0 ?

0xf6 Verge structure left side ? 7 arg
0xf0 Verge structure right side? 7 arg


These commands are probably for the verge structure. The values are similar to the scenery commands in GP2/3. Probably you can set e.g. the height of a run off-area (in GP4 these areas are not flat anymore. Take a look at Interlagos...).

a1 always 0 ?
a2 Ribbon 1 DFC ?
a3 Ribbon 1 Height ?
a4 Ribbon 2 DFC ?
a5 Ribbon 2 Height ?
a6 Ribbon 3 DFC ?
a7 Ribbon 3 Height ?




Index

List of all GP4 track commands

Posted by Flo from 217.226.124.23:

Here is a list of all track commands used in the GP4 tracks.

Grand Prix 4 Trackediting - Command List

0x86 Connect Pit Lane Start, 1 arg
0x87 Connect Pit Lane End, 1 arg
0x96 Speed Limiter On, 1 arg
0x97 Speed Limiter Off, 1 arg
0x9b Pit Lane Begin Offset, 1 arg
0x9e Pit Lane End Length, 1 arg
0xad Track Banking, 3 args
0xae, 'Corrects' pit lines, 2 args
0xb4 Track Width To Left, 3 args
0xb5 Track Width To Right, 3 args
0xbd Light Source (Sun) Position, 3 args
0xca Define Kerb Profile, 9 args
0xcc Adjust Horizon, 3 args
0xde Black Flag Area Left, 4 args
0xdf Black Flag Area Right, 4 args
0xe8 Map jip onto track surface, 10 args
0xf2 Left Kerbs 5 args
0xf3 Right Kerbs 5 args
0xf5 Fence position 8 args
0xf7 Unk 9 args
0xf6 Verge structure left side ? 7 arg
0xf0 Verge structure right side? 7 arg


Index

PreRelease Alpha of TE - Limitations

Posted by addie from 193.247.102.138:

hold your horses gentlemen :) we are still far from trackediting for gp4 i’m afraid :( the point is this: as you all know these days a track basically consists of two parts, the graphical-part and the, maybe we could call it physical part. the latter is where the cars are driving, which means that is where the phyics-engine works in, where it looks up where the road is going etc, and thats the part the actual TE works with. but this part is invisible in the game ! and how do you edit something that is not visible in the game so you cant verify ?

the other part, the visible part, overlays the physical-part, or vice versa. its the 3D-world we are seeing, and specifically its the definition of its structure i mean here with gfx-part. the textures are again a different story, and already hard enough to work with, arent they.

there is no use in editing the physical part w/o editing the gfx-part, they have to go along, at least as far as the track itsself, the part inbetween the fences is concerned, where the physical part lays. and so far the gfx-part is not editable. (you ever noticed the car “diving” a little bit in the gras or in the gravel ? here we are!)

even the cc-line is actually twice in a gp4 track, the “real” one, that is used by the cc-cars and the driving help, and that is in the s1ctXX-file and the gfx-part that is somewhere else, and thats the part you see in the game when switching it on. so e.g. if you change the cc-line in the actual TE it will still look the same in the game.

you may wonder why the heck anybody makes something that way. on first sight it may look quite strange, but on 2nd look, and knowing a bit about the history of the gp-series, its a logical step and pretty brilliant, if you basically want to keep to your old physics-engine (which is a very good idea, and particularely intended by geoff crammond as he mentioned in an earlier interview) and implement a true 3D-world anyway (which is very appreciated also).

so now we have a version of the grandprix-series which is a true quantum-leap away from all others, finally with a true 3D-view which is amazing, but the downside so far is, coping with the splitted trackfiles is really complicated. a trackeditor actually should generate the s1ctXX-file from the gfx-part, or vice versa, because its impossible (better: it looks impossible to me) to just edit the s1ctXX-file on its own because you cant verify your changes in the game, because they are invisible, take the cc-line for example.

and generating the s1ctXX-file from the gfx-part (most of all the cc-line) means you have to know very precisely about the specifications in detail, which we dont do too much, maybe except rene SDI smit !?
however finding them with good ol’ try&cry-methods is a very long and hard journey this time, i’m afraid. but maybe i’m just biased from the elder versions of the gp-series and there are other possibilities i dont see at the moment, and maybe michael könig and his team found one of them. i’d be glad about it.

but as every long journey starts with the first steps its good to see tools for editing even pieces of a track which most of all means to me that at least some aspects of a track are understood. so my very big thank you to paul once more !!

i wonder about investigations of more people on this subject !?

addie

Posted by Paul Hoad from 194.203.140.126:

These words of Addie's are why I like working with him so much....

read these wise words very carefully, its so refreshing to hear someone else who truely understands the problem space.

a trackeditor actually should generate the s1ctXX-file from the gfx-part, or vice versa

I prefer the thought of the
vice-versa

As Addie says "hold your horses gentlemen" we are a long way from the holy grail

Paul


Index

Kerb Editor

Posted by Marco from 193.108.239.38:

Is possible to manage the 0xca command(Kerb Profile)and,if yes, has it the same characteristics of Gp3 command (eg. side 0/1 right, 2/3 left?)

Posted by addie from 193.247.102.134:

(assuming you were talking about gp4)

should be quite easy to figure out, change the kerb and verify it in the game. but remember, you have to DRIVE OVER it and READ the reaction of the car, because (if my guess is really correct) you won't see the changes.

please post your observations ...

(i'm afraid i dont have the time these days to look into it by myself)

addie

Posted by Marco from 193.108.239.38:

You are right,Addie; i've just reduce the stupid heigt of some external kerb like the ones in Spa (eg.Pouhon); now the phisic is ok, even if you still see the old height and width of the kerb. Is there any reason why, in your opininion, all the tracks are realized whit sectors of 1 unit lenght, which means an incredible work in updating these and other fetures?
tanx for any suggestion

Posted by addie from 193.247.102.138:

its just a guess, but probably the “physical”-part of the track geometry is “machine generated”, from the gfx-part or maybe directly from the gps data ?

(for what i meant with “phys-part vs gfx-part” see my posting in the “PreRelease Alpha of TE - Limitations”-thread)

addie


Index

Total Number Of Track Commands

Posted by Schubert from 203.197.41.111:

The total number of track commands should not change when a new empty section is added (say to the original spa circuit). I added around 100 sections (empty) and now the track doesn't load!. Why is this?


Index

fly-over

Posted by Luuk from 194.134.217.48:

I'm making a track for Gp3 and i wanted to do something new now there's a fly-over in the track but does someone knows how to get a fly-over work (height etc.)

Posted by bigears from 195.92.168.173:

It is a case of playing with numbers. On my Nordschleife track, On the "Flugplatz" jump. Usually I just add a bit of height upwards then the next track section, it needs to be small so the jump will work. So the jump need to be roughly below the "neutral" line or whatever you call it. Then play with the numbers to neutralize the track so it won't go too over the top.

I am sure someone else will explain well as I did had a lot of problems til I tackled it a bit.

Posted by bigears from 195.92.168.169:

Oh just curious, what track you making? If you don't want to reveal it then is it a fictional or a real track?





Index

end of list