Hello all,
I just started so please be patient with me 🙂
I use iracing and I've just modified an existing dash to suits my needs.
Now I'd like to add info zones with text color condition and I'm completely lost, is there a tutorial for noobs like me, should I ask here or over at the iracing forums ?
For example I have created a text zone which is supposed to give me the player's best time in the race, so I used the code for the player's last best lap, changed last to best and of course it does not work ha ha ha.
What did I do wrong ?
Original working last lap
toshorttime(prop('iRacingExtraProperties.iRacing_DriverBehind_02_LastLapTime'),3,0,0)
My modified code which give nothing
toshorttime(prop('iRacingExtraProperties.iRacing_DriverBehind_02_BestLapTime'),3,0,0)
Then I'd like to display these infos in green if the value is lower than my last lap (or best lap) value and in red if it is the other way around so i have found this in the relative section which works but I cannot transpose it to the best lap.
if(isincreasing(4700,[IRacingExtraProperties.iRacing_DriverBehind_02_RelativeGapToPlayer]),0, (if(isdecreasing(4702,[IRacingExtraProperties.iRacing_DriverBehind_02_RelativeGapToPlayer]),2,1)))Â
What are the 4700 and 4702 values in this ?
Thanks for the help
Â
Hi,
These values are delays in ms for which the isincreasing function will return true.
They are staggered, as NCalc tends to brake when using the same delay multiple times on the same properties.
See the function syntax in the attached files.
The DriverAhead/Behind BestLapTime properties don't exist in the current version of the plugin.
I just added them.
I attached an updated version of the plugin
Close SimHub and overwrite the dll file in your SimHub install folder.
Most likely here: C:\Program Files (x86)\SimHub
Finally, for your color code you'll have to compare each driver best time to yours.
It will look something like this. Using NCalc:
if(
isnull(timespantoseconds([iRacingExtraProperties.iRacing_DriverAhead_00_BestLapTime]),0)
<
timespantoseconds([BestLapTime])
,'Green', 'Red')
Thanks a lot,
I didn't find the dll file, maybe you didn't attach it ?
I'll try that when i get it 🙂
Â
JC
Oops, here it is 😉
For real this time.
Zipped, as I think it doesn't like the .dll files.
Hello,
I could just try it now and I get an error about a plugin.
Here's an extract from the log, I have the full log if it helps
[2021-04-30 08:24:23,811] ERROR - An error occured while loading plugin settings control for iRacing Extra Properties: System.Exception: The component 'Romainrob.iRacingExtraProperties.SettingsControlDemo' does not have a resource identified by the URI '/Romainrob.iRacingExtraProperties;component/settingscontroldemo.xaml'.
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Romainrob.iRacingExtraProperties.SettingsControlDemo.InitializeComponent()
at Romainrob.iRacingExtraProperties.IRacingExtraProperties.GetWPFSettingsControl(PluginManager pluginManager)
at SimHubWPF.MainWindow.LoadPluginsControls()
Â
Thanks for the help
JC
@jch
Hi,
I believe this means you have a duplicate plugin dll in your SimHub folder.
Make sure you only have one and restart SimHub.
ok, got it running thanks a lot.
However the best lap for opponents still does not work.
I have this as formula for the guy behind me and it gives nothing
toshorttime(prop('iRacingExtraProperties.iRacing_DriverBehind_00_BestLapTime'),3,0,0)
My best lap is shown with a bestlap predefined format but I cant see the formula.
Also I have format issues, for the last lap and best lap I'd like to have only seconds and .fff shown, for example if the guy made a 02.01.247 I'd like to have only 01.247 displayed, so I changed the format to ss\.fff but still it shows me the complete data, can you tell me where I went wrong ?
Thanks Romain
@jch
Hi. It seems to work fine for me.
Make sure the dll you keept is the updated one, version 1.0.9 (look at this SimHub property: IRacingExtraProperties.PluginVersion)
Also make sure you have telemetry enabled for all the cars in game (see instruction in included pdf).
Then try this formula to get the desired format:
format([iRacingExtraProperties.iRacing_DriverBehind_00_BestLapTime],'ss"."fff')
The result will be empty until until a time is set.
Hello,
Got it running, I had the good DLL version 1.09, rebooted the computer, closed everything, restarted again and It ran....
I still can make the format work, here's what i did in the attachment.
Thanks
Â
Â
I meant this (see png)
But this would be the same:
Formula : [iRacingExtraProperties.iRacing_DriverBehind_00_BestLapTime]
Format: ss\.fff