[REL] rF2 Shared Memory Tools for Developers

Your case is very, very strange.
If you:
  • Downloaded the DLL again, just in case the file is corrupted.
  • Installed all the VC runtimes (32 and 64 bits independently of your system type).
  • Checked the rF2 files integrity.
  • Have the permits to access the DLL.
  • Have a new rF2\UserData fólder.
  • And the Antivirus isn't locking the DLL.
I've no more ideas, sorry
that's why i'm going crazy :(
 
Afaik i should have done everything to "fix" the issue (even updated the vc++ to latest version thanks to support from rf2 discord, but nothing happened),

Do you mean the 2015, 2017, 2019, 2022 runtime package? (x86 and x64 from here) (note that these aren't backwards compatible; if a program needs 2012 runtimes, the 2015-2022 package won't help)

And just to be doubly sure, you installed all 4 of the runtimes included with rF2 (x86 and x64).

2 things:
  • Run each of those runtimes packages again and uninstall each one. Reboot as necessary. Reboot afterwards. Then run them all again and install them.
  • Share your complete trace file in case we can spot anything else.
 
Have you tried to run Steam as Admin?
Not much faith, but...
did it and still nothing :(


Do you mean the 2015, 2017, 2019, 2022 runtime package? (x86 and x64 from here) (note that these aren't backwards compatible; if a program needs 2012 runtimes, the 2015-2022 package won't help)

And just to be doubly sure, you installed all 4 of the runtimes included with rF2 (x86 and x64).

2 things:
  • Run each of those runtimes packages again and uninstall each one. Reboot as necessary. Reboot afterwards. Then run them all again and install them.
  • Share your complete trace file in case we can spot anything else.
tried everything that you said but nothing is moving, i'll try uninstall and reinstall the game (last hope)
here's the last trace
massive thanks for the time, appreciate it
 

Attachments

did it and still nothing :(



tried everything that you said but nothing is moving, i'll try uninstall and reinstall the game (last hope)
here's the last trace
massive thanks for the time, appreciate it

I don't think a reinstall will help, there must be something dll or runtime related that is missing. Perhaps a tool like dependency walker will be useful.
 
I don't think a reinstall will help, there must be something dll or runtime related that is missing. Perhaps a tool like dependency walker will be useful.
downloaded it but don't actually know how does it work :oops: should i just open the dll with it (sharedmemory) or do something else? what am i looking for?
sorry for that
 
Last edited:
downloaded it but don't actually know how does it work :oops: should i just open the dll with it (sharedmemory) or do something else? what am i looking for?
sorry for that

Off the top of my head I wasn't sure myself. Judging by the top layer after opening up the dll it really should be only msvcr120 required (that's the 2013 runtimes, one of those included with rF2). I don't know why your system isn't running it :confused:

The only curious thing I'd say is that all the plugins you're using that I have (everything except FanaLEDs) is using msvcr110, not 120. If the sharedmemory is the only one using the 2013 and it's the only one you can't run, that would suggest a 2013 runtimes issue.
 
Off the top of my head I wasn't sure myself. Judging by the top layer after opening up the dll it really should be only msvcr120 required (that's the 2013 runtimes, one of those included with rF2). I don't know why your system isn't running it :confused:

The only curious thing I'd say is that all the plugins you're using that I have (everything except FanaLEDs) is using msvcr110, not 120. If the sharedmemory is the only one using the 2013 and it's the only one you can't run, that would suggest a 2013 runtimes issue.
FIXED THANK GOD

Instead of repairing/uninstalling and reinstalling the 2013 runtimes from the rf2 support folder i've downloaded them from HERE and repaired; it took a little bit more time than the rf2 folder ones to get installed but yes, worked.

Massive thanks, super thanks to you @Lazza , i owe you guys a beer :)
 
Hello ! I encounter an issue regarding the use of CC with rF2. I used to be on Win 7 and it worked perfectly fine. I upgraded my PC this weekend and had to install Win 10 but now, despite the app working when I use a button press on the controller to talk to it, whenever the window isn't in focus, the button press doesn't work anymore. Which means I can't interact with CC when playing the game, is there any fix for this issue, please ?
 
