• Welcome to MX Bikes Official Forum. Please login or sign up.
 
January 30, 2023, 12:23:45 PM

News:

MX Bikes beta18c available! :)


Output Plugins

Started by PiBoSo, April 21, 2014, 11:35:40 PM

Previous topic - Next topic

HornetMaX

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 :)



PiBoSo


Thank you for the report.

HornetMaX

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.

PiBoSo

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.

PiBoSo


Example source code updated to add more structure members descriptions.

PiBoSo


Example source code updated with the latest structure members descriptions.

PiBoSo


Example source code updated with the latest structure members descriptions, to add straight rhythm info.

HornetMaX

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

PiBoSo


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.

Yirka63

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? 

PiBoSo

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

TomasTheCreator

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

PiBoSo

January 18, 2023, 01:29:36 PM #27 Last Edit: January 18, 2023, 01:31:18 PM by 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.

MxWayGamer

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
Owner of Mxb-servers.com

TomasTheCreator

Quote from: PiBoSo on January 18, 2023, 01:29:36 PM
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.

Aah I haven´t thought of that, but of course that should do the trick. Thank you for the answer  :D