8,802
edits
m (→s76c.xml) |
mNo edit summary |
||
Line 3: | Line 3: | ||
On this page we describe how you make use of a script to get a '''livery selection dialog''' for a [[Aircraft|plane]] in [[FlightGear]]. To get new liveries into [[FlightGear CVS]], you need to have them availabe with this script. | On this page we describe how you make use of a script to get a '''livery selection dialog''' for a [[Aircraft|plane]] in [[FlightGear]]. To get new liveries into [[FlightGear CVS]], you need to have them availabe with this script. | ||
The examples are based on the [[ | The examples are based on the [[Robin DR400]]. | ||
==Files== | ==Files== | ||
There are a few files we need to make (or edit), namely: | There are a few files we need to make (or edit), namely: | ||
* <tt> | * <tt>dr400-set.xml</tt> | ||
* <tt>Models/ | * <tt>Models/dr400.xml</tt> | ||
* <tt>Nasal/ | * <tt>Nasal/liveries.nas</tt> | ||
We also have to make a new directory to store our liveries in. Let's make it <tt>Aircraft/ | We also have to make a new directory to store our liveries in. Let's make it <tt>Aircraft/DR400/Models/Liveries</tt>. | ||
===Models/Liveries=== | ===Models/Liveries=== | ||
Line 21: | Line 21: | ||
<model> | <model> | ||
<livery> | <livery> | ||
<name type="string"> | <name type="string">Default</name> | ||
< | <texture>texture.rgb</texture> | ||
</livery> | </livery> | ||
</model> | </model> | ||
Line 29: | Line 28: | ||
</PropertyList> | </PropertyList> | ||
=== | ===dr400.xml=== | ||
The first part is related to the nasal script. <tt>("Aircraft/ | The first part is related to the nasal script. <tt>("Aircraft/DR400/Models/Liveries", 10);</tt> points FlightGear to the directory where we store our liveries. This is a different directory for every plane, but there should be only one folder for one plane, containing all the liveries for that plane. | ||
<nasal> | <nasal> | ||
<load> | <load> | ||
var livery_update = aircraft.livery_update.new("Aircraft/ | var livery_update = aircraft.livery_update.new("Aircraft/DR400/Models/Liveries", 10); | ||
</load><nowiki> | </load><nowiki> | ||
</nowiki> | </nowiki> | ||
Line 61: | Line 60: | ||
<property-base>sim/model/livery</property-base> | <property-base>sim/model/livery</property-base> | ||
<texture-prop>texture</texture-prop> | <texture-prop>texture</texture-prop> | ||
<texture> | <texture>texture.rgb</texture> | ||
</animation> | </animation> | ||
=== | ===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. | ||
aircraft.livery.init("Aircraft/ | aircraft.livery.init("Aircraft/DR400/Models/Liveries"); | ||
===s76c-set.xml=== | ===s76c-set.xml=== | ||
<model> | <model> | ||
<path>Aircraft/ | <path>Aircraft/DR400/models/dr400.xml</path> | ||
< | <livery> | ||
<file type="string">default</file> | |||
</livery> | |||
</model> | </model> | ||
Line 80: | Line 81: | ||
<default> | <default> | ||
<menu n="10"> | <menu n="10"> | ||
<label> | <label>Robin DR 400</label> | ||
<enabled type="bool">true</enabled> | <enabled type="bool">true</enabled> | ||
<item> | <item> |