• 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.

MSFS20 Creating AI ship routes (and hardened decks for landing)

Messages
216
Country
unitedkingdom
Back-in-the-day I created some ship models for FSX in GMAX/3DS Max, with attached wakes and smoke etc, and used the fantastic AI Boat Traffic Compiler (AIBTC) to have them sail along tracks. I'm now exploring the possibility of doing the same in MSFS. Is there an equivalent of AIBTC... and if not how is it done please?

Also, I'd like some of my ships to have hardened decks for landing on. Again, in GMAX/3DS Max this was perfectly possible in FSX, but how is the same accomplished for MSFS in Blender please?

Many thanks

Andy
 
For a landable deck I use a plane in Blender that isn't part of the main mesh. I select 'invisible' in MSFS material params provided by the MSFS Blender exporter and tick 'road collision' in its properties.

To make it moving and landable you need to add code that was created for the Top Gun Maverick add on.

The sim.cfg of the boat simobject looks like this -

Code:
[fltsim.0]
title=LPD Main
model=
texture=

[General]
category=Boat
HasMovingPlatform = 1


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

[DesignSpecs]
max_speed_mph = 50     
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_s

[Carrier]
carrier = 1

And then you'll need to create a worldscript object which contains speeds, object references and extra scenery objects you want to add to the boat to place in your scenery file.

This is where I got a bit confused. One example file provided had waypoints inside it which I assumed replaces AIBTC for the route, but the boat didn't appear to pay any attention to them when I placed it.

The Top Gun code produces a 30 mile straight line and then it respawns. With waypoints the boat twitches and flickers. Without them it doesn't. So I gave up on waypoints as a straightline is adequate enough for me.

I did all this outside the SDK, but I presume it does something automatically too.

In your package sources add a new folder named 'Scenarii' and inside that another folder with a unique mission name.

In your package definitions add this

Code:
        <AssetGroup Name="example">
            <Type>Mission</Type>
            <Flags>
                <FSXCompatibility>false</FSXCompatibility>
            </Flags>
            <AssetDir>PackageSources\Scenarii\example\</AssetDir>
            <OutputDir>Scenarii\exmaple\</OutputDir>
        </AssetGroup>

 
The actual mission file looks like this

Code:
<?xml version="1.0" encoding="utf-8" ?>
<SimBase.Document Type="MissionFile" version="1,0">
    <Title>testmove</Title>
    <Filename>testmove.xml</Filename>
    <WorldBase.Flight>
1        <SimContain.Container InstanceId="{6e8d43db-8332-4e26-ab00-a45566c6046d}">
      <SimBase.Descr>AI_Carrier</SimBase.Descr>
      <WorldBase.Activated>true</WorldBase.Activated>
      <ContainerID>8048498576</ContainerID>
      <AIType>Boat</AIType>
      <WorldBase.ContainerTitle>LPD Main</WorldBase.ContainerTitle>
      <WorldBase.SimplifiedSimMode>AI</WorldBase.SimplifiedSimMode>
      <SceneryObjects.IsCollidableWithUser>true</SceneryObjects.IsCollidableWithUser>
      <WorldBase.IsOnGround>true</WorldBase.IsOnGround>
      <WorldBase.AttachedWorldPosition>
        <AltitudeIsAGL>true</AltitudeIsAGL>
        <LocalOffsetXYZ>0.000,0.000,0.000,0.000</LocalOffsetXYZ>
        <LocalOrientation>0.000,0.000,0.000</LocalOrientation>
      </WorldBase.AttachedWorldPosition>
      <ParameterAI>
        <GroundCruiseSpeed>20.000</GroundCruiseSpeed>
        <GroundTurnSpeed>10.000</GroundTurnSpeed>
        <GroundTurnTime>120.000</GroundTurnTime>
        <YieldToUser>false</YieldToUser>
        <KeepLastHeading>true</KeepLastHeading>
        <CanReverse>false</CanReverse>
        <WaypointList>
          <WrapWaypoints>false</WrapWaypoints>
          <CurrentWaypoint>0</CurrentWaypoint>
          <BackupToFirst>false</BackupToFirst>
          <Waypoint InstanceId="{28f5ae11-66f1-4429-a287-b8e61eed82cd}">
            <WaypointID>0</WaypointID>
            <SpeedKnots>20.000</SpeedKnots>
            <WorldBase.AttachedWorldObject>
              <OffsetXYZ>0.000,0.000,500.000,0.000</OffsetXYZ>
              <ObjectReference id="AI_Carrier" InstanceId="{6e8d43db-8332-4e26-ab00-a45566c6046d}" />
            </WorldBase.AttachedWorldObject>
          </Waypoint>
        </WaypointList>
      </ParameterAI>
 2   </SimContain.Container>
        <SimContain.Container InstanceId="{07e124d0-4f9a-4021-a11f-78368b616457}">
            <SimBase.Descr></SimBase.Descr>
            <Orientation>0.000,0.000,40.000</Orientation>
            <ContainerID>4298377295</ContainerID>
            <BodyVelocityXYZ>0.000,0.000,50.000,0.000</BodyVelocityXYZ>
            <AIType>Linked_Object</AIType>
            <ContainerTitle>Top CVN 69</ContainerTitle>
            <SceneryObjects.IsCollidableWithUser>true</SceneryObjects.IsCollidableWithUser>
            <AttachedWorldObject>
                <OffsetXYZ>0.000,0.000,0.000,0.000</OffsetXYZ>
                <ObjectReference id="AI_Carrier" InstanceId="{6e8d43db-8332-4e26-ab00-a45566c6046d}" />
            </AttachedWorldObject>
            <ParameterAI>
                <GroundCruiseSpeed>20.000</GroundCruiseSpeed>
                <GroundTurnSpeed>30.000</GroundTurnSpeed>
                <GroundTurnTime>200.000</GroundTurnTime>
                <YieldToUser>false</YieldToUser>
                <KeepLastHeading>false</KeepLastHeading>
                <CanReverse>true</CanReverse>
            </ParameterAI>
        </SimContain.Container>
 3       <SceneryObjects.LibraryObject InstanceId="{03c8b20e-5db0-4023-891c-ebee6db2a3b8}">
            <AltitudeIsAGL>true</AltitudeIsAGL>
            <IsOnGround>true</IsOnGround>
            <Scale>1.000</Scale>
            <MDLGuid>{3f0b7bdc-5717-43e7-b00c-d91ca8f84b93}</MDLGuid>
            <Orientation>0.000,0.000,0.000</Orientation>
            <AttachedWorldObject>
                <OrientationType>DEFAULT</OrientationType>
                <IsOnGround>true</IsOnGround>
                <OffsetXYZ>18.002,19.9097.-59.926,0.000</OffsetXYZ>
                <Orientation>0.00,0.00,90</Orientation>
                <ObjectReference InstanceId="{6e8d43db-8332-4e26-ab00-a45566c6046d}" />
            </AttachedWorldObject>
        </SceneryObjects.LibraryObject>
        </WorldBase.Flight>
