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
Yeah (might as well put it below any other custom script), and as I said, you better only put it when you're about to ship the game. Else changes to the database weapons and armors wouldn't reflect on your tests. XD
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
Btw, i really don't know how to turn off a script LOL!
The only way i know is, put the script between =begin and = end to change the whole script into note.
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
There are many ways to turn it off.


Certain scripts are out there which allow some custom ways (I am using 2 of them, 1 for single script disabling, and one for disabling a bunch of scripts at the same time, for debugging of course).


Aside from these, the default methods are:


- Put the script below the 'Main' script.


- Delete it (ok, ok, but it is a way, right? :p )


- Do a 'CTRL+A' on the script itself to select all the text, and then do a 'CTRL+Q' on it. This will comment out everything effectively disabling the script. Do this again on the whole text to uncomment it.


I recommend the last method, that one is the quickest.
 

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, the CTRL+A then CTRL+Q would be the easiest and fastest way.


Btw, I thought about allowing the storage of gold. That would probably be easy to add.


As for having gold cost to deposit/withdrawals, that would change the way things are handled in a way that might be detrimental to those who doesn't need it so if ever, that would just be an add-on instead of a feature of the base script. Though as of now, I really have no motivation and intention to add that.
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
yeah, the CTRL+A then CTRL+Q would be the easiest and fastest way.

Btw, I thought about allowing the storage of gold. That would probably be easy to add.

As for having gold cost to deposit/withdrawals, that would change the way things are handled in a way that might be detrimental to those who doesn't need it so if ever, that would just be an add-on instead of a feature of the base script. Though as of now, I really have no motivation and intention to add that.
Huhm... I've wondered this for a long time... Are you, by chance, a tsundere or something? :D
 

Killok

Veteran
Veteran
Joined
Jul 30, 2014
Messages
52
Reaction score
1
First Language
English
Primarily Uses
Here is the FULL compatibility script for Yanfly's max limit script

Replace this snippet

#Overwrites the original
def can_store(item)
if @ss_category == :deposit
numb = ADIK::SHARED_STORAGE::MAX_ITEM_NUMBER[@storage_number]
numb = ADIK::SHARED_STORAGE::MAX_ITEM_NUMBER[0] if numb.nil?
if numb == "SceneManager.scene.get_item_limit"
numb = get_item_limit_ex(item)
else
numb = eval(numb) if item != nil
end
begin
numb -= $shared_storage[[@storage_number,item.class.to_s,item.id]]
rescue
end
return numb
else
numb = $game_party.item_number(item)
return numb < $game_party.max_item_number(item) if item != nil
endend
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
I'm not getting any error when I place items to the storage, even if I push the button on an empty item.


The storage max item limit got nothing to do with the inventory's max item limit, and Yanfly's Adjust Limit only affects the inventory's max item limit.


It is not possible to get the error from that, at least not from Yanfly's Adjust Limit script.


If you still get an error, it is not because of that script for sure.


Edit:


Unless you use the inventory's max item limit in the storage max item limit formula, which is the default setting it seems.


So, yeah, that nil check is needed there too, thanks for the heads up!
 
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
I'd actually suggest this instead:

class Game_Party < Game_Unit def max_item_number(item) item.nil? ? return 0 : return item.max_limit end end # Game_PartyWhy? Because I doubt that yanfly will modify that script anymore or at least that method. While if you use your snippet which overrides the can_store method and I modify the can_store method (which I might, or at least on one of the possible add-ons), then you'd need to adjust your snippet too.This would also avoid that same error in case you use another system that calls the max_item_number too that don't have their own safety checks. So it's a better alternative IMO.

If you're still getting errors, then that means you're using a saved game made before yanfly's script was added.

EDIT: Updated to version 2.30!
 
Last edited by a moderator:

Killok

Veteran
Veteran
Joined
Jul 30, 2014
Messages
52
Reaction score
1
First Language
English
Primarily Uses
How would I go about disabling deposit for one storage, or gold etc.

