Magic Data and GP2 Physics

Here you can post everything that fits in the topic "GP2 Screenshots & GP2 Patcher"
Post Reply
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Magic Data and GP2 Physics

Post by rremedio »

Hi there!

I've been playing with the Magic Data and I've made some advancments. For those who don't know, the magic data is the group of factors which define de slot behaviors. I've found 23 factors, but I don't know what half of them do. There's no other factors after factor 23, but there may be others before factor 1, I need to find out.

I could not find the factors which define the pit in/out distances.

These are the factors (one of them per slot).

1. Tyre wear - if you use GP2Lap, this value is switched with the value in the Track Info.
2. Slot Grip Factor - affects the cc performance in the corners.
3. Qual Grip Factor - affects the cc performance in the corners in qualifying sessions.
4. Race Grip Factor - same as 3, but for Race sessions.
5. Unknown (Corner Factor) - it produces strange results when changed, it's a grip factor, but it also affects the way the ccs enter the corners (if set too right they will miss the corner).
6. Unknown
7. Qual grip factor 2 - similar to 3
8. Race grip factor 2 - similar to 4
9- Qual timing factor - affects the time speed of the qualifying (affects laptimes without changing performance....gives funny results if set too high)
10 - Race timing factor - same as 9, but for Race
11- Unknown
12- Unknown
13- Unknown
14- Unknown - same for all slots
15- Unknown
16- Unknown
17- Unknown - same for all slots
18- Unknown
19- Unknown
20- Unknown
21- Human Fuel Comsumption
22- CC Fuel Comsumption
23- Unknown

In the same "region" of the exe there are other two "global factors". The act exactly like factors 9 and 10 (one for qual, other for race), but they affects all slots at the same time.

I'm setting up a small tool to edit them without using a hex editor. It's almost done, it just need a few more tests (it works already, but I'm not sure if it patches the game correctly). It woult be nice if someone else make tests trying to figure out all these Unknowns. Also, I may send it to anyone who wants to try it for fun. With a little imagination I can reproduce the modern tyres behavior, getting better laptimes while the fuel is spent.

Another things is the game physics. I've found a lot of aerodinamic factors togheter with the traditional "car settings". Seems like gp2 has almost the same number of physic factors than gp3! I'm thinking about creating an editor, or more likely a simple patcher for testing. But there's a lot of things that need testing. Is someone willing to help?

It would be great to GP2 future.
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
DJS
GP2 Racer
Posts: 438
Joined: 07.11.2006, 12:16

Re: Magic Data and GP2 Physics

Post by DJS »

Rremedio, I think what you do is pure genius.

I have a question and I think you're the one to ask, because you are deep into the gp2.exe
Would it be possible to give every team it's own carshape?
Could the game handle something like that, you think? :-k

The solution would be 6 or 7 carshapes using both high and lownose or 13 carshapes using just lownose, if it is possible, that is. :wink:
DJS Exclusive - Proud member of team NL²
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

It would be great, but I think it's not possible.
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
AAS
GP2 Star
Posts: 1069
Joined: 08.09.2006, 17:19
Contact:

Re: Magic Data and GP2 Physics

Post by AAS »

Great work rremedio !

Can I help you? I don't know. I understand not much of it

Code: Select all

Also, I may send it to anyone who wants to try it for fun.
Yes,yes,yes =P~ :D


Another question : Would it be possible (someday) to find the code for the track lenght limit, file size limit (.dat) or maybe for the jam size limit.
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

AAS wrote:Great work rremedio !

Can I help you? I don't know. I understand not much of it

Code: Select all

Also, I may send it to anyone who wants to try it for fun.
Yes,yes,yes =P~ :D


Another question : Would it be possible (someday) to find the code for the track lenght limit, file size limit (.dat) or maybe for the jam size limit.
Any person who plays gp2 may help. Becouse you won't deal with the code. You just need to change some numbers and try to figure out what it changes in the game.

About gp2 limits, I guess it's not simple as just changing a value. Problaby gp2 reserves an amout of space in the memory for these things and if you find the code for changing the limit, you'll make the track use memory from other part of the game and cause crashes.

Maybe someone could make a way to gp2lap "deceive" gp2 (switching files as the game runs). But it's far too advanced for me. I'm not even a programmer. :)