</SimBase.Document>
 
Last edited:
Still going

1 - is the core action.

The first GUID is the AI carrier ref that you assign to all other attached objects so they know to move as well.

Worldbase.ContainerTitle is the name of your boat simobject.

Inside 1 is also where your waypoints go, but like I said I'm not much use with that yet. And also speeds etc.

2 is an example of another attached simobject attached to the main one. Again, just the simobject name.

3 is a scenery object. It needs its own unique GUID inside the mission for each instance at the top. And then the object's actual GUID - MDLGuid - which is repeatable each instance.

Objectreference InstanceId is the first GUID at the top that always has to be attached to all other objects that references the AI carrier elements.
 
Looking at this, it also seems AIBTC can still be used (and was used for Global AI Ship Traffic, GAIST, by Henrik Nielsen, @KL791):

 
Last edited:
The only moving landable option with a route appears to be Seafront Simulations boats. I don't know if they're using AIBTC or the waypoints inside a mission file. But they do twitch and flicker like my experiments.
 
Looking at this, it also seems AIBTC can still be used (and was used for Global AI Ship Traffic, GAIST, by Henrik Nielsen, KL791):

Yes. It still works, but I haven't tried very hard with that.

It's the landable bit where I'm pretty sure you'll need a mission file.

In the example instance just the one waypoint creates Top Gun carrier behaviour - one straight line for 30 miles.

Other people should know more. Code type stuff is definitely not my strong point, but I have had working results.
 
There's an example project inside this download -


I fiddled with it but had to reduce the waypoints to just one to stop my model twitching when using its waypoints.
 
Last edited:
Skippy Bing has given me permission to convert the flying stations ships for MSFS. Hopefully this will help!
 
If you want to make a car follow a route that you have created, if you look in the 'for developers' section in this download - https://flightsim.to/file/27908/moving-boats-3d-model-library there is a tutorial on how to create moving boats using worldscripts. Some things in it won't be relevant to cars but the principles are the same.

And Mamu has made a video with a moving vehicle about the same thing -

The car will need to be a simobject or you can create your own invisible simobject and attach a car model to it.
 
If you want to make a car follow a route that you have created, if you look in the 'for developers' section in this download - https://flightsim.to/file/27908/moving-boats-3d-model-library there is a tutorial on how to create moving boats using worldscripts. Some things in it won't be relevant to cars but the principles are the same.

And Mamu has made a video with a moving vehicle about the same thing -

The car will need to be a simobject or you can create your own invisible simobject and attach a car model to it.
Hi, i will study it, thx.
 
What am I doing wrong? My ship will not move.
 

Attachments

  • myship.jpg
    myship.jpg
    881.6 KB · Views: 125
  • reship_script.jpg
    reship_script.jpg
    426.1 KB · Views: 122
Back
Top