Minor update of the plugin (using InternalsPlugin.hpp#8 which was released today [EDIT: plus "Lazza's fix"]) here: https://www.mediafire.com/file/s6ojcr9zrs6q9ls/rf2_sm_tools_3.7.15.1.zip/file

These battery/electric motor entries are the only things that have been added but nothing is making use of them yet so the recommendation is that only developers of programs that use the plugin should download this new version.
Code:
  double mDeltaBest;                       // (omitted in error by S397)

  double mBatteryChargeFraction; // Battery charge as fraction [0.0-1.0]

  // electric boost motor
  double mElectricBoostMotorTorque; // current torque of boost motor (can be negative when in regenerating mode)
  double mElectricBoostMotorRPM; // current rpm of boost motor
  double mElectricBoostMotorTemperature; // current temperature of boost motor
  double mElectricBoostWaterTemperature; // current water temperature of boost motor cooler if present (0 otherwise)
  unsigned char mElectricBoostMotorState; // 0=unavailable 1=inactive, 2=propulsion, 3=regeneration


At some point Crew Chief will be updated to install this instead of the current one but until then if you do install the new version it will try to overwrite with the current plugin (it works perfectly well with the new one it just nags you to install the one it knows and loves).

Crew Chief has been updated to install this version.
 
Last edited:
Hi all.
Thank you for this dll.
I've a couple of questions
Taking a look to the thread, i've understood that, in order to make the dll work on a dedicated server is necessary to activate the "DedicatedServerMapGlobally" in the CustomPluginVariables.JSON, is it correct?
Second question.
If there are several dedicated servers running, how do i identify the server i want to work with?
 
Last edited:
Minor update of the plugin (using InternalsPlugin.hpp#8 which was released today) here: https://www.mediafire.com/file/45kvt7p3lb23gww/rf2_sm_tools_3.7.15.0.zip/file
Thank you very much for the new version update.

I have just managed to add and test those new API in pyRfactor2SharedMemory with BTCC(DLC), and notice a few thing:
1. mBatteryChargeFraction always returns 0.0, as if this data is encrypted or something.
2. mElectricBoostMotorTorque, mElectricBoostMotorRPM, mElectricBoostMotorTemperature, mElectricBoostWaterTemperature all seems working with correct readings.
3. mElectricBoostMotorState would return a series of none sensible values as following pic shows, which doesn't match the data description. I wonder if this is a game bug (as I don't see any issue with the code from API or plugin) or something else?
upload_2023-3-20_14-44-5.png


Thanks for any help!
 
Thank you very much for the new version update.

I have just managed to add and test those new API in pyRfactor2SharedMemory with BTCC(DLC), and notice a few thing:
1. mBatteryChargeFraction always returns 0.0, as if this data is encrypted or something.
2. mElectricBoostMotorTorque, mElectricBoostMotorRPM, mElectricBoostMotorTemperature, mElectricBoostWaterTemperature all seems working with correct readings.
3. mElectricBoostMotorState would return a series of none sensible values as following pic shows, which doesn't match the data description. I wonder if this is a game bug (as I don't see any issue with the code from API or plugin) or something else?
View attachment 51523

Thanks for any help!

I tried running the example plugin v8, which writes the data to a .txt file. I found similar issues:
- mBatteryChargeFraction returns 0 all the time as well
- mElectricBoostMotorState: returns weird values, like:
3.16e-322
7.91e-323
1.77e-321
- mElectricMotorTemperature has a range of 0° (P2P off) to about 7000° (P2P active), not sure this is realistic.
- mElectricBoostWaterTemperture reports 0° (P2P off), around 50 when P2P is active, starting at 0 doesn't seem realistic.

Anyway, the issue is not with Shared Memory Plugin it seems.
 
- mElectricBoostMotorState: returns weird values, like:
3.16e-322
7.91e-323
1.77e-321

The motor state is an unsigned char, and the example plugin outputs it as text by using its values as an array index. It may not be outputting correct values (from a very quick test I think I was getting similar to those reported earlier in this thread) but you're doing something wrong with it if you're getting those numbers.
 
The motor state is an unsigned char, and the example plugin outputs it as text by using its values as an array index. It may not be outputting correct values (from a very quick test I think I was getting similar to those reported earlier in this thread) but you're doing something wrong with it if you're getting those numbers.

Ah my bad. The example plugin as it was caused rF2 to crash, it worked when skipping BoostMotorState, so I tried something different.
 
Ah my bad. The example plugin as it was caused rF2 to crash, it worked when skipping BoostMotorState, so I tried something different.

Yeah, it's probably crashing due to trying to reference a 4-element array using values like 80, 240, etc. Just guessing though.
 
Hello. I need some help. I'm trying to make a program that gets the vehicles of the session.
It works in the client pc but i want to run it in the server.
I can't get it to connect in the server.
I've configured the CustomPluginVariables.JSON as this

Code:
 "rFactor2SharedMemoryMapPlugin64.dll":{
    " Enabled":1,
    "DebugISIInternals":1,
    "DebugOutputLevel":1,
    "DebugOutputSource":1,
    "DedicatedServerMapGlobally":1,
    "EnableDirectMemoryAccess":0,
    "EnableHWControlInput":1,
    "EnableRulesControlInput":1,
    "EnableWeatherControlInput":1,
    "UnsubscribedBuffersMask":0
  }
Do you know what could be wrong?

Thank you
 
Back
Top