• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

AI Boat Traffic Question

Messages
102
Country
us-northcarolina
My first attempt at AI boats.....

Following the excellent instructions by Doug Linn/RTMM found in "AI Boat Traffic for Dummies", I created a simple route with BOAT, PLANS and ROUTE text files.

This is the PLANS text file....


AC#1,Yacht,10%,3hr,02:10:30,00:00:00,1000

("1000" being the Google Earth(.kml) Route number)


However, compiling with AIBTC results in this error


Error: Cannot read traffic: At line 1 of file......\PLANSKW_Yacht.txt: Bad Period 3hr


What's wrong?
 
Messages
657
Country
austria
I think right periods are only 2, 4, 12 and 24 hours (ore weekly).

...and I don't see the reverse tour?
 
Last edited:
Messages
102
Country
us-northcarolina
Ohh....those are the only ones? Ok I'll give it a try right now....now I get Error Cannot read traffic: null

So I guess that means you can't go "one way" as it's expecting a reverse to the starting point
or a loop back maybe?

The reason there's no reverse is that I tried it and got even more errors so I thought I'd
make it a simple one way trip just to see what happens. Baby steps.

I'll keep trying but as I said there were other errors. One I recall was "invalid date" which was confusing since no dates are required in the
PLANS text.

Thank you very much for the tip though. Perhaps you have an example so I can better understand the syntax?
 
Messages
677
Country
ca-quebec
Here an example of PlansXXX.txt for my ships collection :

AC#1,B50771,10%,WEEK,0/13:00:56,1/23:25:48,5077,normal,ferry,2/00:25:47,3/10:50:39,5077,reverse,ferry
AC#2,B50661,10%,24Hr,12:00:56,05:33:46,5066,normal,ferry,06:00:53,23:33:43,5066,reverse,ferry
AC#4,B50671,10%,WEEK,0/11:30:56,2/15:19:34,5067,normal,ferry,2/23:00:53,5/02:49:31,5067,reverse,ferry
AC#3,B50691,10%,24Hr,12:15:56,05:14:17,5069,normal,ferry,23:00:53,15:59:14,5069,reverse,ferry
AC#5,B50701,10%,2Hr,01:00:56,00:12:50,5070,normal,ferry,00:30:53,01:42:47,5070,reverse,ferry
 
Messages
3,278
Country
spain
aiboat watch if the boat can go and return within the time Schedule. usually I créate route of 2 hrs. and start the route in the hour 00.00, and in this way avoid problems with ships that not appear anywhere.
And just check the ship title match with that of the config, file. and the name of the route are correct in the kml file.
 
Messages
102
Country
us-northcarolina
Sorry guys....another question

Error Cannot read traffic: Between leg 0 and leg 0; too much distance (47,290.336 nm)

47,000 ??? Plus I don't have the second leg specified yet since I'm just trying to get boat out there.

I first made a fishing boat route about 40 miles offshore and looped back to the starting point insted of reversing.Got an error because the distance was 87 nm. So I started over with another route that went out only about 20 nm and stopped; planning to add leg 2 to come back to the dock if that worked.

It didn't as the error message above indicates

Question 1- Where did the 47,000 miles come from?

Question 2 - There can't be a limiting distance for a leg, or can there? (I understand almost twice around the world might not work.)

Question 3- What is the syntax for a multileg trip.


Would this work?

AC#1,Fisher,10%,8hr,03:45:00,00:00:00,1000,normal,Fisher,06:45:00,1001

Where 1000 is outbound and 1001 inbound.
 
Messages
898
Country
denmark
hi - a few things comparing your route with one of Jean-Pierre's...

Your 47.200 comes from not having a reverse route - you need that.

AC#1,Fisher,10%,8hr,03:45:00,00:00:00,1000,normal,Fisher,06:45:00,1001

The first appearance of fisher should be a short (6 characeters max) name of the ship for the route or as JP does a code for the ship. Normally I use the first 5-6 characters of the ship name. Longer names make it impossible to decompile the bgl later.

Start a 03.45 on an 8 hr route can be done, but for simplicity set it to 00:00:00 which will be equivalent to 00:00; 08:00; 16:00 GMT - this way you can easily find your boat and check if it works.

The route must be doable in the time span - each leg max 4 hour which again relates to length of your route and the speed you define for the ship in the boat file. For a fishing boat with a speed of 12 in the boat file you can do a total route lenght of 40 miles.

The Second "Fisher" is not an acceptable part of syntax - you have two options "ferry" or "cargo" nothing else. Ferry makes ships start and end in a specific place - e.g. a ferry dock or any other point. Ships always stops in that exact spot. The second last node in the route should not be further than a couple of hundred meters from the last as the ship will go backwards out to the second last node and then turn around. "Cargo" allow you to have up to three ships "parked" at the end of the same route as they will stop at a random place within 300 meters from the last node.

