Jump to content
  • 0

Persistent Storage Items


Bandus

Question

I am hoping this question will be easier than my last!

 

Obviously, there are several items in DayZ Epoch that allow for persistent storage (i.e. the write to the database). These items include vaults, storage sheds, etc.

 

My objective is to be able to place ammo crates/weapon boxes, etc. that can be used for storage at various locations. I have found a way to place boxes and items can be placed into them, however, upon a server restart the items are lost because they are not writing their contents to the database. Can anyone point me in the right direction to make this work? Thanks!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

I would assume first off that the object would need to be written to the hive in the standard format used in the object table, and since it is not a standard storage Item I'm sure nothing is telling it to write to the hive and save. You would have to locate the script files that deal with objects and writing to the database (hive write) and look at how that was done, than see if it was something you can simple append another object to (like an array) or become a little more complicated like adding it to the script.

 

I have not  really looked at that end of the scripts - but I will for giggles and get back to you if I figure anything out.

Link to comment
Share on other sites

  • 0

Unfortunately, I still have not been able to get this to work. I don't suppose anyone has any additional ideas on how to place crates, etc. that players can store items in that will persist after a restart. Due to the existence of vaults/safes and storage sheds it surely seems possible, I just can't figure out how it works. Thanks!

Link to comment
Share on other sites

  • 0

That's fair. I still wonder how it is accomplished via vaults and storage sheds. They seem to keep their items after a restart. I just want to basically make an item, other than a vault that needs a combination and a giant storage shed, that writes to the DB.

Link to comment
Share on other sites

  • 0

UNTESTED... however you could try...

 

DZE_isNewStorage = DZE_isNewStorage + "INSERT ITEM NAME HERE";

 

I believe that will make it so that the item is listed as an epoch storage class and write it to the database with the other storage items.  Just insert that into your init file

 

EDIT: I would also look at

 

dayz_updateObjects = dayz_updateObjects + "INSERT ITEM NAME HERE";

 

Between the two of these variables being overridden I am pretty sure your new box will hold items persistently through a restart.  Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...