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

MSFS How to make a static library asset follow a path?

Messages
54
Country
switzerland
So I followed Federico's 'mowing tractor' tutorial and I now have one of my sailships moving nicely along a (follow) path I had created with Google Earth Pro. So far, so good!
But since the ship is already part of an asset pack and as such loaded into MSFS, that seems like a waste of ressources (because the new track package actually consists of the very same ship model and texture with just a tiny baked-in animation).
Is there a way I can reference a given library asset to a traffic path?
 
Messages
420
Country
unitedkingdom
With a static asset you'll have to add the path as a separate model unless the developer did it themselves.

If you used a worldscript you'd be able to have anything you like following a path, but I think the main object that follows the path in a worldscript would have to be a simobject.

What you could do is make your own ultra low poly simobject, and hide it inside the static model. You can attach static library objects to the main simobject in the worldscript's xml and they'll move along the same path.
 
Messages
54
Country
switzerland
The restriction to simobjects was the reason why hitherto I restrained from working with worldscripts. In fact, apart from that (and their name which I have heard once or twice), I don't know anything about them. Yet. But your idea about the static library object being attached to a hidden or invisible simobject sounds like a good and very interesting workaround. I'll go into that. Thanks!
 
Messages
420
Country
unitedkingdom
There's a quick worldscript tutorial in the download here - https://flightsim.to/file/33166/animated-humans-library

And Mamu has also done a video about it.

It's simple and rapid as long as you don't have a complex path which most boats won't.

To attach an object you need a bit of extra code in the worldscript xml which looks like this

Code:
        <SceneryObjects.LibraryObject InstanceId="{9a686170-7ab0-4fcc-a8aa-f4f3d447a930}">
            <AltitudeIsAGL>true</AltitudeIsAGL>
            <IsOnGround>true</IsOnGround>
            <Scale>1.000</Scale>
            <MDLGuid>{64151d4a-b257-4ae3-adfa-c648406ca65e}</MDLGuid>
            <Orientation>0.000,0.000,0.000</Orientation>
            <AttachedWorldObject>
                <OrientationType>DEFAULT</OrientationType>
                <IsOnGround>true</IsOnGround>
                <OffsetXYZ>22.088,26.224,-35.849,0.000</OffsetXYZ>
                <Orientation>0.00,0.00,0.00</Orientation>
                <ObjectReference InstanceId="{878b254c-3387-43ee-a262-4a082591df36}" />
            </AttachedWorldObject>
        </SceneryObjects.LibraryObject>

The first guid at the top is a unique reference for each instance in the worldscript.

Middle one - MDLGuid - is the static library model's actual guid.

Object reference ID at the bottom is the guid you gave your simobject when you create the worldscript so the static model knows what to attach to.

Offset XYZ will be the position of the ship in relation to your simobject. That'll probably require a fair bit of fine tuning.
 
Last edited:
Messages
54
Country
switzerland
This is great! Will keep me busy over the weekend. Of course, I have your anim people lib, but I hadn't realizied it contained a developers folder with such treasures. :cool:
 
Messages
420
Country
unitedkingdom
I hope you have a productive time.

The Objecr reference ID is the first guid you add to the worldscript at the top. The humans bit can't have anything attached so I didn't clarify that.

I'm shortly to finish an update to the moving ships library with a bunch of worldscripts and simobjects so I'll make a clearer tutorial for that including how to attach stuff.
 
