11-05-2020, 04:42 AM
(This post was last modified: 11-05-2020, 04:52 AM by DerVVulfman.)
(11-04-2020, 06:32 PM)Melana Wrote: This is a nice script
I have some ideas for additional features:
-The possibility to put items from an actor inventory back into the normal inventory
-An option to chose the amount of items to distribute, similar to the shop window for example
-A limit for distributeable items to a character. (Like only up to 5 different kinds of items)
-A stack limit for the individual items like only 5 items of each kind.
Regarding the first option, you can. While in the Battle Items menu, the pop-up window that appears when selecting an item allows you to move items back to the so-called item-bag. This assuming that you left the configuration option for that feature alone.
However, the script itself has notes under the "MORE STUFF?" heading, this actually describing the options you just mentioned. But it also mentions that these options were for others to include, and that I was leaving the script as it is.
Just checking if an actor has X number of items is not too difficult
# Set ID of a potion
item_id = 1
# Get the list of the party leader's items
item_list = $game_party.actors[0].items
# Get the quantity of the potions in the list
item_qty = item_list[item_list]
# Print it
p item_qty
item_id = 1
# Get the list of the party leader's items
item_list = $game_party.actors[0].items
# Get the quantity of the potions in the list
item_qty = item_list[item_list]
# Print it
p item_qty
Assuming your lead has a potion or two, this would tell you how many. Or it will say nil if none exist. This could be used before throwing an item into an actor's personal grab bag. Simple things
But as I said, I'm stopping here. This is a basic system, and it should be adaptable with other battlesystems with some work.