[REL] rF2 Shared Memory Tools for Developers

Discussion in 'Other' started by The Iron Wolf, Jan 19, 2017.

  1. Stefan_L_01

    Stefan_L_01 Registered

    Joined:
    Nov 18, 2012
    Messages:
    595
    Likes Received:
    383
    So you admit that rf2 is hacked by this tool?
     
  2. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    10,617
    Likes Received:
    5,422
    No, this tool is reading from rF2. Writing to rF2 is an entirely different thing.

    What are you trying to do?
     
    lagg and The Iron Wolf like this.
  3. The Iron Wolf

    The Iron Wolf Registered

    Joined:
    Feb 20, 2016
    Messages:
    992
    Likes Received:
    983
    How exactly ability to read a string that plugin reads makes rF2 more cheatable than it already is? You do understand what it reads exactly, and how, right? And, github is full of techniques like this.
     
    lagg likes this.
  4. Stefan_L_01

    Stefan_L_01 Registered

    Joined:
    Nov 18, 2012
    Messages:
    595
    Likes Received:
    383
    You consider acessing something that is not intended to be accessibly not a hack?
    How big is the difference from reading to writing as soon as you know a memory location?
     
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    10,617
    Likes Received:
    5,422
    You should ask yourself those questions, and find some answers, before you suggest something is a hack.
     
    Davvid, lagg and The Iron Wolf like this.
  6. MileSeven

    MileSeven Registered

    Joined:
    Apr 1, 2014
    Messages:
    432
    Likes Received:
    186
    Hi there - I'm just starting to use SimHub and noticed references to this excellent plug-in (already been using it indirectly with CrewChief, of course...)

    Are the data properties automatically exposed to SimHub or do I need to set something up? In the SimHub 'Available Properties', I can see a bunch of data under DataCorePlugin, but nothing explicitly mentioning the shared memory plugin and some data fields that I know @Lazza has used for Motec aren't there (or aren't obvious)...

    Thanks all!
     
  7. delphinho

    delphinho Registered

    Joined:
    Jun 4, 2021
    Messages:
    21
    Likes Received:
    9
    Hi everybody,

    I'm a developer and in the past months a friend and I have developed our own plugin using the standard Plugin API from rFactor. Now I have realized, that most of the stuff, we need to get from the game is already exposed by this plugin. I think I have understood how it works, and would like to migrate all our stuff to a tool using this.
    - Is there any up to date sample, how to access the data? I saw in the description there should be a sample in C# but I didn't manage to find it=
    - Am I right, that I don't need to code in C++ anymore, but could switch e.g. to Java?

    Looking forward to getting some feedback,

    kind regards from Germany :)
     
    Last edited: Jun 4, 2021
  8. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    2,903
    Likes Received:
    1,854
    delphinho likes this.
  9. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,003
    Likes Received:
    1,050
  10. delphinho

    delphinho Registered

    Joined:
    Jun 4, 2021
    Messages:
    21
    Likes Received:
    9
  11. delphinho

    delphinho Registered

    Joined:
    Jun 4, 2021
    Messages:
    21
    Likes Received:
    9
    Hi everybody,
    I'm currently trying to get the Plugin + Monitor running on the dedicated server. Unfortunately, the monitor always says "Not connected". When enabling the debugging, I get these messages:
    Code:
    11:06:05.306 TID:0x18f0  DirectMemoryReader::Initialize(29) : ERROR: Failed to resolve message array.
    11:06:05.306 TID:0x18f0  SharedMemoryPlugin::Startup(345) : ERROR: Failed to initialize DMA, disabling DMA.
    Does anyone have an idea, what I'm doing wrong? I have installed the redistributables and set the Variables to this:

    Code:
      "rFactor2SharedMemoryMapPlugin64.dll":{
        " Enabled":1,
        "DebugISIInternals":0,
        "DebugOutputLevel":5,
        "DebugOutputSource":1,
        "DedicatedServerMapGlobally":1,
        "EnableDirectMemoryAccess":1,
        "EnableHWControlInput":1,
        "EnableRulesControlInput":0,
        "EnableWeatherControlInput":0,
        "UnsubscribedBuffersMask":0
      }
    }
    As I am using an admin account on the server, I should also have the permission to "create global objects. Looking forward to hearing from you,

    Thank you and kind regards :)
     
  12. The Iron Wolf

    The Iron Wolf Registered

    Joined:
    Feb 20, 2016
    Messages:
    992
    Likes Received:
    983
    I have no idea about dedicated server setup but i can tell that "EnableDirectMemoryAccess": is meaningless for dedi server and should be set to 0. Connection to shared memory should not be affected by that though.

    Did you append PID to shared memory file names you are trying to read? You can use SysInternals Process Explorer to see what shared memory files plugin creates.
     
  13. delphinho

    delphinho Registered

    Joined:
    Jun 4, 2021
    Messages:
    21
    Likes Received:
    9
    Thanks a lot for your feedback. I only tried to get the rf2smmp_monitor running. So I did not try to read anywthing with my own code.
    So if I get this correctly, rf2smmp_monito cannot work with dedi server, as the PID cannot be added somewhere in the settings?

    Also, for which application do I need to look? Should it be the dedi application it self? I cannot see anything else that would suitable.
    upload_2021-12-3_22-2-11.png
     
  14. The Iron Wolf

    The Iron Wolf Registered

    Joined:
    Feb 20, 2016
    Messages:
    992
    Likes Received:
    983
    Correct - Monitor does not work with Dedicated server.
     
    delphinho likes this.
  15. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    127
    Likes Received:
    31
    Hello, i have a problem with this plugin.
    It doesn't seems to start properly.
    I start other plugins on my dedicated without issues but this one doesn't load at start.
    I already had this kind of issue with redistributables ...
    Are there any dependencies i can check ?
    Thanks.

    My dedicated is running on Windows Server 2019, and here is the JSON file part :
    Code:
      "rFactor2SharedMemoryMapPlugin64.dll":{
        " Enabled":1,
        "DebugISIInternals":0,
        "DebugOutputLevel":0,
        "DebugOutputSource":0,
        "DedicatedServerMapGlobally":1,
        "EnableDirectMemoryAccess":0,
        "EnableHWControlInput":1,
        "EnableRulesControlInput":0,
        "EnableWeatherControlInput":0,
        "UnsubscribedBuffersMask":0
      }
     
    Last edited: Jun 27, 2022
  16. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    127
    Likes Received:
    31
    Or are there any alternative to this plugin ? To make live timing working on r2la ...
     
  17. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    127
    Likes Received:
    31
    Problem solved : It needed to reinstall all VC redistributable in Support/Runtimes ...
    Thanks to Nibo for his help.
     
  18. FNDY

    FNDY Registered

    Joined:
    Jul 7, 2022
    Messages:
    3
    Likes Received:
    0
    pls help guys, i get this error after reinstalling windows server

    15:43:28.118 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:31.669 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:32.422 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:32.622 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:32.822 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:33.022 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:33.221 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:33.422 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:33.622 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:33.821 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:34.022 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:34.222 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:34.422 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:34.622 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:34.822 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:35.022 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:43:35.222 TID:0x0528 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
     
  19. FNDY

    FNDY Registered

    Joined:
    Jul 7, 2022
    Messages:
    3
    Likes Received:
    0
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(288) : Starting rFactor 2 Shared Memory Map Plugin 64bit Version: 3.7.14.2
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(290) : Configuration:
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(291) : DebugOutputLevel: 15
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(292) : DebugOutputSource: 1
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(293) : DebugISIInternals: 0
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(294) : DedicatedServerMapGlobally: 1
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(295) : EnableDirectMemoryAccess: 0
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(296) : UnsubscribedBuffersMask: 0
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(297) : EnableHWControlInput: 0
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(298) : EnableWeatherControlInput: 0
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::Startup(299) : EnableRulesControlInput: 0
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Telemetry buffer: 241680 bytes.
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Scoring buffer: 75312 bytes.
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Rules buffer: 45272 bytes.
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Multi Rules buffer: 39792 bytes.
    15:58:40.004 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Force Feedback buffer: 16 bytes.
    15:58:40.005 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Graphics buffer: 272 bytes.
    15:58:40.005 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Pit Info buffer: 340 bytes.
    15:58:40.005 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Weather buffer: 632 bytes.
    15:58:40.005 TID:0x25a0 SharedMemoryPlugin::InitMappedInputBuffer(861) : Size of the HWControl buffer: 116 bytes. HWControl input buffer supported layout version: '1'
    15:58:40.005 TID:0x25a0 SharedMemoryPlugin::InitMappedInputBuffer(861) : Size of the Weather control buffer: 628 bytes. Weather control input buffer supported layout version: '1'
    15:58:40.009 TID:0x25a0 SharedMemoryPlugin::InitMappedInputBuffer(861) : Size of the Rules control buffer: 45272 bytes. Rules control input buffer supported layout version: '1'
    15:58:40.009 TID:0x25a0 SharedMemoryPlugin::InitMappedInputBuffer(861) : Size of the Plugin control buffer: 20 bytes. Plugin control input buffer supported layout version: '1'
    15:58:40.009 TID:0x25a0 SharedMemoryPlugin::InitMappedBuffer(846) : Size of the Extended buffer: 10152 bytes.
    15:58:40.009 TID:0x25a0 SharedMemoryPlugin::Startup(367) : Files mapped successfully.
    15:58:57.345 TID:0x25a0 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:59:00.627 TID:0x25a0 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:59:01.381 TID:0x25a0 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:59:01.580 TID:0x25a0 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:59:01.781 TID:0x25a0 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:59:01.981 TID:0x25a0 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
    15:59:02.181 TID:0x25a0 SharedMemoryPlugin::UpdateScoring(897) : WARNING: Scoring update is ahead of telemetry.
     
  20. The Iron Wolf

    The Iron Wolf Registered

    Joined:
    Feb 20, 2016
    Messages:
    992
    Likes Received:
    983
    Do not worry about this particular message - it's a warning, it does not indicate any serious problem.
     
    ebeninca likes this.

Share This Page