Shared Memory API

Discussion in 'Community Workshop' started by Mikael Hermansson, Jun 7, 2015.

  1. SerVik

    SerVik New Member

    Joined:
    May 16, 2017
    Ratings:
    +1 / 0 / -0
    Thanks, majuh !
     
  2. Amir Meshulam

    Amir Meshulam New Member

    Joined:
    Jan 18, 2021
    Ratings:
    +2 / 0 / -0
    I can't see wind details in the SharedMemory Telemetry - is that because the games do not use wind or it's just not exposed?

    Thanks!
     
  3. Maarten

    Maarten Member

    Joined:
    Apr 15, 2019
    Ratings:
    +22 / 0 / -0
    There is no such thing as wind in raceroom
     
  4. ✠UK_SPAWN✠

    ✠UK_SPAWN✠ Member

    Joined:
    Apr 13, 2019
    Ratings:
    +11 / 0 / -0
    is there a way to get each player on the servers current incident points?
     
  5. OtterNas3

    OtterNas3 Well-Known Member

    Joined:
    Jan 9, 2018
    Ratings:
    +313 / 0 / -0
    No - For a good Reason ;)
     
  6. ✠UK_SPAWN✠

    ✠UK_SPAWN✠ Member

    Joined:
    Apr 13, 2019
    Ratings:
    +11 / 0 / -0
    yeah i guessed so. thanks
     
  7. axxis278

    axxis278 Well-Known Member

    Joined:
    Jan 29, 2015
    Ratings:
    +54 / 0 / -0
    actualy yes, on the dedi webpage you can see it, it's dispalyed live in front of each player, and over your mouse on the "incidents" you have the incidents details and points
     
    Last edited: Feb 20, 2021
  8. Jase

    Jase New Member

    Joined:
    Oct 15, 2019
    Ratings:
    +0 / 0 / -0
    Is there a way to find out ranking information per player ( current rating and safety ) from the shared memory API ? I've looked through r3e.cs ( ver 2.9 ) and browsed here but may be missing it or it not be available.
     
  9. CaptainCoffee

    CaptainCoffee Moderator Beta tester

    Joined:
    Oct 11, 2020
    Ratings:
    +74 / 0 / -0
    You can grab the userId from the API and then make a GET request to https://game.raceroom.com/multiplayer-rating/user/{userId}.json
    It returns a JSON object with the following data for example:
    https://game.raceroom.com/multiplayer-rating/user/4.json
    Code:
    {
    "UserId": 4,
    "Username": "jfchardon",
    "Fullname": "J-F Chardon",
    "Rating": 1709.681,
    "ActivityPoints": 2,
    "RacesCompleted": 91,
    "Reputation": 83.601,
    "Country": "LU",
    "Team": "Sector3 Studios AB"
    }
     
  10. Jase

    Jase New Member

    Joined:
    Oct 15, 2019
    Ratings:
    +0 / 0 / -0
    Excellent! thank you
     
  11. blgk

    blgk Member

    Joined:
    Aug 28, 2020
    Ratings:
    +6 / 0 / -0
    What's exacty the Grip value in Shared memory Api? (not the Wear value).
     
  12. Maarten

    Maarten Member

    Joined:
    Apr 15, 2019
    Ratings:
    +22 / 0 / -0
    r3e_float32 tire_grip[R3E_TIRE_INDEX_MAX]

    Multiply by 100 and you have percentage
     
  13. blgk

    blgk Member

    Joined:
    Aug 28, 2020
    Ratings:
    +6 / 0 / -0
    Yes, I know how to multiply.
    What I was asking was the exact meaning of this value. A 1 value means the tire has the max possible grip despite the Wear value, or you have to take in account the Grip value AND the Wear value? I was looking for this kind of info.
     
  14. Maarten

    Maarten Member

    Joined:
    Apr 15, 2019
    Ratings:
    +22 / 0 / -0
    The value of the grip means the exact grip the tire has on that moment, no need to cross reference other fields like wear. The simulator has done this for you.
     
    • Informative Informative x 1
  15. MarcoP

    MarcoP Active Member

    Joined:
    Aug 3, 2021
    Ratings:
    +26 / 0 / -0
    The data is not updated while in Pits, isn‘t it?

    i tried to create a fuel calculator, but currently I only found the avg fuel consumption when on track.
    I was hoping to be able to get the value from the engine mapping from the setup to recalculate the needed fuel for race one, race two and race three depending on this setting.

    Is there a way to achieve the data beeing updated in the pits?
     
  16. Maarten

    Maarten Member

    Joined:
    Apr 15, 2019
    Ratings:
    +22 / 0 / -0
    I've told an admin here the "Session Phase" is not being updated when in pits. Not sure if this has reached the r3e bugtracker.

    r3e-menu.png

    When you enter a session, the phase is "Unavailable", and when you go on track it goes to "Green", but when you go back into the pits, it stays green, so it's not being updated

    (record: "r3e_int32 session_phase;" in the table)
     
  17. MarcoP

    MarcoP Active Member

    Joined:
    Aug 3, 2021
    Ratings:
    +26 / 0 / -0
    Thanks for the Information.
    It would be pretty cool if the data would be updated in the pits as well.
     
  18. Vantskruv

    Vantskruv Member

    Joined:
    Oct 9, 2017
    Ratings:
    +23 / 0 / -0
    I know the API is only one-directional (hence reading data), but it would be nice if we could send commands to the sim aswell, especially for the pit-options i.e:
    map_buffer->set_pit_option(R3E_PIT_OPTION_CHANGE_FRONT_TIRES, R3_COMPOUND_SOFT)
    map_buffer->set_pit_option(R3E_PIT_OPTION_REFUEL, 45).

    It would be nice also to be able to read what data we have set in the pit-menu while it is closed.

    Also, I noticed that the flags for r3_pit_menu_option has been updated (but not on github), as fixing the bodywork has been added in the pit-menu.
     
  19. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,306 / 0 / -0
    The 'fix suspension' element has been removed from the array because of the new 'fix body' element. The devs are aware of this.

    When I want to know the pit menu state I have to press a key to briefly open then close the menu
     
  20. Vantskruv

    Vantskruv Member

    Joined:
    Oct 9, 2017
    Ratings:
    +23 / 0 / -0
    Actually, if I remember it correctly, the elements:

    R3E_PIT_MENU_FRONTWING = 6,
    R3E_PIT_MENU_REARWING = 7,
    R3E_PIT_MENU_SUSPENSION = 8,
    R3E_PIT_MENU_BUTTON_TOP = 9,

    should logically instead be:

    R3E_PIT_MENU_BODYWORK = 6,
    R3E_PIT_MENU_FRONT_AERO = 7,
    R3E_PIT_MENU_REAR_AERO = 8,
    R3E_PIT_MENU_SUSPENSION = 9,

    Where R3E_PIT_MENU_BUTTON_TOP is replaced by R3E_PIT_MENU_SUSPENSION.

    That is my take though (need to check my code again).

    Edit: Also, mrBelowski, I got the sendInput in C++ to work now looking at your code. Probably I forgot some flags in that function. :)