vehicles vdfm
About
Translation for Project Cars porsche_991_gt3rs.vdfm
by JDougNY
Translation for AMS2 fordsgt.vdfm
by GvsE
Version 1.0 - October 8, 2018 - Initial release for Project Cars
AMS2 additions by GvsE - February 13, 2022 - Initial release for AMS2
AMS2 update 1.4.1.3: new entry in data section and data map
Note
Address locations are typical for all VDFM files up to the beginning of the string data. Use this translation as a guide to editing any VDFM file.
Header
[HEADER - 0x000-0x02F (48 bytes)]
0x010-0x013 = 98010000 = 408// (Integer) Byte Length of offset/data section. Count from 0x030-0x1C7
AMS2 0x010-0x013 = 98010000 = 424// (Integer) Byte Length of offset/data section. Count from 0x030-0x1C7
0x15 = 08 // (byte) number of empty bytes after data section. 0x1C8-0x1CF
AMS2
0x15 = 08 // (byte) number of empty bytes after data section. 0x1D8-0x1DF
0x018-0x01B = 12000000 = 18 // (Integer) Byte length of String data Section. 0x1D0-0x1E1
If additional bytes are inserted into the string data section, this register is incremented accordingly.
0x01D = 0E = 14 // (Byte) number of empty bytes after String data section. 0x1E2-0x1EF
AMS2
0x01D = 01 = 1 // (Byte) number of empty bytes after String data section. 0x21F-0x21F
Any changes to String Data section requires a check of remaining empty bytes. There is always one zero byte after last entry. Empty byte count does not include that last zero byte.
AMS2 0x020 = 30 = 48 // (Byte) Byte length of Data Map Offsets. 0x220-0x25F
0x025 = 00 // (Byte) number of empty bytes after the Data Map Offsets.
0x028 = 0C = 12 // (Byte) Byte length of end section. 0x2260-0x26B
0x02D = 04 // (Byte) number of empty bytes after the end section. 0x26C-0x26F
AMS2 Data Section
Calls to Physics Files
[DATA SECTION - 0x030-0x1D8]
[Offset 08 of Data Map]
0x038-0x03B = XX000000 = 0 // (Integer) Location in string data for Chassis filename (*.CDFBIN)
[Offset 18 of Data Map]
0x048-0x04B = XX000000 = 0 // (Integer) Location in string data for Engine filename (*.EDFBIN)
[Offset 20 of Data Map]
PC2 location of turbo: this and the following entries change in AMS2 1.3.3.0
0x050-0x053 = XX000000 = // (Integer) PC2 Location in string data for turbo filename (*.TBFBIN) If Data Map does not call for Offset 20, then no turbo/supercharger is utilized.
AMS2
[Offset 20 of Data Map]
0x050-0x053 = XX000000 = // (Integer) Location in string data for clutches filename (*.CBFBIN) If Data Map does not call for Offset 20, then no clutches is utilized.
for other AMS2 offsets see the data map offsets section
[Offset 28 of Data Map]
0x058-0x05B = XX000000 = // (Integer) Location in string data for turbo filename (*.TBFBIN) If Data Map does not call for Offset 20, then no turbo/supercharger is utilized.
New in Patch 1.4
Failure model filename replaces previous gearbox file name
[Offset 38 of Data Map]
0x068-0x06B = XX000000 = 0 // Location in string data for failure model filename (*.GDFBIN)
[Offset 40 of Data Map]
0x070-0x073 = XX000000 = 0 // (Integer) Location in string data for Gearbox filename (*.GDFBIN)0 //
[Offset 48 of Data Map]
0x078-0x07B = XX000000 = 0 // (Integer) Location in string data for Suspension filename (*.SDFBIN)
[Offset 50 of Data Map]
0x080-0x083 = XX000000 = 0 // (Integer) Location in string data for Collision filenames (*.XML)
[Offset 58 of Data Map]
0x088-0x08B = XX000000 = 0 // (Integer) Location in string data for Tyre filename (*.HDTBIN)
Wheel and Tire Setup
Atention
The vertical tyre/wheel offset is 1/2 of the tyre height value. Width and height in the VDFM matches the dimensions of tyre Mebs used.
You would only adjust the lateral (inward/outward) offsets in VDFM, if you want to make those types of visual adjustments (when viewing car on the track).
Note
Offsets in VHF file are used when viewing the car in the menus. Offsets in VDFM are used when the car is on the track. So, when you have an offset issue in the menus, you adjust the VHF and when the issue is on the track you adjust the VDFM.
0x088-0x08B = B072483F = 0.783 // (Float) FL Wheel/Tyre lateral offset in Meters
0x08C-0x08F = 3333B33E = 0.350 // (Float) FL Wheel/Tyre vertical offset in Meters
0x090-0x093 = 1B2F9DBF = -1.228 // (Float) FL Wheel/Tyre fore/aft offset in Meters
0x094-0x097 = B07248BF = -0.783 // (Float) FR Wheel/Tyre lateral offset in Meters
0x098-0x09B = 3333B33E = 0.350 // (Float) FR Wheel/Tyre vertical offset in Meters
0x09C-0x09F = 1B2F9DBF = -1.228 // (Float) FR Wheel/Tyre fore/aft offset in Meters
0x0A0-0x0A3 = 4260453F = 0.771 // (Float) RL Wheel/Tyre lateral offset in Meters
0x0A4-0x0A7 = 6DE7BB3E = 0.367 // (Float) RL Wheel/Tyre vertical offset in Meters
0x0A8-0x0AB = 1B2F9D3F = 1.228 // (Float) RL Wheel/Tyre fore/aft offset in Meters
0x0AC-0x0AF = 426045BF = -0.771 // (Float) RR Wheel/Tyre lateral offset in Meters
0x0B0-0x0B3 = 6DE7BB3E = 0.367 // (Float) RR Wheel/Tyre vertical offset in Meters
0x0B4-0x0B7 = 1B2F9D3F = 1.228 // (Float) RR Wheel/Tyre fore/aft offset in Meters
0x0B8-0x0BB = 14AE873E = 0.265 // (Float) FL Tyre width in Meters
0x0BC-0x0BF = 0E2D323F = 0.696 // (Float) FL Tyre height in Meters
0x0C0-0x0C3 = 14AE873E = 0.265 // (Float) FR Tyre width in Meters
0x0C4-0x0C7 = 0E2D323F = 0.696 // (Float) FR Tyre height in Meters
0x0C8-0x0CB = 6666A63E = 0.325 // (Float) RL Tyre width in Meters
0x0CC-0x0CF = 48E13A3F = 0.730 // (Float) RL Tyre height in Meters
0x0D0-0x0D3 = 6666A63E = 0.325 // (Float) RR Tyre width in Meters
0x0D4-0x0D7 = 48E13A3F = 0.730 // (Float) RR Tyre height in Meters
Offsets B8 and C0 in Data Map
0x0E8-0x0EB = XX000000 = // (Integer) Location in string data for KERS,DRS and Hybrid filename (*.BBFBIN)
If Data Map does not call for Offset B8, then no *.BFFBIN is utilized.
0x0C0-0x0C4 = XX000000 = // (Integer) Location in string data for Push to Pass filename
If Data Map does not call for Offset C0, then no Push to Pass is utilized.
Brake Discs
0x138-0x013B = 00400344 = 525.0 // (Float) Brake Disc Glow Min (Start to glow slightly)
0x13C-0x013F = 00007A44 = 1000.0 // (Float) Brake Disc Glow Max (Full glow effect)
Unknown
0x140-0x0144 = 0000803F = 1.0 // (Float) ??
0x13C-0x013F = 0000803F = 1.0 // (Float) ??
0x140-0x143 = 0000803F = 1.0 // (Float) ??
0x144-0x147 = FFFFFFFF // Beginning of Container...appears to be
0x148-0x14B = 01000000 = 1 // (Integer) ??
0x14C-0x14F = 01000000 = 1 // (Integer) ??
0x150-0x153 = 01000000 = 1 // (Integer) ??
0x154-0x157 = 01000000 = 1 // (Integer) ??
0x158-0x15B = 01000000 = 1 // (Integer) ??
0x15C-0x15F = 01000000 = 1 // (Integer) ??
0x160-0x163 = 01000000 = 1 // (Integer) ??
0x164-0x167 = 01000000 = 1 // (Integer) ??
0x168-0x16B = 01000000 = 1 // (Integer) ??
0x16C-0x16F = 01000000 = 1 // (Integer) ??
0x170-0x173 = 01000000 = 1 // (Integer) ??
0x174-0x177 = 01000000 = 1 // (Integer) ??
0x178-0x17B = 01000000 = 1 // (Integer) ??
0x17C-0x17F = 0000B841 = 23.0 // (Float) ??
0x180-0x183 = 00000000 = 0
0x184-0x187 = 0000803F = 1.0 // (Float) ??
0x188-0x18B = 0000803F = 1.0 // (Float) ??
0x18C-0x18F = 0000803F = 1.0 // (Float) ??
0x190-0x193 = 0000803F = 1.0 // (Float) ??
0x194-0x197 = 8FC2753E = 0.24 // (Float) ??
0x198-0x19B = 8FC2753D = 0.06 // (Float) ??
0x19C-0x19F = CDCC8C40 = 4.4 // (Float) ??
0x1A0-0x1A3 = 00008040 = 4.0 // (Float) ??
0x1A4-0x1A7 = C3F5A83E = 0.33 // (Float) ??
0x1A8-0x1AB = 6666E63E = 0.45 // (Float) ??
0x1AC-0x1AF = 6666863F = 1.05 // (Float) ??
0x1B0-0x1B3 = CDCC4C3F = 0.8 // (Float) ??
0x1B4-0x1B7 = 00000000 = 0
0x1B8-0x1BB = 3333333F = 0.7 // (Float) ??
0x1BC-0x1BF = 00000000 = 0
0x1C0-0x1C3 = 0AD7233C = 0.01 // (Float) ??
0x1C4-0x1C7 = 00000000 = 0
0x1C8-0x1CB = 00000000 = 0
Backfire Frequency
0x1CC-0x1CF = 00 00 00 3F = 0.5 = backfire: left exhaust backfire frequency
0x1D0-0x1D4 = CD CC 4C 3D =0.5 = backfire: right exhaust backfire frequency
Note
For backfire generally go with values between 0.1 and 0.5
Unknown Cont.
0x1D8-0x1D7 = unknown
0x1D8-0x1DF = 8 empty bytes before the string section
Note
From this point onward the adddresses can change, due to both the byte length of the String data section and the size of the data map section. No matter the addresses the code will flow the same as follows.
String Data
empty bytes for String data
Data Map
empty bytes for Data map (if any)
End Section
Empty bytes for End Section
String Data Section
0x1E0-0x21E = fordsgt String Data Section.
fordsgt
= 8 bytes (fordsgt.
or fordsgt00
) starts at byte 0 of the string section
GT_Cup
clutches entry starts at byte 27
chevrolet_corvette_c7_z06
tire starts at byte 37
This string section has the total of 63 bytes. There is 1 empty byte before the Data Map Offsets section.
Anything called by data map will look for this text for each physics file type. There is always one "zero" byte after each entry in this section.
0x21E-0x21F = // empty bytes for String Data section.
These bytes are ignored, unless offsets 0x018 and 0x01D are adjusted.
Data Map Section for AMS2 (post patch 1.4)
08 = 0x038 = Chassis file lookup // In all VDFM
18 = 0x048 = Engine file lookup // In all VDFM
20 = 0x050 = Clutches file lookup // only when needed. New file in AMS2 1.3.3.*
28 = 0x058 = Turbo file lookup // only when needed
38 = 0x068 = Failure model //
Note
Optional as of 1.4.1.3 (not necessary in patch 1.4.1.3; may become obligatory in the future)
40 = 0x070 = Gearbox file lookup // In all VDFM
48 = 0x078 = Suspension file lookup // In all VDFM
50 = 0x080 = Collision file lookup // In all VDFM
58 = 0x080 = Tyre file lookup // In all VDFM
B8 = 0x0E8 = KERS, DRS, Hybrid file lookup // only when needed
C0 = 0x0F0 = push to pass
Data Map for Fordsgt
Patch 1.3
Starts at address 0x220 and ends at 0x25F
Note
The size of this section amounts to 64 bytes for fordsgt
. This is referenced at address 0x020
To call more data (kers, etc.) increase the size of this section. Then adjust the size of the section at address 0x020
.
08 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 48 00 00 00 00 00 00 00 50 00 00 00 00 00 00 00
so:
08 = 0x038 = Chassis file lookup
18 = 0x048 = Engine file lookup
20 = 0x050 = Clutches file lookup
28 = 0x058 = Turbo file lookup
38 = 0x068 = Gearbox file lookup
40 = 0x070 = Suspension file lookup
48 = 0x078 = Collision file lookup
50 = 0x080 = Tyre file lookup
Data Map for Fordsgt
Patch 1.4
the code:
08 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 48 00 00 00 00 00 00 00 50 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00
08 = 0x038 = Chassis file lookup
18 = 0x048 = Engine file lookup
20 = 0x050 = Clutches file lookup
28 = 0x058 = Turbo file lookup
40 = 0x070 = Gearbox file lookup
48 = 0x078 = Suspension file lookup
50 = 0x080 = Collision file lookup
58 = 0x088 = Tyre file lookup
End Section
0x220-0x22F // end section and empty bytes for end section