Help - Search - Members - Calendar
Full Version: D.R.I.A.C. Inventory System - v1.1
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS2-Submissions
Overlord_Dave
-|- D.R.I.A.C.S. v1.1 -|-

DRIACS stands for: D&D-style Restricted Inventory and Advanced Chest System.


It is a massive overhaul of how items are held by the player. As the name suggests, it gives all items a 'size' (which can correspond to weight, or energy etc...), and limits the player's inventory by the amount of items they are carrying. The user can also allow the player to become "over-encumbered", which will make them move slower.

It also allows the creation of 'chests'. These are objects that contain multiple items, and most importantly remember which items they contain. An entirely new scene has been written to handle moving items between the player's inventory and the opened chest.

Items in chests are defined by the user creating an Item Table. With a simple but powerful syntax, it is easy to create complex random combinations of items.

DISCLAIMER: While I feel very strongly that there's no point having chests if the inventory is not limited, this does not mean that there's no point having a limited inventory if there are no chests. This script is rather complicated, and if you are just after a limited inventory (and not bothered about chests) then there are much simpler scripts out there for you to use.

-- Features --

[Show/Hide] There's a lot of them...
    Version 1.0
  • Each chest is based on a 'base chest' created in the settings of the script. Multiple chests can be created from the same 'base chest'.
  • Initial items in a base chest are listed using a simple syntax. For example, '2i6 4a5' would add two of item id 6, and four of armour id 5. THIS HAS BEEN MASSIVELY IMPROVED UPON SINCE v1.1 - this example still applies, but now there is even more control, such as for randomising chest items.
  • When a chest is opened it is assigned a unique name. The chest can now be accessed from anywhere, allowing the creation of item banks, for example.
  • Many chest management commands, including adding items, checking whether items exist in a chest, and resetting or clearing chests.
  • Random drops by enemies can be put into a chest, which is immediately viewed by the player. Battle events can also lead straight to the viewing of 'spoils' from the enemy, based on spoils created in the settings (like base chests).
  • Advanced inventory management, including the ability to drop items. Items can also be dropped from the Spoils or Shop scene (this can be disabled in the settings).
  • Items can be set to 'no drop', which means they can never be dropped. They can also be set to 'forced', which means that they must be taken by the player, who won't be able to exit a chest without them.
  • A large number of 'encumberment' settings, which describes how the player acts when carrying too much. It can be disallowed completely, or the player slowed down by a set amount, or not able to dash.
  • All text in the system is customisable, including the text of all dialogues and options.
  • Huge amount of display options, including the changing of colour and opaqueness of item names depending on their properties, as well as the positions of new windows.
  • And probably lots of features I've forgotten about tongue.gif.
Version 1.1
  • Gold can now be added to chests - when the chest is opened a pop-up window appears informing the player how much gold they have found (with a customisable message, of course)
  • Chests are now created with an Item Table. A simple but powerful syntax allows the user to easily create complex, random combinations of items, such as for chests tailored to a player's level.
  • Chests can now be initialised 'remotely' with the remote_open_chest command. This means modifications can be made to the chest before the player has opened it for the first time.

-- Screenshots --

[Show/Hide] Note that these shots are not representative of the full customisability of the system.

The modified item scene




The modified shop scene








The brand new 'Spoils' scene












-- Script --

Click here to download the demo for the script (which is too large to post).

A full instructions script is included, detailing how to use all the functions. The demo also demonstrates (nearly) every function.

-- Bug Fixes --

Before reporting any bug, just make sure the latest patch is downloaded, and placed under the main script. Only the newest patch is needed, as it will contain all the other patches. When the patches start getting huge I'll release a new version of the script.

The password is DRIACS.

Latest patch: no patches for current version

[Show/Hide] Old patches (in reverse date order):


-- Compatibility --

This script will almost certainly not be compatible with any script that affect the Item, Shop or Battle scenes.

However, if there is a script which you would like compatibility for, then follow these instructions:
  • First, try placing the DRIACS script above the script you need compatibility for. Most scripts use many aliases, whilst DRIACS doesn't (on account of my not-so-wicked-sick programming skillz tongue.gif). Because of this, most scripts can 'handle' the changes made in DRIACS without any patch needed. If this doesn't work...
  • Next, check that a patch hasn't already been created (see the list below - it should be added to this post)
  • If not, then create a request in the Script Request forum. DO NOT make a request in this post.
  • Eventually, the request will be answered (maybe by me, maybe not). When this happens, presuming it is successful, then PM me so that I can add it to this post.
