Hey there, I’ve been working on revising the weather events on my map, and have been using Ambiance volumes along with the Weather Types system in the Level file to try to create areas that have unique / local weather.
This hasn’t gone badly, but I’ve found myself running into a wall with the way that the Weather Masks work. I read into the documentation on it here:
and realized that the way certain volumes allow one weather type vs another in it is by using a Bitmask as described here:
So I’ve gone down the rabbit hole of learning about Bitmasks, and I understand the basic idea of how they work, and I understand how 0b01 represents bitmask 1, 0b11 represents the combination of 1 (0b01) and 2 (0b10), and all that described in the second doc.
My question now is how do a utilize this to restrict or allow for specific weather events?
For example I’ve added a new weather type that’s on mask 3, in binary this should be 0b11, which is also the same value as 1 and 2 being combined. How would I go about combining mask 3 and 1 so it can only do my custom weather event and rain in that volume (Would I just do the math for combining them and make a number that’s longer?).
What if I wanted to have my custom weather event but no rain or snow, if I do 3(0b11) it will allow all of them.
I’m not entirely sure where to go from this point. In addition, the mask for old volumes before this change were values like “4294967295”, and these seem to allow for all weather events. In binary this is just all 1s, which would be the combination of all weather masks enabled?
Ultimately I’m just confused about how I should combine the masks to make a binary number that I can then convert into the actual mask number that gets the desired combination of weather events within the volume.
Thanks to anyone who reads through this, as I’m not entirely sure what I’m talking about and it’s probably pretty confusing to read too!