Difference between revisions of "Sims 3:0x02019972"

From SimsWiki
Jump to: navigation, search
m
m (Format)
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Sims 3:Main Page]] -> [[Sims 3:PackedFileTypes]]
+
{{TS3AdvancedModdingHeader}}
<br/>[[Sims 3:Main Page]] -> [[Sims 3:RCOL]]
+
{{TS3Resource
<hr/>
+
|name=MTST
==MTST==
+
|typeid= 0x02019972
This is a [[Sims_3:RCOL]] chunk.
+
|expansion=The Sims 3
    DWORD // 'MTST'
+
}}
    DWORD // version?
+
<br clear="all">
    DWORD // unknown
+
    DWORD // (initial MATD index) | 0x10000000;
+
    DWORD // count
+
repeat count times:
+
    DWORD // (MATD index) | 0x10000000
+
    DWORD // material's hash name
+
<hr/>
+
  
Postulate based MTST blocks encountered so far ('''Needs Confirmation!'''):
+
==Overview==
 +
This is a [[Sims 3:RCOL]] chunk.
  
All MTST blocks have a '''count''' >= 1 and the following block in the repetition section:
+
The purpose of the MTST (Material Set) is to allow multiple material definitions to be swapped by the game through the function:
 +
ScriptCore.World.ObjectSetMaterial(ObjectGuid objId, string materialSetName, float transitionTime, bool bTransitionToOverlay);
 +
For most objects, this function is often accessed through the function:
 +
Sims3.Gameplay.Abstracts.GameObject.SetMaterial(string materialSetName);
 +
The string argument is [[FNV|FNV32]] hashed and matched with the hash name to locate and swap out the object's material.
  
    DWORD // (MATD index = initial MATD index) | 0x10000000
+
==Format==
    DWORD // 0x2EA8FB98 (fnv32 hash of "Default")
+
DWORD 'MTST'
<hr/>
+
DWORD Version
[[Sims 3:Main Page]] -> [[Sims 3:PackedFileTypes]]
+
DWORD [[FNV|FNV32]] of MATD Name
<br/>[[Sims 3:Main Page]] -> [[Sims 3:RCOL]]
+
DWORD Initial [[Sims 3:0x01D0E75D|MATD]] index
 +
DWORD Count
 +
--''Count'' repeats of
 +
DWORD MATD index
 +
DWORD FNV32 of MATD Name
 +
 
 +
Based on all MTST blocks so far seen, 'Count' is >= 1 and there is an entry named "Default", i.e.
 +
DWORD MATD index      // == ''Initial MATD index''
 +
DWORD 0x2EA8FB98      // FNV32 of "default"
 +
DWORD 0xEEAB4327      // FNV32 of "dirty"
 +
DWORD 0x2E5DF9BB      // FNV32 of "verydirty"
 +
DWORD 0xC3867C32      // FNV32 of "burnt"
 +
DWORD 0x257FB026      // FNV32 of "clogged" 
 +
Where the MTST is a [[Sims_3:0x01661233|MODL]] block, ''index'' is ''or''-d with 0x10000000 and refers to the MODL resource RCOL block number.
 +
Where it is a MTST resource, ''index'' is ''or''-d with 0x30000000 (not sure what it indexes into, if anything).
 +
 
 +
{{TS3AdvancedModdingHeader}}

Latest revision as of 22:33, 31 July 2011

Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference 

MTST
TypeID:0x02019972
Game Version:The Sims 3



[edit] Overview

This is a Sims 3:RCOL chunk.

The purpose of the MTST (Material Set) is to allow multiple material definitions to be swapped by the game through the function:

ScriptCore.World.ObjectSetMaterial(ObjectGuid objId, string materialSetName, float transitionTime, bool bTransitionToOverlay);

For most objects, this function is often accessed through the function:

Sims3.Gameplay.Abstracts.GameObject.SetMaterial(string materialSetName);

The string argument is FNV32 hashed and matched with the hash name to locate and swap out the object's material.

[edit] Format

DWORD 'MTST'
DWORD Version
DWORD FNV32 of MATD Name
DWORD Initial MATD index
DWORD Count
--Count repeats of
	DWORD MATD index
	DWORD FNV32 of MATD Name

Based on all MTST blocks so far seen, 'Count' is >= 1 and there is an entry named "Default", i.e.

DWORD MATD index       // == Initial MATD index
DWORD 0x2EA8FB98       // FNV32 of "default"
DWORD 0xEEAB4327       // FNV32 of "dirty"
DWORD 0x2E5DF9BB       // FNV32 of "verydirty"
DWORD 0xC3867C32       // FNV32 of "burnt"
DWORD 0x257FB026       // FNV32 of "clogged"  

Where the MTST is a MODL block, index is or-d with 0x10000000 and refers to the MODL resource RCOL block number. Where it is a MTST resource, index is or-d with 0x30000000 (not sure what it indexes into, if anything).

Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference 

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox