need help setting number of laps in a race
need help setting number of laps in a race
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?
Re: need help setting number of laps in a race
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.
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.
Re: need help setting number of laps in a race
Awesome solution! I will give it a shot. thank you!rremedio wrote: ↑04.09.2020, 14:20There 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
Re: need help setting number of laps in a race
I'm having some problems.
Here is the track in notepad:
Here is the track in the hex editor.
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.
Here is the track in notepad:
Here is the track in the hex editor.
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.
Re: need help setting number of laps in a race
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.
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.
Re: need help setting number of laps in a race
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.
Re: need help setting number of laps in a race
Thanks for this topic I´ve solved the same problem with another track.
Is there any way to use the hex editor to "recover" the tracks we can´t open anymore with the track editor? or at least if it´s possible to change the number of laps with the hex editor (obviously I´ve tried to change the number manually but doesn´t work).
Is there any way to use the hex editor to "recover" the tracks we can´t open anymore with the track editor? or at least if it´s possible to change the number of laps with the hex editor (obviously I´ve tried to change the number manually but doesn´t work).
Re: need help setting number of laps in a race
Most tracks I have problems opening with the latest version of TE work with this older version of the editor. If you make any changes with a hex editor, you need to fix the track checksum in order for GP2 to accept it. TE does that just by opening and saving a track, but if it doesn't open, you can try using GP2 Checksummer for DOS (from the Old GP2 Editors page) or another program that saves tracks with the correct checksim. I believe Ale's Pit&Lap Editor will do that, but I'm not sure.eky78 wrote: ↑24.03.2021, 15:01Thanks for this topic I´ve solved the same problem with another track.
Is there any way to use the hex editor to "recover" the tracks we can´t open anymore with the track editor? or at least if it´s possible to change the number of laps with the hex editor (obviously I´ve tried to change the number manually but doesn´t work).
Re: need help setting number of laps in a race
I had problems to use that program, but with your second suggestion it worked!
So once again, thanks for the help!
So once again, thanks for the help!
Re: need help setting number of laps in a race
The trick with the old version of track editor was also new to me, thanks for sharing