Jump to content


Photo

Actor Inventory


  • Please log in to reply
26 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 27 July 2013 - 01:16 PM

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.

actorinventoryscenes1.jpg

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

actorinventoryscenes2.jpg

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.

Edited by Tsukihime, 18 February 2014 - 03:14 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#2 McTricky

McTricky

    Advanced Member

  • Members
  • 400 posts
  • LocationLondon, United Kingdom
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 27 July 2013 - 02:20 PM

So when used in battle, will each party member use items only from their own inventory?



#3 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 27 July 2013 - 02:28 PM

Yes. I have updated the description to explain how the customized scenes work.
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#4 pclaydon

pclaydon

    Advanced Member

  • Members
  • 47 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 29 July 2013 - 11:01 AM

how does gaining items after battle work?



#5 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 29 July 2013 - 11:20 AM

They're just added to the party leader. Additional scripts will be required if you wish to choose who takes the drops.
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#6 Caedmon

Caedmon

    Advanced Member

  • Members
  • 233 posts
  • LocationUnited States
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 15 November 2013 - 10:07 AM

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.



#7 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 15 November 2013 - 12:08 PM

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.

Edited by Tsukihime, 15 November 2013 - 12:09 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#8 Caedmon

Caedmon

    Advanced Member

  • Members
  • 233 posts
  • LocationUnited States
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 15 November 2013 - 02:01 PM

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://grimoirecastl...ctor-inventory/

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



#9 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 15 November 2013 - 02:43 PM

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.

Edited by Tsukihime, 15 November 2013 - 02:43 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#10 Caedmon

Caedmon

    Advanced Member

  • Members
  • 233 posts
  • LocationUnited States
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 15 November 2013 - 03:08 PM

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.



#11 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 15 November 2013 - 03:28 PM

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.

Edited by Tsukihime, 15 November 2013 - 03:35 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#12 Caedmon

Caedmon

    Advanced Member

  • Members
  • 233 posts
  • LocationUnited States
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 15 November 2013 - 04:16 PM

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.



#13 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 15 November 2013 - 04:29 PM

Oh, if you have your own item storage then that would work.
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#14 Caedmon

Caedmon

    Advanced Member

  • Members
  • 233 posts
  • LocationUnited States
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 17 November 2013 - 11:05 PM

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.

#15 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 18 November 2013 - 12:00 AM

I am not sure how it should look. Do you have ideas?
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#16 Caedmon

Caedmon

    Advanced Member

  • Members
  • 233 posts
  • LocationUnited States
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 18 November 2013 - 09:41 AM

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.



#17 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,409 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 18 November 2013 - 11:07 AM

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.

Edited by Tsukihime, 18 November 2013 - 11:07 AM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#18 Hyomoto

Hyomoto

    Staring Contest

  • Member+
  • 41 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 10 February 2014 - 06:50 PM

Ugh, double post.


Edited by Hyomoto, 10 February 2014 - 06:51 PM.


#19 Hyomoto

Hyomoto

    Staring Contest

  • Member+
  • 41 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 10 February 2014 - 06:49 PM

Seriously?  Once again, my bad.  The forum behaves oddly.


Edited by Hyomoto, 10 February 2014 - 06:51 PM.


#20 Hyomoto

Hyomoto

    Staring Contest

  • Member+
  • 41 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 10 February 2014 - 06:50 PM

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
  end
Which comes from,
 def weapons
    @weapons.keys.sort.collect {|id| $data_weapons[id] }
  end
 
But the game default returns,
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.


Edited by Hyomoto, 10 February 2014 - 06:58 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users