To reiterate, if anybody creates a compatibility patch, then make sure you let me know, so that I can include it in this post. You will of course be credited fully.

-- Compatibility Patches --
Once again the password is DRIACS. Patches are sorted by the script's author.

[Show/Hide] KGC_CategorizeItem (Patch 1, released 18/11/2009)
DRIACS version: 1.1
Script version: 10/04/2008 release (version unknown)
Patch Link: kci100408.1c1.1.181109
Note that this patch fixes all known issues. If any still remain then be sure to report it in this post so a new patch can be made.

-- Credit and Thanks --

To summarise:
QUOTE
The DRIACS Team
(unless otherwise stated all are users of www.rpgmakervx.net)

Project Lead and Programming
Overlord_Dave

Beta Testing
Oceano
makryu
MASH MX
Aero_drake (rpgrevolution.com)

Special Thanks
Mithran
Gingercake
Everyone who submitted a bug report
The RPG Maker VX community
To not summarise:

First a big thank you to myself, for conception, coding, and testing of this script. And of course making the truly incredible demo (I kid, I kid).

Secondly, and even bigger thank you to Mithran (of rpgmakervx.net), for making the damn thing work. He knows what he's done wink.gif.

And finally, a gigantic thank you to the following testers, who found many bugs for me to fix, and generally gave me lots of boring work to do:
- Aero_drake
- Oceano (rpgmakervx.net)
- makryu (rpgmakervx.net)
- MASH MX (rpgmakervx.net)

Also, thanks to Gingercake (of rpgmakervx.net) for consultancy on creating the Item Table syntax.

-- Author's Notes --

This projects has been a big part of my RMVX life for a while, so if you do have criticism, please keep it constructive.

And of course, if you have any suggestions for future features, then by all means let me know.

Enjoy the fruits of my mental loins! (sorry, bad image)

Overlord_Dave

x
Khev
Wow, downloaded the demo.

This is actually really good!
Also remembers the "Chests" from Fallout and Oblivion smile.gif

Btw, there are a LOT of features, really nice work ohmy.gif
redyugi
You finally fixed the bugs?!?! Awesome. Definitely downloading. Awesome work. biggrin.gif
Ziosin
Haha, the demo was pretty funny. I like the variety of features included. It's a very nice script if I do say so myself. Good work.
OMG_RAWR!
I love this gave me a few ideas.

Would it be possible to have the mode 2 chests stay as like an item bank and in the mode 1 chest the player could put items in it and after the player does something say waits 1 game day the items inside are sold and gold is deposited to the player?
buny
Found Error...........

when selected drop item when in the chest.....
[Show/Hide] Move route LOL

when i drop item when at chest....
than to press left to chest selection...
than press down-down-down


show this

Click to view attachment
Overlord_Dave
@OMG_RAWR!

This is kind of possible using events. ie. when the day ends, clear the chest in question (using clear_chest, instead of update_chests). As for how to sell all the items, short of a conditional branch checking which items are in the chest (with loads of check_item commands), a scripting solution may be the only one. Suggestion noted, anyways. wink.gif

@buny

I know exactly where this error is happening, but it could be happening for a huge number of reasons biggrin.gif.

If you could, make a tiny project whose only purpose is to demonstrate the bug (as in, just one map and one chest), and then send it to me with how to replicate the bug. Since the system is so complicated I'm afraid this would be the only way to work out what's actually going on.
MetalnosX
Hi!when i tried to download the demo it was set on private can you change that
wltr3565
The download link says the link is private. In other words, I can't download sad.gif
buny
umm...so you don't understand what i mean... okay.....
if thats the question.... i'll use a picture

just extract the RAR file...
that contain a step-step picture tha twould explain....
__1 until __9


The Link!
Overlord_Dave
Sorry, had the wrong link up >.<. It should work now.

And thanks to buny I have just fixed a bug. So much for beta testing tongue.gif (nah, you guys were great).