Messages
54
Country
switzerland
So now I have a 'dummy' simobject cube that moves nicely along some kind of tetragon that I drew on a Google Earth map and exported. The dummy cube is attached to a 'pilot' (leftover from mamu's tutorial) and the worldscript is still of category/AI type 'animal' (your Buckingham croco script). Probably neither pleasing nor harming, so I decided to look into that later.
WRT your code above:
  • I gave the SceneryObjects.LibraryObject a unique InstanceID (GUID)
  • I replaced the one in <MDLGuid> with the one found in the desired static model's properties
  • I copied the <SimContain.Container> GUID to the <ObjectReference>
I get an errorless compile with one warning (PackageBuilder | No partial lister for asset type WorldScript). However, this time (with the code inserted) all I see when I drop the worldscript into the scenery are the outlines of a small transparent cube.
But before you agonise: where in the worldscript nest do I insert the code? Is it inside of SimContain.Container, WorldBase.Flight or SimBase.Document? (I think I tried them all without much of a change.)

EDIT: So emberrassing that I missed your comment at flightsim.to for five days ─ sorry! The tallship pack will certainly help me to make the dummy cube a proper boat (instead of the current animal).
 
Last edited:
Messages
420
Country
unitedkingdom
I'll dig around for a working file when I'm near a computer later or tomorrow.

But I didn't realise the ship was your own project. I thought you wanted to move someone else's.

Just make the ship into a simobject. No need to attach anything unless you want to add some tinsel from elsewhere.
 
Last edited:
Messages
54
Country
switzerland
Haha, that was indeed a question I had on my lips for a while, why not simply turn the ship assets into SimObjects.
But I was afraid to ask, because I thought, there MUST be some BIG and (for all devs except for me) obvious downside to that? Like SimObjects using more ressources, being more prone to code changes or some other nasty thing? There isn't? I could exchange the models in my asset pack with SimObjects so that me and everyone else could use them in Worldscripts?
However your idea of attaching a static object to a dummy SimObject still has a creative elegance in it...
 
Messages
420
Country
unitedkingdom
The only problem would be if trillions of people have downloaded them as library objects and they're placed in multiple projects.

Then you'd have to keep both types or continue with the attachment idea.

Simobjects also aren't collidable unless you add a line to the worldscript, and they won't be at all without a worldscript.

And if you add a wake it'll probably keep spouting foam even when parked.

There's also a limit of 1000 I think simobjects to run at one time but that's only likely to hit close to an international airport.
 
Messages
54
Country
switzerland
Hi. I'm really in some trouble. Even when I compile your 'tallship' into a SimObject it shows only weird lines when I place it into the scenery. The same like all my trials in the past week.
BUT: Even the Asobo boats and ships/yachts look like this!
And there's a funny thing to it: While all SimObjects in Asobo's and 3rd party libs work fine, boats and ships have all the same problem. With one exception, 'raceboat' and 'ferry' in the simaddon airports common lib (among Vehicles and actually in the 'Landmarks' subfolder!) work fine. Well, they show the strange dancing black lines, too, but at least the models are visible! (2nd screenshot)
I remember having seen those dancing lines a couple of times before in a marina.
Maybe it's an Asob bug (I see it on two different installations)? So we'd have the chance to see a solution within the next five years.
I am now stuck with both alternatives of bringing my sailships to life... <facepalm>

EDIT: Even the compiled scenery package loaded with dev mode off shows (screenshot 03):
  1. most simobjects (windmill, animals etc.) fine
  2. simaddons' boats with lines
  3. none of my boat/ship simobjects (neither the 'tallship')
 

Attachments

  • MSFS Screenshot 01.jpg
    MSFS Screenshot 01.jpg
    212.7 KB · Views: 69
  • MSFS Screenshot 02.jpg
    MSFS Screenshot 02.jpg
    106.7 KB · Views: 70
  • MSFS Screenshot 03.jpg
    MSFS Screenshot 03.jpg
    274.3 KB · Views: 65
Last edited:
Messages
767
Country
italy
Hi. I'm really in some trouble. Even when I compile your 'tallship' into a SimObject it shows only weird lines when I place it into the scenery. The same like all my trials in the past week.
BUT: Even the Asobo boats and ships/yachts look like this!
And there's a funny thing to it: While all SimObjects in Asobo's and 3rd party libs work fine, boats and ships have all the same problem. With one exception, 'raceboat' and 'ferry' in the simaddon airports common lib (among Vehicles and actually in the 'Landmarks' subfolder!) work fine. Well, they show the strange dancing black lines, too, but at least the models are visible! (2nd screenshot)
I remember having seen those dancing lines a couple of times before in a marina.
Maybe it's an Asob bug (I see it on two different installations)? So we'd have the chance to see a solution within the next five years.
I am now stuck with both alternatives of bringing my sailships to life... <facepalm>

EDIT: Even the compiled scenery package loaded with dev mode off shows (screenshot 03):
  1. most simobjects (windmill, animals etc.) fine
  2. simaddons' boats with lines
  3. none of my boat/ship simobjects (neither the 'tallship')
The solution to those horrible lines is to install the Maverick update (the one with the F18 and carrier)
Believe it or not
Buggy since su10 beta, they know, only fix is as suggested
Otherwise you can take the boats Simbojects models and strip the vfx from them (those lines are vfx loading bad)
 
Messages
767
Country
italy
Haha, that was indeed a question I had on my lips for a while, why not simply turn the ship assets into SimObjects.
But I was afraid to ask, because I thought, there MUST be some BIG and (for all devs except for me) obvious downside to that? Like SimObjects using more ressources, being more prone to code changes or some other nasty thing? There isn't? I could exchange the models in my asset pack with SimObjects so that me and everyone else could use them in Worldscripts?
However your idea of attaching a static object to a dummy SimObject still has a creative elegance in it...
There is a concern about the maximum number of Simbojects loaded on screen (max 1000 at the moment)
A decent sized airport may top the limit quite easy, the result are random Simbojects unloaded (not really nice when a big airplane disappeares..)
So the worldscript use should be limited to areas with enough distance from big hubs.
Driving SimObject along waypoints is indeed a CPU bound task, so yeah, good for eye candy, but with en eye on performance
 
Messages
54
Country
switzerland
Another 🤦‍♂️. Some 37 yrs ago the Maverick addon (with an F-14!) would have been my dream. But indeed, I have wiped that ─ as it now looks ─ 'Pandora's box' off my systems long ago. Without knowing the consequenses. I neither understand why the put new assets like rocks and trees within WUs instead of putting them in the base sources (which they update anyway). Anyway, MANY THANKS for hinting at that!

>> Driving SimObject along waypoints is indeed a CPU bound task, so yeah, good for eye candy, but with en eye on performance
Would that be a difference between a simobject and a static model? But anyway, the 'attach solution' would need a simobject, too...
 
Messages
54
Country
switzerland
Have 'Maverick' installed and up-to-date, but all I see of any SimObject type 'Boat' (even Asobo's own!) is a white cube outline. Maybe need to reinstall both(!) of my systems?

EDIT: Found the 'reason' why my scenery would never show any of my ships and boats, neither any other SimObject of type 'Boat'.
My play'ground' is Lake Zurich. And Lake Zurich is 408m above sea level. @superspud: Look what happens when I put your tallship (or one of Asobo's yachts) in Lough Neagh in Northern Ireland (12.5m above sea level)! And the gizmo is no help, it just lifts the boundary box, but the model itself does not emerge out of the water. Haven't tried it yet, but maybe adapting the contact points in sim.cfg would help? Or worldscript <IsOnGround> tag to 'false'?
Anyway, I have currently only plans for ship tracks in the ocean and will now simply relocate my test scenery to the sea.
However, any feedback is highly welcomed: did you know this, can you confirm it, is there a simple workaround?
 

Attachments

  • asobo boats.jpg
    asobo boats.jpg
    370.6 KB · Views: 58
  • lough neagh.jpg
    lough neagh.jpg
    119.6 KB · Views: 58
Last edited:
Messages
767
Country
italy
Have 'Maverick' installed and up-to-date, but all I see of any SimObject type 'Boat' (even Asobo's own!) is a white cube outline. Maybe need to reinstall both(!) of my systems?

EDIT: Found the 'reason' why my scenery would never show any of my ships and boats, neither any other SimObject of type 'Boat'.
My play'ground' is Lake Zurich. And Lake Zurich is 408m above sea level. @superspud: Look what happens when I put your tallship (or one of Asobo's yachts) in Lough Neagh in Northern Ireland (12.5m above sea level)! And the gizmo is no help, it just lifts the boundary box, but the model itself does not emerge out of the water. Haven't tried it yet, but maybe adapting the contact points in sim.cfg would help? Or worldscript <IsOnGround> tag to 'false'?
Anyway, I have currently only plans for ship tracks in the ocean and will now simply relocate my test scenery to the sea.
However, any feedback is highly welcomed: did you know this, can you confirm it, is there a simple workaround?
Use GroundVehicle as type
It will pop your boat from the abyss and bring it to the lake level
Of course you can't rely on default assets because the Simboject itself needs to be configured as GroundVehicle
 
Messages
54
Country
switzerland
Thanks mamu. Now you mention that, I am quite sure it had worked on lake Zurich as long I had used Superspud's crocodile template of 'animal' type. But the perfectionist part in me was reluctant to keep it like that when the SDK offers a 'Boats' category!
Can I do everything with a GroundVehicle I can do with a Boat? Like e.g. attack a wake?
 
Last edited:
Messages
54
Country
switzerland
I'm shortly to finish an update to the moving ships library with a bunch of worldscripts and simobjects so I'll make a clearer tutorial for that including how to attach stuff.
Now that I finally see my ship following the worldscript waypoints, it is actually backing up. And as you say in your current tutorial the <LocalOrientation> tag does not bring the expected result. Do you know an easier way of changing the simobjects direction instead of going back to Blender and export again?
 
Messages
54
Country
switzerland
Just make the ship into a simobject. No need to attach anything unless you want to add some tinsel from elsewhere.
I have a slight 'problem' turning the static objects into SimObjects. In modelLib I could put multiple objects into the model folder and in the texture folder I had a pool of the many textures common among the models.
As SimObjects I don't manage to put several models in the model folder. When I duplicate the entry in the sim.cfg I get 'duplicate sections' errors. See attach ─ and be merciful to me...

Is the/a solution to put the models in different folders and give the 'texture' a full path instead of leaving it default/empty?
 

Attachments

  • sim.cfg.txt
    1.1 KB · Views: 75
  • model.CFG.txt
    63 bytes · Views: 73
Last edited:
Messages
420
Country
unitedkingdom
Waypoints seem to be a lot fussier than coordinates.

Your boat will need to be correctly orientated from Blender. It'll need to match the enclosed direction.

I put simobjects in their own folders. Dunno what the alternative is.

You can pool textures in one folder. Check the tallship I added in the comment to your project. In the texture file there's a second line, fallback.2, that references a pooled folder in the simobject section.

As for lakes, that never really occurred to me to check.
 

Attachments

  • orient.zip
    220.7 KB · Views: 78
Last edited:
Top