Example:

Storage 0 = Full functonality

Storage 1 = Only Withdraw

Storage 2 = Withdraw/deposit items etc, but not gold 
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
I just noticed that the text for the player header and storage header windows is not centered.

It is because you are using the direct width which the player set for the window instead of simply using 'contents.width' for the width of the text. Replace them with 'contents.width' and it will be centered correctly.

Thanks for the gold option! *-*

@Killok

To disable the item categories, set 'nil' for their text settings.

To disable deposit/withdraw options, set...

Wait, that is not possible right now, I think.

But coding this isn't hard at all.

Here is what you need to do for it:

Search for 'Window_SS_Category < Window_HorzCommand'.

In this class, go to the 'col_max' definition.

Replace that whole definition with this:

def col_max categ = ADIK::SHARED_STORAGE::SS_CATEGORY_WINDOW[$shared_storage_number] categ = ADIK::SHARED_STORAGE::SS_CATEGORY_WINDOW[0] if categ.nil? if categ[5].nil? || categ[6].nil? return 1 else return 2 end endNow go a bit further down and you will see the 'make_command_list' definition.Replace that definition with this one:

Code:
  def make_command_list    categ = ADIK::SHARED_STORAGE::SS_CATEGORY_WINDOW[$shared_storage_number]    categ = ADIK::SHARED_STORAGE::SS_CATEGORY_WINDOW[0] if categ.nil?    add_command(categ[5],   :deposit, true) unless categ[5].nil?    add_command(categ[6],   :withdraw, true) unless categ[6].nil?  end
Now you can do the same with the deposit/withdraw options as with the item category options. Set the text for them to nil to disable them.
 
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
if you set the text to nil, it will automatically remove the option to deposit/withdraw items of that kind.

As for removing the either deposit or withdraw..Never thought of adding that coz it doesn't seem so useful to have a storage that can only accept deposits. A storage that only allows withdrawal has some sense though, if you add items to it beforehand. Hmmm

@Sixth - or you could simply add some spaces to the text :)

Anyway, my laptop is still undergoing startup repair and it might really be gone for good so unless it gets fixed or I get a new laptop, I cannot do something. 
 
Last edited by a moderator:

Killok

Veteran
Veteran
Joined
Jul 30, 2014
Messages
52
Reaction score
1
First Language
English
Primarily Uses
If you copy a save file to your desktop, Deposit an item- Save, then replace the save file with the copy it makes it possible to duplicate items in game. Is there any way to fix this glitch?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Ahh yes, the good old "Sacred effect"!


I can't even count the items I duplicated that way! LOL! :D


I don't mind it, thou. Coupled with a random item generator, it actually gives the game a bit of Diablo, Sacred, Titan Quest, etc feeling. Even these great and famous games couldn't do anything about this.


Manipulating with save files was always a way to get some advantage in any PC games, since they can be copied infinite times to anywhere, and this means infinite backups.


Aside from games which store the actual save files which matter on their own online server, I think nothing can be done about it.
 

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 just a side-effect of creating files locally that has been there ever since time immemorial. Using this script alone, there isn't. Aside from online storages, the other method would be to actually merge the storage file with a file that stores all your save files (meaning you'd customize the save/load scripts too). That's what I do in my current project.
 
Last edited by a moderator:

Killok

Veteran
Veteran
Joined
Jul 30, 2014
Messages
52
Reaction score
1
First Language
English
Primarily Uses
when will your current update be available?

My game is going to be relient on a user copying and pasting thier save files to another persons game for PvP purposes, will this cause only cause an error if the save file dosnt match the auction file?
 

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
What update? I have no plans for updates as of now...

will this cause only cause an error if the save file dosnt match the auction file?
what auction file? 

Anyway, whether it errors or not would depend on how your planned PVP would work. 
 

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
Updated the script for a quick bugfix
 

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