Difference between revisions of "Sims 4:0x01D0E75D"

From SimsWiki
Jump to: navigation, search
m (Overview: Improved a link)
(Param DataTypes: Updated with known changes to format in TS4)
 
Line 56: Line 56:
 
|-
 
|-
 
| 4 || Texture
 
| 4 || Texture
 +
|-
 +
| 0x10004 || Texture
 
|-
 
|-
 
|}
 
|}
Line 79: Line 81:
 
| 2 || * || Int[] ||
 
| 2 || * || Int[] ||
 
|-
 
|-
| 4 || 4 || Texture|| A resource key index.  In most cases it is a [[Sims 4:RCOL#References|RCOL reference]], however in the case of [[Sims 4:0x015A1849|GEOM]], it is a [[Sims 4:Key_table|Key Table]] index. This data is padded to 16 bytes with 00.
+
| 4 || 4 || Texture|| In most cases it is a [[Sims 4:Key_table|ResourceKey]](in ITG order), however in the case of [[Sims 4:0x015A1849|GEOM]], it is a [[Sims 4:Key_table|Key Table]] index, which is padded to 16 bytes with 00.
 
|-
 
|-
 
| 4 || 5 || TextureKey|| [[Sims 4:Key_table|ResourceKey]](in ITG order) padded to 20 bytes with 00
 
| 4 || 5 || TextureKey|| [[Sims 4:Key_table|ResourceKey]](in ITG order) padded to 20 bytes with 00

Latest revision as of 20:07, 15 July 2014

Modding Reference by Category

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

Material Definition - MATD
TypeID:0x01D0E75D
Game Version:The Sims 4



[edit] Overview

This is an RCOL chunk.

DWORD 'MATD'
DWORD version
DWORD		// Material name hash or 0
DWORD		// Shader name hash or 0
DWORD length	// Length from 'MTRL' or 'MTNF'; 16+(16*count)+(4*parmcount)
--if version < 0x103
	DWORD 'MTRL'   // Used instead of MTNF if the internal list of resource keys is null.
	DWORD 0
	WORD
	WORD
--else if version >= 0x103
	DWORD IsVideoSurface	// boolean
	DWORD IsPaintingSurface //
	DWORD 'MTNF' or 'MTRL'	// Used if the internal list of resource keys is non-null.
				// Note that it may still just be of zero length.
                               // TODO: Is 'MTNF' even used anymore?  Will using it case problems in TS4?
	DWORD 0
	DWORD datasize	// Size of the data block (total parms*4)

DWORD count
--count repeats of
	DWORD param name hash	// Valid values depend on the Shader used
				// see ShaderParams for another list
	DWORD			// Data type code
	DWORD data size (in DWORDS)
	DWORD data offset	// From 'MTRL' or 'MTNF'

--count repeats of
	--data count repeats of  
		--insert data // see Param Datatypes for possible typecode/size combos
		--insert padding to DWORD boundry

[edit] Param DataTypes

TypeCodes
Id Description
1 Float
2 Int
4 Texture
0x10004 Texture
DataType
TypeCode Size(in DWORDs) Data Description
1 1 Float
1 2 Vector2
1 3 Vector3
1 4 Vector4
2 1 Int
2 * Int[]
4 4 Texture In most cases it is a ResourceKey(in ITG order), however in the case of GEOM, it is a Key Table index, which is padded to 16 bytes with 00.
4 5 TextureKey ResourceKey(in ITG order) padded to 20 bytes with 00

[edit] Notes

  1. Valid texture reference types include { TXTC, DDS, ANIM } resource types.
Modding Reference by Category

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

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox