Basic gun setup is as the attached image

Shellstart1 is the hook
Correct orientation of the pivot point axes is important.
Shellstart1 and Head1 have normal orientation.
Gun1 has the Pivot Point y axis pointing down.
Shellstart1 is child of Gun1
Gun1 is child of Head1
To export using Maraz you need some text files which configure the export.
Gun1.cfg
scale_factor 1
n_lods 1
lod_dist 3000
lod_type P
lod_prefix L0_
n_coll 0
n_hook 1
Shellstart1
shadow_char Y
Head1.cfg
scale_factor 1
n_lods 1
lod_dist 3000
lod_type P
lod_prefix L0_
n_coll 0
n_hook 0
shadow_char Y
I does not matter at this stage that no shadow meshes and no collision meshes are defined. These may be added later.
To run the exporter it is best to use a project file so all meshes are exported together.
The project file will be like the following.
MyWarship.prj
num_objects 2 D 1.0
Head1 1
Gun1 1
You will select the project file in the Export screen of Max.
As you add more *.cfg files the number of objects in the *.prj file will increase.
This is enough to generate a working *.msh file for the game.
Once you have the LOD0 mesh working then add collision boxes, shadows and LODs
lod_dist 3000 --- is just an arbitary viewing distance of 3000 meters to get started. When you have added LODs this may reduce to 300