A different route number for the second part is not needed - let it be the same as it is also shown in JP's example. And then you have to add "reverse" plus your choice between you choice ferry or cargo.

The length of the route dépends on the time you allow - a 4WEEK route can be quite long... I do some routes with 2WEEK cycle which are 4800 miles with a speed of 25.

You need to follow the syntax below stricly else no luck...


AC#2,B50661,10%,24Hr,12:00:56,05:33:46,5066,normal,ferry,06:00:53,23:33:43,5066,reverse,ferry
 
Messages
102
Country
us-northcarolina
We
hi - a few things comparing your route with one of Jean-Pierre's...

Your 47.200 comes from not having a reverse route - you need that.

AC#1,Fisher,10%,8hr,03:45:00,00:00:00,1000,normal,Fisher,06:45:00,1001

Well, well thank you very much KL. For a beginner that's very informative.

I thought reverse meant take the same route home. Otherwise, it seemed to me, long distance routes, say a cruise ship, couldn't stop in London and then cruise the Med a few days later before heading straight home to New York. Wouldn't that be 3 legs and 3 different routes?

And I had no idea ferry or cargo were the only choices.

Thanks again...that helps a lot.
 
Messages
2,287
Country
us-washington
I only have one question now. Writing a file to compile for a traffic file is it true I cannot have any spaces between words? If so- what if my ai title has spaces in it?
More Q's to follow I am sure! hahaha
But the boat I selected has spaces in the name.
 

Attachments

  • screenshot4030.jpg
    screenshot4030.jpg
    49.1 KB · Views: 109
Messages
269
Country
germany
Hi,
I have just tested it again, spaces do not matter.
Only restriction, in the Plans.txt the designation may not have more than 10 sign.

In the AIBTC directory there is a folder source_files...
In this folder belong the three files Boats.txt, Plans.txt and Routes.kml...
In the traffic_files folder you will find the compiled traffic.bgl...

According to your screenshot, your three source files are in the rout directory of aibtc.

Google Earth is suitable for creating the route.
 
Messages
2,287
Country
us-washington
do not understand.,.. 10 sign. Yes got all 3 files there bu t aibtc compile button is dim. I assume this means aibtc says htere is something wrong with one of those files.
 
Messages
2,287
Country
us-washington
Hot damn! got it to try to compile
screenshot4039.jpg
but got an error. -bad period- screenshots below. so far it looks like the trouble lies in 'plans'

screenshot4040.jpg
 
Messages
2,287
Country
us-washington
Just got rid of the error... change 14hr to 8hr... BUT Now I get......... plan needs to have at least one boat. Is my boat name too long?
 
Messages
269
Country
germany
So...
I try to explain AIBTC and the three source files.

The three source files must always be named as follows, where the * is a placeholder for own characters.
It doesn't matter if a space, underscore, letter or number is used.
Only the following characters must be the same for all three files, so that AIBTC can assign these files.

Now for an explanation of the individual files and their structure using an example...

Boats*.txt (The Boats*.txt is quite simple in structure)
Code:
AC#1,30,"VEH_Larrys_schoolbus"

- AC#1 –>introduce the id number of this entry...

- 25 –>is the boat / vehicle / animal speed...

- VEH_Larrys_schoolbus –> is the model name. The model name could be found in the sim.cfg...


Plans*.txt (This is where it gets more difficult now)
Code:
AC#1,Car,1%,1Hr,00:00:00,00:01:25,99999,normal,ferry,00:30:00,00:31:25,99999,reverse,ferry

- AC#1 –> define the boat model identifier. Use the same identifiers as specified in Boats.txt

- Car –> is the vehicle name. It is not displayed or used by the traffic, but could help to distinguish plans. Avoid punctuation marks and use no more than 10 leters.

- 1% –> is the minimum traffic percent that must be configured to see this vehicle in the simulator

- 1Hr –> is the repeat frequency. You can specifiy it as a number of hours or weeks

In each order, a departure time is given. The departure is relative from the start of the period. If a vehicle has a 4 hours periods, then an order that starts at 1:45 will be repeated at 5:45, 9:45, 13:45, 17:45, and 21:45 each day.

Since one must consider the return journey with, only 1/2/4/6/8/10/12 or 24 hours periods make sense!

The further timetable consists of 5 comma-separated fields in each case for the outward and return journey:
In my example above this means...
00:00:00,00:01:25,99999,normal,ferry

- 00:00:00 --> Start time of the outward journey.

- 00:01:25 --> Arrival time of the outward journey, the duration of the travel time results from the speed of the vehicle and the length of the distance traveled. The arrival time is recalculated by the AIBTC.
Therefore always check the times before using the Traffic*.bgl if they are still in the travel period, so that it does not come to misrepresentations.

