Actor Inventory

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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

Get it at Hime Works!

Screenshots

These are a few scenes/windows I've customized for actor inventories.

Modified shop buying/selling. Press page up/page down to change the current actor.

The current actor will buy the item.



Modified battle item usage. The items are selected from the current actor's inventory.



Installation

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

All custom menus should be placed below the actor inventory scenes.

Usage

The following script calls are available if you want to add or remove items for specific actors.

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.

Notes

More scripts will be required to make this a fully functional system, including

1. A way to exchange items between actors

2. A better item scene to indicate who the current actor is

You are free to submit your own scripts to improve the system.
 
Last edited by a moderator:

McTricky

Veteran
Veteran
Joined
Jul 10, 2012
Messages
790
Reaction score
386
First Language
English
So when used in battle, will each party member use items only from their own inventory?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Yes. I have updated the description to explain how the customized scenes work.
 

pclaydon

Veteran
Veteran
Joined
Apr 7, 2012
Messages
77
Reaction score
21
First Language
English
Primarily Uses
how does gaining items after battle work?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
They're just added to the party leader. Additional scripts will be required if you wish to choose who takes the drops.
 

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
Tsukihime,

Every time I want to add a new script to my game it seems as though you have the closest thing to what I need.  So I am looking to make a Shining-Forcesque game and I need to have a system that allows me to have actor inventory for each character (which you have), ability to trade between characters (which you have), set item limits for each character (not sure if yours does this yet,  Kreeds actor inventory did), and the ability to buy items in a shop and decide which character gets it.  Can your scripts do all this?  One other thing that would be nice would be to have the shop, if you are buying a weapon, ask you if you want to assign the weapon to the actor and if you say yes ask if you want to sell your old weapon to him.  That was a nice feature in Shining Force 3, it sped up the shopping scenes a lot.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I don't know what you mean by "item limit for each character". Do you mean that one person can only carry 500 items while another can carry 1000?


How does Kread's script handle item gaining when an actor's inventory is full?


The modified shop scene I provided assumes the leader gets the item, but it can be modified to allow the player to choose which actor will take it.


The "equip weapon/armor" should be done as an add-on.
 
Last edited by a moderator:

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
Sorry for not clarifying.  I am thinking much smaller.  And the limit would be the same for all characters.  Let's say 4 items each can be taken into battle.  The preference would be if your inventory is full that you need to discard something in order to carry the current one.

Here is a link to Kreed's script:

http://grimoirecastle.wordpress.com/rgss3-scripts/gameplay-scripts/actor-inventory/

I can't check right now the script as I am at work but will look later to see what I can find.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Kread's actor inventory is different. It requires you to equip items for use in battle.


My actor inventory just converts it from party inventory to actor inventory, so each actor can only use whatever they have.
 
Last edited by a moderator:

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
Sorry if this seems like a silly question, but what is the difference?  In your actor inventory aren't you taking it into battle?  Is there a way to limit your inventory per actor to 4?  I guess I am not looking to have a party inventory but instead have a storage area that between battles can be accessed and traded from.  So I guess that would be the party inventory per say.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
If you limit your actor's inventory to 4 that means you can only ever carry 4 items per actor. That's all this script does. It doesn't add an extra "battle inventory" or anything.


There would be no separate party inventory where your actors could re-stock in between battles since there is no more party inventory.
 
Last edited by a moderator:

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
Yes sir that is correct.  But that is what the item storage is for.  If you want your character to carry something else you go to your headquarters and you exchange items, or trade with other players.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Oh, if you have your own item storage then that would work.
 

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
I have a request for your actor inventory, could you make it so that the characters name or picture appears on their inventory screen? Since we can cycle through inventories it would be nice to know for sure which one we are on.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I am not sure how it should look. Do you have ideas?
 

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
The most logical way to do it and probably least time consuming would be in the bar that appears at the top of the screen.  It was empty for me at least and could easily fit the characters name and maybe even their class.  Added their face would be harder, unless you could have it be behind the main window with a semi transparent background.  Just an idea.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I think it would be better to request for an item scene that provides actor details on the screen. The default scene really doesn't provide any place to put it.


The bar at the top is the help window and displays item descriptions.
 
Last edited by a moderator:

Hyomoto

Staring Contest
Veteran
Joined
Oct 4, 2012
Messages
47
Reaction score
0
First Language
English
Seriously?  Once again, my bad.  The forum behaves oddly.
 
Last edited by a moderator:

Hyomoto

Staring Contest
Veteran
Joined
Oct 4, 2012
Messages
47
Reaction score
0
First Language
English
Ugh, double post.
 
Last edited by a moderator:

Hyomoto

Staring Contest
Veteran
Joined
Oct 4, 2012
Messages
47
Reaction score
0
First Language
English
So this was a while ago, hope you'll get this.  I was looking through the script, and I'm sure I can muscle this out eventually but it may turn out more fruitful just to ask.  Your actor inventory returns

def weapons    @inventory.weapons  endWhich comes from,

Code:
 def weapons    @weapons.keys.sort.collect {|id| $data_weapons[id] }  end
 

But the game default returns,

Code:
def weapons    @equips.select {|item| item.is_weapon? }.collect {|item| item.object }  end
Which means that instead of returning what your character had equipped, it returns the weapons in their inventory.  My question is simply, was that intentional or did you make a mistake?  If you try to get the characters equipped weapon via the above method, it will obviously not work, so it breaks compatibility with anything that used this method.  But, I may just not be reading into it far enough or misunderstand how it worked to begin with.  Commenting it out fixes it, but now I have to see what I broke in your scripts.
 
Last edited by a moderator:

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,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top