Hi desukarhu
In our system an inventory is simply a collection of items. Therefore you could make it seem like they all share the same inventory but actually all your characters have their own small inventory (with the equipped items) and then you have the "player" inventory which you share between your characters.
To design this you'll have two choices.
1)Have a single big inventory with many item collections, one for each character equipement, one for the shared items, etc. "Equipping" would mean moving the item from one item collection to another
2) Each character has their own inventory and you have another main shared inventory. Equipping would mean moving items from the main inventory to one of the character inventories.
Note if you plan to use UCC the only option to use will be option 2 as the character requires an inventory to equip weapons.
That's the core concept.
As for the UI that's a bit more complicated. In UIS v1.0.X there are no equipment window or drag and drop so having multiple characters makes it a bit harder to know on which character you wish to equip an item to. You could code a custom equip item action which give you a list of character names which you can press to equip... but that's probably not what you want.
This will be addressed in V1.1 (Which I am currently working on) where we will be upgrading the UI options. You'll have drag&drop, equipment windows, floating panels, filters, sorters, etc...
If you are a programmer you can of course create your own UI and I'll be happy to help you with any questions you come up with.
/// <summary>
/// Add an itemCollection to the inventory.
/// </summary>
/// <param name="itemCollection">The item Collection.</param>
public void AddItemCollection(ItemCollection itemCollection)
{
m_ItemCollections.Add(itemCollection);
itemCollection.Initialize(this, true);
}
/// <summary>
/// Remove an itemCollection in the inventory.
/// </summary>
/// <param name="itemCollection">The item Collection.</param>
public void RemoveItemCollection(ItemCollection itemCollection)
{
m_ItemCollections.Remove(itemCollection);
itemCollection.Initialize(null, true);
}
/// <summary>
/// Add an itemCollection to the inventory.
/// </summary>
/// <param name="itemCollection">The item Collection.</param>
public void AddItemCollection(ItemCollection itemCollection)
{
m_ItemCollections.Add(itemCollection);
itemCollection.Initialize(this, true);
if (Application.isPlaying) {
EventHandler.RegisterEvent(itemCollection, EventNames.c_ItemCollection_OnUpdate, () => OnItemCollectionUpdate(itemCollection));
}
}
/// <summary>
/// Remove an itemCollection in the inventory.
/// </summary>
/// <param name="itemCollection">The item Collection.</param>
public void RemoveItemCollection(ItemCollection itemCollection)
{
m_ItemCollections.Remove(itemCollection);
itemCollection.Initialize(null, true);
if (Application.isPlaying) {
EventHandler.UnregisterEvent(itemCollection, EventNames.c_ItemCollection_OnUpdate,
() => OnItemCollectionUpdate(itemCollection));
}
}
public class MyItemCollection : ItemCollection{
public void SetPurpose(ItemCollectionPurpose purpose){m_Purpose = purpose;}
...
}