-99999 --> is the route number as defined in the file "Boats.KML". Only numeric identifiers are supported

- normal --> The fourth field is a value indicating the direction of travel on the route. If it is marked with "reverse", then the route is driven from the last point to its first point.

- ferry --> The last flag concerns the terminal parking type. A vehicle marked with FERRY will stop at the end point of the route. The default behavior is cargo, with deiser route definition the vehicle is made to find a parking place on a circle around the end point.

The further entries are for the return trip and have the same meaning as the outward trip.
For the return trip, use the same route number!

Furthermore, one vehicle, one schedule, one route, one Traffic*.bgl, as for each vehicle its own route and its own schedule!

What is still important, all times are GMT (UTC+0) times!
So when testing it is best to change the simulator to UTC time.


Routes*.kml

I use the following template for this and only change the coordinates and the name for new routes (which I create with Google Earth).
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>File created with kml.KMLWriter</name>
<Placemark>
<name>99999</name>
<Style>
<LineStyle>
<color>ff0000ff</color>
<width>2</width>
</LineStyle>
</Style>
<LineString>
<tessellate>1</tessellate>
<coordinates>-96.66120783425868,33.74163821331267,0.0
-96.6612636577338,33.741989151898416,0.0
-96.66104690171778,33.74420276451621,0.0
-96.66108227334918,33.74631739445597,0.0
-96.66077231056988,33.7468213062714,0.0
-96.65975357405841,33.74714524958132,0.0
-96.65886090137064,33.74631739445597,0.0
-96.65861246176064,33.74532756767566,0.0
-96.65865579620005,33.742727022771014,0.0
-96.65870239958168,33.742196115679754,0.0
-96.65883030742407,33.741836178668734,0.0
</coordinates>
</LineString>
</Placemark>
</Document>
</kml>

You can save this file as txt file and after changing the coordinates/route number change txt to kml.

Routes*.kml -> the format mainly used by AIBTC is the GoogleEarth KML format. It can be viewed and edited with free versions of Google Earth, so it is more convenient to use this format for routes.
KML is more stable than KMZ.
The path name stored in Google Earth is used as the route identifier. If a name is not numeric, the route is skipped and cannot be used for defining plans.
Path information other than latitude and longitude is not used. If errors occur with KML files, it is recommended to remove all style information and keep only the point coordinates.
Therefore, I always use my template.
Paths in Google Earth are displayed undirected, but the direction is from the first point added to the last point.

If my example files are used, then the school bus departs on a route every hour in TE68.
Half an hour later it starts the return journey.

I hope to have shed some light on AIBTC.
 
Messages
2,287
Country
us-washington
This does help immensely.. better than the instructions I have. The screenshot above shows the content of my files. I can send a again if you wish.
Right now I am getting the message.... needs at least one boat. the older error message stated 'bad period' I change 14 hrs to 8hr which satisfied that.
 
Messages
269
Country
germany
Please write here once the Boats*.txt and once the Plans*.txt.
Otherwise it makes it impossible to help and I can only guess, which is not helpful.
And then we see further.

The Plans*txt from the screenshot above cannot work like this, even with a period of 8 hours.
See my explanation of Plans*.txt and compare it with your screenshot.
 
Messages
2,287
Country
us-washington
AC#1,10,ai_Barque Statsraad Lehmkuhl
AC#1,ai_Barque Statsraad LehmkuhlLehmkuhl,1%,8Hr,06:00:00,00:00:00,1000,normal,cargo,ai_Barque Statsraad Lehmkuhl,06:00:00,00:00:00,1000,reverse,cargo,ai_Barque Statsraad Lehmkuhl
This is the sim.cfg of the boat

[fltsim.0]
title=ai_Barque Statsraad Lehmkuhl
model=
texture=
ui_manufacturer=Welker's Plane & Ship Wharf
ui_type=Norways Tallship 22 sails

======================================================
[General]
category=Boat

[contact_points]
static_pitch=0.0 //degrees, pitch when at rest on the ground (+=Up, -=Dn)
static_cg_height=1.0 //feet, altitude of CG when at rest on the ground 0,7

[DesignSpecs]
max_speed_mph = 20
acceleration_constants = 0.5, 0.4 //Time constant (effects responsiveness), and max acceleration (Gs)
deceleration_constants = 2.0, 0.5 //Time constant (effects responsiveness), and max acceleration (Gs)
SternPosition = 0

[Effects]
wake = fx_wake_m


kml file too big even zipped.
 

Attachments

  • Routesai_Barque Statsraad Lehmkuhl.zip
    900 bytes · Views: 108
  • Plansai_Barque Statsraad Lehmkuhl.zip
    293 bytes · Views: 114
Top