Maximum laps limit?

Posted by AUS_Doug 
Maximum laps limit?
Date: July 03, 2014 01:47AM
Posted by: AUS_Doug
Hi all,
The other day, I downloaded an Indy Oval track from here and wanted to run 200 laps.

So I set it up in TSM's Magic Editor, went to drive....and as soon as the guy on pole crossed the S/F line, the race was over and he'd averaged about 48000 Km/h.
(Showing that - if my maths is right - the game thinks he finished all 500 Miles (800 Km) in about a second)

So is there a hardcoded limit to the amount of laps that can be run - or a limit to the distance that can be covered in a race - present in GP4?
(And can this be gotten around, maybe by that god we call René Smit?)

As a test I dialed it down to 113, and everything is fine so far.

Cheers,
AUS_Doug.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator



Edited 1 time(s). Last edit at 07/03/2014 08:32AM by AUS_Doug.
Re: Maximum laps limit?
Date: July 03, 2014 11:15AM
Posted by: Atticus.
It's 126, I believe. My Brands Hatch Indy track uses that many and I had the same effect as you've had when I increased it above this value.
Re: Maximum laps limit?
Date: July 03, 2014 01:05PM
Posted by: AUS_Doug
Alright, good to know.

And I can't believe I didn't know that someone had done a Brands Hatch!
Downloading now.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
Re: Maximum laps limit?
Date: July 03, 2014 03:59PM
Posted by: Atticus.
Thanks, I hope you'll like it. :-)
Re: Maximum laps limit?
Date: July 03, 2014 06:14PM
Posted by: TGF1DRIVER
Does the 126 laps limit count for editing the lap number with GP4Builder as well? :-O
Re: Maximum laps limit?
Date: July 03, 2014 06:21PM
Posted by: Atticus.
Re: Maximum laps limit?
Date: July 04, 2014 07:14PM
Posted by: SDI
I've been trying to increase it, with moderate success. Not everything is working yet, but you can experiment with it by adding ExtendMaxRaceLaps=1 under [Misc] in gpxtrack.ini. This will increase the maximum to 254 laps. Things not working yet are: some table that holds the current lap for each car and keeping track of the number of laps done for each tyre set.

René Smit, Independent Software Developer.
Download my GPx tools here.
Re: Maximum laps limit?
Date: July 05, 2014 12:37AM
Posted by: Atticus.
Wow, thanks René, I didn't know about this before. :-)
Re: Maximum laps limit?
Date: July 05, 2014 01:55AM
Posted by: AUS_Doug
Re: Maximum laps limit?
Date: July 05, 2014 02:11PM
Posted by: SDI
Yes, it is (was) a hidden feature, since it's not finished yet. Use at your own risk, don't expect it to work properly :)

René Smit, Independent Software Developer.
Download my GPx tools here.
Re: Maximum laps limit?
Date: July 05, 2014 07:55PM
Posted by: Atticus.
OK, will do. :-)
Re: Maximum laps limit?
Date: July 06, 2014 11:26AM
Posted by: EricMoinet
254 laps ? That's nice, we'll can do endurance races at accurate length with GPx by now. Thanks a lot René. (Y)



Re: Maximum laps limit?
Date: July 07, 2014 03:23AM
Posted by: Meteoro405
Ha, start (before line) and finish race crossing line! 500 mts of race :-O



Mods & Tracks for GP4 - [www.mediafire.com]


Keeping alive the GP4
Re: Maximum laps limit?
Date: July 07, 2014 07:05PM
Posted by: EricMoinet
Maybe because the drivers weren't born at that time ;)


Nice mod btw



Re: Maximum laps limit?
Date: July 11, 2014 11:50AM
Posted by: AUS_Doug
Hi all,
Today I got my first chance to have a run around Indianapolis after setting the laps to 200, following René's instructions.

Unfortunately, the AI keep running themselves out of fuel; Their 'Status' will change to 'Pit Call' when they start getting low, but they'll turn it off about 3/4 of the way around the track.

Has anyone else had this problem and, if so, René is this a side effect of one of the problems you mentioned?

Or is there something wrong on my end?

I can upload the Magic File that I'm using, which is unchanged from the original except for 'Track Grip', Race Laps, the default AI setups, the pitstop strategy section and some of the possible car failures.

Cheers,
AUS_Doug.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
Re: Maximum laps limit?
Date: July 11, 2014 03:15PM
Posted by: Meteoro405
EricMoinet escribió:
-------------------------------------------------------
> Maybe because the drivers weren't born at that
> time ;)
>
>
> Nice mod btw


Ha ha! ;)

Cheers (B)

Mods & Tracks for GP4 - [www.mediafire.com]


Keeping alive the GP4
Re: Maximum laps limit?
Date: July 13, 2014 06:22PM
Posted by: SDI
Yes, must be a side effect.

René Smit, Independent Software Developer.
Download my GPx tools here.
Re: Maximum laps limit?
Date: June 14, 2015 02:07PM
Posted by: SDI
I've managed to fix the CC not doing pitstops when the race is 18 laps or more! And I fixed a whole bunch of other potential issues with 254 race laps. Going higher than 254 is virtually impossible though.

The only problems remaining are related to the fuel load and the lap chart in the post-race menu.

The fuel indicator on the wheel only goes to 99. When the car has more fuel it is cut off to 99 although the digit behind the decimal keeps going from .9 to .0. I've tried to turn the F into a 1 (or 2) but it didn't work out. I can work around this in several ways, although none of them is ideal:

1) Keep the digit behind the decimal equal to 9 when the the fuel load is cut off.
2) Not cutting it off to 99 but skipping the first digit (divide by 100 and use the remainder). So 123.4 would show "F 23.4". You wouldn't know if it's 23.4, 123.4 or 223.4 except for 'feeling' the weight while driving, but at least you see some progress.
3) Divide by 10, in which case the load will go down 0.1 instead of 1.0 each lap. So 123.4 will show "F 12.3" (imagine there's no decimal point). It can be done only for 100 fuel laps or more to keep the precision for low fuel load, but that could be confusing.
4) Any other ideas?

(Edit: solved now) Another problem is that you cannot select more than 98 fuel laps during a pitstop. Before I try to fix this, I want to know if this is actually a requirement? For endurance racing it might not be needed, but for very short tracks it might...

(Edit: also solved now) The final known problem is that GP4 crashes when selecting the lap chart after a 254 lap race. I think it runs out of space or something while trying to render 254 laps in one chart. Not sure if anyone uses this, but it would be nasty if you press it by accident during a championship before saving your game.

René Smit, Independent Software Developer.
Download my GPx tools here.



Edited 2 time(s). Last edit at 06/14/2015 08:42PM by SDI.
Re: Maximum laps limit?
Date: June 14, 2015 05:51PM
Posted by: Meteoro405
A panel can know the amount of fuel... and chart lap... caution ;)

The limit of 254 laps, which is determined? Memory o GP4 code?



Mods & Tracks for GP4 - [www.mediafire.com]


Keeping alive the GP4
Re: Maximum laps limit?
Date: June 14, 2015 06:09PM
Posted by: SDI
Yes indeed, GPxCInfo can show it too, so it's probably not that important to fix.

> The limit of 254 laps, which is determined? Memory o GP4 code?

The limit is caused by GP4 code, which uses 8 bits to store it. All access to it was mostly signed, so only 7 bits were used (127 laps). Also, a 99 laps limit was applied at several places. My patch makes all access unsigned and removes the other limits too.

René Smit, Independent Software Developer.
Download my GPx tools here.
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