Jump to content
Smoke

Hercules Ultimate Storage System (HUSS)

Recommended Posts

Hey all,

I had an idea to implement the ultimate storage system with which users of Hercules would be able to create as many storages as they want without a hassle. And so I worked on Hercules Ultimate Storage System (HUSS). The basic idea of the design has been completed and at this point it is ready to be tested. I wanted to gather suggestions to further extend the system, hence this topic.

To test the system, simply visit my fork of Hercules in the storages branch and clone it.

 

Storage.conf Example Entry

{
        Id: (int)                              (required|unique) Unique Identifier
        Name: (string)                         (required) Name of the storage sent to the client.
        Capacity: (int)                        (required) Maximum capacity of the storage.
}


All storages are handled with dynamic arrays that will save a tonne of memory if and when created.
They are saved in the same storage database (SQL) as the original separating them by a storage identifier.
An infinite number of storages can be created, there are no limits.
The current design implementation only allows saving/loading of approximately 1600 items per storage due to packet size limits.

 

Script Command Changes


*openstorage(<storage_id>{, <storage_mode>})

Default Storage Access Mode: STORAGE_ACCESS_ALL

This will open character's Kafra storage window on the client connected to 
the invoking character. It can be used from any kind of NPC or item 
script, not just limited to Kafra Staff.

The storage window opens regardless of whether there are open NPC dialogs 
or not, but it is preferred to close the dialog before displaying the 
storage window, to avoid any disruption when both windows overlap.

	mes("I will now open your stash for you");
	close2();
	openstorage(1);
	end;

Storage Modes:
	STORAGE_ACCESS_VIEW     // View storage only
	STORAGE_ACCESS_GET      // Allow getting items from storage.
	STORAGE_ACCESS_PUT      // Allow putting items to storage.
	STORAGE_ACCESS_ALL      // Allow all actions.

 

So if you guys have any suggestions or ideas that would better the system for Hercules, feel free to comment below :)

Share this post


Link to post
Share on other sites

That's very cool! Does it mean now we can have shared storage, ie a chest on a map in which anyone can put or retrieve items?

Share this post


Link to post
Share on other sites
24 minutes ago, meko said:

That's very cool! Does it mean now we can have shared storage, ie a chest on a map in which anyone can put or retrieve items?

Not with current implementation of HUSS, currently it can create unlimited number of character storage I guess, and not shared storage.

Share this post


Link to post
Share on other sites
1 hour ago, meko said:

That's very cool! Does it mean now we can have shared storage, ie a chest on a map in which anyone can put or retrieve items?

That's a good idea, but it'd have to work like the guild storage on a server level... which is not the same to the account-bound storage. Could be done if I do something similar for the guild storage in the future.

Maybe for now it could be edited to allow account and character based storage.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.