At the end of the day I'll put a patch up in this post, to be put under the script. I'll wait just in case any more bugs are found.

Overlord_Dave

EDIT: p.s. I am running on UK time, so it will be in the middle of the day for any US forum goers.
DementedCashew
Use Photobucket for storing.
buny
QUOTE (DonyaClaudia @ Oct 2 2009, 02:03 AM) *
Use Photobucket for storing.


Make much space...
Overlord_Dave
The bug-fixing patch has been added, in the 'Script' section of the main post. Make sure you have it placed below the main script before reporting any bugs. Enjoy. x
wltr3565
What's the password for the patch?
redyugi
If you looked at the post, he tells you that the password is DRIACS
Overlord_Dave
New patch up. Fixes a bug with the add_to_chest command.
Overlord_Dave
New patch released: c1.0.3.171009 (released 17/10/09)

Get the patch here: http://pastebay.com/61893

Fixes some issues with the 'option window' in the Item scene not disappearing when all of an item has been used up.

Some unknown issues may still remain with this however.

Overlord_Dave
doogle423
SO yea could you kinda like make it so you get more encumberance as you level you strenght or something?
Overlord_Dave
@doogle423

Not entirely sure what you mean by 'more encumberance', but to change the size of the player's inventory use
CODE
$max_inv_size = new_size

with new_size replaced by a number. For the time being it's up to the user to change this value in an event every time the player's strength is increased (or for any other reason).
doogle423
is there any way to put it at a temporary change?
Overlord_Dave
@ doogle423

The change is as temporary as you want it - you're free to change it back at any time wink.gif (though be careful of making the player's inventory smaller than the total size of the items within - use check_inv_size to check this).
Overlord_Dave
New patch released: c1.0.4.271009 (released 27/10/09)

Get the patch here: http://pastebay.com/64108

Fixes a bug where all events move slower when the player does (from over-encumberment).

