Livery over MP: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 1: Line 1:
On this page we describe how you make use of a script to get a livery selection dialog in FlightGear. To get new liveries into [[FlightGear CVS]], you need to have them availabe with this script.
[[Image:Livery_selection_dialog.jpg|thumb|270px|The livery selection dialog of the [[Sikorsky S76C]].]]
 
On this page we describe how you make use of a script to get a livery selection dialog in [[FlightGear]]. To get new liveries into [[FlightGear CVS]], you need to have them availabe with this script.
 
The examples are based on the [[Sikorsky S76C]].


==Before we start==
==Before we start==
Line 27: Line 31:


====s76c.xml====
====s76c.xml====
The first part is related to the nasal script. </tt>("Aircraft/Sikorsky-76C/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>
Line 35: Line 41:
   livery_update.stop();
   livery_update.stop();
   </unload>
   </unload>
  </nasal><nowiki>
  </nasal>
</nowiki>
 
The second part is very important and probably the hardest of all. We need to set which parts of the model should change when you select a new livery. To find the object-names, you could make use of software like [[Blender]] or [[AC3D]]. The <tt><texture>S76livery.rgb</texture></tt> part points FlightGear to the livery that should be shown on startup.
 
  <animation>
  <animation>
   <type>material</type>
   <type>material</type>
Line 56: Line 64:


====S76C.nas====
====S76C.nas====
The only thing you might change in the nasal file is the directory of the liveries.
  aircraft.livery.init("Aircraft/Sikorsky-76C/Models/Liveries", "sim/model/livery/name", "sim/model/livery/index");
  aircraft.livery.init("Aircraft/Sikorsky-76C/Models/Liveries", "sim/model/livery/name", "sim/model/livery/index");


Line 61: Line 71:
  <model>
  <model>
   <path>Aircraft/Sikorsky-76C/Models/s76c.xml</path>
   <path>Aircraft/Sikorsky-76C/Models/s76c.xml</path>
  <start-idling type="bool"></start-idling>
   <variant type="int">1</variant>
   <variant type="int">1</variant>
  </model>
  </model>

Navigation menu