For adding upgrade cost, here is an example from one I'm working on : recipe.m_resources = new Piece.Requirement[] { new Piece.Requirement() { m_resItem = PrefabManager.Cache.GetPrefab<ItemDrop>("Iron"), m_amount = 10, m_amountPerLevel = 5 }, new Piece.Requirement() { m_resItem = PrefabManager.Cache.GetPrefab<ItemDrop>("DeerHide"), m_amount = 10 } };
So in this recipe, it will cost 10 deer hide and 10 iron to create, then upgrades will cost 5 per level (5, 10, 15 and so on). Hope this is enough to help.
4 comments
recipe.m_resources = new Piece.Requirement[]
{
new Piece.Requirement()
{
m_resItem = PrefabManager.Cache.GetPrefab<ItemDrop>("Iron"),
m_amount = 10,
m_amountPerLevel = 5
},
new Piece.Requirement()
{
m_resItem = PrefabManager.Cache.GetPrefab<ItemDrop>("DeerHide"),
m_amount = 10
}
};
So in this recipe, it will cost 10 deer hide and 10 iron to create, then upgrades will cost 5 per level (5, 10, 15 and so on). Hope this is enough to help.
I am gonna try it.