I'll post my work made so far later here. So anyone can test it.

Regards
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

I'd like to post my little tool here today, but I'll have to delay it for one or two weeks. I've found my "magic data recorder" has a bug that makes it get wrong values for some factor in some slots. So I need to check everything slot by slot, and I have no time to do that. I won't be at home until day 27, so you have to wait untill june 28th or 29th.

Sorry guys... #-o
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
TdK
GP2 Pro
Posts: 900
Joined: 11.12.2006, 20:16
Location: Netherlands

Re: Magic Data and GP2 Physics

Post by TdK »

rremedio wrote:I'd like to post my little tool here today, but I'll have to delay it for one or two weeks. I've found my "magic data recorder" has a bug that makes it get wrong values for some factor in some slots. So I need to check everything slot by slot, and I have no time to do that. I won't be at home until day 27, so you have to wait untill june 28th or 29th.

Sorry guys... #-o
Don't worry, we will wait patiently, at least, i do :lol:
TdK - (re)tired GrandPrix 2 manic!
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

Well, I still can't fix the bug. Seems like a bug in the programming language (Ruby). Cause the program gets the correct values for almost all offsets, but in some offsets it returns the wrong values.

I'm rewriting the code, but the bug appeared again. I did check everything, I don't know what happens.

Now the program has a graphic interface. I hope I can released it in the next days.

Does anybody now how to read/write file offset values with Visual Basic 2008? I have it installed here and it would produce a better program than Ruby, but I didn't understand the process (I'm not a programmer, I'm just a "Do it by yourself" philosophy guy). I have knowledge in VBA, but not with this sort of thing, and VB 2008 is also a bit different.

Regards
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

Update: I've downloaded Visual C++ and it's a great sollution. The users won't need to have the .net framework anymore, I guess...and the exe will be a smaller file.

The only problem is that it is thousand times more complicated to develop a program. But at least it gives me the correct values.
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
V12-Power
GP2 Star
Posts: 1051
Joined: 19.09.2006, 20:33
Contact:

Re: Magic Data and GP2 Physics

Post by V12-Power »

That sounds good. I can program in C and C++ (I guess only the easier things are in my range). Combined with a "graphic top" 8-[ it's a nice thing, I guess!
Visit my website: FK's sportscar project
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

V12-Power wrote:That sounds good. I can program in C and C++ (I guess only the easier things are in my range). Combined with a "graphic top" 8-[ it's a nice thing, I guess!
Cool!

The program already have a nice interface. My problem with C++ is converting values from type, to type (string to integer, integer to string, etc). In ruby is so easy to do that. But even if it's more tricky in C++, I think it will work out nicely. And maybe you can give me some tips. :)
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
V12-Power
GP2 Star
Posts: 1051
Joined: 19.09.2006, 20:33
Contact:

Re: Magic Data and GP2 Physics

Post by V12-Power »

Maybe the cast-operator can help you. Let's say:

string x;
int y;

y = (int) y;

I never used this, I only know it in theory. In the cases I had, the types were changed on their own. :?
Visit my website: FK's sportscar project
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

It didn't work here, but I can do it using the stringstream header. I guess I have everything now. I think the magic data program will be realeased next week. It will be able to import/export data to gp2, store data in text files, load those files and edit the data in the program interface. :)

Then I'll start the physics editor \:D/
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

More improvements today. The program now imports and exports data correctly. I just need to create the routines to save/load data files (so you can store data specific to each track/carset combination).

I guess this won't be hard. Just a few more days :)
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: Magic Data and GP2 Physics

Post by rremedio »

90% ready! :)

It imports and exports data, save and load files and you can edit data in the program interface. I just need to create a .ini file, so it can remmember the gp2.exe location and write some documentation about it. I think it will be released tomorow. \:D/
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
Post Reply