[REL] DRSShiftBeeps

Discussion in 'Other' started by Lazza, Nov 4, 2018.

Tags:
  1. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    DRSShiftBeeps plugin v4

    This is a simple plugin that plays beeping sounds to indicate DRS status, and optionally plays a sound to prompt you changing gears. It sounds a long beep to indicate DRS detection has been successful, and a shorter beep when you reach the DRS activation zone(s). The Shiftbeeps play at a configured percentage of your available revs, configurable across up to 10 'shift maps'.

    The DRS beeps (pending, available) are based on a Mercedes F1 video about DRS, where the beeps were audible. I matched the pitch and duration pretty closely. The shiftbeep I made much less piercing, it's noticeable when you tune in to it but hopefully not too annoying.

    Note: This uses FMOD dll files to help play the sounds. If another plugin is using FMOD my files might be older (or newer... maybe) which could cause issues, so please check before overwriting existing files.

    Installation

    Extract the attached zip file to your rF2 folder. Check your volume (not too loud!). Start rF2 (just to the main menu is fine) and a DRSShiftBeeps.ini file will be created in your player folder, and you should hear a long beep as rF2 starts.

    Options
    • The .ini file has a global/master section with volume control, an option to turn off the startup beep, and options to turn on the DRS and Shift beeps (so you can disable either here).
    • Then there's a DRSBeeps section with a separate volume control, and controls over the 'drs pending' beep, the drs available beep, and sounds to indicate (de)activation (very optional)
    • Next is ShiftBeeps, again a separate volume control, then a couple of parameters controlling how it repeats beeps if you don't change gear.
    • Finally, there's a ShiftMaps section where you can define up to 10 different shiftmaps, individually named, each with its own set of RPM percentages to beep at. The default ones are just simple Qual-Race-Fuel Saving maps, other uses might be for engines that produce peak power much lower in the rev range or similar.
    Controls

    This plugin uses some custom controls, they can be assigned in the game by going to Options -> Controls -> Devices. You'll see them above any remaining "Custom Plugin #4", "Custom Plugin #5", etc, entries.
    • ShiftMapNext / ShiftMapPrev : these ones allow you to scroll back and forth through whatever ShiftMaps you have defined in the INI file. You may have 2 or 3 sets you've defined for different car types or scenarios, you can move back and forth as desired instead of having to scroll through all of them to get back to where you started.
    • DRSSoundMode : This allows you to change, live, whether DRS and/or Shift beeps are played. If the car you're in doesn't do DRS you might want to disable DRS only; or it might be considered eligible for ShiftBeeps but you don't want to hear them, so you can disable them by cycling through to the appropriate option.
    When using these controls the current selection will be displayed in the Message Center in the game. To avoid repeated messages 'timing out' the plugin will append a <number> to the message if it was recently displayed, so that the game treats it as a new message and displays it again. The numbers themselves don't mean anything, and won't appear if a particular message hasn't been shown for 10 seconds. It's all a bit messy but I had to abandon an on-screen menu when rF2 dropped support for plugin drawing.

    Uninstalling

    Remove the DRSShiftBeeps dll files (in Bin32 and Bin64 Plugins folders), remove fmodex.dll and fmodex64.dll (as long as nothing else is using them), and delete rF2\PluginData\DRSShiftBeeps.


    Misc

    This is a quick extract of a plugin I've had for years for league use, separated from other features and vehicle restriction taken off (so it works with any mod). I'll probably add a little to it, bit limited with no plugin drawing options in rF2 at the moment though.

    Any issues let me know.

    Fixes:
    v4: startup crash
    v3: Printing trash after first stint.
     

    Attached Files:

    Last edited: Nov 11, 2018
    atomed, Pedro Gomes, badun and 10 others like this.
  2. Louis

    Louis Registered

    Joined:
    Dec 27, 2016
    Messages:
    1,379
    Likes Received:
    838
    Nice, thank you!
     
  3. vancstar

    vancstar Registered

    Joined:
    Oct 5, 2010
    Messages:
    141
    Likes Received:
    21
    A good feature to have thanks for releasing so we can use it on other vehicles it was always useful in that league ;) And with more cars having DRS it will be used more.
     
  4. Filip

    Filip Registered

    Joined:
    Feb 9, 2017
    Messages:
    929
    Likes Received:
    731
    In the latest official HUD I can't find any indicator showing when DRS is open. Lazza does your plugin address that issue too?
     
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    @Filip Sorry, no, only option there would be playing a sound the whole time which would be a little silly :) (though a childlike "vroooom" noise would be funny)

    There are many many addon HUDs that do show when you've activated it, check on the workshop. I use one of the SMG ones I think.
     
  6. Filip

    Filip Registered

    Joined:
    Feb 9, 2017
    Messages:
    929
    Likes Received:
    731
    I'll check 3rd party HUDs, thanks.
    Btw maybe easy solution would be to play short "open" sound when activating DRS and "close" sound when it deactivates?
    It probably isn't realistic but then again I'm pretty sure real drivers don't have the problem of knowing the status of their DRS.
     
  7. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    Yeah, that did occur to me pretty soon after I replied earlier. I'll take a look, definitely would only be an option though :)
     
    Filip likes this.
  8. badun

    badun Registered

    Joined:
    Nov 7, 2018
    Messages:
    14
    Likes Received:
    16
    excellent plugin, very useful....... can i suggest,if its possible, to make an on/off button shortcut, usable in the garage, motec recording has CTRL M, if you have never used that. I can just see the beeping getting annoying if you are driving a car without drs and have forgotten to turn off the plugin via the options........thanks
     
  9. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    @badun Yeah, I've used that plugin :p

    The DRS beeps shouldn't make any noise in a car without DRS, at least from what the plugin interface documentation says. If that's the case (does it still pick up DRS available?) I'll have to see if I can find any other info that would indicate it can't be used, and stay silent.

    I did notice on my hud that it showed DRS as available in a car that didn't actually do DRS, but I figured that was a car bug. If it always happens... nothing's ever easy... :rolleyes:
     
  10. badun

    badun Registered

    Joined:
    Nov 7, 2018
    Messages:
    14
    Likes Received:
    16
    Your right, it did beep on my initial test, but its not beeping in my number 1 car enduracers Lmp2. My bad sorry. Good work still
     
  11. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    Thanks for updating, I'll check some more cars and see what it does, I am a bit worried because I know there generally isn't a lot of useful info provided to plugins of this nature so I might be a bit stuck if it does beep unnecessarily, but I'll see what I can find.
     
  12. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    @badun Well, rather annoyingly, you're right. (annoying not because you're right, but because it's true :D)

    This is really a game bug, as HUDs that indicate DRS status also show drs is available (and activated, if you press the button) even when you're in a car that doesn't do DRS. I assumed that when the game said DRS is available in the vehicle telemetry it meant that the vehicle could use it.

    A key to disable the plugin isn't quite what I'm after, for reasons that will become obvious with the next update. I'll think about it.
     
  13. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    Ok, bit of a change up, it's now called DRSShiftBeeps to indicate that it now does (or can do) both DRS sounds and shift-prompt sounds.

    I need to rewrite the first post a bit and I'm leaving the house right now so might not get it done soon, but briefly:
    • There are now (slightly comical) noises for activating and deactivating the DRS.
    • I've added 'shift beeps', a tone to indicate you've reached a certain RPM point and should consider changing gears. These are expressed as a percentage of maximum RPM (so work across various cars) and are fairly configurable - the INI file explains it for now.
    • ShiftBeeps currently only work in certain circumstances: cars with at least 6 gears and a pit limiter fitted. It doesn't feel right to have this sort of thing on, say, a 70s F1 car, so for the moment and despite the fact HUDs can provide plenty of unrealistic info I've decided to check for those two things. It's aimed at modern open wheeler cars, like F1 which definitely use beeps for this purpose. I realise those criteria may need to change later.
    • There are now 3 custom controls you'll find in options -> controls -> devices. The first two allow you to scroll through the various ShiftMaps (in either direction), the third one cycles through the various sound options allowing you to (dis/en)able the DRS and Shift sounds separately.
    I'm pretty sure I can't detect whether a car should have DRS sounds, so that sound mode cycle is all I've got.


    If you have DRSBeeps please remove all its files before using the other one; they WILL exist side by side which will get a bit messy. Best to remove the original one completely.

    Cheers!
     
    badun likes this.
  14. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    1,488
    Likes Received:
    965
    Are you sure? :D

    Thank you for the plugin Lazza
     
  15. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    @lagg You're welcome, hope it's useful :)

    I've edited the first post for now, I'm going to play with this for a bit longer so it can save preferences (sounds on-off) for different cars, and probably also some in-game setting of shiftmaps which could be interesting, I'm also going to make ShiftMap allocation dynamic so basically any number can be defined.

    In the meantime, I did a little bit of testing but if anyone finds any bugs please let me know, I'll be actively fixing them in the near future.

    I suspect I'll have to drop the 'number of gears' detection down to 5 to fit in some more recent OW cars that might reasonably have something like shiftbeeps implemented, which might basically mean dropping that requirement altogether. That would then mean any car with a speed limiter would have them available, which isn't ideal but there's no surefire way to categorise cars so I'm probably a bit stuck. At least requiring the pit limiter rules out the proper classic cars, and people can just watch HUDs for shift help then anyway...
     
  16. badun

    badun Registered

    Joined:
    Nov 7, 2018
    Messages:
    14
    Likes Received:
    16
    loving it mate, well done :)
     
  17. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    Oops! :oops:

    Fixed a bug that made the plugin print trash every time you jumped in the car with shiftbeeps available, from the second stint onwards. Sorry about that, I should have caught it.
     
    badun likes this.
  18. M Lynn

    M Lynn Registered

    Joined:
    Aug 2, 2017
    Messages:
    44
    Likes Received:
    10
    Don't know if it's just me or something else that I have installed, but when I run rF2 with this plugin, it crashes straight back to the launcher. When I delete the .dll everything is fine. This didn't happen with v1 or v2, and yes, I did remove those versions completely.
     
  19. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,407
    Likes Received:
    3,098
    @M Lynn Thanks for reporting, I had some startup issues yesterday but I was also playing a lot with my screen configuration so I thought it might be related. It seemed intermittent, starting maybe 50% of the time, so this could be testing testing… if you get my drift :cool:

    Cheers!
     
  20. M Lynn

    M Lynn Registered

    Joined:
    Aug 2, 2017
    Messages:
    44
    Likes Received:
    10
    It seemed to happen all the time here. No worries mate ;)
     

Share This Page