Is it halal to develop or play games featuring randomized reward systems, such as Clash Royale chests or gacha games, where players receive random items of different rarities? Does the ruling differ between free packs and packs purchased with real money or in-game currency? Is it gambling?

Ustadh AbdulAziz al-Haqqan
Paying money, or currency you bought with money, for a pack whose contents you do not know is gambling, and selling such packs is the same forbidden transaction. If the pack or the currency came to you free and you paid nothing, there is no harm in opening it, though it is better to stay away from it. What is allowed is selling and buying a known item by name.