ACC Simhub Dynamic Leaderboards Plugin

Misc ACC Simhub Dynamic Leaderboards Plugin 1.4.3

Login or Register an account to download this content
Can you add track info to the plugin? To retrieve track info/temps, etc directly from ACC and not from simhub data? Great plugin as it is!
I'd like to create a custom dashboard using this, but adding info like track/ambient temp from simhub properties is unreliable. Thanks!
Could you elaborate what's the issue with data from Simhub properties? Have you tried the "rawdata" properties like "DataCorePlugin.GameRawData.Physics.RoadTemp" or "DataCorePlugin.GameRawData.Realtime.TrackTemp"?

Atm I don't think I can do anything better from this plugin than Simhub already does. I could reexport "Realtime.TrackTemp" from my connection to ACC but it would be the same as Simhub's "DataCorePlugin.GameRawData.Realtime.TrackTemp" property. And so I don't see the benefit of doing that. Further more that property is not that accurate to begin with. ACC round's it down, always (even if the actual temp is 24.9999). So the "DataCorePlugin.GameRawData.Physics.RoadTemp" should probably preferred and that I could only reexport that exact Simhub property.
 
Last edited:
Could you elaborate what's the issue with data from Simhub properties? Have you tried the "rawdata" properties like "DataCorePlugin.GameRawData.Physics.RoadTemp" or "DataCorePlugin.GameRawData.Realtime.TrackTemp"?

Atm I don't think I can do anything better from this plugin than Simhub already does. I could reexport "Realtime.TrackTemp" from my connection to ACC but it would be the same as Simhub's "DataCorePlugin.GameRawData.Realtime.TrackTemp" property. And so I don't see the benefit of doing that. Further more that property is not that accurate to begin with. ACC round's it down, always (even if the actual temp is 24.9999). So the "DataCorePlugin.GameRawData.Physics.RoadTemp" should probably preferred and that I could only reexport that exact Simhub property.
Thanks for your reply. I guess my complaint was that sometimes Simhub doesn't report the temps at all, making them 0C, 0C, and I was wondering if your plugin could be a way to work around it. Good stuff though, I'm enjoying your plugin. I may even publish a leaderboard based on it. Thanks!
 
... I guess my complaint was that sometimes Simhub doesn't report the temps at all, making them 0C, 0C, ...
Ah, that is true. The ACC's shared memory data only shows the temps when the player is on the track and at all other times it reports 0C. This is what Simhub's `DataCorePlugin.GameData.RoadTemperature` and `..AirTemperature` report. However the broadcasting data does provide the temps at all times (although they are rounded down as mentioned before). So following little javascript provides temps at all times.

JavaScript:
// Air temp
var t = $prop("DataCorePlugin.GameData.AirTemperature") // or $prop("DataCorePlugin.GameRawData.Physics.AirTemp")
if (t == 0) {
    return $prop("DataCorePlugin.GameRawData.Realtime.AmbientTemp")            
} else {
    return t
}
JavaScript:
// Track temp
var t = $prop("DataCorePlugin.GameData.RoadTemperature") // or $prop("DataCorePlugin.GameRawData.Physics.RoadTemp")
if (t == 0) {
    return $prop("DataCorePlugin.GameRawData.Realtime.TrackTemp")            
} else {
    return t
}
 
Ah, that is true. The ACC's shared memory data only shows the temps when the player is on the track and at all other times it reports 0C. This is what Simhub's `DataCorePlugin.GameData.RoadTemperature` and `..AirTemperature` report. However the broadcasting data does provide the temps at all times (although they are rounded down as mentioned before). So following little javascript provides temps at all times.

JavaScript:
// Air temp
var t = $prop("DataCorePlugin.GameData.AirTemperature") // or $prop("DataCorePlugin.GameRawData.Physics.AirTemp")
if (t == 0) {
    return $prop("DataCorePlugin.GameRawData.Realtime.AmbientTemp")           
} else {
    return t
}
JavaScript:
// Track temp
var t = $prop("DataCorePlugin.GameData.RoadTemperature") // or $prop("DataCorePlugin.GameRawData.Physics.RoadTemp")
if (t == 0) {
    return $prop("DataCorePlugin.GameRawData.Realtime.TrackTemp")           
} else {
    return t
}
I open up a request for Simhub and in the next version (so probably 8.4.4) the "AirTemperature" and "RoadTemperature" properties should behave like the javascript I provided.
 
Hey @nsss thank you for assisting me in my prior inquiry. I have another question. I would like to place some permanent data above the layer containing the leaderboard (basically a widget). For example, Gap to car ahead. I haven't been able to find the correct property syntax for this. I mean, it works if it is part of the leaderboard using the index for each car, but what I am trying to do is create a widget to always show me the gap of the car ahead of MY car.

ie. [DynLeaderboardsPlugin.Dynamic.FocusedPosInCurrentLeaderboard.Gap.ToAhead.Overall]

but i get a null

Just for added context, I'm using your plugin to create so far, 3 dynamic dashboards. 1 shows the entire current leaderboard, I nailed that on :) ; the second one is for qualifying and the third one is for the race.
 
Just for added context, I'm using your plugin to create so far, 3 dynamic dashboards. 1 shows the entire current leaderboard, I nailed that on :) ; the second one is for qualifying and the third one is for the race.
I'm glad you find it useful :)

