Howto:Adding Bombable to FlightGear Aircraft: Difference between revisions

Jump to navigation Jump to search
Line 506: Line 506:
Uh-oh.  There is our first error.  f-15-demo.xml, line 31, column 2, I have "<scenario>" rather than "</scenario>".
Uh-oh.  There is our first error.  f-15-demo.xml, line 31, column 2, I have "<scenario>" rather than "</scenario>".


I fix and re-start.
I fix, save the fixed file, and re-start. Now I get:
 
* Bombable (ver. 4.4) loaded . . .
* loading scenario "f-15-demo"
* Failed to load XML: . . .  F-15E-StrikeEagle-bombableinclude.xml
 
OK, this is typical.  There is a typo or stray character on the .xml file.
 
Best/easiest way to test XML files is load them in Internet Explorer.  It will parse the XML file and display any errors it finds.  (If you don't have access to IE there are other XML parsers available.)
 
I right-click on F-15_StrikeEagle-bombableinclude.xml and choose "Open with Internet Explorer".  It turns out there is a stray character on line 3.  I delete it, save the file, and try again:
 
* Bombable (ver. 4.4) loaded . . .
* loading scenario "f-15-demo"
* No error messages!
 
I open the map (Equipment/Map) and check "Traffic".  I see "Jones" and "Cooper" each flying their separate ways.
 
Success!
 
But wait . . . they are not turning, attacking, or anything.  I see no messages saying that the F-15E has been initialized.
 
Obviously the -bombableinclude.xml code has not executed at all.
 
I open FGDATA\Aircraft\F-15E\Models\F-15E_StrikeEagle.xml and have a look.
 
Here is the problem:
 
<?xml version="1.0"?>
<PropertyList include="F-15E_StrikeEagle-bombableinclude.xml">
<path>Aircraft/F-15E/Models/f-15E.ac</path>
<animation>
    <type>shader</type>
    <shader>chrome</shader>
    <texture>Aircraft/Generic/Effects/glass_shader.png</texture>
    <object-name>CanopyGlass</object-name>
<object-name>FrontGlass</object-name>
 
   
  </animation>
<animation>
    <type>noshadow</type>
    <object-name>Cockpit</object-name>
   
  </animation>
<!--
 
<nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/F-15E/Models/Liveries", 10);
    </load>
  <unload>
      livery_update.stop();
    </unload>
  </nasal>
 
Success!


==Where your aircraft files are==
==Where your aircraft files are==
482

edits

Navigation menu