It is possible to write a DLL that receives data from the simulated bike in realtime.
Example source code can be downloaded at http://www.mx-bikes.com/?page=downloads
Please note that all function calls are blocking, so control should be returned to simulation as soon as possible to avoid framerate issues.
The DLL must be compiled for 64 bit.
The plugin must have the file extension renamed to DLO and it must be copied to the "plugins" directory in MX Bikes installation folder.
NOTE: a license is not needed to add plugins.
Plugins interface updated.
Example source code updated to add info about track centerline data.
Thanks for this Piboso.
For some reason I can't download the input_int.c file though. When I click on the link on the downloads page I get an error that the page couldn't be found, and when I try to save it, it tells me that there isn't any file to save.
Quote from: Sandbiter on September 17, 2014, 07:37:33 PM
Thanks for this Piboso.
For some reason I can't download the input_int.c file though. When I click on the link on the downloads page I get an error that the page couldn't be found, and when I try to save it, it tells me that there isn't any file to save.
Input plugin example uploaded. Thank you for the report.
Example source code updated to the latest interface.
Example source code updated to the latest interface.
Example source code updated to the latest interface.
Hmmm ... GetModDataVersion() still returning 4 ?
Thank you for the report.
Updated again.
Hi everyone,
I need to know when the wheels are in the air.
I searched in the plugin, but i don't found this information.
Is it possible to add this on the next version?
Thanks
Quote from: Azazel on April 19, 2018, 08:23:49 AM
Hi everyone,
I need to know when the wheels are in the air.
I searched in the plugin, but i don't found this information.
Is it possible to add this on the next version?
Thanks
Example source code updated to the latest interface.
Please note that, starting with Beta8, output plugins must be compiled for 64 bit.
Just compiled my MaxHUD for MXB x64: took me 2 hours to wrestle with Visual Studio configurations and platforms ::) ::) ::) but code compiled fine without any change (*) and it runs just fine. Woot !!
(*) Well, of curse I have a bunch of size_t --> int warnings, no biggie.
Example source code updated to the latest interface.
Quote from: PiBoSo on August 29, 2018, 01:59:44 PM
Example source code updated to the latest interface.
Minor: many fields (e.g. m_iSession, m_iSessionState, m_iReason) lack the comment/descritpion in many race structures.
For some is no biggie, as the field is described elsewhere, others I just take them from GPB :)
Thank you for the report.
Another quirk I just noticed: in MXB m_iSessionNumLaps in SPluginsRaceSession_t dopesn't seem to be set, it's always zero.
Seems to work fine in GPB however.
Quote from: HornetMaX on September 06, 2018, 01:06:50 AM
Another quirk I just noticed: in MXB m_iSessionNumLaps in SPluginsRaceSession_t dopesn't seem to be set, it's always zero.
Seems to work fine in GPB however.
Thank you for the report.
The fix will be integrated in the next update.
Example source code updated to add more structure members descriptions.
Example source code updated with the latest structure members descriptions.
Example source code updated with the latest structure members descriptions, to add straight rhythm info.
One small request: could you document what exactly is in the argument
_pRaceData of
TrackCenterline ?
__declspec(dllexport) void TrackCenterline(int _iNumSegments,SPluginsTrackSegment_t *_pasSegment,void *_pRaceData)
My understanding is that you have some floats indicating the position along the centerline of the start/finish line, then the split points and the speed trap.
Is it correct to assume (as not documented) that:
- GPB has 1x start line, 3x splits, 1x speed trap
- MXB has 1x start line, 2x splits, 0x speed trap
- WRS has 1x start line, 2x splits, 1x speed trap
- KRP has 1x start line, 2x splits, 1x speed trap
The "_pRaceData" input is briefly documented in the TrackCenterline function comment:
"_pRaceData is a pointer to a float array with the longitudinal position of the start / finish line and splits."
There indeed are two split lines, with the only exception being GP Bikes with three.
Therefore, in the case of MX Bikes, "_pRaceData" is a pointer to an array of three float values.
Example source code updated to remove an incorrect reference to a "speed trap" line.
Hi,
I would like to gather output data (speed) and convert it to signal. It would be than used to make "force feedback" for my MXB simulator.
Is here anyone willing to help me write DLL so I can collect this speed data and send it to USB port and to Arduino?
Example source code updated to the latest interface.
- Added the brakes pressure to SPluginsBikeData_t
- Added the holeshot line longitudinal position ( -1 if missing ) to the "_pRaceData" parameter of the TrackCenterline function
I´m using the plugin and it works flawlessly, but are there a way to read if the bike is in the air or not? @piboso
Quote from: TomasTheCreator on January 17, 2023, 01:41:27 PMI´m using the plugin and it works flawlessly, but are there a way to read if the bike is in the air or not? @piboso
At the moment there is no dedicated value to read.
A potential solution might be to check if both suspensions are completely extended.
Is it possible to add a function to know if the player is in solo game or online ? And get the server port if it's online
Quote from: PiBoSo on January 18, 2023, 01:29:36 PMQuote from: TomasTheCreator on January 17, 2023, 01:41:27 PMI´m using the plugin and it works flawlessly, but are there a way to read if the bike is in the air or not? @piboso
At the moment there is no dedicated value to read.
A potential solution might be to check if both suspensions are completely extended.
Aah I haven´t thought of that, but of course that should do the trick. Thank you for the answer :D
Example source code updated to add a couple functions to control the replay / live riders and cameras selection.