Hey @nsss thank you for assisting me in my prior inquiry. I have another question. I would like to place some permanent data above the layer containing the leaderboard (basically a widget). For example, Gap to car ahead. I haven't been able to find the correct property syntax for this. I mean, it works if it is part of the leaderboard using the index for each car, but what I am trying to do is create a widget to always show me the gap of the car ahead of MY car.

ie. [DynLeaderboardsPlugin.Dynamic.FocusedPosInCurrentLeaderboard.Gap.ToAhead.Overall]

but i get a null
I believe this section in the wiki describes what you want, that is how to get the gap (and other properties) to the car ahead: https://github.com/kaiusl/KLPlugins...s-of-the-cars-right-aheadbehind-of-the-player.

So full code would be
JavaScript:
var idx = $prop('DynLeaderboardsPlugin.Dynamic.FocusedPosInCurrentLeaderboard') + 1
var ahead = $prop('DynLeaderboardsPlugin.Dynamic.' + idx + '.Gap.Dynamic.ToAhead')

if (ahead == null) { return '' }
// No gap can realistically be 50000 seconds without being more than a lap
// and you cannot realistically be more than 50000 laps behind to break following
if (ahead > 50000) { return format(ahead - 100000, '0', true) + 'L' }
return format(ahead, '0.00', true)

If this is not what you expected/wanted let me know.
 
I'm glad you find it useful :)


I believe this section in the wiki describes what you want, that is how to get the gap (and other properties) to the car ahead: https://github.com/kaiusl/KLPlugins...s-of-the-cars-right-aheadbehind-of-the-player.

So full code would be
JavaScript:
var idx = $prop('DynLeaderboardsPlugin.Dynamic.FocusedPosInCurrentLeaderboard') + 1
var ahead = $prop('DynLeaderboardsPlugin.Dynamic.' + idx + '.Gap.Dynamic.ToAhead')

if (ahead == null) { return '' }
// No gap can realistically be 50000 seconds without being more than a lap
// and you cannot realistically be more than 50000 laps behind to break following
if (ahead > 50000) { return format(ahead - 100000, '0', true) + 'L' }
return format(ahead, '0.00', true)

If this is not what you expected/wanted let me know.
Oh, I see, the code makes sense. I think that's what I need. I'll give it a try as soon as I can. Again, I'm grateful for your help.
 
Hi, newby here, I am testing the AccDynLeaderboard dash, is it possible to extend to 25 cars? Thanks
Flavio
Sure is. You'll need to modify couple of plugin settings and make the dashboard bigger.

To be more precise you'll need to increase the number of cars exported under "Dynamic leaderboards" tab. Then edit the dashboard size so that more rows will fit and increase the repetition count on the first row of the leaderboard.
 
nsss updated ACC Simhub Dynamic Leaderboards Plugin with a new update entry:

v1.4.0

Fixed​

  • Relative leaderboards showing wrong car for one update after a position change.

Added​

  • New Cup, RelativeCup, PartialRelativeCup leaderboard types.
    These are effectively Class, RelativeClass and PartialRelativeClass except they
    also filter by the focused car's cup category (Pro/Overall, Pro-Am, Am, National).
  • Few new properties related to new leaderboard types:
    • Laps.Best.Delta.ToCupBest...

Read the rest of this update entry...
 
I'm not smart in creating these things but I was able to get what I needed (also taking code from another dashboard). As you can see from the image in the third column for gain/loss of positions there is the value "-0" for missing cars. Is there any way to hide it?
DynOverall2.png
 
I'm not smart in creating these things but I was able to get what I needed (also taking code from another dashboard). As you can see from the image in the third column for gain/loss of positions there is the value "-0" for missing cars. Is there any way to hide it?View attachment 732082
Most of the properties are `null` for the cars that are missing. So you can check for them to determine if car is missing or not.

To hide some text field you can set it's "Visible" property to
JavaScript:
if (
    isnull(prop('DynLeaderboardsPlugin.Dynamic.' + repeatindex() + '.Car.Number')),
    0,
    1
)
 
No positions showing on the new Nordschleife dlc, position is showing as -1, but okay on other tracks. I attach two screenshots showing this on my adapted Dynamic Leaderboard.

Will the plugin require updating?

Thanks in advance
Terry
 

Attachments

  • 24hNords.jpg
    24hNords.jpg
    181 KB · Views: 13
  • origNurbs.jpg
    origNurbs.jpg
    110.6 KB · Views: 11
No positions showing on the new Nordschleife dlc, position is showing as -1, but okay on other tracks. I attach two screenshots showing this on my adapted Dynamic Leaderboard.

Will the plugin require updating?

Thanks in advance
Terry
This appears to be due to a bug in ACC (reported in their forums). The issue is that the broadcasting server doesn't send track data for N24. However this plugin needs that data for an update and when it's not present we skip the update and wait for track data.

I think there is a relatively simple workaround but I'll see about it tomorrow (hopefully).

EDIT: should be fixed in 1.4.1
 
Last edited:

Latest News

What's needed for simracing in 2024?

  • More games, period

  • Better graphics/visuals

  • Advanced physics and handling

  • More cars and tracks

  • AI improvements

  • AI engineering

  • Cross-platform play

  • New game Modes

  • Other, post your idea


Results are only viewable after voting.
Back
Top