Addon

From FlightGear wiki
(Redirected from Add-on)
Jump to navigation Jump to search
Fgaddonslogo202x89.png

An addon is a third-party pack for FlightGear containing enhancements.

Installing an addon

Download and copy the add-on to a directory on your computer.

In the launcher, select the Add-ons page from the icon bar on the left, then find the "Add-on Module folders" section and click the Add (+) button. Select the folder where you put the add-on. Make sure the selected folder path ends with the add-on name (such as "Logbook").

Alternatively, use the command line switch --addon=/path/to/some/addon if you are not using the launcher.

Some add-ons (like Aerotow Everywhere) may require additional actions. Please also read the description of the specific add-on.

List of Addons

You can find the official repository at flightgear/fgaddon/trunk/Addons

  1. Add-ons Menu Aggregator - this add-on aggregates the menus of all other add-ons into one menu item.
  2. Aerotow Everywhere Add-on - AI towing aircraft for gliders at every airport.[1]
  3. AnotherGUI - An add-on that adds a new GUI style.
  4. ATC Chatter (ported by Torsten).
  5. AutoEarthView - an addon for spaceflight that automatically starts/stops Earthview based on the altitude
  6. Blacklist add-on - Automatically ignore pilots with certain callsigns or multiplayer models.
  7. Bombable - military add-on.
  8. Cargo Towing Addon [2] - Allow any helicopter to tow, move and place various types of models.
  9. FaceTrackNoIR (ported by HHS)[3] - An addon to interface this head tracker with FlightGear
  10. Fencemaker (Eases creating Fence-like scenery objects. Originally by VaLeo, converted to an addon by sfr) - (download)[4]
  11. FGCamera - (manual) - Wiki Page
  12. FGPlot
  13. Flight Planner - a flexible tool for manual flight planning and airport briefing.
  14. Ground Services (ported by ThomasS)[5]
  15. Hax!: landing evaluation and aircraft development tools, TerraSync toggler.
  16. Headtracker addon Helps integrate FaceTrackNoIR and opentrack with FlightGear.
  17. HighAirTrader An in-sim mini game in which you transport goods to different airports.
  18. Hoppie ACARS client - connect to Hoppie's ACARS, used on VATSIM and other networks.
  19. HUD Heli - additional Heli HUD's (manual) - encapsulation of HeliHUD package as an addon.
  20. Illuminator - configure lights attached to 3D models (e.g. taxi light, landing light or a light attached to a scenery model like a light pole) at runtime.
  21. KML Exporter (Google Earth) - (manual)
  22. Landing Rate addon [1]
  23. LinuxTrack Head Tracker integration - (manual)
  24. LittleNavMap integration - (manual)
  25. Logbook Add-on - logs all your flights to local file with flight analysis.[6]
  26. Log time-stamper add-on - Will print simulated UTC time, real local time, and/or real UTC time time-stamps at configurable intervals to the console and log.
  27. Mickey - Tiny HUD for mouse flying in FlightGear. Visual feedback for mouse flying, to make up for mouse's lack of self-centering.
  28. Mission Generator Addon [7] - Generate various random missions - Search & Rescue, Life Flight, Aerial Intrusion, Wildfire.
  29. MPChatImprovments Multi-key commands for Multiplayer, new features for chat,...
  30. Nasal Namespace Browser - heir to Nasal Browser
  31. noGroundDamage - Addon to temporarily disable damage after landing and for ground operations for the c172/c182
  32. Oscilloscope addon - Allows displaying a property of Nasal function over time
  33. PAR instrument - Precision Approach Radar and Ground Controlled Approach
  34. Rain Vector Editor - Utility to allow dynamic editing of the rain vector for the rain effect on glass.
  35. Ramp Marshall [8] - Ramp Marshalling for FlightGear Airports.
  36. RCView - Radio Control View[9]
  37. Red Griffin ATC - Speaking Air Traffic Controller[10]
  38. SimBrief import - Import flightplans, weights, fuel, and winds alof, from SimBrief.
  39. Spoken ATC (ported by Torsten)[11]
  40. Spoken GCA - An offline ground controlled approach (GCA) addon
  41. VFRFlight integration - (manual)
  42. VFR Flying Helper - (manual)
  43. Which Runway Add-on - dynamically determines and displays the optimal runway for take-off and landing based on current wind and airport preferences, while calculating headwind, crosswind, and tailwind components for each runway.[12]
  44. Wildfire [13] - Wildfire simulation.
  45. YASim Development Tools (by jsb)

Experimental Addons

Addons which are in the development stage/unfinished but can be used as a quick view of addon functionality

  1. FlightGear Missions addon - Add-on for missions/adventures code
  2. Model Cockpit View (abandoned)[14]

