need help setting number of laps in a race

Here you can present your WIP or new cars and/or stuff you made for GP2
Post Reply
User avatar
samsepi0l
GP2 Starter
Posts: 120
Joined: 01.03.2019, 01:39

need help setting number of laps in a race

Post by samsepi0l »

I am trying to correct the number of laps in the old RIO track i downloaded. In real life, they raced 61 laps here. I have found that this track works best in slot-5 (which is the original spain). I use GP2LAP so normally GP2 sets the number of laps correctly when i place a fan-made track into a slot, but for some reason it keeps coming up as 63 laps when I go into the game. I opened the track in track-editor, and went into the track info (gp2info) and changed the number of laps to 61, but when I raced there it still came up with 63. Is this listed somewhere else in the track file that I should be modifying it? I know I can just run gp2 without gp2lap and change the number of laps with gp2edit, but I shouldn't have to do it that way right?

User avatar
rremedio
GP2 Star
Posts: 1424
Joined: 14.01.2007, 15:05

Re: need help setting number of laps in a race

Post by rremedio »

There is a common bug in the track editor that makes it save the GP2INFO section twice. Then when it try to change it saves correctly but the "extra" section is not deleted and it creates confusion for GP2Lap.

It is easy to check by opening the .dat file in Notepad. You will see some repeated info.
trackeditorbug.png
To fix it, I open it in a hex editor, replace the duplicated parts with a bunch of "EF"
trackeditorbug2.png
trackeditorbug3.png
Then I save the track. Open it in the Track Editor, save it again to rebuild the GP2INFO section and fix checksums. Opening it again in the hex editor we can see that it fixed the GP2INFO section and now GP2Lap will correctly follow the number of laps set by you.
trackeditorbug4.png
"The Fox provides for himself. but God provides for the Lion" - The Marriage of Heaven and Hell by William Blake

Image

User avatar
samsepi0l
GP2 Starter
Posts: 120
Joined: 01.03.2019, 01:39

Re: need help setting number of laps in a race

Post by samsepi0l »

rremedio wrote:
04.09.2020, 14:20
There is a common bug in the track editor that makes it save the GP2INFO section twice. Then when it try to change it saves correctly but the "extra" section is not deleted and it creates confusion for GP2Lap.

It is easy to check by opening the .dat file in Notepad. You will see some repeated info.

To fix it, I open it in a hex editor, replace the duplicated parts with a bunch of "EF"

Then I save the track. Open it in the Track Editor, save it again to rebuild the GP2INFO section and fix checksums. Opening it again in the hex editor we can see that it fixed the GP2INFO section and now GP2Lap will correctly follow the number of laps set by you.
trackeditorbug4.png
Awesome solution! I will give it a shot. thank you!

User avatar
samsepi0l
GP2 Starter
Posts: 120
Joined: 01.03.2019, 01:39

Re: need help setting number of laps in a race

Post by samsepi0l »

I'm having some problems.

Here is the track in notepad:
Image

Here is the track in the hex editor.
Image

I'm not sure which addresses to change to EF. It looks like the number of laps is set to 61 (which is what i want), however when search for another instance of 63 (which is incorrect) I can't find it.

User avatar
rremedio
GP2 Star
Posts: 1424
Joined: 14.01.2007, 15:05

Re: need help setting number of laps in a race

Post by rremedio »

I can't really tell for sure and I couldn't reproduce the problem with that version of the track.

I would replace all the bytes marked in red in the following image with EF for the sake of testing. If it doesn't work, maybe you can attach that .dat file here. I'd like to check it.
trackeditorbug5.png
"The Fox provides for himself. but God provides for the Lion" - The Marriage of Heaven and Hell by William Blake

Image

User avatar
samsepi0l
GP2 Starter
Posts: 120
Joined: 01.03.2019, 01:39

Re: need help setting number of laps in a race

Post by samsepi0l »

rremedio wrote:
06.09.2020, 03:40
I can't really tell for sure and I couldn't reproduce the problem with that version of the track.
You know what, you won't believe it.... I re-loaded the track, went into gp2 with gp2lap and the problem was gone. 61 laps right like I changed it. Strange. Either I am getting old and foolish or this was just a strange thing. I can't explain it! But thank you for your suggestion, I did learn a little from it. :D

Post Reply