Clothing And Tool Items
Template:ModdingOutdated Note: Not Currently in ModKit (will be added soon)
Overview[edit | edit source]
Avatar parts are a bit different than normal items types, since they may have meshes which must be attached to avatars in the game.
Objects which are visible in the world must be "curved", while those which are visible in the UI must not. Thus, the meshes associated with an avatar part must provide materials for curved and un-curved render modes, for use in the world and avatar UI respectively.
Parts of an avatar item must also define the mode by which they are attached to the avatar. Currently there are two modes of attachment, "skinned" and "attached". Skinned avatar parts are expected to contain a SkinnedMeshRenderer, which will be bone-mapped to the avatar (for things like clothing). Attached avatar parts must provide the name of a bone in the avatar's animated skeleton, which will parent the part.
Tool Example[edit | edit source]
Modders may add new tools by adding a GameObject to the tool item which has the AvatarAttachedPart script and which is named Avatar.
In this example, the modder has not specified any curved or UI materials for the tool, so the appropriate default avatar materials will be applied when the item is equipped. The attach point name "AttachTool_Axe" may refer to a bone in the avatar skeleton to which it will be attached when it is not being held. If the attach tool name is left empty (or misspelled) then the tool will not be shown when it is not in the player's hand.
Clothing Example[edit | edit source]
A modder may also want to add a complex item which has multiple parts. In this example, when the player equips the 'WaterSuit' item, their avatar will display 7 new attachments, listed under the Avatar object. Note that the object which contains all the avatar parts must be called "Avatar".
This example shows SuitShoes, which is just one of several SkinnedAvatarParts which are a part of the WaterSuitItem. All AvatarPart components allow for separate prefabs to be assigned for male or female avatars. All parts of an avatar item must have a component which inherits from the abstract behaviour AvatarPart.
The unchecked option to "Use Material Texture" determines whether the textures from the selected materials will be used or those from the prefab (which may have a textured renderer).