12. Build useful inventory variations
Figure 27. A tool-only view hides the notebook and map while they remain in the carried inventory.
1. Give item definitions Types such as tool, note and key.
2. Create a second authored inventory view with its own element ID. Set its Inventory Types field to tool in Type Settings.
3. Keep your first view’s filter empty so it shows all carried items.
4. Use ordinary Buttons to show the intended GUI/view and hide the other. Author the filters before running the game.
5. Run the game, switch views, then return to All items. Confirm no inventory was removed.
The filter accepts a list separated by commas, semicolons or new lines. Matching ignores case and trims spaces. Multiple types are an OR filter: tool,key means items with either type, not only items with both.
A filter changes a view, not possession. HasInventory still sees a hidden notebook. Runtime Change GUI Element Property can change inventoryTypes too, but the rebuild/refresh limitation in chapter 26 makes separately authored views the safer starting point in 0.86.3.4.
