To enable special control of your models, several entries in the modeldef.xml file have to be made. Basically, an entry in modeldel.xml connects a model to internal FSX simulation variables, so called SimVars. SODE uses specific SimVars to accomplish some features.
The modeldef.xml file is located for example at:
FSX: C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\Modeling SDK\bin P3D: D:\Lockheed Martin\Prepar3D v4 SDK 126.96.36.19948\Modeling\3ds Max\bin
Sample entries can be found in the file „SODE_modeldef_Entries.xml“. The contents of this file must be copy-pasted anywhere (preferably at the beginning) into the modeldef.xml file:
- Open that modeldef.xml with your editor of choice.
- Copy the contents of SODE_modeldef_Entries.xml from <!– ### SIMOBJECT DISPLAY ENGINE ### –> to <!– ### END SIMOBJECT DISPLAY ENGINE ### –>
- Paste contents into modeldef.xml file AFTER the <ModelInfo> node!
- Save modeldef.xml
- Start gmax with FSX Gamepack or 3dsMax
- In the AnimationManager tool, you should see a “SimObject Design Engine” group offering the default animation tags. You may create your own by editing modeldef.xml
In order to maximize the use of the very limited amount of writeable SimVars, the different SODE output parameters are mapped onto the same SimVar using individual bits.
To retrieve the information out of the SimVar, you must mask the variable for the desired bits. Please see the example code provided to get an idea.
The following sections describe the special features and the used SimVar in detail.