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