Yanfly Cost Manager- Display Current nº of Items

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
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.



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!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
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...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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)
 

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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?
 

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top