Creating an addon

There is a very simple Skeleton addon available in FGAddon to be used as a template.[15] See flightgear/fgaddon/trunk/Addons/Skeleton.

A leading slash (/) in this section indicates the base directory of the directory structure of the addon.

Minimum configuration

An addon may be installed in a directory anywhere on your hard disk and need at least two files:

  • /addon-config.xml - A standard PropertyList XML file to be used to populate or modify the property tree. (Same as to be used in --config=foo.xml)
  • /addon-main.nas - The Nasal hook for the logic. This file needs a function called main() which will be called from the global addon initializer (addons.nas)

Additional common files

  • /addon-metadata.xml - A PropertyList XML file with metadata about the addon it.
  • /addon-menubar-items.xml - A PropertyList XML file describing menus to be added to the FlightGear menu bar.
  • /gui/dialogs/<my-foobar-dialog>.xml - PropertyList XML files to create custom dialogs.

Good to know

The new addon mechanism lets you add a addon-config.xml to override the settings in defaults.xml and other files.

That will allow an addon to:

  • override key bindings (as in the spoken ATC addon),
  • add or override autopilots and property rules,
  • introduce XML state machines.

Unless your really want to add/change/remove those at runtime, this should cater for most use cases.[16]

Sound Support

Sound support is available using fgcommand's.

See also Howto:Play sound using Nasal script.

Addon initialization

On initialization fgfs takes care of:

  • Through options.cxx:[15]
    • Creating a property under /addons/addon[n]/path=/path/to/some/addon
    • Loading /path/to/some/addon/addon-config.xml into the property tree (same as --config=/path/to/some/addon/addon-config.xml)
    • Adding /path/to/some/addon to the list of allowed directories (same as --fg-aircraft=/path/to/some/addon)
  • Through addons.nas:
    • Loading /foo/bar/baz/addon-main.nas into namespace __addon[ADDON_ID]__
    • Calling main(addonGhost) from /foo/bar/baz/addon-main.nas.

Aircraft specific config (addon-hints)

Some addons need per-aircraft configuration. While addons should strive to be self-contained (ie. the addon should contain means to detect different aircraft and apply config from whithin the addon) there is also the possibility for the addon to read so called "addon-hints".

For this, a special property tree exists: /sim/addon-hints/<addon>/... The tree is expected to be populated from the aircraft.xml file. The addon can then read the properties from a common place regardless of loaded aircraft.

<sim>
  <addon-hints>
    <my-addon>
        ...
    </my-addon>
  </addon-hints>
</sim>

APIs

C++ API

There is a C++ API on FlightGear's side that handle some on the add-on related tasks manly through the AddonManager(), Addon() and AddonVersion() classes.

Nasal API

The Nasal add-on API lives in the 'addons' namespace and can for example do queries to AddonManager() and read data from addons.Addon objects. It can for example compare add-on versions if there is dependencies.

See: [GitLab]/flightgear/fgdata/next/Nasal/addons.nas

References

References
  1. Roman Ludwicki (PlayeRom)  (Aug 14th, 2022).  Re: Aerotow Everywhere .
  2. Wayne Bragg (wlbragg) .  Re: Cargo Towing Addon .
  3. Unknown, HHS (Nov 1th, 2018).  Re: .
  4. Stefan Frank  (Aug 8th, 2021).  Re: .
  5. ThomasS  (Aug 12th, 2017).  Re: .
  6. Roman Ludwicki (PlayeRom)  (Dec 11th, 2022).  Re: Logbook Add-on .
  7. Wayne Bragg (wlbragg) .  Re: Announcing Mission Generator Addon .
  8. omega95 - Wayne Bragg (wlbragg).  Re: Nasal based Independant Ramp Marshall . Re: Announcing New Ramp Marshall Addon .
  9. Chris Ringeval (Eatdirt)  (Mar 23rd, 2024).  RCView .
  10. RedGriffin  (Jan 6th, 2020).  Re: .
  11. Torsten  (Jul 10th, 2017).  Re: .
  12. Roman Ludwicki (PlayeRom)  (Sep 10th, 2025).  Which Runway GitHub .
  13. AndersG - Wayne Bragg (wlbragg) .  Re: Wildfire Addon .
  14. wkitty42  (Mar 24th, 2025).  Re: .
  15. 15.0 15.1 Richard Harrison  (Jun 14th, 2017).  [Flightgear-devel] Emesary / Multiplayer improvements .
  16. Torsten  (Jul 23rd, 2017).  Re: Spoken .

Related content

Wiki articles

Forum topics

Readme files

Source code

FGAddon

FGData

FlightGear