Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Multiple Inventories V2.0

Status
Not open for further replies.
Multiple Inventories
Version: 2.0


Introduction

This script allows you to easily have multiple inventories and gold
and be able to switch between them in game.

Screenshots

Go to your local grocery store, look at the bagger, look at how he bags things in different bags. There's your screenshot.

Demo

http://www.rmxp.org/forums/downloads.php?do=file&id=968

Script

The families don't like splitting their items and money between inventories.
(Don't post asking for the script please, thank you)

Instructions

Just add above main.

To switch the inventory just use this call script

Code:
$game_party.switch_inventory([i]inventory ID[/i])

where inventory ID is the ID of the inventory you want to switch to.

FAQ

Awaiting Question

Compatibility

does not require SDK Part I (but it is recommended)


Author's Notes

Scripted in less than an hour
 
OMG Trickster that was awesome! I went to the grocery store but they werent open at midnight. I want a refund! (All proceeds go to the families.)

Is there a way to combine inventories?
 

Shiro

Member

Wow Trick, this is one very sexy script. This, like many, were scripts I was looking for a long time ago (but gave up since I couldn't find/request it).

Thank you very much :) Works flawlessly on my end. I like how it's not just inventory, but gold as well.

Also, that is the best screenshot in existance.
 

arev

Sponsor

Go to your local grocery store, look at the bagger, look at how he bags things in different bags. There's your screenshot.
This is starting to be really irritating. Couldn't you just omit the screenshot part? Not to mention that sometimes that bloody screenshot would be useful :p
 
Well, I only have one thing to do.
*goes crazy clapping like Gant in Phoenix Wright 1-5*
Oh, and well done. That too.
 
I've been wanting a script like this for a while. Seriously, the game I worked on with RPG Maker for the PS1 would've benifited greatly from this kind of script, but well, RPG Maker for the PS1 kinda sorta doesn't have scripting...

Anyway, it's cool, but how do you combine inventories?

Say I want a game where you start out with say, 4 different teams doing their own thing, each with their own inventory. However, at some point in the game, they all join up and all their items and gold are all put together. Is that possible with this script at this moment? Also, could I just combine a few? In my example, what if only two teams could join up, so only their inventories combined...how about that?
 
And Added Updated to Version 2.0

Adds Combining/Merging Inventories

Call this in a call script

$game_party.combine_inventory(base, merge[, overflow])

where:
base is the base id (the items will be added here)
merge is the merge id (the items will be taken from here)

overflow is an optional boolean value (true or false) that tells what happens when there is an overflow (too many of one item) If it is true then if there is an overflow then the remainder is kept in the merge inventory if it is false then these items are lost. The default value is false

Example calls

Code:
 $game_party.combine_inventory(0, 1)
$game_party.combine_inventory(0, 1, false)
 $game_party.combine_inventory(0, 1, true)

The first and second calls do the exact same thing inventory 1 is merged with inventory 0 and any excess items are returned to inventory 1

the last call merges inventory 1 with inventory 0 but if there are excess items then they aren't returned to inventory 1 they are lost
 
That's not possible with this script but you can easily bypass it by storing the gold in a variable and removing the gold, but I guess I can add that in a future update
 
Trickster;246741":34b0jq40 said:
And Added Updated to Version 2.0

Adds Combining/Merging Inventories

Call this in a call script

$game_party.combine_inventory(base, merge[, overflow])

where:
base is the base id (the items will be added here)
merge is the merge id (the items will be taken from here)

overflow is an optional boolean value (true or false) that tells what happens when there is an overflow (too many of one item) If it is true then if there is an overflow then the remainder is kept in the merge inventory if it is false then these items are lost. The default value is false

Example calls

Code:
 $game_party.combine_inventory(0, 1)
$game_party.combine_inventory(0, 1, false)
 $game_party.combine_inventory(0, 1, true)
The first and second calls do the exact same thing inventory 1 is merged with inventory 0 and any excess items are returned to inventory 1

the last call merges inventory 1 with inventory 0 but if there are excess items then they aren't returned to inventory 1 they are lost

Uhm... what? You confused me... which one is it? :p

Anyway, great job. I was thinking about using something like this for a future project.....
 
I'm a bit confused. How exactly are you supposed to get the script? When I download the demo I just get the game and can't get to the files with the script. Any help would be appreciated.
 
Hey just one little question, like in the popular MMORPG Guild Wars, could I have it where I could have an item called a pouch or something and when you use it, the script opens another inventory and the normal one (to switch between them...), like an item that is a small inventory  ???..




EDIT!!! "THE DOWNLOAD LINK IS BROKEN KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN!!!!!!!!!!!"

Opps... sorry bout' that (lol), could you just post it at a file hosting website please (ex. Download.com, Mega Upload...)
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top