Its done through an xml file that works through the standard equipment/payload menu in FlightGear.
You need to define to the tions in the set file.
Have a payload position or positions defined in the FDM then you create a corresponding xml file that basically animated the objects you specify based on the options you define in the set file.
And yes, it is very easy to make a complete pigs ear of it.