Overlord_Dave
Genshyu
Every time I click the stupid spoilers it just brings me back to the top of the page >:(
keyonne
I wonder if there is any way you could possibly make it so that you can have different chest/inventory sets. I.E. I am currently making a game where you can have 4 different characters in a world and each one has a "save slot" and thusly a different inventory, etc.
Fawlcon
I got this problem playing through the demo.



any idea on what happened?
Overlord_Dave
@Genshyu

I'm very sorry about that, but I assure you it's a fault with the code of these forums and nothing to do with me wink.gif. Before it wouldn't even let me post links to photobucket because it is 'untrusted', when 90% of the pics on these boards are hosted on that website.

@keyonne

Multiple inventories will certainly be implemented at some point, but it will be quite a lot of work, so you'll have to wait for a much later version for that to occur.

In fact, I recommend trying some multiple-inventory scripts with the DRIAC system (making sure you paste the script(s) below the DRIAC system), since they may be compatible. If errors do occur then make a post on the script request forum and someone (possibly me) can make a patch to ensure compatibility.

@Fawlcon

I'm afraid I don't know what happened... there is no use of the 'push' method anywhere near that line, and I've looked at all the uses and none of them could be applied to a Fixnum object...

Are you using any other scripts that could be interfering?

EDIT: oh, and make sure you've got the latest patch and placed it below the DRIACS scripts.
Fawlcon
QUOTE (Overlord_Dave @ Oct 31 2009, 05:54 PM) *
@Genshyu

I'm very sorry about that, but I assure you it's a fault with the code of these forums and nothing to do with me wink.gif. Before it wouldn't even let me post links to photobucket because it is 'untrusted', when 90% of the pics on these boards are hosted on that website.

@keyonne

Multiple inventories will certainly be implemented at some point, but it will be quite a lot of work, so you'll have to wait for a much later version for that to occur.

In fact, I recommend trying some multiple-inventory scripts with the DRIAC system (making sure you paste the script(s) below the DRIAC system), since they may be compatible. If errors do occur then make a post on the script request forum and someone (possibly me) can make a patch to ensure compatibility.

@Fawlcon

I'm afraid I don't know what happened... there is no use of the 'push' method anywhere near that line, and I've looked at all the uses and none of them could be applied to a Fixnum object...

Are you using any other scripts that could be interfering?

EDIT: oh, and make sure you've got the latest patch and placed it below the DRIACS scripts.


oh its prolly the patch..thx ill go try it now.

edit: i've placed the patch in DRIACS 1...thats what you said thats what your suppose to do, right? anyways, it comes up with a syntax error line 511 or something like that..
Overlord_Dave
QUOTE (Fawlcon @ Oct 31 2009, 11:45 PM) *
oh its prolly the patch..thx ill go try it now.

edit: i've placed the patch in DRIACS 1...thats what you said thats what your suppose to do, right? anyways, it comes up with a syntax error line 511 or something like that..


Nope, that's not what you do wink.gif. Place it as a new script under all the DRIACS scripts.
Fawlcon
QUOTE (Overlord_Dave @ Nov 1 2009, 08:52 AM) *
QUOTE (Fawlcon @ Oct 31 2009, 11:45 PM) *
oh its prolly the patch..thx ill go try it now.

edit: i've placed the patch in DRIACS 1...thats what you said thats what your suppose to do, right? anyways, it comes up with a syntax error line 511 or something like that..


Nope, that's not what you do wink.gif. Place it as a new script under all the DRIACS scripts.


K ill try that now and get back to you

K it worked. Btw does this script work with tenkentai battle system?
Overlord_Dave
@ Fawlcon

It may work without errors, but I doubt the spoils after battle system will work.

However, I do recommend trying it. If you do, make sure you place the Tankentai script BELOW the DRIACS scripts.

Also, you should probably download this before hand...

@Everyone else

New Version 1.1 released!

Get it here: DRIACS v1.1 (released 1/11/2009)

Not only can you now add gold to chests, but I've added the ability to randomise items using Item Tables. An Item Table is a string that contains a simple syntax by which you can easily randomly define items to be in the chest. The instructions script has plenty of examples, and an entire section dedicated to how to create Item Tables.

I've also split the Settings and Data sections of DRIACS 2 into 2 separate scripts, just to make editing them easier.

Finally, I've created the remote_open_chest command, which will initialise a chest before the player has first opened it so that modifications can be made.

This script includes all of the old patches. You MUST delete the v1.0 patches for this script to work. Because I've changed how Item Tables are read, the old patches will cause the game to crash.

Thanks for all your support so far smile.gif

Overlord_Dave
Jacklo
Lol, yesterday I downloaded this like 15 minutes before the new one.
Randomize and gold, very nice, Overlord.

I can already think of a few ways to use remote_open_chest.

Edit:
I am getting a syntax error on line 88 of DRIACS 2b(Data)

That would be:
87| # DO NOT REMOVE OR MODIFY THIS NEXT ENTRY
88| 'null_chest' => Chest.new('nul_chest', -1, -1, I_TABLES['empty'])
89| } # <- DO NOT DELETE THIS

Demo works fine, all I did was add a chest.


Figured it out...
The power of a coma is amazing... lol
Overlord_Dave
Yes... the comma at the end of the CHESTS hash is very important tongue.gif But glad you figured it out wink.gif
Overlord_Dave
Just a quick note to say I've finally managed to get the screen shots working (I know someone complained about this).

Oh, and I'll be releasing some KGC compatibility patches soon. Exciting wink.gif

Enjoy!
Overlord_Dave
New compatibility patch released: KGC_CategorizeItem (Patch 1, released 18/11/2009)

Get the patch here: kci100408.1c1.1.181109

Instructions on how to use are at the top of the patch script.

Note that this patch fixes all known issues. If any still remain then be sure to report it in this post so a new patch can be made.

Overlord_Dave

P.s. some more KGC patches coming up soon...
Darkreaper
any way to make a similar script to this for xp? possibly make it dependent on certain attributes such as strength?
something like this would be really handy for my project cool.gif
Overlord_Dave
@Darkreaper

I personally have absolutely zero knowledge of RGSS, so I couldn't help you there.

Anybody is welcome to convert the code, but at over 4000 lines it may take a while....

EDIT: Oh, and I'll probably include an attribute-dependent inventory size in the next version wink.gif
woahfish
Is it possible to have just the chests which you can store items in? because I don't really want anything to have a weight and I don't need complicated chest options like deleting items when I do a certain things etc etc.

or should I just make everything with a weight of zero?
voooldo
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.