mika-n / NGPCarMenu

Custom "Select Car in-game menu" for Richard Burns Rally (RBR v1.02 SSE) game. The plugin supports custom car preview images (the real RBR 3D rendered custom car images), car specs from NGP physics model (engine, transmission, FIA category, year, etc), longer car menu names (up to 30 chars in a menu) and even more chars in the car specs window. New car preview images are created through in-game menu of the plugin.
37 stars 4 forks source link

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

Open mika-n opened 2 years ago

mika-n commented 2 years ago

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?

image

image

lennartb- commented 1 year ago

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?

mika-n commented 1 year ago

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.

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 commented 1 year ago

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).

lennartb- commented 1 year ago

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.