Jump to content

Question on Material swap.


Recommended Posts

This is just a question of curiosity. I have no idea on this and have not even begun to look into it.

 

So, I have a pine tree mod with a winter theme, basically just a mash up of SpiffySkytroopers work with his permission. I re-done the pine texture myself though.

 

I also did a texture to add snow to the pines but it looked too "heavy" to be consistently there. The plain green looked better for long term play.

 

Would there be a way though, to trigger a material swap when a certain weather is running?

 

I would only want it to trigger on load screens, like coming out of an interior, the trees are applied the snow texture if snow weather is current and it remains even if weather changes until next load screen. So a doorway, fast travel or sleep etc.

 

On load, if weather is still bad,snow is still on trees but if its clear weather, trees are more green and remain green until next load screen no matter the weather changes etc.

 

I guess this material swap would have to affect the tree textures as well as the tree lod textures.

 

Again, This is more a question of curiosity on whether its possible or not. I have zero understanding of scripting though I have tried to learn and managed to make one small edit to a script that actually worked.. I am a long way off understanding that s#*! tho.. haha

Link to comment
Share on other sites

I didn't tried it, but you can use material swaps in destruction stages on your tree: https://imgur.com/a/8z7uUqx#gSXi9Ec

Then use DamageObject so it shows a different swap if the current weather match the weather for the swap.

Of course you would need to dig in to scripts a bit to get it working, a draft:

 

Let's say you have a tree object with two damage stages, 0% damage shows the basic swap, and damaged object shows snow on the tree.

You would need to attach an script to the base object of the tree, something like this:

Scriptname SwapOnDamageStageChanges extends ObjectReference
Weather Property SnowWeather Auto

Event OnCellLoad()
    If Weather.GetCurrentWeather() == SnowWeather
        DamageObject(200.0)
    Else
        ClearDestruction()
    EndIf
EndEvent

You just need to fill the property for SnowWeather. Surely there is a better approach to this, using other event and whatnot, but that's the basic idea.

Edited by DieFeM
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...