• Tutorial: Marginal's Ground Traffic Plug-In

    Marginal's Ground Traffic Plug-In

    By Paul Mort

    As you may have noticed from my previous SketchUp and Overlay Editor tutorials, X-Plane is extremely customizable in regards to scenery creation, and tools such as the two listed above, offer the enthusiast a host of possibilities.

    What I would like to briefly touch on today is another versatile tool, and again, one created by that talented developer, Jonathan 'Marginal' Harris.

    The tool in question is called Ground Traffic and can be download here.

    Ground Traffic allows X-Plane scenery designers to add animated ground and water traffic (via routes) to scenery packages. Ground Traffic is a plugin which sits inside your scenery directory and acts as an extension. There are many plugins available for X-Plane with each one adding additional features to a vanilla X-Plane installation. Most of these reside in your main plugins directory which is located in: X-Plane - Resources - plugins, but as mentioned above, Ground Traffic sits in the scenery you are creating (important).

    Installation

    Let's begin! First, we need to create a new folder in the main directory of the scenery we are editing and name it 'plugins'. Next we need to drop the supplied 'GroundTraffic' folder into our newly created 'plugins' folder. The GroundTraffic folder (if used before) can be copied from a previous scenery to our current one.

    Ground Traffic

    To complete the setup, create a plain text file, name it 'GroundTraffic.txt' and drop it into the same location as the 'plugins' folder.

    Ground Traffic

    The empty GroundTraffic.txt file we have just created will be used to enter latitude and longitude coordinates. These coordinates will in turn be used to create a route. The plugin will then read this and move our object.

    The Route

    Multiple objects can be animated from within the same GroundTraffic.txt file by repeating blocks of text but for simplicity, we will animate just one here.

    Open the empty GroundTraffic.txt file in any text editor so that we can begin to input our route. To plan our route, open the required scenery file in Overlay Editor and draw single connecting lines (I use the lib/airport single_taxi line) to create each leg of the route - five in our example. The lines are only a guide to our route coordinates and must be deleted later to avoid having yellow lines showing in our scenery. Overlay Editor is not being used to place any objects but merely as a route planner so DO NOT place your object as the plugin will do that for us.

    You will then see, as you click on each of the five node dots, that its longitude and latitude coordinates are displayed in the bottom right of Overlay Editor, plus the number of each node (0 to 4).

    If the last node in the route is left unconnected then the animated object will automatically travel along the shortest and most direct path (in our case) from node 4, back to node 0. Once done, it will then begin the cycle again.

    Ground Traffic

    GroundTraffic.txt Format

    route	20	0	270	objects/USCGShip.obj
    #
    #          
    55.8875939  -5.6710646
    pause 20
    55.8977674  -5.6605225
    55.8978985  -5.6497673
    55.8928473  -5.6465214
    55.8865496  -5.6598144
    #  
    

    At first glance the completed GroundTraffic.txt file (above) looks quite confusing, but in reality it's not. Let's go and do some dissecting!

    Every route MUST start with a 'route' command
    20 is the speed in MPH (miles per hour)
    0 is an offset figure (Seldom used)
    270 is used to rotate the object if it travels i.e. sideways (its orientation in degrees can be corrected).
    USCGShip.obj is our object to animate

    The object and its location must be specified. Personally I find it easiest to drop the object and its texture file into the scenery objects folder. This avoids the need to type in a long destination path, such as those found in the OpenSceneryX directory. Instead, the above tells the plugin to look for it in the scenery objects folder, which is much shorter.

    The # symbol tells the plugin to ignore anything after it and can be used to insert comments. We then have our five sets of route coordinates. A pause command can be placed between the coordinates to stop the animation for a specified number of seconds, in our case 20.

    To animate more objects in the same GroundTraffic.txt file, simply leave a space and begin with a new route command.

    Save the GroundTraffic.txt file overwriting the original blank one in the scenery package, delete the taxi guide lines in Overlay Editor and then save the scenery package.

    Shut down and restart X-Plane selecting our animated scenery, and you should see your animated object moving in all its glory.

    Paul Mort
    [email protected]


    2 Comments
    1. ceparsons's Avatar
      ceparsons -
      Reminds me of the Turtle programming language from decades ago.
    1. Joeyboots's Avatar
      Joeyboots -
      This is a great plug-in. Thanks for the info.
  • Recent Forum Activity

    pcohen

    Fsx startup please?

    Thread Starter: pcohen

    Hi everybody Have decided to Run FSX again as it is still my Favourite Flight sim. Not getting along with the new Microsoft Flight Simulator 2020....

    Last Post By: pcohen Today, 05:46 AM Go to last post
    iianclancy

    FSX (older delux version) run under Win10 (pro)

    Thread Starter: iianclancy

    I am trying to add on new scenery (EGTK in this case) and loaded the .bgl file into both the Addon Scenery folder in FSX and a separate folder in...

    Last Post By: pomak249 Today, 03:04 AM Go to last post
    ster100

    Question about installing x-plane 11

    Thread Starter: ster100

    1) Digital download: how many gb is x-plane 11 after download? Is it compressed? If yes, how many gb? 2) where to install? C, D or on desktop?

    Last Post By: johnost Today, 03:04 AM Go to last post
    loki

    MSFS Known Issues

    Thread Starter: loki

    The official list of known issues, and workarounds, can be viewed at the site below. https://www.flightsimulator.com/known-issues/

    Last Post By: loki Today, 02:52 AM Go to last post