Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,272
Reaction score
301
First Language
English
Primarily Uses
N/A
So you are implying If I want to make separate storage containers I have to pretty much make a separate chest section in the script and have events call for that?

Or is this script intended really to have a global storage unit follow you around the game?
 

shadow2k

Villager
Member
Joined
Oct 12, 2013
Messages
21
Reaction score
2
First Language
English
Primarily Uses
There is already a section for boxes in the script.  It's pretty easy, all you have to do is copy the entry for one of the boxes in the list and change the name.  It's all documented so if you're not averse to a bit of reading you should be able to figure it out.  You can also have boxes created from script calls but I don't think there is a way to make those work with multiple events.  That seems to be more for temporary boxes.

My use for this script is to have a stash inventory for the player that can be accessed from multiple events (for instance, from home) and then also to handle loot inventories throughout the game.  So far it seems to work well for that.  My main concern right now is to find a way to quickly transfer the entire player inventory to a box with a script call.  This will work for prison scenarios where the player has to escape and find their items.  Still haven't figured that out.
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,201
Reaction score
858
First Language
Hungarian
Primarily Uses
RMVXA
You could try this snippet I wrote:

class Game_Interpreter def party_inv_transfer(box_id,limit,equip) $game_party.all_items.each do |item| amount = $game_party.item_number(item) $game_boxes.add_item(item,amount,box_id,limit) $game_party.lose_item(item,amount) end endend
Use this script call:

party_inv_transfer(box_id,limit)Replace 'box_id' with the ID of the box, and 'limit' with the type of transfer you want to use :)all, :force or :max - you can read about these limits in the header of IMP's script).Note: I did NOT test this, that is up to you! :p
 
Last edited by a moderator:

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,272
Reaction score
301
First Language
English
Primarily Uses
N/A
 My main concern right now is to find a way to quickly transfer the entire player inventory to a box with a script call.  This will work for prison scenarios where the player has to escape and find their items.  Still haven't figured that out.
And no gold to pay your fine hm? It's off to the lock up then!

I like this idea.
 

LeeOccleshaw

Stone Dragon Workshop
Veteran
Joined
Jun 9, 2015
Messages
155
Reaction score
82
First Language
English
Primarily Uses
Hey, really nice script! Very straight forward to use and it works great. I'd love to use it in my game - I do aim to make it commercial if it shapes up to be any good so would that be ok?

I was wondering if anyone could help me make it compatible with Source's 'Smooth Cursor' script as it is showing the cursor on both sides at once. (http://rpgmakersourc.../smooth-cursor/ )

Also, can anyone point me in the right direction with moving the help window to the bottom rather than the top? If anyone can help with either of those things I'd very much appreciate it!

Here's a screenshot of my game so that you can see what I mean:

junktrunk.png


Thanks!
 
Last edited by a moderator:

shadow2k

Villager
Member
Joined
Oct 12, 2013
Messages
21
Reaction score
2
First Language
English
Primarily Uses
You could try this snippet I wrote:

class Game_Interpreter def party_inv_transfer(box_id,limit) $game_party.all_items.each do |item| amount = $game_party.item_number(item) $game_boxes.add_item(item,amount,box_id,limit) end endend
Use this script call:

party_inv_transfer(box_id,limit)Replace 'box_id' with the ID of the box, and 'limit' with the type of transfer you want to use :)all, :force or :max - you can read about these limits in the header of IMP's script).Note: I did NOT test this, that is up to you! :p
Thanks!  I'll try this and see what happens.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,201
Reaction score
858
First Language
Hungarian
Primarily Uses
RMVXA
I just noticed that I forgot to remove the transferred items from the player's inventory.


Updated the snippet above, so make sure to get that one.
 

shadow2k

Villager
Member
Joined
Oct 12, 2013
Messages
21
Reaction score
2
First Language
English
Primarily Uses
Ok.  I'll give the new script a try.
 

radicalpain

Villager
Member
Joined
Oct 7, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
is there a way of a conditional branch to find out if an item is in a box. Ex: I have Item #1 in box 5 and want to set up a conditional branch to complete a quest if I removed #1?


Thanks again great work !!!!


R>P
 

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
66
Reaction score
45
First Language
English
Primarily Uses
RMVXA
@LeeOccleshaw: If you want to use it in a commercial game, that's totally fine. I would like, but do not need, crediting.
I'm afraid I don't really have time to familiarise myself with the smooth scrolling script, so someone else will need to do that. My script leaves an inactive cursor in whichever box you're not scrolling through, so maybe the smooth scrolling script needs a modification to hide inactive cursors?
Moving the windows around and/or resizing them should be a minor job for any competent scripter.

@radicalpain: you can use $game_boxes.item_number(item_to_check, box_id) > 0 (which will also give you the option of checking for other values - like more than 10, or whatever).

* * * * * *

I'm also releasing version 1.8.

New in this version includes the ability to transfer between the party as well as other boxes. It works exactly the same as transferring between boxes, but for the box id, you put
Code:
:party
.
I've done this in such a way that if anyone is using a script that limits the player's inventory, writing a script to incorporate that into transferring to the player should be really simple.

I also fixed some bugs involving there not being space for transfers when transferring into a box with infinite size.

You can also now remove_all items in a box.

@radicalpain: you can also use
Code:
$game_boxes.contains?(item_to_check, box_id)
as well as checking the size being greater than 0.
 
Last edited:

Jzkann

*creative title*
Member
Joined
Aug 23, 2017
Messages
27
Reaction score
4
First Language
Italian
Primarily Uses
RMVXA
I wrote this in the page where i wrote your script:

box_id = 1
name = "Test"
size = 5
$game_boxes.setup(box_id, name, size)


But it says there's a problem in line of "$game_boxes.setup(box_id, name, size)".

What i did get wrong?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,580
Reaction score
12,123
First Language
English
Primarily Uses
RMVXA
If you typed in (box_id, name, size) then you have not given the script anything to evaluate.
"Box_id", "name" and "size" are there to tell you what information needs to be included.
So you might have something like this (all made up, just for the sake of an example)
$game_boxes.setup(6, "Pantry", 5)
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,201
Reaction score
858
First Language
Hungarian
Primarily Uses
RMVXA
If he wrote all of that in a script call, than all the variables used in the arguments are indeed set correctly, since the first 3 lines set them up.

But without knowing the exact error report and when it happens, there isn't much point in guessing what causes the error.

If you mean that you wrote those lines in the script editor, than that is the issue. That should be a script call from an event.
You should check that topic about "How to use a script" before you attempt to install/use any custom scripts.
 

tomkomaster

Veteran
Veteran
Joined
Sep 19, 2015
Messages
151
Reaction score
8
First Language
English
Primarily Uses
RMVXA
There is an error when using this script with TheoAllens Inventory limit and Item sizes add-on: When you try to put an item into a storage box with not enough space to hold it, it gives this error: Script 'IMP1 storage boxes' line 301: ArgumentError occured. Wrong number of arguments (0 to 1). (for example, lets say I set a hand axe to item size of 2. Then I open a box with 14/15 (1 space free). If I try to put that hand axe into that box, it gives that error.)

Picture of error

Could this be made compatible with Vlue's Weapon/Armor randomization script? Like if I set a weapon or armor to appear in a box, and if I set some affixes and/or prefixes for said armor or weapon in the database, then it will generate those weapons or armors with those affixes in the box?

Link to Vlue randomization script


Also, could this script be made to be able to have the storage boxes include gold too? Like I can set so that the player opens a storage box, there will be 5 gold, which the player can pick up. However he cannot put gold in the storage boxes.
 
Last edited:

IMP1

"haystack".scan(/needle/)
Veteran
Joined
Mar 6, 2014
Messages
66
Reaction score
45
First Language
English
Primarily Uses
RMVXA
Good find with that error. Sorry, I had a small mistake. I've fixed it now. Let me know if there are still any problems.

I'm not really using RMVXace much these days (my main computer isn't windows anymore so doing RGSS3 stuff is difficult). I'm not really in a position to make this compatible with Vlue's script. Maybe someone else here can do that for you.

I can't really do the storing gold thing either, but your request makes me want to make a slightly more general script, where obtaining certain items triggers events (maybe common events). Maybe it's time to dust off the old laptop...
 

tomkomaster

Veteran
Veteran
Joined
Sep 19, 2015
Messages
151
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Thanks for the fix, it now works :) Well, I will try to get someone then to help me with making it compatible with Vlues script then.
 

tomkomaster

Veteran
Veteran
Joined
Sep 19, 2015
Messages
151
Reaction score
8
First Language
English
Primarily Uses
RMVXA
I've put a request here on the forums for the gold withdrawal feature for your Storage Boxes script IMP1, and vFoggy was kind and awesome enough to make an addon for it, so if someone else wants to use the Gold Withdraw feature, you can use it too. All credit goes to vFoggy, he wrote it, I just requested it. He also made small changes to the Item Sizes addon, to make it compatible with the Gold withdrawal script. IMP1, you can add the script to the first page of your post along with a new version of Item Sizes addon if you want.

Here you can grab both the Gold Withdrawal and the compatible version with it of the Item Sizes script
 

Vis_Mage

Wisp Charmer
Veteran
Joined
Jul 28, 2013
Messages
771
Reaction score
275
First Language
English
Primarily Uses
RMMV
Can someone help me figure out what I'm doing wrong with this script call?

I have a conditional branch with the fallowing:

Code:
$game_boxes.item_number(261, 2) > 19

But it doesn't work. The game doesn't crash or anything, it just won't return as true. Just to be sure, I am trying to see if box 2 has 20 or more copies of item 261.
 
Last edited:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,201
Reaction score
858
First Language
Hungarian
Primarily Uses
RMVXA
I guess, it should be:
Code:
$game_boxes.item_number($data_items[261], 2) > 19
Note that you can use $data_weapons and $data_armors as well for weapons and armors.
 

Millu30

Warper
Member
Joined
Jul 14, 2015
Messages
2
Reaction score
0
First Language
Polish
Primarily Uses
I got a problem your script is not interpreting letters as name for the box which causing error.
Can you fix this ?
 

Latest Threads

Latest Profile Posts

Finally working on a real title graphic! Here we are at an early stage:
titledemo.png
Sometimes game dev feel like...
progressMeme.png
back with more music

When I first heard a song by Nickolas Wolfe I was impressed by his musical skills and I instantly knew he was the perfect fit for the sound I was looking for Eniko: Ghosts Of Grace. The song I first heard was later used in Doirosz Arena in the game. For the launch of the demo version of Eniko next week, Nickolas made a new version of this very meaningful song!
Contemplating an old idea I once had about a fantasy world where elemental manipulation was possible, but combat uses required... creativity. Kinda like ATLA, but far more restricted, with a lot of physics-related realism driving what was possible.

Forum statistics

Threads
121,872
Messages
1,144,810
Members
160,128
Latest member
capitanchief
Top