1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Boat and ship traffic in FSX

Discussion in 'BGLComp XML, AFCAD, SceneGenX' started by Joe W, 25/11/06.

  1. Joe W

    Joe W

    Joined:
    3/6/04
    Messages:
    256
    Country:
    unitedstates
    I'm trying to do a simple boat traffic file for FSX using the TrafficDatabaseBuilder and it compiles without any error messages but the ships don't show. I've tried the Ferry and the Yacht and neither will show in the Traffic Tools Explorer. Has anyone else done this? The files are as follows:
    X44.BoatsType.cvs is the name of the boat file
    Contents:
    # typeKey,Title,Cruise,routeTypes,AutoSchedule?

    Yacht1,VEH_water_yacht_280ft_sm,20,CRUISE,yes
    Yacht2,VEH_water_yacht_280ft_sm,20,CRUISE,yes

    The Routes are:
    File name: X44.Routes.csv
    and the contents are:
    #ID, TerminalFrom, TerminalTo
    1234,1112,2222
    {,,
    25.779166,-80.175,
    25.779,-80.174,
    25.779,-80.17233,
    25.768,-80.142833,
    25.7696,-80.13933,
    },,

    The Terminals are:
    File name: X44.terminals.csv

    Contents:
    #ID, Capacity, TypeMask

    1112,2,CRUISE
    2222,2,CRUISE
    This is a simple route that starts behind the cruise ship on the left side of X44 in Miami. If you choose the SE water rwy and are in a float it should start on the left and contines to the condos on the left at the marina.
    I have copied the files to a folder with the Traffic builder in and CMD in too and the name of my bgl is TrafficX44.bgl.
    The command line is: TrafficDatabaseBuilder /output=TrafficX44.bgl
    and as I said.... it compiles with no errors.
    I just cannot get this to show.
    Thanks
    Joe W.
  2. lc0277

    lc0277

    Joined:
    25/9/06
    Messages:
    156
    Country:
    france
    As for aircraft AI, there are tons of factors that could affect traffic :confused:
    Did TrafficDatabaseBuilder reports that it scheduled XX boats along route Y ?
    Did you put the "ships and ferries" slider at max (not the last slider, it is not AI)
    The route endpoints should be at least 300 meters away from land, unless you specify "FERRY" type.
    Is the model "VEH_water_yacht_280ft_sm" well defined in the sim.cfg (I checked and it's ok in default FSX install)
    Did you copy the bgl file to Scenery\world\scenery\ ? (you will see a progress bar the next time you launch fs)
    etc
  3. Paavo

    Paavo

    Joined:
    20/5/06
    Messages:
    140
    Country:
    estonia
    You must specify lists of boats, terminals and routes.

    Eg.
    Code:
    TrafficDatabaseBuilder /output=TrafficX44.bgl /BoatTerminals=X44.terminals.csv /BoatTypes=X44.BoatsType.cvs /BoatRoutes=X44.Routes.csv
  4. Joe W

    Joe W

    Joined:
    3/6/04
    Messages:
    256
    Country:
    unitedstates
    You got it.......
    Command line is:
    TrafficDatabaseBuilder /BoatTypes=XX.BoatType.csv /BoatRoutes=XX.BoatRoutes.csv /BoatTerminals=XX.BoatTerminals.csv /Output=TrafficXX.bgl

    It didn't take but all day to find that out....
    Thanks
    Joe W.
  5. airprox

    airprox

    Joined:
    23/4/05
    Messages:
    40
    Country:
    scotland
    I've been thinking of looking at the AI boats... am I right in thinking that we can add our own custom boats, and define our own routes for these boats... we just can't define when these boats with appear, that bit is automatic/random?

    Cheers
    Alun
  6. lc0277

    lc0277

    Joined:
    25/9/06
    Messages:
    156
    Country:
    france
    Airprox: it's just like AI aircraft, you can add your own models, write schedules, define repeat frequency etc. Unfortunately the TrafficDatabaseBuilder can't build files with custom schedules. It just generates random traffic that maximize seaports usage.
    The default boat traffic file contains a lot of routes (1041), only a few of them are effectively used. International cargo/oil routes are available as a CSV file in the SDK, so you can generate traffic from them.
    I've extracted all the routes as KML (google earth) data here : routes.kml. I decompiled schedules and wrote them in a text file, but it is rather cryptic and the format informations are for french spotters sorry :(

    I'm currently writing a boat traffic decompiler/compiler, so in the future you may define your own boat schedules :)
  7. airprox

    airprox

    Joined:
    23/4/05
    Messages:
    40
    Country:
    scotland
    Thanks for the info! I'm just finishing up an offshore supply vessel for FS9, so I'll need to have a play to get it up to FSX standards once the SDK comes out... Once that's done I'm hoping to incorporate it in the ODG offshore scenery.

    I like the idea of the decompiler/compiler!

    Cheers
    Alun

    Just tried the kml file... very cool!
    Last edited: 26/11/06
  8. Paavo

    Paavo

    Joined:
    20/5/06
    Messages:
    140
    Country:
    estonia
    Mm, sounds interesting.
    Is naval traffic triggered randomly by simulation engine as the SDK suggests or does TrafficDatabaseBuilder randomly generate schedules? I mean, is it possible to alter schedules with some hex-editing?
  9. lc0277

    lc0277

    Joined:
    25/9/06
    Messages:
    156
    Country:
    france
    There are two kinds of sea traffic in FSX:
    - random autogen leisure ships near coastlines. They have no schedules or programmed paths, just sailing around. You can only control the density and the 3D models used, see my post about LivingWorld source in the FSX Mesh forum (well it looked off-topic for mesh ;) )

    - programmed traffic, generated by TrafficDatabaseBuilder. They have schedules (generated randomly by the tool, but they are really coded in the file) . The traffic BGL file format is optimized for AI engine. Editing it by hand will be very hard, since you must regenerate an index of all sectors crossed by the ship if you change the schedule.

    I'm currently writing a traffic compiler for boats and I'm expecting to release it in the next few days or weeks.
  10. Paavo

    Paavo

    Joined:
    20/5/06
    Messages:
    140
    Country:
    estonia
    Thanks for the info and please keep us updated regarding your compiler.
  11. lc0277

    lc0277

    Joined:
    25/9/06
    Messages:
    156
    Country:
    france
    I've put a first version here : aibtc01.zip with a short documentation : http://lc0277.nerim.net/boat/ (sorry for the poor english in the doc :eek: )

    I designed the interface and text file format deliberately similar to TTools by Lee Swordy so the learning curve will be steeper.
    It can decompile default boat traffic to text files + KML data. The inverse process is also possible, so you can write your own traffic and compile it. However I don't know where are the exact limits of what is possible to do with AI boats, so if it crashes feel free to blame me ;)
  12. Paavo

    Paavo

    Joined:
    20/5/06
    Messages:
    140
    Country:
    estonia
    Great work! : )

    Are you aware of ways of making ferry-type vessels travel on ground? My hovercraft always stops just as its reference point crosses the border between water and land. Also, this method could be used to add for example busses if this limitation can be overcome.
  13. lc0277

    lc0277

    Joined:
    25/9/06
    Messages:
    156
    Country:
    france
    I tried some time ago to make an A.I. ship route on ground. The boat appeared right, but they disappeared some minutes afterwards. They can travel on small strips of land : bridges, piers or seawalls but with some unexpected behaviour if we expect too much for a boat.

    FSX offers a lot of methods to make living objects : AI (boats, aircrafts), Mission (any type), LivingWorld autogen (boats, ground vehicles), SimConnect-managed objects (boats, aircrafts, ground vehicles). It's up to developpers to choose the best way :cool:

Share This Page