You don't have to let Godot's collision layers and masks bitmask shifting nonsense make you hate your game dev life. Not anymore. I built a simple free tool you can use that will calculate bitmask collision layers and masks FOR YOU. You know, make the computer do the work for you because reasons. You have to do everything else, so this evens the score a little bit.
There is even a nicely formatted code example you can yoink and use in your project directly. Talk about scratching our own itchio, I built this tool to save my own tired noggin from the ouchies. No joke.
https://devwhiledead.itch.io/godot-collision-calculator
Works with Godot 4.3+ for sure and likely earlier versions too. If you've ever banged your head against collision layers/masks (like we all have to at some point as devs), you will understand why I had to make this for the community. This is my first contribution but I thought it was a good one, and I've got ideas for more tools and useful things I can make so we can make better games together.
Hopefully you will download, enjoy, and leave a note if you feel like it. Just wanted to help out and give devs something that is useful, but let me know if it helps you or you find any bugs or issues so I can make this better! Thank you.