Damage Formula per MV

Good evening, I still have a problem with the damage formulas and now I'll explain I use RPG Maker MV.. I would like to calculate them as in D&D, I have already created variables with the various types of dice combined e.g. 1D4 1D6 1D8 etc but I would like the damage of some skill was calculated (1D6 * the actor's level).
I've tried all the ways I could find on the internet, but it always gives me 0 or gives values outside the "range".
Also I'm using Yanflee enemy level so I would need it for them too.
I ask for help.....
Thank you
Math.floor(Math.random() * 6) + 1 will get you a random number from 1 to 6, i.e. the same as 1D6.

(Math.floor(Math.random() * 6) + 1)*a.level is 1D6 multiplied by the actor's level.

Original thread: https://forums.rpgmakerweb.com/threads/damage-formula-per-mv.164436/