Hi plutonmania,
Thank for letting us know.
1)
The first bug in the first two screenshots, is a bug in the Inventory System that we found at the start of the week. Please replace this function in the ItemSlotCollection.cs script:
Code:
/// <summary>
/// Returns the slot where the item is set.
/// </summary>
/// <param name="item">The item that is in the collection.</param>
/// <returns>The slot where the item is equipped. -1 indicates no slot.</returns>
public int GetItemSlotIndex(Item item)
{
var stackableEquivalentItemIndex = -1;
for (int i = 0; i < m_ItemSlotSet.ItemSlots.Count; i++) {
var itemSlot = m_ItemSlotSet.ItemSlots[i];
if (itemSlot.Category != null && !itemSlot.Category.InherentlyContains(item)) {
continue;
}
if (m_ItemsBySlot[i] == null) { continue; }
if (m_ItemsBySlot[i].Item == null) { continue; }
if (m_ItemsBySlot[i].Item == item) { return i; }
if (m_ItemsBySlot[i].Item.StackableEquivalentTo(item)) {
stackableEquivalentItemIndex = i;
}
}
return stackableEquivalentItemIndex;
}
We'll update the Inventory System soon.
2)
I can't seem to replicate the bug in the third screenshot about the Item Action Panel / Button.
It seems one of the ItemViewSlot or ItemView is null, but that doesn't make any sense.
Could you please copy paste the full error message, and explain in detail the steps to replicate that bug?
3)
I think the 3 slot below left are shortened for weapons. But when I use it 1 time it assigns well, but when I click another time it removes the weapon of "assigns" but that makes the bug. and no longer wants to re assigns when I recall on it and makes the game in break
As you say that does seem to be a problem.
There was another bug in ItemSlotCollection. Please replace this function:
Code:
/// <summary>
/// Simple remove of an item from a specific item stack.
/// </summary>
/// <param name="itemInfo">The item Info to remove.</param>
/// <param name="removed">The amount already removed.</param>
/// <param name="itemStackToRemove">The item stack to remove the amount from.</param>
/// <returns>The amount removed (includes the amount previously removed).</returns>
private int SimpleInternalItemRemove(ItemInfo itemInfo, int removed, ItemStack itemStackToRemove)
{
var remainingToRemove = itemInfo.Amount - removed;
var newAmount = itemStackToRemove.Amount - remainingToRemove;
if (newAmount <= 0) {
// Remove the item from the item collection.
itemStackToRemove.Item?.RemoveItemCollection(this);
removed += itemStackToRemove.Amount;
itemStackToRemove.Reset();
itemStackToRemove.Initialize(ItemAmount.None, this);
if (m_ItemStacks.Contains(itemStackToRemove)) {
m_ItemStacks.Remove(itemStackToRemove);
}
} else {
removed += remainingToRemove;
itemStackToRemove.SetAmount(newAmount);
}
return removed;
}
The Item was not being removed properly from the slot collection so when it was added back to the default itemCollection it was given a new ID, causing the Hotbar to lose reference to it.
4)
The Camera for the "Character Raw Image" was missing. I'm not sure when that happened. I must have deleted it by mistake.
Here are the settings you want:
You'll aslo need to set the
Layer for Body, Head and Arms to "Character".
5)
Both of the bugs you experienced were caused by the last update we made. We made a big change to ItemSlotCollection to allow a fixed slot count, but that allowed null items which we had to deal with. I should have done a better job testing all use cases before making the update live, and for that I apologize.
Hopefully we'll update the Inventory and the integration very soon.