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

Swapping models depending on weather

Messages
12
Country
canada
I saw a question below about activation of activity based on time of day, and obviously there is the simple day/night switch in blender.

I am curious if there is a season / temperature switch that is similar.

I have scenery the uses boats and summer activities half of the year but then lakes freeze at random times when winter rolls around.

What I would like to do it have each model of boat switch to ice fishing huts, skidoos, skiers etc on the fly when the lake freezes. Then back when it thaws.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,530
Country
netherlands
For which sim is this? P3D v4 and above give some access to weather variables from scenery objects.
 
Messages
298
Country
unitedkingdom
It took a bit of fiddling but here's a model that appears below 1c. If you want it appear above 1c change the 'lt' in the xml to 'gt'

I would've thought choosing months would be more reliable but this is still a bit of fun and might be for something special.
 

Attachments

  • weeplan.zip
    398.1 KB · Views: 13
Messages
12
Country
canada
It took a bit of fiddling but here's a model that appears below 1c. If you want it appear above 1c change the 'lt' in the xml to 'gt'

I would've thought choosing months would be more reliable but this is still a bit of fun and might be for something special.
Oh cool!

You might be right about the seasons, but I thought the lakes would still unthaw if the temperatures were above 0c in the winter? In which case I would have a bunch of very wet ice fishers lol

Love your work btw, I'm using some of it!
 
Messages
298
Country
unitedkingdom
I guess it would actually, but there still might be freakishly warm days if people are using live weather at wintry times.

Suddenly converting everyone into beach babes for that one day might look a bit strange.
 
Messages
12
Country
canada
I guess it would actually, but there still might be freakishly warm days if people are using live weather at wintry times.

Suddenly converting everyone into beach babes for that one day might look a bit strange.
Canadians are an odd group!

I am still working out the details lol. Who knows, when the canada update comes out my banff scenery might get trashed anyway!
 
Messages
12
Country
canada
So since the canada update is out and there were no major changes to my banff area other than some terraforming work I think the best choice is to remove the boats from the lakes during the winter, and then I can add winter stuff to replace them.

I have dozens of boats with guids, is there a way to bat edit them to set the winter / summer trigger?

Could somone give me the string I would need? I have been going through the documentation but I think I'm overcomplicating this.

Any assistance would be appreciated.
 

Rotornut44

Resource contributor
Messages
551
Country
us-florida
So since the canada update is out and there were no major changes to my banff area other than some terraforming work I think the best choice is to remove the boats from the lakes during the winter, and then I can add winter stuff to replace them.

I have dozens of boats with guids, is there a way to bat edit them to set the winter / summer trigger?

Could somone give me the string I would need? I have been going through the documentation but I think I'm overcomplicating this.

Any assistance would be appreciated.

I'm not sure that there is any way to detect snow or ice on the ground, unless it has been added in the last update. I have just used 0 Celsius or less for icicles showing in the past. This may not function as intended under every circumstance, but it should get you close. You could always use a colder temp if the lake isn't frozen over. Though, I'm not sure how MSFS determines if a lake is to be frozen over. If it's temperature based or something else.

Also, they need to be turned into SimObjects for this to work if you haven't already.

Here's my code:
Code:
<?xml version="1.0" ?>
<ModelInfo version="1.1">
    <LODS>
        <LOD ModelFile="ESD_Icicles_Chunilna_Shed_Medium.gltf"/>
    </LODS>
    <Behaviors>
        <Include ModelBehaviorFile="Asobo\Generic\Visibility.xml"/>
        <Component ID="Icicles_Shed_Medium" Node="Icicles">        <!-- "ID" can be whatever. "Node" is the name (As defined in your modeling program) that you wish to show/hide -->
            <UseTemplate Name="ASOBO_GT_Visibility_Code">
                <VISIBILITY_CODE>
                    (A:AMBIENT TEMPERATURE, celsius) 0 &lt;=
                </VISIBILITY_CODE>
            </UseTemplate>
        </Component>
    </Behaviors>
</ModelInfo>

As far as batch goes. I'm sure one could be made, but I find that copying the code in usually goes pretty fast, even with a few dozen edits. (At least, faster than I could personally figure out and edit the batch.. lol)
 
Messages
12
Country
canada
I'm not sure that there is any way to detect snow or ice on the ground, unless it has been added in the last update. I have just used 0 Celsius or less for icicles showing in the past. This may not function as intended under every circumstance, but it should get you close. You could always use a colder temp if the lake isn't frozen over. Though, I'm not sure how MSFS determines if a lake is to be frozen over. If it's temperature based or something else.

Also, they need to be turned into SimObjects for this to work if you haven't already.

Here's my code:
Code:
<?xml version="1.0" ?>
<ModelInfo version="1.1">
    <LODS>
        <LOD ModelFile="ESD_Icicles_Chunilna_Shed_Medium.gltf"/>
    </LODS>
    <Behaviors>
        <Include ModelBehaviorFile="Asobo\Generic\Visibility.xml"/>
        <Component ID="Icicles_Shed_Medium" Node="Icicles">        <!-- "ID" can be whatever. "Node" is the name (As defined in your modeling program) that you wish to show/hide -->
            <UseTemplate Name="ASOBO_GT_Visibility_Code">
                <VISIBILITY_CODE>
                    (A:AMBIENT TEMPERATURE, celsius) 0 &lt;=
                </VISIBILITY_CODE>
            </UseTemplate>
        </Component>
    </Behaviors>
</ModelInfo>

As far as batch goes. I'm sure one could be made, but I find that copying the code in usually goes pretty fast, even with a few dozen edits. (At least, faster than I could personally figure out and edit the batch.. lol)
Right simobject first -> then script. Originally I was going to do something like you have above,the downside is that boats and people can just appear again on Tuesday when it's just a touch warmer even though the areas are closed. So im look for a seasonal switch say November until may where the boats are gone.
 

Rotornut44

Resource contributor
Messages
551
Country
us-florida
For months, you could use this code:
Code:
(E:LOCAL MONTH OF YEAR, number) 11 &gt;= (E:LOCAL MONTH OF YEAR, number) 5 &lt;= and

Note: All my month code is a range within the same year, I've not tried anything like November to May, so this code is untested, but I believe the structure should work.
 
Messages
12
Country
canada
For months, you could use this code:
Code:
(E:LOCAL MONTH OF YEAR, number) 11 &gt;= (E:LOCAL MONTH OF YEAR, number) 5 &lt;= and

Note: All my month code is a range within the same year, I've not tried anything like November to May, so this code is untested, but I believe the structure should work.
Nice thank you, I will play with that.
 
Top