Save-/loadable Inventory

Diaxos

Villager
Member
Joined
Jan 23, 2017
Messages
5
Reaction score
0
First Language
German
Primarily Uses
Hey Guys, 


after watching diverse tutorials on YouTube and hours after hours of try-and-error i searched the www for a script that allows me to simply save the current inventory (to actually delete it and load it later).


I found one, still this requiered some changing in other scripts of the vxa. I tried my best, but as i'm not really talented in this, i failed. I asked the author of the script, but it seems that the forum i found the script is not really used anymore and the ppl i wrote to never answered.


In fact, im a complete new RMer and wanted to do a game only with RM-given things... but at the time beeing, my character is in jail and therefor needs to be taken off its inventory..


so far there would be no problem, as i could simply clear every single item availabe (with this script i found i guess, not 100% sure). 


But as the game should continue, the character escapes from jail and (should) find his inventory-stuff in a chest later.


Is there by any chance, someone who knows where i can find a working script?


Or did anyone of you wrote such a script?


If so, it would be more than awesome if you would allow me to use it and send me the script (at best with an explanation how to use it).


At this point, i dont want to earn any money with my project.


Thanks in advance


Diaxos
 

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
Use event commands to unequip every equipment your actor/s might have then


call this snippet in an event script call when you want to remove the items


id = 1
id2 = 2
$game_variables[id] = []
$game_variables[id2] = []
$game_party.all_items.each do |item|
$game_variables[id].push(item)
x = $game_party.item_number(item)
$game_variables[id2].push(x)
$game_party.lose_item(item,x,false)
end


Change the value of id and id2 to Game Variables that you are not using, and don't use them for anything else, or you'd destroy the snippet.


Then when you want to regain all items, just call this snippet in an event script call


id = 1
id2 = 2
$game_variables[id].each_index do |index|
item = $game_variables[id][index]
x = $game_variables[id2][index]
$game_party.gain_item(item,x)
end




Make sure that id and id2 are consistent between the two script calls. 


This should do for your current needs, just take note than you shouldn't do something like call the "save items" part more than once before using the "recover items" part.
 
Last edited by a moderator:

Diaxos

Villager
Member
Joined
Jan 23, 2017
Messages
5
Reaction score
0
First Language
German
Primarily Uses
Thx Adiktuzmiko for your fast answer, sorry im late, had much work to do.


I guess im just too dumb to use this properly u.u


in a test world this works perfectly fine, but with the very same variables used (not used during the game), in my game it doesnt work anymore..


and when i try to check on the variables via F9 Key, my RGSS3Player times out.


Do you have any Ideas what i can do?


Maybe it helps you to know that my character loses the equipment properly with your snippet in map A and should regain the equipment in map B.


I hope I dont bother you too much..


Thx for your help!


Diaxos
 

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
in a test world this works perfectly fine, but with the very same variables used (not used during the game), in my game it doesnt work anymore..


and when i try to check on the variables via F9 Key, my RGSS3Player times out.


If it works on a test environment but not in your project, that would most probably mean something is actually changing those variables in your game, probably some other script. This could also happen with just those snippets in case you did like set the event to autorun/parallel and didn't delete it after coz that will run the snippet over again continuously, in which case by the 2nd run of that snippet the party doesn't have the items anymore, so the saved list gets replaced by the current inventory which is a blank one.

Maybe it helps you to know that my character loses the equipment properly with your snippet in map A and should regain the equipment in map B.


So in your own project, they lose the items but didn't regain them? That would then mean that the value of the variables are getting replaced. 


Can you show me a screenshot of the events where you used the lose and regain item snippets?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
alternatively you can search for tsukihime's scripts on the master script list, she wrote multiple player/multiple inventory scripts.
 

Diaxos

Villager
Member
Joined
Jan 23, 2017
Messages
5
Reaction score
0
First Language
German
Primarily Uses
Adiktuzmiko , thats exactly what happens..


you were right, one of the events was set to automatic without a proper exit, changed that, still doesnt work ...


screenshots should be below... thx for all your help :)  I would be so damn lost without your help :o

screenshot lose1.png

screenshot lose2.png

screenshot lose3.png

screenshot lose4.png

screenshot regain.png
 

Diaxos

Villager
Member
Joined
Jan 23, 2017
Messages
5
Reaction score
0
First Language
German
Primarily Uses
Good evening Andar, I just found a plugin of tsukihime, that manages multiple inventories, still i dont get how to install it..


In the description she says, I should download the .js data and load it via plugin-manager. But my VXACE doesnt grant me a plugin-manager.. can you help me out on this one?


Im sorry I bother you so much -.- Im really a bloody noob '^^
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
@Diaxos That is because plugins are for MV, scripts are for Ace - Ace has a script editor, MV has a plugin manager.


You got the wrong script - please search Tsukihimes site again, you'll also find the Ace-Version of it there and that is the one you need, not the MV-Plugin.
 

Diaxos

Villager
Member
Joined
Jan 23, 2017
Messages
5
Reaction score
0
First Language
German
Primarily Uses
Ah, I see... I really didnt know that, sorry -.- Now I found the right script, I think. Still got to get used to the handling.


Thx so far for helping :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top