Adding extra magic data line to the TMD file in TSM?

Posted by firebreather 
Is there a way to add extra magic data lines to the TMD files in the TSM? The ones in particular which I would want to add are Desc86 and Desc90.

I find that I need to use a different TMD file for each season. In the different seasons which I have the horsepower changes (between ~700hp for 1997 up to ~1050hp for current day - with a few ups and downs in between). So when the HP changes you need to change the gear ratios for the Computer Cars otherwise they either hit max revs at the beginning of the straight or they struggle to get out of 4th gear...

I also change the All Wheel Tyre Grip for each year which simulates different downforce levels for each season - ranging from 1850 (1999 with 4 groove tyres) up to 2300 (2021). But that doesn't work for wet races (as it seems wet races may also use those so you end up either several seconds faster or several seconds slower depending on which season you are on). After a bit of testing decreasing Desc90 by 5 and increasing Desc86 by 3 for every increase of 50 All Wheel Grip seems to keep the wet times consistent across seasons (you also have to decrease individual drivers grip by 100 for every increase of 50 All Wheel Grip as well - buts that's handled in the performance files).

But basically I'd rather not have 10 different track files for each grip level to change the Desc86 and 90, as it's a lot of admin and a pain if I needed to tweak a track. So controlling those from the TMD in TSM (within the CSM) would be a lot easier!

Or is there another way of hot swapping certain magic data lines for a season? i.e. if there was a normal MD file with the track does that get read first, then the TMD overwrites the extra bits over the top?
i recently asked ZaZ about this and it's not possible. TMD is limited to the values that are already in the file.
The only way to add more magic data is by directly patching your dat file.

Anyway: TMD is still very useful because it allows you to use different magic data per track set (you can use multiple MD on the same track). To do so, just open your trackset ini-file and refer to your tmd files as follows (example):
MagicData1=2022_Rd01_Sakhir.tmd
MagicData2=2022_Rd02_Jeddah.tmd
MagicData3=2022_Rd03_Melbourne.tmd
MagicData4=2022_Rd04_Imola.tmd
...



GP Files | GP Videos | Discord: Carl_gpgames#2350
I thought that might be the case :(

So other than having 10 different track files then a trackset ini file for each season which picks the right track and the right TMD file, is there a way to do it with the MD3 files? i.e. patch that over a track for each season first (to set the base magic data for the track - including the wet weather bits), then the TMD loads over the top to add the CC setups?

Or can I get the trackset file to just load an MD3 file instead of a TMD one?
don't be fooled by the md3 import function. just because tmd can import md3 files doesm't mean it will read all of its values. it will just read the values that are known to tsm (which is what you can see in a tmd files).
on the other hand it is, unfortunately, not possible to load md3 files with a trackset.

so i fear your only way out is to either write a script to automatically patch your dat files when you load them or to keep multiple dat fiiles.



GP Files | GP Videos | Discord: Carl_gpgames#2350
Hi Carl

is there a complete tutorial about the use of multiple MD on the same track?
best
Jose
How do I creat a tmd file based on a md3?
The trackset ini-file you mention is the settings.ini we use when load the track in TSM?
How do I create a tmd file based on a md3?
Just import it in TSM and then save it. Your tmd file will then be in the folder of your track called "default.tmd". You can then rename the file (ex. monza1988.tmd) and refer to it in the trackset.
Let's say you use track Monza 1988 for multiple season, you just repeat that process and name your tmd files accoringly (f. e. monza1987.tmd, monza1989.tmd, monza1990.tmd, etc.).


The trackset ini-file you mention is the settings.ini we use when load the track in TSM?
No, it's located in the main track directory (by default Grand Prix 4\Tracks).
Just open them and refer to the magicdata (as showed in my first post).

Example for a 1988 trackset (where i only added custom MD to Monza, you can basically repeat that for each track):
[Tracks]
Track1=1988 Jacarepagua\1988\settings.ini
Track3=1988 Monte Carlo\1988\settings.ini
Track13=1988 Estoril\1988\settings.ini
Track14=1988 Jerez\1988\settings.ini
Track6=1988 Detroit\1988\settings.ini
Track12=1988 Monza\1988\settings.ini
MagicData12=1988 Monza\1988\monza1988.tmd
Track8=1988 Silverstone\1988\settings.ini
Track7=1988 Paul Ricard\1988\settings.ini
Track11=1988 Spa\1988\settings.ini
Track5=1988 Montreal\1988\settings.ini
Track15=1988 Suzuka\1988\settings.ini
Track2=1988 Imola\1988\settings.ini
Track4=1988 Mexico City\1988\settings.ini
Track10=1988 Hungaroring\1988\settings.ini
Track9=1988 Hockenheim\1988\settings.ini
Track16=1988 Adelaide\1988\settings.ini

Let me know if you need any further help.



GP Files | GP Videos | Discord: Carl_gpgames#2350
Thanks Carl !!! I will test it.
Best
Jose
I wasn't thinking about the import MD3 bit in TSM, as that kind of makes sense that it only keeps the values that it knows about. But if I go into the track DAT file and export the magic data as an MD3, then remove the magic data from the track file, if the MD3 file is in the same folder as the track DAT file, presumably GP4 will read the MD3 for the magic data as opposed to not having any? If that DAT/MD3 combination is used at the same time as TSM, at what point does the TMD file get read? Before or after the MD3? i.e. does the TMD overwrite only the known TSM values over the MD3 file?

Or what might be even more useful is to ignore the TMD files altogether, and can the trackset ini file just link straight to a MD3 instead of a TMD?

In your example of where you have only added custom magic data to Monza, where is the magic data read from? The DAT or and MD3?
To answer your question let's start with the basics:
In default (unmodded) GP4, magic data is stored in the gp4.exe and not in the DAT-files (original GP4-dat's do not contain magic data).
Later, the possibility was developped to add magic data to dat-files as an extension to these files. GpXPatch reads the magic data and patches the shared memory of the gp4.exe. This is basically how it still works.
So what does TSM do? I believe it temporarilly patches the track-dats (that's at least what i believe) with the changes you made to the magic data and then restores it once you quit the game. It will, however, always create a file called "default.tmd" in your track-folders which is bascially just the known (by tsm) magic data, read from the dat and written to a tmd-file.

There is no way to read magic data directlly from md3-files while loading or runing the game. MD3 can only be used to either patch a dat-file (with c4magic) or to import it to TSM. TSM does always read magic data from tmd files when you load a track (like in my example, it will read the magic data from monza1988.tmd). However, let's say you have other magic data values which tmd is not capable of, but you have them patched to your dat. Those will still work with TSM, it's just that they will be read straight from the DAT and not from TDM. In other words, it's not possible to "ignore" a TMD file, because even if you delete it, TSM will create it again (based on the known magic date values from your DAT).

Long story short, the order is somehow like this:
1. TDM
2. Track dat
3. gp4.exe



GP Files | GP Videos | Discord: Carl_gpgames#2350
Sorry, only registered users may post in this forum.

Click here to login

Maintainer: mortal, stephan | Design: stephan, Lo2k | Moderatoren: mortal, TomMK, Noog, stephan | Downloads: Lo2k | Supported by: Atlassian Experts Berlin | Forum Rules | Policy