Shared Storage V 2.40

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Bloodmorphed explained it. Its for games where you want to separate the storages for the items, weapons and armors for some reason. Like if you want different headers, or maybe different backgrounds. You could always make separate events or an event that lets you choose which to open, but then it will be easier if the user can simply press a button to switch.


There would probably only be a few rare cases when you'd do that, but I decided to place it there anyways just in case. :)
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
Bloodmorphed explained it. Its for games where you want to separate the storages for the items, weapons and armors for some reason. Like if you want different headers, or maybe different backgrounds. You could always make separate events or an event that lets you choose which to open, but then it will be easier if the user can simply press a button to switch.

There would probably only be a few rare cases when you'd do that, but I decided to place it there anyways just in case. :)
If that's the case, it should be for a VERY EXTENDED game like a MMORPG or something. But in my case, this script with Theo's Limited Inventory was already a great combination :D
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Very good script, thanks a lot for it!

People using Yanfly's Ace Adjust Limit script will get an error if they push the confirm button on the withdraw item list when the list is empty.

To fix that, find this line:

return numb < $game_party.max_item_number(item)And replace it with this one:

return numb < $game_party.max_item_number(item) if item != nilIf you are using the main script only, without the addon, you do this in the main script.
If you use the addon too, you need to do this in the addon script only.

And about the icons, everybody can place any icon there with Yanfly's Command Window Icons script without any scripting knowledge within seconds.
But nevertheless, if you want, you can make an option for that too.

Nevermind the below crossed things. I managed to find it. :D
And I got a question...
How the heck can I modify the item name display's width?
I am using a randomizer script, which adds random affixes to items, and those affix names are not counted in with the real item name's width, which in turn cuts almost all of my randomized item's name.
Kinda annoying.
Tried to find the lines for it in the script, but couldn't. >.>


Here is a screenshot to show what I mean:
storage1.PNG

Ohh, and I almost forgot...
Any chance of adding gold to the possible categories?
That would help a lot of people, I guess. :)

Just when I thought everything works fine, I noticed something which breaks the entire point of me wanting this system. >.>

So, I use Vlue's Weapon/Armor Randomizer script for random bonuses on equipment. 

The storage stores them just fine, all the way until I start a new game and try the storage. 

When I do that, the random items are there, but instead of staying on the same affixes, they have been re-randomized with new affixes. This happens only when I start a new game, and want to access an existing storage within that new game.

If I load a game instead, the affixes stay the same inside the storage.

But the point why I wanted to use this script is to allow players to change the rare and epic stuff with their other characters through storage chests (I guess everybody have seen a feature like this in countless RPG games). And for that, the player need to start a new game. 

So, what is the difference between a new game storage load and a load game storage load? Why would it change only at new game loading? o.o
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
As far as I understand Vlue's work, he creates new items when you randomize the affixes and that is saved along with your save file. I'm sure those values doesn't persist thru different saves, and that is why you're getting the affixes re-randomized when you open a new game.


We could re-save the modified weapons and armor database, but that wouldn't really be ideal IMO.
 
Last edited by a moderator:

Killok

Veteran
Veteran
Joined
Jul 30, 2014
Messages
52
Reaction score
1
First Language
English
Primarily Uses
amazing script!!!!!!

I would love to see a feature where it requires gold to withdraw an item

almost like a pseudo-auction house!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Ohh, and I almost forgot...


Any chance of adding gold to the possible categories?


That would help a lot of people, I guess.
Thinking about it. Possibly when I have time, I have other things on priority list right now.

I would love to see a feature where it requires gold to withdraw an item


almost like a pseudo-auction house!
Hmmm... Maybe an add-on, no guarantees. :)
 

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
Eh??? It will re-randomize the weapon stat when load another save? It's a pity that my game do the same as sixth's, so this gonna be... bad...

If you can, please make a compability version for us. (of course if you want and when you're free, it don't want to force people)
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
@Kuro - You're also using Vlue's script?


I don't really do compatibility requests. And I would need to modify the way the game handles saving and loading so that instead of loading the weapons and armors the way Vlue's does it, I would save and load them into another file. As of now I can't do it as I have other things in my priority list.
 

Killok

Veteran
Veteran
Joined
Jul 30, 2014
Messages
52
Reaction score
1
First Language
English
Primarily Uses
People using Yanfly's Ace Adjust Limit script will get an error if they push the confirm button on the withdraw item list when the list is empty.

To fix that, find this line:

return numb < $game_party.max_item_number(item)

And replace it with this one:

return numb < $game_party.max_item_number(item) if item != nil
This also occurs while depositing no items in inventory no items in bank
 

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
@Kuro - You're also using Vlue's script?

I don't really do compatibility requests. And I would need to modify the way the game handles saving and loading so that instead of loading the weapons and armors the way Vlue's does it, I would save and load them into another file. As of now I can't do it as I have other things in my priority list.
Yes, i'm using VLue's, too. Ah, feel free to do your work.

