NGPCarMenu icon indicating copy to clipboard operation
NGPCarMenu copied to clipboard

How to improve shift lights in SimHub to be compatible with NGP6 cars and a gear RPM limits?

Open mika-n opened this issue 3 years ago • 4 comments

The SimHub 7.4.14 or newer version now includes the improvement explained here as an official feature. The modded download link is no longer available because you can now use the official SimHub version. Thanks WotEver for including this feature into the official release of SimHub

This is a how-to post related to integration of SimHub and RBR. This post is not directly related to NGPCarMenu plugin itself.

Problem description: SimHub (https://www.simhubdash.com/) is all-around dashboard tool to display customized and versatile dashboards and game overlays. SimHub supports Richard Burns Rally also.

One of the supported features in SimHub is to display shift lights based on engine RPM (green - yellow - red line as the last "warning" to upshift a gear). However, this feature leaves much to desire with RBR because SimHub uses one "red line RPM" (=calculated based on percentage of max RPM per car) for all gears. Many of the rally cars in RBR have different recommended upshift RPM values per gear. Usually higher gears have lower recommended upshift RPM point than low gears.

For example Yaris WRC 2018 has following recommended upshift RPMs per gear: Gear1 upshift = 7320.0 Gear2 upshift = 7230.0 Gear3 upshift = 7170.0 Gear4 upshift = 7060.0 Gear5 upshift = 6960.0 Gear6 upshift = 8500.0 (MAX RPM, so nothing to upshift from the last gear)

Now, SimHub uses one "red line RPM" for this car and if you have set it as "15%" then SimHub would show "red upshift warning light" at 7225 RPM regardless of the current gear. Not good with RBR because you are most of the time upshifting too late or too early.

Solution: It would be much better to have SimHub red line RPM point to dynamically follow the current car, the current gear and NGP6 physics upshift data per gear. This post has a link to a modded version of SimHub-for-RBR plugin (ie. SimHub plugin, not RBR in-game plugin) which does this.

The modded version adjusts the max RPM at runtime based on the current gear and this way the red line RPM value is adjusted per gear in SimHub dashboards (yes, the mod adjusts max rpm and not directly the red line rpm because the current version of SimHub doesn't easily allow to modify red line RPM value directly at runtime. I'll try to talk with the author of SimHub and hopefully he sees the benefit of this also and provides better built-in SimHub support and solution).

How to use the mod?

  • You need to have SimHub 7.4.11 or 7.4.12 version installed (the mod DOES NOT work with older version of SimHub and I don't guarantee that it works with newer versions either. At the time of writing this v7.4.12 is the lastest version of SimHub). You can install new version of SimHub on top of your existing SimHub installation and it should keep all your existing settings.
  • Download the linked zip file (see the top of this post) and unzip it into the root folder of SimHub and let it overwrite the existing LFSReader.dll file while SimHub app is closed (for sure you may want to take a backup copy of the original file before overwriting the file).
  • Tweak "Red line", "Shift light 1" and "Shift light 2" car settings page in SimHub (see screenshot 1). -- Set "Red line (percent of max RPM)" value as 100% (yes, this should really be 100% because the max RPM is actually the red line RPM value in the modded SH plugin). -- Set both "shift light 1 & 2 offset (percent)" values something small value like 2-3%. If these values are too big then a yellow early-warning shift light is lit too early in SimHub.
  • Make sure "Car settings Overrides" does NOT set anything in MAX RPM and Red line options because the modded SimHub for RBR plugin takes care of these values at runtime dynamically using car specific NGP6 physics data in RBR (see screenshot 2).

image

image

mika-n avatar Nov 15 '21 21:11 mika-n

Hi, I'm currently trying to do something similar for G27 and G29 wheels (https://github.com/lennartb-/RBR2G29) and ran just about into the same general problem, that static RPM and redline values are not good enough. Could you share the code you used for the (now apparently obsolete?) SH plugin? Reading the LSP files seems to be the easy part, I'm not super deep into RBR development, but I assume I'd need to grab the physics file from the currently installed car slot. You have any pointers on how to do so, programmatically?

lennartb- avatar May 07 '23 09:05 lennartb-

SimHub has nowadays merged the code changes as part of the official release, so there is no need for the custom solution in this post.

Anyway, just to read the per car per gear RPM values is easy as parsing the LSP file as explained in the posts above.

  • LSP files are in physics\carSlotBasedFolder\common.lsp
  • ControlUnit/Gear2UpShift and Gear2DownShift and RPMLimit options (up/downshift per gear. RPMLimit is the max rpm)

physics\carSlotBasedFolder\ depends on the car slot (slotID -> physics\carFolder) used in RBR/RSF. 0 c_xsara 1 h_accent 2 mg_zr 3 m_lancer 4 p_206 5 s_i2003 6 t_coroll 7 s_i2000

The slotID is part of the UDP telemetry data.

mika-n avatar May 07 '23 11:05 mika-n

Anyway, very interesting project and i'm sure lots of g27/g29 users will be interested in it. Once you get it going then would you be interested to turn it into a "real" RBR plugin and then maybe give a permission to include the plugin in RSF? I can help you with converting it into a rbr plugin (which would work even without UDP telemetry being enabled).

mika-n avatar May 07 '23 11:05 mika-n

physics\carSlotBasedFolder\ depends on the car slot (slotID -> physics\carFolder) used in RBR/RSF. The slotID is part of the UDP telemetry data.

Great, thanks, that seems pretty straightforward.

Anyway, very interesting project and i'm sure lots of g27/g29 users will be interested in it. Once you get it going then would you be interested to turn it into a "real" RBR plugin and then maybe give a permission to include the plugin in RSF? I can help you with converting it into a rbr plugin (which would work even without UDP telemetry being enabled).

Of course, would be very happy to do so. My C++ skills are basically zero though, I only picked Rust because I wanted to get into it anyway and couldn't make it work with the official C# Logitech SDK.

lennartb- avatar May 07 '23 12:05 lennartb-