Yanfly Skill Cost Help

I think this is the place for my question, if this is not i'm sorry

I'm working with the "Yanfly Engine Ace - Skill Cost Manager"

I managed so far to get it work, except for the "custom cost" feature:

<custom cost:$game_party.item_number($data_items[01])><custom cost colour: 2><custom cost size: 20><custom cost icon: 192><custom cost requirement>$game_party.item_number($data_items[01]) >= 1</custom cost requirement><custom cost perform>$game_party.lose_item($data_items[01], 1)</custom cost perform>Here's what it look like in game:

Spoiler
7p49.png

I would like to display the number of usable item ID 001 remaining in my inventory as custom cost and i can't find the proper call.
No, this wouldn't be the right thread. This thread is for scripted equivalents to default event commands. Something like "how do I show a picture with a script call."


As to your question, I don't think there's any way to do that with that script by default. It would most likely require an edit of the script. I'm familiar with the script because I've used it myself, but you might consider linking to it for anyone else who might want to help you.


Alternative to that, you could display the items remaining in the description of the skill? The description box can use a lot of the same commands as the message box. You'd either need to run an event and assign the number to a variable and use \v or another script edit to add an "item number" type command.
I was asking for a script call that's why I posted here, sorry ^^

Too bad there is no way to display those value.

I played all the day with $draw[...] without success

Thanks for your help
I split it off from the topic. Please read the opening post next time, thank you.
Someone asked that same question before and here's the fix:


Get Shaz' Linked variables something script


link a variable to the number of that item so that everytime you call the variable it returns the current number of the item


show that variable on the custom cost part


PS: remove preceeding zeroes from the indices... just use 1 directly... adding the zeroes sometimes can cause problems so better not put them
I'm trying to do the same, but no success. I tried with Shaz's Linked Variables but I didnt even could start the game with it (Yeah, I'm sucking at scripting).

Would be great If anyone give an example of how link these two scripts to make the item counter.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-cost-help.25613/