• 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 XML Help / Simobject

Messages
212
Country
austria
Hello,

i have (at least i'm pretty sure of it) followed the following tutorial to get a simple simobject into the sim.


However, i'm running into an issue, and since i have basically zero knowledge about xlm codes, i thought i would try and ask for help.

Screenshot (31).png



It says: "Error encountered here" - but what is the problem ?
Can anyone shed some light on this ?


I have attached the "SimObjects" Folder from my project as i'm unsure where i have made a mistake.

Thank you for taking the time to read this.

Cheers



Code:
<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{26675d21-e81f-4d5a-a70b-c1fd83e7c83d}">
  
    <LODS>
      
        <LOD MinSize="0" ModelFile="scip-signals.gltf"/>
      
    </LODS>
  


      
    <Behaviors>

<Component ID="t16" Node="x0_t16">
<Visibility>
<Parameter>
<Code>(A:AMBIENT WIND DIRECTION, Degrees) 67 &gt; (A:AMBIENT WIND DIRECTION, Degrees) 240 &lt; and if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>

<Component ID="t34" Node="x0_t34">
<Visibility>
<Parameter>
<Code>(A:AMBIENT WIND DIRECTION, Degrees) 241 &gt; (A:AMBIENT WIND DIRECTION, Degrees) 67 &lt; and if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>

</Component>
      

    </Behaviors>
</ModelInfo>
 

Attachments

  • SimObjects.zip
    624.2 KB · Views: 72
  • packagedefinition.zip
    683 bytes · Views: 65
Last edited:

=rk=

Resource contributor
Messages
4,491
Country
us-washington
A couple of things I notice; you have an empty "Airplanes" directory in your project sources folder, the software can easily create any folder it needs, so I don't think the empty folder will prevent a build, but it raises questions, especially without the project definitions.xml, but anyway.

Presumably you have an animation, that definition and GUID should go in on line 3, before <LODS>
"<Animation name="signals" guid="anything besides the GUID of the model" type="Standard" typeparam2="signals" typeparam="AutoPlay,Random" />

I'd try moving that "model info" closing statement, </ModelInfo> up above the "behaviors" tag and renaming that to "ModelBehaviors," both for opening and closing. (<ModelBehaviors> and </ModelBehaviors>)

That's all I notice. The animation line is key, absolutely necessary, the ModelInfo and ModelBehaviors edits I am pretty sure of.
 
Messages
212
Country
austria
Thank you for offering your help, i appreciate that.

I have added the "packagedefinitions" to my initial post, sorry for not thinking about that in the first place.

The "airplanes" folder was added when i created the asset group (in the sim) - but as i followed the tutorial i have added the landmarks folder, since it seems to work for him.
I'm sure i followed it step by step, but obviously i messed up somewhere along the way.

Presumably you have an animation
I do not, it's two objects which should be visible/invisible according to the winddirection.

But i'm a bit confused about renaming the <ModelInfo> - the xml starts with this line

Code:
<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{26675d21-e81f-4d5a-a70b-c1fd83e7c83d}">

Would i change this to

Code:
<?xml version="1.0" encoding="utf-8" ?>
<ModelBehaviours version="1.1" guid="{26675d21-e81f-4d5a-a70b-c1fd83e7c83d}">

That doesn't look right, does it ?
The ModelInfo is the first tag to be opened, shouldn't it be the last to be closed ?

I'm sorry if i sound like an idiot, but it's quite alot for me to learn.
 

=rk=

Resource contributor
Messages
4,491
Country
us-washington
No, the "ModelInfo" definition line #2, is fine, as far as I know. The term I recommend you edit is "Behaviors," to ModelBehaviors."

I am quoting from a model.xml for an animated SimObject I placed in the sim. The object flickered and later worked exactly as intended, with animation as a scenery object, but the xml essentially worked for SimObject and whether these terms I am suggesting might have made it flicker, would be yours to decide.

So yes, as far as I understand, "ModelInfo" is a separate argument from "ModelBehaviors," so it has to close first.
 
Messages
212
Country
austria
Thank you @Anthony31 - this seems to have done, well, something.
But now i'm confronted with another error i haven't seen before, you wouldn't know anything about that too, would you ?

Screenshot (36).png






Thank you very much for helping, i will gladly attach any file you may need to "investigate"

I can see the "output path does not exist" error - but to which asset group is that rteferring to ?
And why all of a sudden ?
 
Messages
769
Country
italy
You should check your placement .xml (SCIP.XML) for this error, line 736, column 260

That line can have a duplicate attribute name

A culript could be some Vectorplacement objects
662f2efdcecae2e071a064ce84605d76.jpg


Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Messages
212
Country
austria
A culript could be some Vectorplacement objects
How did you know ? This was it, i removed them, did them again (just a fence) and viola, now it works.

Thank you, beeing able to successfully compile the project again is a huge relief.

You need to insert another </Component> after

</Visibility>

and before

<Component ID="t34" Node="x0_t34">
And thank you for pointing this out, i wouldn't have found it without your help.
 
Messages
769
Country
italy
How did you know ? This was it, i removed them, did them again (just a fence) and viola, now it works.

Thank you, beeing able to successfully compile the project again is a huge relief.


And thank you for pointing this out, i wouldn't have found it without your help.
I supposed that was Vectorplacement because it is known to have lot of bugs, the duplicate properties is one of them.
Be aware that at the moment, when you compile the scenery and place in community there is a big issue showing several lods of the same object at the same time.

I would avoid using them till SU10

Some more info here:

 
Messages
212
Country
austria
I'm sorry for just replying now, i must have missed your post.
You're right, the vector placement tool seems a little messed up, fences start appearing in mid air etc.

I just wanted to thank you for your post, very much appreciated.

Cheers
 
Top