Magic Data Discussion

Posted by TomMK 
Magic Data Discussion
Date: September 07, 2012 02:12PM
Posted by: TomMK
I couldn't find a comprehensive tutorial on this subject so I decided to write one myself :-). It's a work-in-progress right now, so I'd welcome any comments from those more knowledgeable than me! Let's get started...

Magic Data is the name for a set of parameters that controls the way the game behaves at each track. It should really be called Track Data in my opinion.

Magic Data must be aligned with Performance data and Physics data to achieve a good gaming experience. This tutorial aims to explain how Magic Data works.

First some background on tracks:

Tracks are made up of, as a minimum, a WAD file and a DAT file. It is the DAT file which contains the Magic Data.

There are 2 ways to view and edit the Magic Data in the DAT file. First there is CMagic, available at SDI Utilities. But I prefer TSM, part of the ZaZ Tools package. This gives a visual interface to the Magic Data, instead of the text-based CMagic.

Install a track in TSM by clicking "Create new track". Fill in the name of the track and then link it to the track's WAD and DAT files

Now for the main purpose of this tutorial - it's time to have a look at some Magic Data.

Highlight a track and click the Magic Data tab.

The Magic Data tab is split into 7 sections: Car Setup, Pitstop Strategy, Failure Chance, Grip & Fuel etc, Laps & Sector Splits, Tyre Choice, Skill Factors. Lets look at each section.

(1) Car Setup

This section controls the Player and AI car setup in 3 ways: Wing Level (front and rear), Gear Ratios and Brake Balance.

Wing Level can be a value between 1 (low downforce) and 20 (high downforce).

Gear Ratios should be set so that the car is able to reach its maximum speed without "running out" of revs. It is mainly influenced by the Wing level, especially the rear wing setting. The gaps between the gears should be fairly equal. TSM only shows values for 6 gears. If a car has 7 gears the game will adjust for this automatically.

The Brake Balance value shown is Front Brake Balance. It is normally around 57% (5700) for AI car setups.

(2) Pitstop Strategy

This section determines the AI cars pitstop strategy (1, 2 or 3 stops) and on which laps they should make their pitstops.

The percentage row should always sum to 100. Pitstop strategy is randomly determined for each AI car according to the percentages assigned to each option (1,2 or 3 stops). There is no way to make certain cars choose a particular strategy.

(3) Failure Chance

This section decides which types of failures the AI cars might experience. Higher values means a high chance of this type of failure.

(4) Grip & Fuel etc

This is the hardest section to understand and the main reason I wanted a tutorial on Magic Data. It deals mainly with Fuel and Grip parameters but also some other miscellaneous items. Lets run through each parameter in turn:

Track Grip. Affects both player and AI cars. Higher values mean more grip. Of the 17 original 2001 tracks, values range from 15742 (Imola) to 17120 (Indianapolis). The average value is 16365.

Downforce. Affects both player and AI cars. This should be called Air Resistance or Altitude. Higher values give less air resistance, which means higher top speeds but slower cornering ability as there is less downforce generated. Of the original 17 2001 tracks, values range from 17 (Imola, Silverstone, Spa) to 31 (Hungaroring). The average value is 23.

Ride Height. Affects both player and AI cars. I don't fully understand this paramneter. Changing it is not advisable. It seems to affect acceleration and top speed. Higher values give a lower acceleration and top speed. Of the original 17 2001 tracks, values range from 926 (Interlagos) to 1022 (Monaco). The average value 990.

Fuel. Affects both player and AI cars. This value is the amount of fuel 'units' that equals 1.0 laps of fuel according to the in-cockpit readout. Obviously shorter tracks require less fuel per lap, and longer tracks require more per lap. Of the original 17 2001 tracks, values range from 5766 (Monaco) to 10730 (Spa) which is a predictable result.

AI Grip. This value actually alters the AI cars aggressiveness (not grip) in braking zones. The default value is 64768 for most of the original 2001 tracks. Maximum aggresiveness is around 30000, at which point the cars all spin off. This value should be left at 64768.

AI Grip Finetune. Just alters the above value by a small amount. Not really important.

Range min / Range max. Varies the performance of all AI cars by these amounts. Can be left at the default values of 512 (Range min) and 2048 (Range max).

AI Errors. The number of unforced errors made by the AI cars. Higher values mean more errors. The most common value of the 17 2001 tracks is 64, with a range from 24 (Monaco) to 96 (Montreal).

