Yanfly Cost Manager- Display Current nº of Items

Yanfly Cost Manager - RGSS3

I'm using this script to create a Final Fantasy-like THROW skill (havent found any script for that),

so it's basically:

A skill - SHURIKEN

Using the skill cost a shuriken (item).

Then here, thats zero but default, I need it to show the current number of Shuriken (item) I have in my inventory.

[IMG]http://i.imgur.com/bscyxev.jpg?1[/IMG]

I'm not the kind of guy who just post around for help without even trying or searching.

I've search without any results and tried to create strings, like <custom cost: $draw_party.item_number($data_items[40]) , 1)>  - Nothing happens and I'm not a programmer, so I dont know why exactly.

<custom cost: ?><custom cost requirement>$game_party.item_number($data_items[40]) >=1</custom cost requirement><custom cost perform>$game_party.lose_item(($data_items[40]), 1)</custom cost perform>  Any help is welcome. Thanks!
It may just be that you haven't set up the first few things correctly, and it maybe needs all of them to work properly. Try putting this before the start of your custom cost requirements/perform sections:

<custom cost: 1x><custom cost colour: 0><custom cost size: 16><custom cost icon: 192>but instead of 192 for the icon, use whatever icon index is associated with your shuriken item.That will show you how many you need each time you use the skill. It will NOT show you how many you have in inventory. If you also need it to show how many you have, that might require a script mod.
It may just be that you haven't set up the first few things correctly, and it maybe needs all of them to work properly. Try putting this before the start of your custom cost requirements/perform sections:

<custom cost: 1x><custom cost colour: 0><custom cost size: 16><custom cost icon: 192>but instead of 192 for the icon, use whatever icon index is associated with your shuriken item.That will show you how many you need each time you use the skill. It will NOT show you how many you have in inventory. If you also need it to show how many you have, that might require a script mod.
I see. But I need it show how many I have.

A script mod? Damn, I didnt know it was that complicated! I mean, I thought if you enter a string similar to <custom cost perform> ones, it would work!

Thanks for the help anyway.

If anybody else have any idea how show how many items I have...
How do you want it to show? Do you want the amount in inventory to show instead of the amount required (which doesn't seem right to me)?


Something like this?

Code:
<icon> Shuriken         1x <item icon> (qty in stock)
How do you want it to show? Do you want the amount in inventory to show instead of the amount required (which doesn't seem right to me)?

Something like this?

<icon> Shuriken 1x <item icon> (qty in stock)
Yeah! Actually, just  " <icon> Shuriken  <qty in stock>".

See the picture? Just replace the 0 with the qty in stock.
But how does the player know how many it's going to take? And if there's only one figure there, how do they know that's how many you have in stock, and not assume that's how many are required to use the skill?


You don't want to tailor the whole system for just ONE particular skill/item. What if you have another skill that uses 2 items instead of 1?
But how does the player know how many it's going to take? And if there's only one figure there, how do they know that's how many you have in stock, and not assume that's how many are required to use the skill?

You don't want to tailor the whole system for just ONE particular skill/item. What if you have another skill that uses 2 items instead of 1?
That's not really a problem. I'm pretty sure I'm not going to make a skill that uses more than one item. But if I do, I would just advice it in the skill description.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-cost-manager-display-current-n-of-items.18689/