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

Rolling and pitching AI ships in FSX

Messages
54
Country
unitedkingdom
Although there is no contacts section in the sim.cfg I did have to move the model centre

dover2.jpg
 
Messages
52
Country
scotland
I see what you mean, the ships do actually react to weather. It seems like the default ships (US Navy Destroyer and Cruiser, USCG Cutter etc,. Boy do I love that USCG Cutter!) need some severe weather to get them to move at all, and even then its only a slight "bob", just like you said

Does anyone know where this pitching and rolling movement is defined in the AI models?

The sim.cfg file seems so limited for ships, but are there more parameters that can be put in that file (perhaps undocumented at this time) that can give more control over pitching and rolling?
 
Messages
5,214
I think you can put in a [lights] section, but I guess that is not going to make your vessel roll and pitch.
 

ollyau

Resource contributor
Messages
1,026
Country
us-california
I'd just take a stab in the dark and try some sections from the aircraft.cfg and see if they work in the sim.cfg :p.
 
Messages
52
Country
scotland
OK...using just trial and error, I've now, in essence, tried out almost all the elements of an aircraft.cfg file as a sim.cfg file, and even dropped an airfile into the folder with it, just in case it made any difference.

The results seem to me that an AI boat's sim.cfg file is so rudimentary that no more than a handful of parameters work (and those are pretty much just the ones that you can find in the sim.cfg's of the default boats).

So I guess we're barking up the wrong tree trying to get pitch and roll effects (or indeed much else useful) out of the sim.cfg file.:(

I also have to say that despite other comments I've read both here and in other forums that I myself have not observed any pitch or roll in the default ships even by setting the severest of weather. It makes me wonder if there is really any element of that sort of movement in AI boats, or does a boat actually have to be defined as a pilotable "airplane" (i.e. like a seaplane) to get any of that sort of movement at all from it?:confused:
 
Last edited:
Messages
5,214
Just to let you know I am still on the subject.
Thought I had an idea by placing flattens in the sea at various altitudes (small ones of 2 or 3 feet).
Unfortunately, the vessel just bumps and the sides of the altitude difference are rock instead of water. Placing landclass water on top of it does not help either.
So, for the time being, I guess you are right regarding AI vessels not bobbing on the waves.
 

GHD

Messages
12,243
Country
england
One of Rick Piper's ships certainly pitches.

Stern down:

sterndown.jpg


Stern raised:



Please ignore the wake effect, we're still working on that.
 
Messages
5,214
Very, very interesting, George.
But I think I am going to finish my Ceuta heliport and harbor first.
 
Messages
814
Country
ca-ontario
Guys,

What you are trying to accomplish is dead simple in SimConnect. Have you tried to look into that? I can give you some pointers if you need more info.

Misho
 
Messages
52
Country
scotland
@George

Would love to study that boat of Rick Piper's, George. Is it downloadable from somewhere?


@Misho

I would be happy to look at any methods you know of for adding pitch and roll to AI boats, Misho. Can you share some of your knowledge about using SimConnect to achieve this? It would be much appreciated.
 
Messages
814
Country
ca-ontario
@George
I would be happy to look at any methods you know of for adding pitch and roll to AI boats, Misho. Can you share some of your knowledge about using SimConnect to achieve this? It would be much appreciated.

No problem - The place to start is "AI Objects and Waypoints" sample in SimConnect SDK. In there, one of the objects added is a baloon, and there are "hooks" in there to set up keys for thrust. Instead of the baloon, load the ship model, and instead of the "GENERAL ENG THROTTLE LEVER POSITION:1" variable, use "ROTATION VELOCITY BODY Z" (or Y for pitch? I forget). That way, using C and V keys, your ship will pitch up and down by an amount specified for every key press, and check if everything is working. I am greatly generalizing, of course...

The next step would be to set up a sinusoidal wave form and assign values to the pitch, instead of the key inputs. That's easy - just an application of trigonometry. Once you have this sinusoidal wave, you can apply it to all 3 axis, in various amounts.

From there, the sky is the limit... you could have your app check for all the loaded "boat" class SimObjects in the reality bubble and apply this bobbing... it could check for weather stations and apply realistic wind and weather. You could also add a custom section to sim.cfg, with parameters on the ammount of roll in all 3 axis, MOI etc (FSX will ignore it, and your app can read it in)

I'm not sure if you're tinkering with SimConnect, but if you're interested in pursuing this, I suggest you set up the Visual Studio and start compiling the SDK sample first. Then if you get stuck I can probably supply you with the skeleton app to get you going...

Misho
 

ollyau

Resource contributor
Messages
1,026
Country
us-california
Couldn't you make it a model animation or something? Like the elevator or flags on Javier's Nimitz?

The solution of using SimConnect is still good, though, since it could be applied to any boat without having the source model. Still, you'd need to be running another separate application for it :p.
 
Messages
814
Country
ca-ontario
Couldn't you make it a model animation or something? Like the elevator or flags on Javier's Nimitz?

The solution of using SimConnect is still good, though, since it could be applied to any boat without having the source model. Still, you'd need to be running another separate application for it :p.


Yes you could - if you don't mind having same old same old repeating anim. SimConnect gives you ability for randomness and unpredictability.

Ah yes - a lot of people consider SimConnect a "separate app"... However, the SimConnect add-on can be coded as a DLL, which is not very different from most of the default and third party aircraft gauges ( - and we all know how many .gau, .cab. and .dll files are out there :) ) All you need to do to add the SimConnect DLL is one entry in DLL.XML, one time (just like adding a gauge entry in panel.cfg file) Once that is done, user doesn't even know it is running. If designed properly, this little add-on can set your boats bobbing happily ( or bucking violently, depending on weather conditions). The only drawback is the still water surface...

Misho
 

ollyau

Resource contributor
Messages
1,026
Country
us-california
Yes you could - if you don't mind having same old same old repeating anim. SimConnect gives you ability for randomness and unpredictability.

Ah yes - a lot of people consider SimConnect a "separate app"... However, the SimConnect add-on can be coded as a DLL, which is not very different from most of the default and third party aircraft gauges ( - and we all know how many .gau, .cab. and .dll files are out there :) ) All you need to do to add the SimConnect DLL is one entry in DLL.XML, one time (just like adding a gauge entry in panel.cfg file) Once that is done, user doesn't even know it is running. If designed properly, this little add-on can set your boats bobbing happily ( or bucking violently, depending on weather conditions). The only drawback is the still water surface...

Misho

Ah, good point about making it a DLL :p.
 
Messages
814
Country
ca-ontario
Come to think of it, an EXE wouldn't appear any different to DLL as far as end user is concerned. You could code it so that it runs completely silent in the background. :cool:

Misho
 
Messages
52
Country
scotland
Thanks for your Simconnect pointers, Misho.

Simconnect is not something I've ever touched before, but I will take your advice and have a look at the SDK examples, and see if I can get my head round it.

Cheers,
Voodoo
 
Messages
814
Country
ca-ontario
Thanks for your Simconnect pointers, Misho.

Simconnect is not something I've ever touched before, but I will take your advice and have a look at the SDK examples, and see if I can get my head round it.

Cheers,
Voodoo

It may sound daunting, but It is really easy - download the Express edition for VC (2008, free!) and install. Load the SDK example. Set your header and lib paths (as per SDK). It will compile. :cool:

Misho
 
Top