MMAT

From SimsWiki
Revision as of 20:19, 17 September 2012 by Kiwi tea (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
4C697E5A
Short name: MMAT
Long name: Material Override

Overview

The Material Override resource is model material information and allows the various different recolors of an object to be applied. MMAT is commonly thought of as a skin, but actually it provides information about the skin, it is NOT the actual skin of the object!

You will likely only need to deal with these if you clone a non-recolorable object and need to make it recolorable, or if you are adding extra colours to the package.

Material Definition (TXMT) and Material Override (MMAT) names are related

The name of an MMAT has to match the TXTR name it represents as shown in this graphic.

Fields

The following fields are available for use in this format. These names are stored in the 'key' attribute of each tag, with the actual value between the start and end tags.

Booleans

  • defaultMaterial - Is this material the default material for the object? ie. is this the default skin

Strings

  • creator - The program or person that created the material?
  • family - Type of the material?
  • modelName - The filename of the object model, with each . replaced by a _ character
  • name - The filename of the material, with each . replaced by a _ character
  • subsetName - The group that this material belongs to - presumably all materials with the same group name are placed together in the chooser
  • type - The type of file this is? Has the value modelMaterial

Unsigned Integers

  • flags - Flags for the material. Only seen values of 0 so far
  • materialStateFlags - States of the material? Only seen values of 0 so far
  • objectGUID - The unique ID number for the object this material is applied to

Signed Integers

  • objectStateIndex - The current state of the object, or -1 if no states are defined for the object.

Internal Representation

MMAT is an XML-based file with the following structure...

<?xml version="1.0" encoding="UTF-8"?>
<cGZPropertySetString>
FIELDS HERE

There are different types of fields that can be in a document. Each type is both represented as a different tag name, AND a 'type' attribute on the tag. Presumably the game only reads the 'type' attribute

 <AnyBoolean key="" type="0xcba908e1"></AnyBoolean> - Boolean true/false
 <AnyString key="" type="0x0b8bea18"></AnyString> - Text string
 <AnyUint32 key="" type="0xeb61e4f7"></AnyUint32> - Unsigned Integer number - 4 bytes/32 bits
 <AnySint32 key="" type="0x0c264712"></AnySint32> - Signed Integer number - 4 bytes/32 bits
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox