Using variables with Yanfly message codes \nw[id] \na[id] etc.

I have a questions about message codes, and I hope I'm asking in the right place. I know that \nw[place id# here] will show the weapon with that exact id, but what if you want to show a weapon id that is stored in a variable? Any suggestions on how to best achieve this? I've tried a few things, but no luck yet. Sorry if this is a dumb question.
Yanfly's message core for MV

I was thinking something like

\nw[$gameVariables.value(346)] but this of course doesn't work
Have you tried using the variable message code, \v[x]? E.g. to use the value of variable ID 12:
Code:
\nw[\v[12]]
Have you tried using the variable message code, \v[x]? E.g. to use the value of variable ID 12:
Code:
\nw[\v[12]]
I should have thought of that der! That worked perfectly thank you! It makes since now that I see it.

Original thread: https://forums.rpgmakerweb.com/threads/using-variables-with-yanfly-message-codes-nw-id-na-id-etc.111416/