But honestly, is that really going to save you much time/work? Having to set up the variable and call the common event every time isn't really any harder than just showing the message manually.
Until you decide you want to change the name of the item or how the message displays, in which case you'd have to go back through every event and edit them, instead of changing one common event.
On that note, I'd actually recommend making a different variable for each item name instead of reusing the same variable every time. Something like:
- Common event has "You gained \v[1]"
- At the beginning of the game, there's an event that says "variable 2, doomSwordName = 'Sword of Doom', variable 3, potionName = 'Healing Potion'", etc. Finally have a variable like "variable 1, itemGained"
- When giving the player an item, set variable 1 = variable 2, or variable 1 = variable 3, then call your common event
Then, if you want to change "Healing Potion" to "Health Potion", you only have to change the one event at the beginning of the game where you named variables 2, 3, etc. If you want to change how the display message looks, you only change the common event.
Archeia recommended making a common event for giving items to players when I was new to RPG Maker and I ignored the advice and just put it in my events manually. Then I decided I wanted to add icons later. It took a
lot of work and I missed some that I had to keep going back and changing every time I'd find a missed one. I could've saved so much time and QA by making things reusable as possible.
If you wanna save yourself some work, then a plugin might be a better option instead.
If you're new to RPG Maker, Plugins
can be really helpful and save you a lot of time, but keep in mind they aren't typically tested for compatibility with each other or even properly tested within their own functionality. It's common for new devs to go Plugin-crazy and just grab one for everything, but there's a lot of value in learning what the engine can do on its own and only look for Plugins where there's a significant gap in functionality you need (like overhauling the battle system or, as mentioned, if you want item gains to be in a separate special window).