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.

For this purpose there is the new Material Scripting (LUA Script). There is an example LUA file in the SDK where an object changes the color of the diffuse channel depending on the season (Material Season Example.lua).Now that we know how to change the visibility of a model's part with RPN code, is there a way to change a texture with RPN code?
!lua
local TextureWinter = "mh_flughafen_aeroclub_wi.dds"
local TextureSommer = "mh_flughafen_aeroclub.dds"
local month = varget("E:ZULU MONTH OF YEAR", "Number")
if month > 2 then
varset("T:DiffuseTexture", "string", TextureSommer)
else
varset("T:DiffuseTexture", "string", TextureWinter)
end


Where would the script go in your addon scenery though?
Has anybody compared the performance between LUA script and duplicating model parts? I guess the script is more elegant, but with a model with multiple materials you would also get many scripts to put with your scenery, Just read you can put them in a local scripts folder that you add via add-on.xml though.




Here's something really twisted. It shows an object from dusk to dawn, but only during the summer. It is based from the no_day above, to show the use of even more variable conditions.
XML:<PartInfo> <Name>no_day_summer_only</Name> <Visibility> <Parameter> <Code> (E:ZULU MONTH OF YEAR, number) 6.0 >= (E:ZULU MONTH OF YEAR, number) 8.0 <= (E:TIME OF DAY, enum) 0 == (E:TIME OF DAY, enum) 2 == (E:TIME OF DAY, enum) 3 == or or and if{ 1 } els{ 0 } </Code> </Parameter> </Visibility> </PartInfo>
Note the or or and order. We loaded the 'stack' with conditions. Then we bring them off in the reverse order. We detect night or dusk or dawn, and it must be summer.


<PartInfo>
<Name>season_winter</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 12.0 >= (E:ZULU MONTH OF YEAR, number) 2.0 <= or if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>season_not_winter</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 3.0 >= (E:ZULU MONTH OF YEAR, number) 11.0 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
(E:ZULU MONTH OF YEAR, number) 6.0 >= (E:ZULU MONTH OF YEAR, number) 8.0 <= and // make sure it's summer
(E:TIME OF DAY, enum) 0 == (E:TIME OF DAY, enum) 2 == (E:TIME OF DAY, enum) 3 == or or // 'or' the desired times of day; or simply use (E:TIME OF DAY, enum) 1 != (as mentioned before)
and // join the two clauses since both need to be TRUE to enable the stated condition; and finally ...
if{ 1 } els{ 0 } // explicitly leave TRUE or FALSE on the stack (not strictly necessary, I think, but good practice anyway).
(E:ZULU MONTH OF YEAR, number) 6.0 < if{ 0 quit } // if earlier than June: set FALSE and quit processing what follows
(E:ZULU MONTH OF YEAR, number) 8.0 > if{ 0 quit } // if later than August: set FALSE and quit processing what follows
(E:TIME OF DAY, enum) 1 != if{ 1 } els{ 0 } // set TRUE if it's not day


<!-- Season visibility -->
<PartInfo>
<Name>season_spring_north</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 3.0 >= (E:ZULU MONTH OF YEAR, number) 5.0 <= and (O:WorldBase.Latitude, radians) 0.5 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>season_summer_north</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 6.0 >= (E:ZULU MONTH OF YEAR, number) 8.0 <= and (O:WorldBase.Latitude, radians) 0.5 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>season_fall_north</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 9.0 >= (E:ZULU MONTH OF YEAR, number) 11.0 <= and (O:WorldBase.Latitude, radians) 0.5 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>season_winter_north</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 12.0 >= (E:ZULU MONTH OF YEAR, number) 2.0 <= and (O:WorldBase.Latitude, radians) 0.5 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>season_spring_south</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 9.0 >= (E:ZULU MONTH OF YEAR, number) 11.0 <= and (O:WorldBase.Latitude, radians) -0.5 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>season_summer_south</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 12.0 >= (E:ZULU MONTH OF YEAR, number) 2.0 <= and (O:WorldBase.Latitude, radians) -0.5 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>season_fall_south</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 3.0 >= (E:ZULU MONTH OF YEAR, number) 5.0 <= and (O:WorldBase.Latitude, radians) -0.5 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<PartInfo>
<Name>season_winter_south</Name>
<Visibility>
<Parameter>
<Code>
(E:ZULU MONTH OF YEAR, number) 3.0 >= (E:ZULU MONTH OF YEAR, number) 5.0 <= and (O:WorldBase.Latitude, radians) -0.5 <= and if{ 1 } els{ 0 }
</Code>
</Parameter>
</Visibility>
</PartInfo>
<!-- end season visibility -->



Hi.Animated or not, the idea was to have it rotate to the prevailing wind as set in the weather options.