Btw, maybe if you don't think of it as a compability fix, but an add-on to keep weapons/armors as its original shape when stored into storage by saving their info into another save data? Because maybe not only VLue's, someone may use another way to change their W/A parametes which only affect their only save. This add-on will be very helpful.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
It's still for compatibility, because unless you edit the original scripts, there's no way that the items in the database will be different during gameplay. :)


Also, if I add that, you need to ensure that you'll only use it once the game is finished. Else any updates to the database won't reflect since you already have saved the weapons and armors differently (this would also happen I think to Vlue's in case you load an already saved game after editing the database)


It's one of the main reasons why I don't prefer saving the database objects into the save file or any other file.
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
It's still for compatibility, because unless you edit the original scripts, there's no way that the items in the database will be different during gameplay. :)

Also, if I add that, you need to ensure that you'll only use it once the game is finished. Else any updates to the database won't reflect since you already have saved the weapons and armors differently (this would also happen I think to Vlue's in case you load an already saved game after editing the database)

It's one of the main reasons why I don't prefer saving the database objects into the save file or any other file.
It's fine. There's still some other way to balance the game, like, change the enemies stat.

My W/A have already balanced with each other (for now) so i'm gonna gambling and accepting the risk.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Try this one, not sure if it works. If it does work, use at your own risk. Once you place it and it's active, any database edits to your weapons and armors won't reflect. You could just try it once and see if it works then disable it and delete the external file and just re-activate the script right before you ship out the game.

Code:
module DataManager    class << self; alias save_game_without_rescue_persist_adik save_game_without_rescue ; end  def self.save_game_without_rescue(index)    File.open("PersistItems.rvdata2", "wb") do |file|      Marshal.dump($data_weapons, file)      Marshal.dump($data_armors, file)    end    return save_game_without_rescue_persist_adik(index)  end    class << self; alias load_normal_database_persist_adik load_normal_database ; end  def self.load_normal_database    oad_normal_database_persist_adik    begin      File.open("PersistItems.rvdata2", "rb") do |file|        $data_weapons = Marshal.load(file)        $data_armors = Marshal.load(file)      end    rescue    end  end  endclass Scene_Load    alias rig_on_load_success_adik on_load_success  def on_load_success    rig_on_load_success_adik    begin      File.open("PersistItems.rvdata2", "rb") do |file|        $data_weapons = Marshal.load(file)        $data_armors = Marshal.load(file)      end    rescue    end  endend
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
Try this one, not sure if it works. If it does work, use at your own risk. Once you place it and it's active, any database edits to your weapons and armors won't reflect. You could just try it once and see if it works then disable it and delete the external file and just re-activate the script right before you ship out the game.

module DataManager class << self; alias save_game_without_rescue_persist_adik save_game_without_rescue ; end def self.save_game_without_rescue(index) File.open("PersistItems.rvdata2", "wb") do |file| Marshal.dump($data_weapons, file) Marshal.dump($data_armors, file) end return save_game_without_rescue_persist_adik(index) end class << self; alias load_normal_database_persist_adik load_normal_database ; end def self.load_normal_database oad_normal_database_persist_adik begin File.open("PersistItems.rvdata2", "rb") do |file| $data_weapons = Marshal.load(file) $data_armors = Marshal.load(file) end rescue end end endclass Scene_Load alias rig_on_load_success_adik on_load_success def on_load_success rig_on_load_success_adik begin File.open("PersistItems.rvdata2", "rb") do |file| $data_weapons = Marshal.load(file) $data_armors = Marshal.load(file) end rescue end endend
Now i'm out, i'll be home 1 hours later and test it AFAP.

Btw, that mean, as long as the W/A save data exist, all W/A data from database will remain unchangable, and delete the W/A savedata will allow changing database. Or as long as the script remain, no matter if W/A save data remain or not, the database will be unchangable?

And, if i play the game, save, then change the database and start the new game. Will the new game have the database after change, only the save from before remain unchanged, or both new game and save unchanged?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Both new game and save game will use the new W/A save file, so changes from the database won't work on both. Which is why I suggest that you just install it for testing, and when you're sure that it works, remove the script first (or disable it via selecting the script, select all then hit ALT+Q) and delete the data file for the W/A first. Then just reinstall/reactivate the script when you're about to ship the game


At least, that's the theory behind it. XD


Anyway, this is probably as far as I would go for the problem (assuming the snippet will work as intended)
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
The game crash with this bug when i tried to test it. (Tested on a new project with only your shared storage and VL's, and tested both the compability fix above or below other scripts).

Edit: oops, look like you wrong type load to oad. After i retype it to load, i now can test the game. Now i'm gonna see if it's work or not.

Untitled.png
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
yeah, a typo. XD


I'd post it on the OP just in case, probably with a disclaimer. XD
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
It worked well! You sure don't want to make this as an add-on for your shared storage?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Oww, thanks for that snippet!

It works like a charm! *-*

So, aside from saving weapon and armor databases elsewhere, this doesn't change anything else, right?

I suppose I must put this snippet below any other custom scripts which can alter the equips, right?

Thanks again for the quick solution!

You surely work fast even when you got no time for it. :D
 

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,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top