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

Making my first AI ship... MDL problem?

Messages
216
Country
unitedkingdom
Dear All,

I'm having a go at making my first AI ship for FSX in Gmax. I've designed objects in Gmax before and successfully exported them to MDL and used some xml with coordinates to compile to BGL. They show up in FSX just fine.

Now I'm exporting to MDL directly into SimObjects/Boats/test_boat/model/ and putting the texture in the adjacent folder. In the model folder I'm also placing a simple model.cfg which points to the MDL file. I also have a simple sim.cfg.

I have no problem with creating a GUID and exporting as MDL. I also convert the textures with no problems (all FSX Materials).

I create a route for my ship using aibtc. To avoid any typos or other problems I'm using exactly the same plans and routes for another ship I already have sailing in FSX. This way I know exactly where she'll be and when. All I do is change the name of the boat in the Boats file.

However, my new ship never shows up!

It struck me that although my MDL has a GUID I don't use it at all after export. Is this correct?

Also, I guessed that I should be able to find my ship using the GUID in the FSX Object Placement Tool? However, it simply isn't there.

I have a horrible feeling I've missed something simple? :o
 
Last edited:
Hi,

Only objects in a object library do show up in the OPT tool, so I think it is quite normal that your SimObject does not appear there.

Also I think it is normal that you don't use the GUID when using it as a SimObject. But maybe some aircraft designer who is more familiar with that process can confirm that.
 
Now my MDL is making FSX crash!

OK, so I exported my very simple ship from GMAX to MDL no problem. Then I wrote some basic XML to place it near an airport and compiled as a BGL. In FSX I then add the correct folder as scenery and load a flight at that airport. When I go to the airport and start flying my object appears exactly as expected. No problem with the textures and I'm guessing the MDL and BGL are therefore OK.

I then put the same MDL into my new SimObjects boats folding (inc. the model.cfg, sim.cfg and same textures, as mentioned in my previous posts). In my Boats text file I change the name of the SimObject to my new test boat name, save and then compile using AITBC with no errors. I then reload my scenery in FSX and go to Free Flight to the nearest airport. However, when it loads to 100% FSX crashes every time! I even tried re-booting, but no change.

I also tried substituting the the original ships name back into the Boats text file, compiling with AITBC, reload scenery and go to Free Flight. This time is doesn't crash and the default boat is there as expected, no problem!

