Actor Inventory

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

This script changes the inventory system from a party-based inventory to an actor-based inventory. Each actor now has its own inventory. The inventories are preserved even if you remove an actor from the party and then add them later.

By default, any “gain item” or “remove item” calls will remove items from the party leader. You will need to use script calls to add items to other members.

This script does not provide any scenes or windows so you will need to install other scripts that will provide those. This script also does not provide a way to exchange items between actors.

Download

Script: download here
Required: Core – Inventory

Here are some modified scenes for the actor inventory based on the default scenes/windows.

Or get the entire scene package here.

Addons

Compatibility patches

If you are using Instance Items, you will need a patch for that. Get it here.

Installation

Place this script below Core – Inventory and above Main. If you are using the Shop Manager, these scripts go above it

Usage

The following script calls are available:

gain_weapon(id, amount, actor_id)
gain_armor(id, amount, actor_id)
gain_item(id, amount, actor_id)
lose_weapon(id, amount, actor_id)
lose_armor(id, amount, actor_id)
lose_item(id, amount, actor_id)

Where id is the database ID of the object you want to add/remove, amount is the amount of you want to add/remove, and actor_id is the actor that you want to add to or remove from.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

47 Responses

  1. Anonymous says:

    Is an MV version in the works?

  2. Indigoair says:

    Hello, I was wondering a couple things that I couldn’t find specifically outlined in your description;

    I’m assuming when the “item” command is selected by a player in battle, they only have access to the items in their own inventory?

    Also, is it possible to still have a communal inventory but only have certain items sent to a character-specific inventory? This would be ideal for the kind of battle system I am trying to implement.

    • Hime says:

      Yes, during battle, the inventory will be pulled from the actor.
      This script assumes that inventory will be handled by actors.

  3. AllegedMexican says:

    Whenever I use the select key items command it only pulls the item list from the party leader. Is there any way I can get it to show a list of all the items that the party collectively has?

  4. LaganRK says:

    I can pass all items of actor[1] to actor[2] inventory?

  5. Silenity says:

    Is it possible to perhaps add a skill equip?
    So that an actor can only bring a few skills in each battle.
    So even though actor 1 has 6 skills learned, he can only bring in 3 skills per battle.

  6. Safire says:

    Excuse me, but I was trying to use this script with Mr. Bubbles “Too Much Information Item Scene” and, even when items appear in the Trade Scene, they don’t appear in the Item Scene. Is there a way to solve this?

    ~Sorry for my bad english, and sorry if this sounds rude, I think it sounds rude but I don’t know how to put it with other words >w<~

    • Hime says:

      This script completely changes the way items are handled: instead of the party holding all the items, each actor holds their own items. Other scripts would likely need to be changed accordingly.

  7. Bigace360 says:

    Did my question get deleted?

  8. Bigace360 says:

    Hey Hime,

    I was trying to create a addon that limited an actor’s inventory from exceeding X amount, but for some reason the game still exceeds the max amount of items in the actors inventory no matter what I do. Here’s my source code if you think you can help me out with this and if you want you can just apply it to your Actor Inventory script later on.

    https://db.tt/2ktRWmP8

    Other scripts I’m using are:

    Instance Items
    Core – Inventory
    Core Inventory – Instance Items patch
    Actor Inventory
    Actor Inventory – Instance Items patch

    • Hime says:

      The item max methods only determines how much you can have of a specific item, not of inventory in general. You will need to add additional logic to gain_item (or in your events) to check whether the max number of items has been exceeded.

  9. Paramecium13 says:

    I am having some trouble with this script. When I try to add an item to an actor's inventory with either an event command or a script, the menu says that the actor has 0 of that item. When I remove an armour, the menu also says I have 0 but I am still able to equip it again. When I use an event to assign a variable to the number of a certain item in the inventory and then to display that number, it also returns 0. However, the actor trade scene (from your other script) displays the correct number of items and allows trading.

    • Hime says:

      Are you using the custom scenes provided? Those are required to properly display actor inventories.

      • Paramecium13 says:

        I updated this script to the version released July 30, 2014 and all the issues were solved. I first downloaded it a little over a month ago and didn't expect there to be an update.

        • Hime says:

          Oh that bug, ya I update scripts from time to time. Sometimes I don't publish any fixes. If you're following me on twitter I usually make smaller announcements there like if I fix a bug or something.

  10. Misaki says:

    Would you ever consider making a way to determine who gets drops from item chests and such? I'm using GubiD's TBS along with this script for a Fire Emblem-esque game, but it feels odd to have an item go to the party leader's inventory when another member found that item.

  11. Chubbins says:

    Is there a way for this to be used with either Yanfly or Neonblack's Skill Cost scripts, specifically with item costs? So that to use an ability the user has to have an item in their inventory?

    • Hime says:

      It might, depending on how they are written. If they require you to type in a formula then you can just check the actor's inventory instead of the party's inventory.

      • Chubbins says:

        Sorry to bother you again, but I'm still new to scripting in RGSS3. What string would I use to check for the actor's inventory instead of the party's inventory?

        • Hime says:

          I don't know how you would reference the actor but if "self" refers to the actor, you can say

          self.inventory_items.include?($data_items[3])
          

          Which checks if item 3 is in your inventory.

  12. IceSage says:

    Sorry if I missed it… But is there a way to check if a person has something in their inventory? The normal way is broken if you add this. (Either this or the "core" script.) I have conditionals that check if an item is in the inventory… And with these scripts it just assumes everything is in the inventory. So If I put a conditional to check for "Apple" in the inventory, and put a message to say, "I have an apple." Even if you don't have an apple in ANY inventory, it will still run that conditional as true. I apologize if this is mentioned somewhere, but I'm not seeing it.

  13. Anonymous says:

    Hey there – I've found your scripts really helpful.
    I do have a small problem with this one though.. Even when my main character (actor id 1) isn't in the party, all of the items go to his inventory instead of the character who's actually the party leader at that time.

  14. Feldherren says:

    I keep turning up, like a cockroach, or something.

    I seem to have run into an issue with at least this script (or, well, the scenes) and the key items prompt. When last you saw me, I was looking into possibly making another person's script compatible with yours, but it seems that the select key items event command won't register any key items in any inventory. Furthermore, attempting to select the empty slot crashes with the error:

    Script 'Actor Inventory Scenes' line 72: NoMethodError occurred.
    undefined method 'usable?' for nil:NilClass

  15. I keep getting an error whenever I select an item (Empty Inventory) for an actor and when trading items when only 1 actor exists and no items available. It also gives me the same error during battle. Also I am using Neon Black’s battle engine.
    Error:
    line30: NoMethodError occurred
    undefined method ‘last_item’ for nil:NilClass

  16. unfauglith says:

    This is a really great script. Thanks a lot!

    I’m wondering, could it be possible to add a limit on how much items an individual actor can carry? This would make a game more interesting because the player would need to distribute the items equally.

    Sorry for bad english 😛

    • unfauglith says:

      Ah. I know there’s already some scripts out there that put a limit on the inventory, but they don’t seem to work with this script. Sorry and thanks again.

      • Hime says:

        I have not thought of a good way to enforce inventory limits so you should see if they are willing to add support for the Core: Inventory script that this script relies on.

      • Hime says:

        I have not thought of a good way to enforce inventory limits so you should see if they are willing to add support for the Core: Inventory script that this script relies on.

  17. Idetrorce says:

    very interesting, but I don’t agree with you

  18. hytporsche says:

    This is pretty AMAZING man! If their are any Suikoden 1 lovers out there willing and trying to make a Suikoden 1 fan made game, you basically just hit the nail on the head for the actor inventory system 🙂 Well done!

  1. October 13, 2013

    […] can also use this script with Tsukihime’s Actor Inventory, find the right version […]

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax