In the Inventory Manager under Categories, I can tell an item category to be available/visible in certain menus (Items, Documents, Objectives).
I cannot make it unavailable for Crafting though.
Since I am using a special item category for "Spells", it would be nice if I could not show it in the Crafting inventory (like I also not display it in the regular inventory).
Question 1: How can I do this?
Question 2: If I add something to one of the Adventure Creator Scripts (like I did for the Player Menu a few days ago), wouldn't it be overwritten with the next update? If yes, what can I do to prevent that? I mean if I have to tinker with the Inventory script for example, I don't see a way to use my own Inventory script instead of the original AC one.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What's your AC version? The MenuCrafting element type should support category-filtering.
The best way to run custom code in AC is to use custom event hooks - this tutorial has details. The OnMenuElementClick event, for example, can be used to alter the behaviour of clicking in menus. Crafting is kind of its own beast, though, but it should already be possible to filter items in such elements by category.
I have just checked my version again. It's 1.81.7 and Unity doesn't show an available update.
Are we maybe talking about different menus? This is the one I mean: https://imgur.com/a/tJswIRs
I had expected that Crafting would show up here
I also found something in the PlayerItems properties in the Menu Manager for Crafting.
There I can tell the "PlayerItems" properties to Limit by category default, but my spell from a different category is still shown and I can only select the default category for filtering which I created - the "spells" category isn't shown there.
edit: Oops ... I accidentaly must have changed the category of that spell while changing its position in the inventory. Weird. After I put it in Spells again, it isn't shown anymore in the crafting menu. Looks fine now!
edit: And after I fixed the category for the spells item, the category also shows correctly up in the crafting menu manager - I guess it just wasn't shown because it was empty before I fixed it, which is fine.
One problem though:
After I added the needed ingredients for the item to be crafted (Output is set to "Result is automatic" so I can see the preview while crafting), the item to be crafted is shown in the PlayerItems list.
This is confusing (and can cause errors when players add it as ingredient as well and then create), since i wouldn't want to use it as ingredient.
I changed its category to a new one ("special"), and deselected this category in the PlayerItems "Limit by category" filters.
It still shows up there: https://imgur.com/a/t57j5cA
Update: Ok, it was same problem (which I solved). Somehow the item was reset to "default" and therefor shown in the available items for crafting. So this was my fault.