Misc 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 Misc component, signified by the following;
"misc": { =Content= }
Misc components are one of the components that are related to Achievements. This component is for any miscellaneous achievements which will be triggered by Staxel itself. This includes Changing Clothing, Using the Recipe Ovelay etc. A full list is listed in #"key".
When and How to use
Misc components are used whenever you want an Achievement that tracks any miscellaneous achievement that can be triggered by Staxel.
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;
"misc" : { "key" : "recipeOverlay", "translationString" : "staxel.achievements.talkFarmFanOverlay" }
The first property is the "key" which will be the achievement type to be triggered. See #"key" for the full list of used values. The second property, "translationString" is the translation string for the achievement description.
With that this component is done.
Config Options
All config options must be inside the body of;
"talkTo": { =Config Here= }
"key"
Valid options (String): "recipeOverlay", "changeClothing", "chargeMax", "throw" and others that may appear.
Default Value: No default value is specified. Always need to provide your own.
This is the type of action that will trigger the overlay. Specifically, an achievement trigger is called in code, and this component will check if that achievement trigger is the same as the key. So any number of achievements types can be used through this component.
"translationString"
Valid options (String): A string that contains a unique Translation Code.
Default Value: No default value is specified. Always need to provide your own.
This is the translation code to the description of the achievement.