Spin recovery range. The number of track sectors the AI cars check before rejoining after a spin. The default value is 64 for all 17 original tracks.

Sectors to pit in begin / end. Track specific. Do not alter.

Pre pit speed limit. I'm not sure what this does. I believe it is the speed at which the AI cars approach the pit lane entry. Needs more testing.

Fuel consumption player. The Human players fuel consumption. For some reason it is always higher than the AI fuel consumption! Of the 17 original 2001 tracks, values range from 16643 (Hockenheim) to 19190 (Monaco). The average value is 17705.

Fuel comsumption AI. The AI cars' fuel consumption. Of the 17 original 2001 tracks, values range from 15741 (Barcelona) to 17172 (Spa). The average value is 16413, which is 1292 less than the Player fuel consumption average.

Tyre wear. Affects only the players car. Higher values mean a faster tyre wear rate. Of the 17 original tracks, values range from 12258 (Barcelona) to 18574 (Indianapolis).

AI Race performance. This should be called AI tyre wear. Affects AI cars only. Higher values increase AI tyre wear and slows them down as the race goes on. 2001 values range from 2461 (Suzuka) to 4886 (A1 Ring). The average value is 3584.

Weather percentage. Pretty obvious this one. The percentage chance of rain affecting a session at the track.

AI Race grip. I'm not sure exactly what this does, but the value is 256 for all 17 original tracks. I suggest leaving this at 256.

AI Tyres. I have no idea what this does. Any suggestions?

Black flag penalty. The length of time (in milliseconds) that a black flag penalty lasts for.

Black flag. I think this value is the speed the players cars is reduced to during a Black Flag penalty. Lower values mean a greater reduction in speed.

(5) Laps & Sector Splits

Laps. Total number of laps for a 100% race distance.

Split1 / Split2. The track sector in which slits 1 and 2 end. Should be set by the track maker.

(6) Tyres

Possible values are 52 - 55. The Hard value is always 1 greater than the Soft value. And the Type value is always 100. But I don't know what any of the values mean! Any assistance would be appreciated!

(7) Skill Factors

Determines how much faster / slower the AI cars are at a given Skill level. Higher values mean faster AI competition.

=====================================================


Intel NUC 8i3, 8GB RAM, MS Sidewinder Wheel



Edited 3 time(s). Last edit at 02/08/2019 12:53AM by TomMK.
Re: Magic Data Tutorial
Date: September 07, 2012 02:13PM
Posted by: TomMK
In this post I'm going to apply what we know about magic data to model the 2012 season in GP4. When I've written it :-).

=====================================================


Intel NUC 8i3, 8GB RAM, MS Sidewinder Wheel
Re: Magic Data Tutorial
Date: September 07, 2012 02:21PM
Posted by: Atticus.
This topic should be stickied ASAP. Thank you TomMK. :-)
Re: Magic Data Tutorial
Date: September 07, 2012 02:30PM
Posted by: kedy89
Good job, clarifies lot of things for me regarding the grip & fuel section. One thing you can maybe add is that it's also possible to have 0 stops by setting 100% at 1 stop, with the lap for the first stop after raceend (e.g. the race has 56 laps, set it to 59). However it's important that the fuel/fuel consumption is correct then.




Some mods
F1 1996 | F1 2002 | F1 2007 | F1 2011 | F1 2013 | F1 2015 | F1 2018
Re: Magic Data Tutorial
Date: September 08, 2012 09:32AM
Posted by: Lo2k
Very interesting thread !

I read it quickly but I would just add 3 little things :
- There's no magic data in original .dat tracks. In this case, tracks are using default magic data for each track stored in another file (most Probably GP4.exe or f1gstate.sav, sorry I can't remind).
Of course if magic data is present into a .dat it is applied to the track instead of default values.
- The Black flag setting might not be the speed of the car under black flag because this speed is set in $DE and $DF commands in track sector 0 for the each .dat (this also gives the opportunity to set different black flag speed limit for each corner cutted)
- if TSM presentation is very slick, it seems it removes some (more or less) interesting values, like the one that set garage car direction. That's this setting which is allowing cars at 45° at Monaco...

I hope we will be able to completely decipher these values one day...





Edited 4 time(s). Last edit at 09/08/2012 09:36AM by Lo2k.
Re: Magic Data Tutorial
Date: September 15, 2012 10:34AM
Posted by: TomMK
OK, I have been working on understanding Magic Data for a few more days and have found out some more:

