Open frey123 opened 4 years ago
Hi Frey,
I don't think the dedicated server has a shared memory but The Iron Wolf can give you a better answer. It's not something I've ever thought about.
Cheers, Merry Xmas to you too, -- Tony
Hi @TonyWhitley,
ok I found out the following:
Shared resources use the following naming convention:
- $rFactor2SMMP_<BUFFER_TYPE>$
or
- $rFactor2SMMP_<BUFFER_TYPE>$PID where PID is dedicated server process PID.
Source: /rFactor2SharedMemoryMap.cpp#L20
I was able to map the dedicated server with you code. If you like I can modify your code and make a pull request.
Greetings
Hi Frey,
Please go ahead and modify the code as I would have to set up a server to test it. Raise a PR and I'll merge it into my code, it will be a good addition. I'm interested to hear what you're going to use it for.
Cheers, -- Tony
Hi Tony,
alright, I will do when I have time.
I want to implement a plugin to improve the safety car experiences.
Let's say to make the call out of the SC more realistic.
I will set the safety car threshold to a high number, so game will never call out the safety car. I will override the call out logic in my plugin and sending /throwyellow commands.
On server-side, I will track some events to call the SC, like:
I also have a red flag plugin in mind. When a hard crash or car pile happened, I will stop the session, store the current ranking and session time and restart the race with flying start with the previous ranking that I want to reset with /editgrid command. And everything automated with python.
Ah, sounds like the sort of thing I do to improve rF2 but I never race with the safety car so I have never even thought about that. Only think I've written for the server is to reverse the grid: https://github.com/TonyWhitley/rF2DedicatedServer
Hi @TonyWhitley ,
is it possible to read data from the dedicated server?
I changed the process name to "rfactor2 dedicated.exe" in
__find_rf2_pid()
andisRF2running()
but I get "rFactor 2 Shared Memory not present." and "Incorrect shared memory". Server only is running for sure.Does the rF2SharedMemoryMapPlugin by TheIronWolfModding map data from the dedicated server at all? I set
DedicatedServerMapGlobally
to 1 inCustomPluginVariables.json
Can you help me please to figure out how I could use your python implementation to read telemetry from dedicated server?
Thank you and a merry x-mas! Frey