Relative overlay, not sure which field. The bottom 2 didn't wrap around in this instance for some reason but basically the 4 column from the left is always "#null" in the stock cars. In other cars like the paid GT3/E cars there's no issue.
fixed the leaderboard relative section to hide fields when "#null" try this and tell me if it works. If it works I'll add it to the racedepartment resource
The nulls are no longer there which is great, however we've now lost the race position in the relative section.
Which car is it? Because it's not showing correct place in position gab section too. Could there be something missing in the car mod? Well you can edit the leaderboard dash and remove the code function behind "visible" properties for the fields you want to be shown.
https://steamcommunity.com/sharedfiles/filedetails/?id=2183577229 - this car; Stock Car 2018 but also with this mod on top: https://steamcommunity.com/sharedfiles/filedetails/?id=2183577229 I guess it's something to do with the car as the version from the top of the page does work for the paid GT/LMP content. I wouldn't have thought the car would matter to the relative position though?
I can try and test with the car tomorrow, but if it's too car specific it's hard to find a good solution. That's also why sometimes tyrecompound is blank, there are so many possibilities that's it's hard to code in.
@addrum I suspect, it's the car mod which is missing information. Carnumber is not available in correct format in the api. But when looking in the veh file, the number is present. Quite weird.
How strange. I'll report to the mod author and see what they say. Was there a way to hide the "#null" but keep the race position in the relative (first column)? See my last screenshot; only my race position is shown.
you can edit the leaderboard yourself. just edit those fields you want to be shown all the time and edit the green visible fx field, and remove the code in that.
I think so, have never experienced otherwise. But it has problem showing oil and water temps from most s397 cars because rf2 api dont expose those info from these cars.
So it should work in both the leaderboard (to show which tyres are my opponents using) and the main tyres widget right? I'll give it a try anyway
oh I thought you talked about temps and wear info etc. If its about the compound, its a bit different. Because there is (to my knowledge) not a standard for what is soft, medium, hard etc. So I have only "hard programmed" the most used ones. I think the "main tire info" shows correct but in leaderboard where it only shows one letter, its more limited. you are welcome to gather a long list of possible tires from the api with each car but its not as simple of saying super soft, hyper soft etc. some are named s8m and likewise so the have to be identified and grouped.
here is an example of the code from the leaderboard. Code: var CurrentPos = $prop('DataCorePlugin.GameData.NewData.Position'); var compoundText = ""; var CurrentName = drivername(1); if (CurrentPos <= 9){CurrentPos = '0' + CurrentPos} compoundText = $prop('GarySwallowDataPlugin.Leaderboard.Position' + CurrentPos + '.Telemetry.TyreCompound') if(compoundText == 'S7M (Soft)'){return 'S'}; if(compoundText == 'Slick N2'){return 'S'}; if(compoundText == 'SLICK CPM'){return 'S'}; if(compoundText == 'S8M (Medium)'){return 'M'}; if(compoundText == 'S9M (Hard)'){return 'H'}; if(compoundText == 'H5M (Inter)'){return 'I'}; if(compoundText == 'P2M (Rain)'){return 'W'}; if(compoundText == 'P9M (Rain)'){return 'W'}; if(compoundText == 'Rain N2'){return 'W'};
Good news... Im not a coder.... but found a way to check if part of the a word is in the name of the tirecompound. if it is then show the correct letter. @The Walker do you know any compounds on your mod cars that dont have one of these names below included? so the code for each "one letter" text in the leaderboard should be this: Code: var CurrentPos = $prop('DataCorePlugin.GameData.NewData.Position'); var compoundText = ""; var CurrentName = drivername(1); if (CurrentPos <= 9){CurrentPos = '0' + CurrentPos} compoundText = $prop('GarySwallowDataPlugin.Leaderboard.Position' + CurrentPos + '.Telemetry.TyreCompound') var compoundTextlow = lcase(compoundText); if(compoundTextlow.indexOf('qual') >= 0){return 'Q'}; if(compoundTextlow.indexOf('slick') >= 0){return 'S'}; if(compoundTextlow.indexOf('soft') >= 0){return 'S'}; if(compoundTextlow.indexOf('race') >= 0){return 'R'}; if(compoundTextlow.indexOf('road') >= 0){return 'R'}; if(compoundTextlow.indexOf('medium') >= 0){return 'M'}; if(compoundTextlow.indexOf('hard') >= 0){return 'H'}; if(compoundTextlow.indexOf('inter') >= 0){return 'I'}; if(compoundTextlow.indexOf('wet') >= 0){return 'W'}; if(compoundTextlow.indexOf('rain') >= 0){return 'W'};
any compounds you want included, that dont fit those words, and then what "one letter" should represent it?
I've pinched bits of these to make my own.... One thing I'm missing though.... Is there a way to display theoretical best lap? I can't get the best sectors to add up.
Just tried it... try this for theoretical best lap: Code: secondstotimespan( ( timespantoseconds([DataCorePlugin.GameData.NewData.Sector1BestTime])+ timespantoseconds([DataCorePlugin.GameData.NewData.Sector2BestTime])+ timespantoseconds([DataCorePlugin.GameData.NewData.Sector3BestTime]) ) ) This is for potentional lap based on current sector and best sector combined: Code: secondstotimespan( ( timespantoseconds([Sector1Time])+ timespantoseconds(isnull([Sector2Time],[DataCorePlugin.GameData.NewData.Sector2BestTime]))+ timespantoseconds([DataCorePlugin.GameData.NewData.Sector3BestTime]) ) )