I just finished the Stats equipable item part, created my own items and the problem is, that the game allows me to equip the item and all, but it does not give me the weapon itself (if that makes sense).
In other words, I pick up a Stats equipable item, find it in my inventory, put it to the weapon slot, but my character’s hands are still empty and even the inspector says that I’m still unarmed.
Other non-visible gear like head slots, leg slots, rings etc. work fine, because they give only passive bonus to health for example. But this weapon one needs to be seen and used which is currently not.
I’m not seeing an Equipped Prefab in the inspector you posted.
Post up a copy of your WeaponConfig.cs (format it with the </> button) and we’ll take a look.
I think I see the issue… the bow should be a WeaponConfig, not a StatsEquippableItem. The inspector you have posted is a StatsEquippableItem, which Fighter will not recognize as a WeaponConfig.
Yes, that was indeed the issue. The root of the problem was that it did not add any damage bonus. That’s why I started digging in there in the first place.
I don’t know if I just missed a line there, but the GetAdditive/Percentage modifiers just did not work in my case, so I workarounded it by adding damageBonus in WeaponConfig like this:
public float GetWeaponDamage()
{
return weaponDamage + damageBonus;
}
…and it works flawlessly in my use case. I spent too much time thinking how to make it work with Stats item instead doing this right away.