When finding the data values I had to manually find them through memory reading and some reverse engineering of asm functions, however for the sake of this blog I will detail how I imagine the C code of the actual game would look.

NOTE: s32 is the same as int and f32 is the same as float

// From 0x801633A0
typedef struct bikeStruct {
    /*0x00*/ f32 zPos;
    /*0x04*/ f32 yWheelFront;
    /*0x08*/ f32 xPos;
    /*0x0C*/ void unk_0C;
    /*0x10*/ f32 yWheelBack;
    // ...
    /*0x50*/ s32 lightLean;
    /*0x54*/ s32 strongLean;
} bikeStruct;

The original concept for this used tool used lua and muppen64 (Speedrun Tool Emulator), however project64 (General Purpose Emulator) now releases with a javascript debugger and API which is alot easier and more intuitive to use so I have moved the system.

I wrote a constantly looping script that would read the player data necessary from the struct, although in reality this reads a memory range from the start of a pointer, that would save the information into a file line.