Then I tried making one simple box in GMAX with FSX materials, exporting as MDL, placing it in SimObjects (with associated files and textures. Changed the name in the Boats text file, compiled with AITBC, reloaded scenery, went to Free Flight at nearest airport and again... at 100% FSX crashes EVERY time!

I can only comclude that I'm doing something wrong in GMAX, either when I make the box or when I export it as MDL. What strikes me as very odd is the fact it compiles fine as a BGL and shows up no problem as static scenery. Why should the MDL in SimObjects be any different??

I'm VERY confused and frustrated! :(
 
I'm not sure how GMax MDLs are exported for FSX for I work with Max, but I guess you're right: Something goes wrong between GMax and the SimObject-MDL.
Could you please post your sim.cfg file here?
 
Hi Thorsten,

Many thanks for your reply. Its driving me crazy here!

Here are the contents of my sim.cfg:

[fltsim.0]
title=hms_elephant
model=
texture=

[General]
category=Boat

[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 = 0.3, 0.3 //Time constant (effects responsiveness), and max acceleration (Gs)
SternPosition = -120

[Effects]
wake = fx_wake_xl
 
Yes, hms_elephant is the name of my boat.

I figured out what was causing FSX to crash (I think). My model.cfg said this...

[models]
normal=hmselephant

... when it should have said...

[models]
normal=hms_elephant

Spot the typo!!

Now FSX doesn't crash AND my boat appears where and when it should! At last!
 
AI Boat Newbie question.

I want to create my own AI Boat model for traffic use. Is it just a matter of exporting it as a model with MDX and assigning a cfg file that I know works?

Thanks,
David
 
Is there a sim object library file where I need to add the new AI ship so I can use it for AI?
 
An AI is always called by its "title". I would suggest playing around with existing ships first. Create a simple AI route and compile it calling a default AI ship. If that works clone one of the default AI ship folders of a ship that resembles your own ship most (so you don't have to change too many parameters), then rename the folder and assign a unique title in the sim.cfg file. Keep the default mdl first and test it, compiling the traffic file calling this new, cloned model. If that works move your own mdl into the model folder and call it in the model.cfg file. Any model should work. For test reasons I sometimes use some simple untextured boxes, just to make it easier for me to spot them in FS.
 
Well I created my first traffic route. It compiled fine. Imusing an FSX default Ferry (ferry1).
I created a 4hr route. I can't get the ship to show up. I checked all along its route and nothing, not there.

Only thing I can think of is that at the port of origin the terrain may not be water underneath the photoscenery. Would that cause AI to fail and not display?
Yes, all sliders are setup correctly. Also tried CargoB and Wash_ferry_sm, so it does not seem to be a model problem.
Also checked FSX.cfg and all simobject libraries are declared.

Thanks,
David
 
If the area below resample ground isn't water that can happen. Like I said: I'd try this step by step, using a small, open area in the water that's easily monitored. Also remember the times in the flightplans are UTC!
Use the SDK TrafficExplorer to see a list of all AI ships in the area, this makes things a lot easier.
 
gonna try that. I think I did a population adjustment of the area and in doing so inadvertently placed a ground tile over water.
Gonna modify the route and move the start point further into sea.

Thanks!
 
Well I've run out of ideas! Here are my files, hopefully someone can find an error. Tried several default ships, several routes. All other default boat traffic is there. SimObjects/boats is declared on fsx.cfg too. Seems to be compiling fine. Help!

BoatsCPX
AC#1,25,"VEH_water_cargoG_sm"

PlansCPX
AC#1,B60264,10%,24Hr,11:35:00,12:23:12,1005,normal,ferry,13:35:00,14:23:12,1005,reverse,ferry

RoutesCPX

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">

<Document>
<name>1005.kml</name>
<Style id="sh_ylw-pushpin">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<Style id="sn_ylw-pushpin">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<StyleMap id="msn_ylw-pushpin">
<Pair>
<key>normal</key>
<styleUrl>#sn_ylw-pushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#sh_ylw-pushpin</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name>1005</name>
<styleUrl>#msn_ylw-pushpin</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
-65.3022845724431,18.30079050468472,0 -65.30401620985104,18.29948309116044,0 -65.33032836648604,18.28662419393582,0 -65.58836361234592,18.33140728928761,0 -65.61380508252175,18.35111446193554,0 -65.62736846658349,18.34093808599772,0 -65.62836022246371,18.33640148227088,0 -65.62965818313553,18.33392498468679,0
</coordinates>
</LineString>
</Placemark>
</Document>
</kml>
 
try with shorter routes, 2hrs route or 4 hrs route, always had problems with longer routes. yes you have to check name of the route and the ship name in the XML route file and config file but i think the compiler will take charge of all this.
start the route time Schedule at 00,00 always. I can't explain all this techinically but for experience, but as I said if I tried to make longer route my ships always got lost in the ocean.
 
Are you sure it is compiled correctly?
In my decompiled traffic bgls the routes.txt contains 2 sets of coordinates for the route, one for 'normal' and one for 'reverse'.
 
GHD, then there must be something I'm missing on my FSX setup. I think I'm at SP2, and so far all other SDK tools work (could not get traffic tools to load though).

Is there a specific SP requirement? One thing I did notice is that my default ships on the Sim Objects/boats library....don't have a ".air" file. They only have ".cfg", not sure if that has any effect.
BTW I have no problems whatsoever with aircraft AI traffic.

Any other special setup or tweak required to make this work?

Thanks,
David
 
Back
Top