Tyre types - As we know, values range from 52-55. I believe lower values indicate a harder, slower compound. Have a look at these results:

Track = Spa-Francorchamps 2011
Race type = Quickrace (15% distance)

Tyre Type / Average Fastest AI lap time:
Type 52 = 1m 50.8
Type 53 = 1m 50.2
Type 54 = 1m 49.6
Type 55 = 1m 49.0

These average lap times were calculated using lots of simulations and show a clear pattern.

In the 17 original tracks' Magic Data, the first value is always higher (that is softer, according to my findings). Interestingly, this makes me think the labels in TSM ( "Hard" / "Soft" ) are the wrong way around.

The "type" value determines which compound the AI cars run. A value of 100 (it is 100 in all of the 17 original tracks magic data) makes the AI choose the first compound. A value of 0 makes them choose the second.

=====================================================


Intel NUC 8i3, 8GB RAM, MS Sidewinder Wheel



Edited 2 time(s). Last edit at 09/15/2012 10:35AM by TomMK.
Re: Magic Data Tutorial
Date: September 15, 2012 10:36AM
Posted by: Alessio88
Well done Tom,really interesting tutorial,thanks a lot :)

Greetings
Alessio


CoM3 oN McL4R3n.....:)
Re: Magic Data Tutorial
Date: September 15, 2012 03:46PM
Posted by: noncon
Great work! I'm bookmarking this page. :)

I understand slower lap times on the hard compound, but any data on how much farther the A.I. can go on the hard compound before lap times drop off compared to soft?

Thanks again for you work!
KJ
Re: Magic Data Tutorial
Date: September 15, 2012 03:57PM
Posted by: Atticus.
OMG... That is stunning work.

Incidentaly, one could interpret the four types as the current Pirelli range, as I understand. So modifying them accordingly on the tracks (setting two out of the four) could model the Pirelli tyre choices.

It is so fantastic that GP4 reveals secrets even after 10 years.

:-)
Re: Magic Data Tutorial
Date: September 15, 2012 06:00PM
Posted by: phantaman
I did something simple over tire compounds. you can not decide which strategy to use because each of us "compiles" the GP4 differently, so I used the pirelli's strategy for 2011.



to calculate the fuel used:

following example bahrain 2010

1 lap = 6.299km
6.299/5.00 = 1.2598
1.2598 x 2.37 (fuel/5km) = 2.985726 kilos / lap

basically is 2.985726 (kilos / lap) multiplied by the factor 2979 ... would 8894.477754 (disregard the numbers after the decimal point), we have 8894 of fuel to bahrain 2010 ;-)

----signature--------------------------------------------------------

RELEASE => Physics (under FIA Technical Regulations)
MagicDatas? Setups? Pit Stop Strategies? Track Specific Performances? Up2Date GP?
Power Torque Curve? Where's this stuff? All download is available at ..
Re: Magic Data Tutorial
Date: September 15, 2012 07:43PM
Posted by: noncon
This is good info as well. But if Tom is correct (higher value=softer) you might be running hard tires when you want soft.

Thaks again
KJ
Re: Magic Data Tutorial
Date: September 16, 2012 12:04AM
Posted by: phantaman
noncon Wrote:
-------------------------------------------------------
> This is good info as well. But if Tom is correct
> (higher value=softer) you might be running hard
> tires when you want soft.
>
> Thaks again
> KJ

well ... I believe this goes against the information that I have :/

I want to share this with you guys. All can download and read (online) ... from the old SDI FORUM, topic name:

"CMagic data"

I saved this topic and converted it to. pdf

[www.mediafire.com]

and saved (and converted) plus one with additional information (15 pages) name:

"Realistic Performance Tyre Modelling Procedure"

[www.mediafire.com]

Thanks to my backup´s and have fun ;)

----signature--------------------------------------------------------

RELEASE => Physics (under FIA Technical Regulations)
MagicDatas? Setups? Pit Stop Strategies? Track Specific Performances? Up2Date GP?
Power Torque Curve? Where's this stuff? All download is available at ..
Re: Magic Data Tutorial
Date: September 16, 2012 06:15AM
Posted by: TomMK
phantaman - those threads are discussing GP3. Now I don't see why GP4 would be different, but that's what it seems like to me. I need to do more testing at other circuits. I picked Spa because the long lap exaggerates the differences and makes them easier to see.

