230
edits
m (menu entries should always open() the dialog (not toggle it)) |
m (comments about the (non-)structure of an XML overlay file) |
||
Line 13: | Line 13: | ||
===Models/Liveries=== | ===Models/Liveries=== | ||
For every livery we need to make a file. Let's say we got a Rescue livery, we | For every livery we need to make a file. Let's say we got a Rescue livery, we then need to make a file called Rescue.xml in our <tt>Models/Liveries</tt> directory. When a particular livery gets selected, its XML file is copied to the aircraft's property tree. On the pilot's side this is the main property tree <tt>/</tt>, and on all remote machines on the MP network it's one of the multiplayer branches in <tt>/ai/models/multiplayer[]</tt>. The structure of livery XML files is completely free. There just has to be a property containing a name for the selection dialog, and <tt>aircraft.livery.init()</tt> must be told which it is. By default it is <tt>sim/model/livery/name</tt>. | ||
<?xml version="1.0"?><nowiki> | <?xml version="1.0"?><nowiki> | ||
Line 64: | Line 64: | ||
===liveries.nas=== | ===liveries.nas=== | ||
The only thing you might change in the nasal file is the directory of the liveries. | The only thing you might change in the nasal file is the directory of the liveries. If you don't have the livery name in <tt>sim/model/livery/name</tt>, then you have to add this as second function argument. | ||
aircraft.livery.init("Aircraft/DR400/Models/Liveries"); | aircraft.livery.init("Aircraft/DR400/Models/Liveries"); | ||
Line 72: | Line 72: | ||
<path>Aircraft/DR400/models/dr400.xml</path> | <path>Aircraft/DR400/models/dr400.xml</path> | ||
<livery> | <livery> | ||
<file type="string" | <file type="string"/> | ||
</livery> | </livery> | ||
</model> | </model> |
edits