Hat of Wonders (5e Equipment)
From D&D Wiki
Wondrous item, Legendary
The user of this hat can use a bonus action to reach into it's depths and pull out an object the hat's sentience thinks the user needs.
Sentience. The Hat of Wonders has a Lawful Good sentience with an Intelligence of 12, Wisdom of 20, and Charisma of 6, and can only interact and communicate with the rest of existence through the objects it gives to its users. However, it can see and hear anything within 120 feet of it (Truesight). It cannot initiate a conflict against its bearer, and instead becomes hostile as shown below.
Personality. The hat is very good at making predictions as to what the user actually needs, sometimes to such a degree that the user might not even understand why they might need an item the hat gives them. It typically follows the user's tastes, but never makes weapons of any kind, except as below. The hat's definition of need is a personal one, especially so since it can't communicate except by the items it gives. For example, if it thinks the user needs to calm down because that user is in danger or something, it might provide oh so useful items such as scented candles and a yoga mat. If things are calm however, and the user doesn't definitively need anything in particular, it tends to give the user what they want, unless it has a message to deliver.
The hat can understand any language spoken to it, and can be intimidated. If the user succeeds on an intimidation check against the hat, it'll give them any item they ask for directly, instead of items they need. However, this will also cause the hat to betray the user, slowly spiraling out of control with the amount of things it makes. This can quickly become dangerous, since the hat can't do anything else besides make items appear. Keep in mind, the hat can also be reasoned with, and will stop making new items if the threat has passed and it stops thinking it's in danger.
If the hat turns hostile, use this page for the encounter. Note that the hat will not fight willingly if others can protect it or it doesn't truly think it is in danger. It might also turn hostile however if met with a truly massive amount of different requests at once, such as from multiple people.