Atticus - Yes I agree, it potentially makes it possible to model the 2012 Pirelli compounds very nicely.

Does anyone know if there is a way to log / view the AI cars' tyre wear during a race?

=====================================================


Intel NUC 8i3, 8GB RAM, MS Sidewinder Wheel
Re: Magic Data Tutorial
Date: September 16, 2012 07:35AM
Posted by: phantaman
TomMK Wrote:
-------------------------------------------------------
> phantaman - those threads are discussing GP3. Now
> I don't see why GP4 would be different, but that's
> what it seems like to me.

if u can analyze a GP3-2000 magicdata, except for some slight differences (seems to be 99.9% identical to me) ... why many say the GP4 is nothing more than a redone GP3/GP3-2000

you did not talk about spa francorchamps? ... following (standard spa) examples in .pdf:

[gp3-2000 magic file]

[www.mediafire.com]

[GP4 magic file]

[www.mediafire.com]

----signature--------------------------------------------------------

RELEASE => Physics (under FIA Technical Regulations)
MagicDatas? Setups? Pit Stop Strategies? Track Specific Performances? Up2Date GP?
Power Torque Curve? Where's this stuff? All download is available at ..
Re: Magic Data Tutorial
Date: September 16, 2012 10:37AM
Posted by: TomMK
One thing that I believe makes modelling the modern Pirelli tyres difficult in GP4 is that we cannot eliminate refueling.

With refueling, there is even more benefit to making more pitstops, because you carry less fuel during the race. If you add tyres that wear faster than normal, there is even more benefit to making more stops.

This makes strategies such as Jenson Button's 1-stopper at Spa this year impossible in GP4. A 2/3 stop strategy is much faster if you add refueling into the mix.

=====================================================


Intel NUC 8i3, 8GB RAM, MS Sidewinder Wheel
Re: Magic Data Tutorial
Date: September 27, 2012 11:46PM
Posted by: Cyberacer
We CAN eliminate refueling with a little trick:

In a 70 laps race, set in magic data the cars to pit only 1 time at the end of lap 72 (as a rule, use always +2 or +3).

But we have to make a fine adjustment of AI cars fuel consumption to prevent cars running out of fuel before finishing the race.
We also have to fine tune our (=player's) fuel consumption for the same reason. Note that setting a safe value would make our car running heavy with too much useless fuel at the closing laps.

example:

....
16384 ; unk (dw) (always 16384?)
16384 ; unk (dw) (always 16384?)
100 ; pitstop group 1 %
72 ; stop 1

0 ; pit window 1
0 ;
0 ;
0 ;
0 ;
0 ;
0 ; pitstop group 2 %
0 ; stop 1
0 ; pit window 1
0 ; stop 2
0 ; pit window 2
0 ;
0 ;
0 ;
0 ;
0 ; pitstop group 3 %
0 ; pit window 1
0 ; stop 2
0 ; pit window 2
0 ; stop 3
0 ; pit window 3
0 ;
0 ; failure chance : suspension
0 ; failure chance : loosewheel
.......

_________________________
some of my GP4 works ...
Re: Magic Data Tutorial
Date: September 28, 2012 02:01AM
Posted by: TomMK
Yes but that also eliminates pitstops for tyres so it's still not quite simulating the 2012 rules. Nice idea though.

=====================================================


Intel NUC 8i3, 8GB RAM, MS Sidewinder Wheel
Re: Magic Data Tutorial
Date: September 28, 2012 02:40PM
Posted by: mortal
This thread has been pinned to the GP4FAQ. Nice work, thanks. :-)


[www.mediafire.com] Some say you should click it, you know you want to. :-) [www.gp4central.com] <----GP4 Central
Re: Magic Data Tutorial
Date: November 02, 2012 07:13AM
Posted by: TomMK
So something I cannot understand are the following 2 Magic Data items:

10          ; sectors to pit in begin
6           ; sectors to pit in end

Anyone know what these do?

=====================================================


Intel NUC 8i3, 8GB RAM, MS Sidewinder Wheel
Re: Magic Data Tutorial
Date: November 02, 2012 08:24AM
Posted by: Turbo Lover
The first line is about at which sector in comparison with a particular pit flag (pitlane begin) the car makes the move to the pits. The second line is about at which sector in comparison with a particular pit flag (pitlane end) the car makes the move to the track.



My Grand Prix 4 Files

I'm a total dick. How many people can say that?
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