MZ VisuStella - Skills and States core: Skill Costs question

So I'm using visustella's skills and states core to have certain gun skills require certain ammunition.
It works brilliantly.

My issue is that in combat, when selecting the skill, it tells you how many ammo the skill takes, but there's no obvious way to tell how much of a certain type of ammo you have left.

So, my heavy shot takes a heavy slug and the skills says "Heavy Shot: 1X [icon for heavy slug]". But until I run out, I have no idea how many I have left during combat. I can't realistically make an ammo gauge as there are a few different ammo types.

So what I'm wondering: is there a way to have the skill show how many time I can use it based on it's cost instead of showing the cost. (or both, the number left though, is the key information I'm after)

Any other interesting suggestions or work-arounds would be very much appreciated.
Well, it figures that right after I ask, I finally figure it out.
Pretty easily actually, it goes in the "Cost Display" javascript setting for the item costs in question:
I added this to the end of the cost display code (but before the "return" line), and it show me
how many of the item in question I have left by adding "/ [count]" to the end of the display text.
In this case, itemID 44:


//TEXT ADD AVAILABLE:
text += '/';
text += $gameParty.numItems($dataItems[44], 0);
Another solution that might also be nice, is that you can include the number of that item held by the party in the skill description so it shows up like below:
1601744963805.png

with a code like Potions left: \ItemQuantity[1] (though it would require VS Message Core for that simple textcode)

The solution you've found is good too though - hopefully this can also help if anyone else is curious though. 😀
Oh, that's really clever, Ghost. That never would have occurred to me and may come in handy for other reasons. Thanks!
Well, it figures that right after I ask, I finally figure it out.
Pretty easily actually, it goes in the "Cost Display" javascript setting for the item costs in question:
I added this to the end of the cost display code (but before the "return" line), and it show me
how many of the item in question I have left by adding "/ [count]" to the end of the display text.
In this case, itemID 44:


//TEXT ADD AVAILABLE:
text += '/';
text += $gameParty.numItems($dataItems[44], 0);


Sorry to necro this thread but I'm in a similar situation.

If I understand correctly, when I add this to the plugin settings, it will only show me the total owned of item #44. I'm trying to include the total owned of the item a particular skill needs (1/99 arrows, 4/100 bullets, 99/10,000 rubber duckys...).
Unfortunately I can't code js, but I figure it would take replacing "($dataItems[44], 0)" with whatever determines how many of the item being used the player has.

The solution to add it to the skill description would be nice, but I also need it to be added to the "attack" command, as weapons like the bow or gun change the attack skill to one that consumes 1 arrow/bullet.

Thanks in advance!

Original thread: https://forums.rpgmakerweb.com/threads/visustella-skills-and-states-core-skill-costs-question.128217/