Own Items Component
Category:Component Modding are all optional properties that can be added to any file. Components are useful in extending the original files with even more information, such as the cost of the item or whether the block can be broken by a weapon.
On this page, we go over the Own Items component, signified by the following;
"ownItems": { =Content= }
Own Items components are one of the components that are related to Achievements. This component is similar to the Any Of Category Component. The difference is this is Whenever you collect or discard items it will check to see if items are in your inventory.
When and How to use
Own Items components are used whenever you want an Achievement that tracks the number of specific items in your inventory.
To start off with first, you should create an Achievement. Once that is done, you can add the following below the last property of the file;
"ownsItems" : { "items" : [ { "code" : "staxel.item.whatever", "count" : 1 } ] }
This only has one property "items" which is a list of Spawned Items. For more info see See Items#Universal Spawning Rules. There is one difference in this case. All of these items must have an extra property labelled "count". This specifies how many of this item must exist in the inventory.
Config Options
All config options must be inside the body of;
"talkTo": { =Config Here= }
"items"
Valid options (List of Spawn Item): See Items#Universal Spawning Rules for more information.
Default Value: No default value is specified. Always need to provide your own.
This is the item that will be spawned in. These items must have an extra property which is listed below.
"count"
Valid options (Int): A positive integer number.
Default Value: No default value is specified. Always need to provide your own.
This is the amount of this item needed before it is allowed to succeed.