Difference between revisions of "Sims 3:0xEA5118B0"

From SimsWiki
Jump to: navigation, search
(Map: Added overview and format with field names based on findings made by Rick)
(Format: Added Material Resource data type cases based on findings made by Rick)
Line 980: Line 980:
 
  QWORD [[#Shaders|Shader]]
 
  QWORD [[#Shaders|Shader]]
 
  DWORD Count1
 
  DWORD Count1
QWORD [[#Properties|Property Id]]
+
    QWORD [[#Properties|Property Id]]
BYTE dataType
+
    BYTE dataType
switch(dataType)
+
    switch(dataType)
case 06: QWORD // DDS Instance Id
+
        case 00: FLOAT
case 00: FLOAT // Little Endian
+
        case 01: DWORD
 +
        case 02: BYTE  // Boolean 0x00 or 0xFF
 +
        case 03: DWORD Count1
 +
        --repeat Count1
 +
            FLOAT
 +
        case 04: DWORD Count2
 +
        --repeat Count2
 +
            DWORD
 +
        case 05: DWORD Count3
 +
        --repeat Count3
 +
            BYTE // Boolean 0x00 or 0xFF
 +
        case 06: QWORD // DDS IID<sub>64</sub>
 +
 
 
======Shaders======
 
======Shaders======
 
[[FNV|FNV32]] Hashed shader names from "Shaders_Win32.precomp"
 
[[FNV|FNV32]] Hashed shader names from "Shaders_Win32.precomp"

Revision as of 22:10, 12 August 2014

Modding Reference by Category

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

Effect Resource Tree - SWB
TypeID:0xEA5118B0
Game Version:The Sims 3



Contents

Overview

These internal files are known as Swarm Binaries, because they are read and rendered by the Swarm VFX System originally developed by Andrew Willmott. Variants of this system are used not only The Sims 3, but also The Sims 2, The Sims 4, SimCity 4, SimCity 5, and Spore. Swarm Binaries are compiled from text files written in Arg Script language. More info can be found in presentations here: http://www.andrewwillmott.com/talks/swarm-procedural-content

The internal format for Swarm Binaries was derived primarily by analyzing internal code for parsing them, hidden within The Sims 3 main executable itself.

The field names were initially guessed at by playing around with their values and observing the changes to the effect in The Sims 3 itself, by using an effect playing debug object, and later by using a dedicated Effect Player which uses the game's engine API included with The Sims 3 Create-A-World Tool. The actual field names were finally found as symbols for Swarm Binary structures within PDB files included with leaked dev versions of SimCity 5, and correlated to corresponding fields in The Sims 3's Swarm Binary format, which is why some of the fields are still unknown.

Format Facts:

  • It is primarily Big Endian, but groups of floats denoting vectors are swizzled to Little Endian.
  • Curves are used to determine how the effects change over time.
  • There are often "vary" and "offset" fields corresponding to this curves that are used to adjust the values using the following formula:
    random(1 - vary, 1 + vary) * current_value + offset
  • The format can be easily expanded by increasing the version of a component type and/or adding entirely new components.

Format

All data is in Big Endian order unless otherwise noted(most floats). This spec is very primitive and needs work.

WORD	Version
Effect Sections 		
Resource Sections 				
VisualEffect Section
BYTE[4] //FFFFFFFF
VisualEffect Handles

Effect Sections

Format

--Repeat until BlockType 0xFFFF
	// Block List
	WORD	BlockType
	WORD	Version
	DWORD	Count
	--repeat(Count)
		--Insert block data(depending on type)

Blocks

BlockType
0x0001 Particle Effect
0x0002 Metaparticle Effect
0x0003 Decal Effect
0x0004 Effect Sequence
0x0005 Sound Effect
0x0006 Shake Effect
0x0007 Camera Effect
0x0008 Model Effect
0x0009 Screen Effect
0x000A Unused
0x000B Game Effect
0x000C Fast Particle Effect
0x000D Distribute Effect
0x000E Ribbon Effect
0x000F Sprite Effect

Particle Effect

Format
DWORD    //BE; Flags
FLOAT[2] //le; Particle Lifetime
FLOAT    //BE; Preroll Time
FLOAT[2] //le; Emit Delay
FLOAT[2] //le; Emit Retrigger
FLOAT[3] //le; Emit Direction Bounding Box Minimum
FLOAT[3] //le; Emit Direction Bounding Box Maximum
FLOAT[2] //le; Emit Speed
FLOAT[3] //le; Emit Volume Bounding Box Minimum
FLOAT[3] //le; Emit Volume Bounding Box Maximum
FLOAT    //BE; Emit Torus Width

// Emit Rate Curve (Particles/Sim-Minute)
DWORD Count //BE
    FLOAT   //BE
FLOAT    //BE; Emit Rate Curve Time
WORD     //BE; Emit Rate Curve Cycles
FLOAT    //BE; Emit Rate Speed Scale

// Size Curve
DWORD Count //BE
    FLOAT   //BE
FLOAT    //BE; Size Vary

// Aspect Ratio Curve (1 is normal)
DWORD Count //BE 
    FLOAT   //BE

// Randomization Multipliers: 
//  If > 0, randomly scaled between 0 and value for each particle 
//  and multiplied to each value of the specified delta list
//  Seems to favor higher values, since when I set each to 10, 
//  a lot more particles were very wide and spinning rapidly,
//  and very few particles were narrow and spinning slowly.
//  UPDATE: The basic formula is: (1 + random(-1,1) * vary) * value
FLOAT // BE; Aspect Ratio Vary
FLOAT // BE; Rotation Vary
FLOAT // BE; Rotation Offset

// Rotation Curve (1 = one clockwise rotation = 360 degrees)
DWORD Count //BE
    FLOAT   //BE

// Alpha Curve (0 - 1 = transparent - opaque)
DWORD Count //BE
    FLOAT   //BE
FLOAT //BE; Alpha Vary; 0 - 1 = transparent - opaque

// Color Curve
DWORD Count //BE
    FLOAT //le ; Red   ; 0 - 1
    FLOAT //le ; Green ; 0 - 1
    FLOAT //le ; Blue  ; 0 - 1

//Color Vary that is added at a random intensity to each particle
//Example: if set to (0,0,1) with white particles, 
//    some particles will be bright yellow, some will be pale yellow, and most will be white
FLOAT //le ; Red   ; 0 - 1
FLOAT //le ; Green ; 0 - 1
FLOAT //le ; Blue  ; 0 - 1

//Resource reference block
QWORD //BE; IID64 of a an image(DDS), model(VPXY), or material(see Material Section below)
BYTE  //BE; Format
BYTE  //BE; DrawMode
if ((DrawMode & 0x80) == 0x80) DWORD //BE; ??? 
if ((DrawMode & 0x40) == 0x40) BYTE  //BE; ???

// BE; Draw Flags
if (Version >= 6) WORD
else              BYTE

BYTE  //BE; Buffer
WORD  //BE; Layer
FLOAT //BE; Sort Offset
QWORD //BE; Second IID64; almost always 0xFFFFFFFFFFFFFFFF

BYTE     //BE; Physics Type
BYTE     //BE; Override Set
BYTE     //BE; Tile Count U
BYTE     //BE; Tile Count V
BYTE     //BE; Align Mode
FLOAT    //BE; Frame Speed
BYTE     //BE; Frame Start
BYTE     //BE; Frame Count
BYTE     //BE; Frame Random
FLOAT[3] //le; Directional Forces Sum
FLOAT    //BE; Wind Strength
FLOAT    //BE; Gravity Strength
FLOAT    //BE; Radial Force
FLOAT[3] //le; Radial Force Location
FLOAT    //BE; Drag
FLOAT    //BE; Velocity Stretch
FLOAT    //BE; Screw Rate

// Wiggles 
DWORD Count //BE
    FLOAT    //BE; Time Rate
    FLOAT[3] //le; Rate Direction
    FLOAT[3] //le; Wiggle Direction

BYTE //BE; Screen Bloom Alpha Rate; usually 0x00
BYTE //BE; Screen Bloom Alpha Base; usually 0xFF
BYTE //BE; Screen Bloom Size Rate;  usually 0x00
BYTE //BE; Screen Bloom Size Base;  usually 0xFF

// Loop Box Color Curve
DWORD Count //BE
    FLOAT //le ; Red   ; 0 - 1
    FLOAT //le ; Green ; 0 - 1
    FLOAT //le ; Blue  ; 0 - 1

// Loop Box Alpha Curve
DWORD Count //BE
    FLOAT //BE; 0 - 1 = transparent - opaque

// Surfaces
DWORD Count //BE
    DWORD //BE; Flags; 0x3FFF mask?
    QWORD //BE; IID64 of a surface map(see Material Section below)?
    FLOAT //BE; Bounce            ; Should be DWORD?
    FLOAT //BE; Slide             ; Should be DWORD?
    FLOAT //BE; Collision Radius  ; Should be DWORD?
    FLOAT //BE; Death Probability ; Should be DWORD?
    DWORD //BE; Pin Offset
    ZSTRING //???
    ZSTRING //???
    DWORD Count //BE
        FLOAT[3] //le; Surface Point

FLOAT    //BE; Map Bounce
FLOAT    //BE; Map Repulse Height
FLOAT    //BE; Map Repulse Strength
FLOAT    //BE; Map Repulse Scout Distance
FLOAT    //BE; Map Repulse Vertical
FLOAT    //BE; Map Repulse Kill Height; usually -1000000000.0
FLOAT    //BE; Probability Death; usually 0.0
FLOAT[2] //le; Altitude Range; usually (-10000.0, 10000.0)
QWORD    //BE; Force Map IID64;      usually 0xFFFFFFFFFFFFFFFF
QWORD    //BE; Emit Rate Map IID64;  usually 0xFFFFFFFFFFFFFFFF
QWORD    //BE; Emit Color Map IID64; usually 0xFFFFFFFFFFFFFFFF

// Random Walk
FLOAT[2] //le; Time
FLOAT[2] //le; Strength
FLOAT    //BE; Turn Range
FLOAT    //BE; Turn Offset
FLOAT    //BE; Mix
// Turn Offset Curve
DWORD Count //BE
     FLOAT  //BE
BYTE     //BE; Walk Loop Type

FLOAT[3] //le; Attractor Origin
// Attractor Strength Curve
DWORD Count //BE
    FLOAT   //BE
FLOAT //BE; Range
FLOAT //BE; Kill Range

// Path Points
DWORD Count //BE
    FLOAT[3] //le; Position
    FLOAT[3] //le; Velocity
    FLOAT    //BE; Time

if (Version >= 2)
    FLOAT[3] //le; ???
    DWORD Count //BE
        FLOAT[3] //le; ???

if (Version >=3) BYTE  //BE; ???
if (Version >=4) FLOAT //BE; ???
if (Version >=5) FLOAT //BE; ???

Metaparticle Effect

Overview

This type takes an existing effect and modifies it

Format
QWORD    //BE; Flags
FLOAT[2] //le; Particle Lifetime
FLOAT    //BE; Preroll Time
FLOAT[2] //le; Emit Delay
FLOAT[2] //le; Emit Retrigger
FLOAT[3] //le; Emit Direction Bounding Box Minimum
FLOAT[3] //le; Emit Direction Bounding Box Maximum
FLOAT[2] //le; Emit Speed
FLOAT[3] //le; Emit Volume Bounding Box Minimum
FLOAT[3] //le; Emit Volume Bounding Box Maximum
FLOAT    //BE; Emit Torus Width

// Emit Rate Curve (Particles/Sim-Minute)
DWORD Count //BE
    FLOAT   //BE
FLOAT    //BE; Emit Rate Curve Time
DWORD    //BE; Emit Rate Curve Cycles; Should be FLOAT?
FLOAT    //BE; Emit Rate Speed Scale

// Size Curve
DWORD Count //BE
    FLOAT   //BE
FLOAT    //BE; Size Vary

// Pitch Curve
DWORD Count //BE
    FLOAT   //BE
// Roll Curve
DWORD Count //BE
    FLOAT   //BE
// Heading (Yaw) Curve
DWORD Count //BE
    FLOAT   //BE

FLOAT //BE; Pitch Vary
FLOAT //BE; Roll Vary
FLOAT //BE; Heading (Yaw) Vary

FLOAT //BE; Pitch Offset
FLOAT //BE; Roll Offset
FLOAT //BE; Heading (Yaw) Offset

// Color Curve
DWORD Count //BE
    FLOAT //le ; Red   ; 0 - 1
    FLOAT //le ; Green ; 0 - 1
    FLOAT //le ; Blue  ; 0 - 1
// Color Vary
FLOAT //le ; Red   ; 0 - 1
FLOAT //le ; Green ; 0 - 1
FLOAT //le ; Blue  ; 0 - 1

// Alpha Curve (0 - 1 = transparent - opaque)
DWORD Count //BE
    FLOAT   //BE
FLOAT //BE; Alpha Vary

ZSTRING Base Effect  //See Effect Handles below
ZSTRING Death Effect //See Effect Handles below

BYTE     //BE; Align Mode
FLOAT[3] //le; Directional Forces Sum
FLOAT[3] //le; Global Forces Sum
FLOAT    //BE; Wind Strength
FLOAT    //BE; Gravity Strength
FLOAT    //BE; Radial Force
FLOAT[3] //le; Radial Force Location
FLOAT    //BE; Drag
FLOAT    //BE; Screw Rate

// Wiggles 
DWORD Count //BE
    FLOAT    //BE; Time Rate
    FLOAT[3] //le; Rate Direction
    FLOAT[3] //le; Wiggle Direction

BYTE //BE; Screen Bloom Alpha Rate; usually 0x00
BYTE //BE; Screen Bloom Alpha Base; usually 0xFF
BYTE //BE; Screen Bloom Size Rate;  usually 0x00
BYTE //BE; Screen Bloom Size Base;  usually 0xFF

// Loop Box Color Curve
DWORD Count //BE
    FLOAT //le ; Red   ; 0 - 1
    FLOAT //le ; Green ; 0 - 1
    FLOAT //le ; Blue  ; 0 - 1

// Loop Box Alpha Curve
DWORD Count //BE
    FLOAT //BE; 0 - 1 = transparent - opaque

// Surfaces
DWORD Count //BE
    DWORD //BE; Flags; 0x3FFF mask?
    QWORD //BE; IID64 of a surface map(see Material Section below)?
    FLOAT //BE; Bounce            ; Should be DWORD?
    FLOAT //BE; Slide             ; Should be DWORD?
    FLOAT //BE; Collision Radius  ; Should be DWORD?
    FLOAT //BE; Death Probability ; Should be DWORD?
    DWORD //BE; Pin Offset
    ZSTRING //???
    ZSTRING //???
    DWORD Count //BE
        FLOAT[3] //le; Surface Point

FLOAT    //BE; Map Bounce
FLOAT    //BE; Map Repulse Height
FLOAT    //BE; Map Repulse Strength
FLOAT    //BE; Map Repulse Scout Distance
FLOAT    //BE; Map Repulse Vertical
FLOAT    //BE; Map Repulse Kill Height; usually -1000000000.0
FLOAT    //BE; Probability Death; usually 0.0
FLOAT[2] //le; Altitude Range; usually (-10000.0, 10000.0)
QWORD    //BE; Force Map IID64;      usually 0xFFFFFFFFFFFFFFFF
QWORD    //BE; Emit Rate Map IID64;  usually 0xFFFFFFFFFFFFFFFF
QWORD    //BE; Emit Color Map IID64; usually 0xFFFFFFFFFFFFFFFF

// Random Walk 1
FLOAT[2] //le; Time
FLOAT[2] //le; Strength
FLOAT    //BE; Turn Range
FLOAT    //BE; Turn Offset
FLOAT    //BE; Mix
// Turn Offset Curve
DWORD Count //BE
     FLOAT  //BE
BYTE     //BE; Walk Loop Type

// Random Walk 2
FLOAT[2] //le; Time
FLOAT[2] //le; Strength
FLOAT    //BE; Turn Range
FLOAT    //BE; Turn Offset
FLOAT    //BE; Mix
// Turn Offset Curve
DWORD Count //BE
     FLOAT  //BE
BYTE     //BE; Walk Loop Type

FLOAT[3] //le; Random Walk Preferred Direction

FLOAT //BE; Align Damping
FLOAT //BE; Bank Amount
FLOAT //BE; Bank Damping

FLOAT[3] //le; Attractor Origin
// Attractor Strength Curve
DWORD Count //BE
    FLOAT   //BE
FLOAT //BE; Range
FLOAT //BE; Kill Range

// Path Points
DWORD Count //BE
    FLOAT[3] //le; Position
    FLOAT[3] //le; Velocity
    FLOAT    //BE; Time

FLOAT //BE; Tractor Reset Speed

Decal Effect

Overview

This is mostly used for things like the build tool UI tools(i.e. the terrain tool circle).

Format
DWORD //BE; Flags; 0x7F mask?
QWORD //BE; IID64 of a DDS Resource
BYTE  //BE; ???
FLOAT //BE; ???
BYTE  //BE; ???
FLOAT //BE; Lifetime
// Rotation Curve
DWORD Count1 //BE
    FLOAT    //BE
// Size Curve
DWORD Count2 //BE
    FLOAT    //BE
// Alpha Curve
DWORD Count3 //BE
    FLOAT    //BE
// Color Curve
DWORD Count4 //BE
	FLOAT //le ; Red   ; 0 - 1
	FLOAT //le ; Green ; 0 - 1
	FLOAT //le ; Blue  ; 0 - 1
// Aspect Ratio Curve
DWORD Count5 //BE
    FLOAT    //BE
FLOAT    //BE; Alpha Vary
FLOAT    //BE; Size Vary
FLOAT    //BE; Rotation Vary
FLOAT    //BE; Texture Repeat
FLOAT[2] //le; Texture Offset
QWORD    //BE; Emit Color Map IID64; usually 0xFFFFFFFFFFFFFFFF
if (Version >= 2) BYTE //BE; ???

Sequence Effect

Overivew

Combines effect compilations so they play out sequentially

Format
DWORD Count1 
	FLOAT[2] Time Range //Little Endian
	ZSTRING Effect Name //See Effect Handles below
DWORD Flags //0xF mask?

Sound Effect

Overview

Plays a sound

Format
DWORD //BE; Flags; 0xF mask?
QWORD //BE; IID64 of an Audio Tuner
FLOAT //BE; Location Update Delta
FLOAT //BE; Play Time
FLOAT //BE; Volume
if (Version >= 2) BYTE //BE; ???

Shake Effect

Format
FLOAT //BE; Lifetime
FLOAT //BE; Fade Time
// Strength Curve
DWORD Count1 //BE
    FLOAT    //BE
// Frequency Curve
DWORD Count2 //BE
    FLOAT    //BE
FLOAT //BE; Aspect Ratio
BYTE  //BE; Base Table Type
FLOAT //BE; Falloff

Camera Effect

Format
DWORD //BE; Flags; 0x3FF mask?
WORD  //BE; View Flags
FLOAT //BE; Lifetime
// Heading (Yaw) Curve
DWORD Count1 //BE
    FLOAT    //BE
// Pitch Curve
DWORD Count2 //BE
    FLOAT    //BE
// Roll Curve
DWORD Count3 //BE
    FLOAT    //BE
// Distance Curve
DWORD Count4 //BE
    FLOAT    //BE
// FOV Curve
DWORD Count5 //BE
    FLOAT    //BE
// Near Clip Curve
DWORD Count6 //BE
    FLOAT    //BE
// Far Clip Curve
DWORD Count7 //BE
    FLOAT    //BE
QWORD //BE; Camera ID
WORD  //BE; Cubemap Resource

Model Effect

Format
DWORD //BE; Flags; 0x3 mask?
QWORD //BE; Resource IID64
FLOAT //BE; Size
// Color
FLOAT //le; Red   ; 0 - 1
FLOAT //le; Green ; 0 - 1
FLOAT //le; Blue  ; 0 - 1
FLOAT //BE; Alpha (0 - 1 = transparent - opaque)
// Animation Curves
DWORD Count //BE
	FLOAT[2] //le; Length Range
       // Curve
	DWORD Count //BE
	--repeat(Count)
	     FLOAT  //BE
	DWORD //BE; Curve Vary
	DWORD //BE; Speed Scale
	BYTE  //BE; Channel ID
	BYTE  //BE; Mode
QWORD //BE; Material IID64; usually 0xFFFFFFFFFFFFFFFF
BYTE  //BE; Override Set

Screen Effect

Format
BYTE  //BE; Mode
DWORD //BE; Flags; 0x3 mask?
// Color Curve
DWORD Count //BE
	FLOAT //le; Red   ; 0 - 1
	FLOAT //le; Green ; 0 - 1
	FLOAT //le; Blue  ; 0 - 1
// Strength Curve
DWORD Count //BE
    FLOAT   //BE
// Distance Curve
DWORD Count //BE
    FLOAT   //BE
FLOAT //BE; Lifetime
FLOAT //BE; Delay
FLOAT //BE; Falloff
FLOAT //BE; Distance Base
QWORD //BE; Texture IID64

// Filters
DWORD Count //BE
    BYTE  //BE; Type
    BYTE  //BE; Destination
    QWORD //BE; Source
    // Parameters
    DWORD Count
        BYTE

// Temporary Filter Buffers
DWORD Count //BE
    FLOAT //BE; Screen Ratio; should be DWORD?
    FLOAT //BE; Size; should be DWORD?

// Float Parameters
DWORD Count //BE
    FLOAT   //BE

// Vector 3 Parameters
DWORD Count  //BE
    FLOAT[3] //le

// Vector 2 Parameters
DWORD Count  //BE
    FLOAT[2] //le

// Resource ID Parameters
DWORD Count //BE
    DWORD   //BE

Game Effect

Overview

It appears as though this effect can be used to send OS style messages, perhaps for manipulating the mouse for tutorials or something. There are currently no examples in The Sims 3 to be sure.

Format
DWORD    Flags //0x3FF mask?
DWORD    Message ID
DWORD[4] Message Data
ZSTRING  Message String
FLOAT    Life

FastParticle Effect

No examples to decode

Overview

It appears as though this effect is a simplified version of the Particle Effect for faster computations? There are currently no examples in The Sims 3 to be sure.

Format
DWORD    //BE; Flags; 0x1FFF mask?
FLOAT[2] //le; Particle Lifetime
FLOAT    //BE; Preroll Time
FLOAT[2] //le; Emit Delay
FLOAT[2] //le; Emit Retrigger
FLOAT[3] //le; Emit Direction Bounding Box Minimum
FLOAT[3] //le; Emit Direction Bounding Box Maximum
FLOAT[2] //le; Emit Speed
FLOAT[3] //le; Emit Volume Bounding Box Minimum
FLOAT[3] //le; Emit Volume Bounding Box Maximum

// Emit Rate Curve (Particles/Sim-Minute)
DWORD Count //BE
    FLOAT   //BE
FLOAT    //BE; Emit Rate Curve Time
WORD     //BE; Emit Rate Curve Cycles
FLOAT    //BE; Emit Rate Speed Scale

// Size Curve
DWORD Count //BE
    FLOAT   //BE

// Color Curve
DWORD Count //BE
    FLOAT //le ; Red   ; 0 - 1
    FLOAT //le ; Green ; 0 - 1
    FLOAT //le ; Blue  ; 0 - 1

// Alpha Curve (0 - 1 = transparent - opaque)
DWORD Count //BE
    FLOAT   //BE

//Resource reference block
QWORD //BE; IID64 of a an image(DDS), model(VPXY), or material(see Material Section below)
BYTE  //BE; Format
BYTE  //BE; DrawMode
if ((DrawMode & 0x80) == 0x80) DWORD //BE; ??? 
if ((DrawMode & 0x40) == 0x40) BYTE  //BE; ???

// BE; Draw Flags
if (Version >= 6) WORD
else              BYTE

BYTE  //BE; Buffer
WORD  //BE; Layer
FLOAT //BE; Sort Offset
QWORD //BE; Second IID64; almost always 0xFFFFFFFFFFFFFFFF

BYTE     //BE; Align Mode
FLOAT[3] //le; Directional Forces Sum
FLOAT    //BE; Wind Strength
FLOAT    //BE; Gravity Strength
FLOAT    //BE; Radial Force
FLOAT[3] //le; Radial Force Location
FLOAT    //BE; Drag

Distribute Effect

Overview

Note: there is only one of these

Format
DWORD   Flags //0x3FFF mask?
DWORD   Density
ZSTRING ComponentName
DWORD   Start
BYTE    Source Type
FLOAT   Source Size

// Pre-Transform
WORD     Flags
FLOAT    Scale
FLOAT[9] Orientation //Little Endian 
FLOAT[3] Position    //Little Endian

// Size Curve
DWORD Count
    FLOAT

DWORD Size Vary

// Pitch Curve
DWORD Count
    FLOAT

// Roll Curve
DWORD Count
    FLOAT

// Heading (Yaw) Curve
DWORD Count
    FLOAT

FLOAT Pitch Vary
FLOAT Roll Vary
FLOAT Heading (Yaw) Vary
FLOAT Pitch Offset
FLOAT Roll Offset
FLOAT Heading (Yaw) Offset

// Color Curve
DWORD Count
    FLOAT Red   //Little Endian; 0 - 1
    FLOAT Green //Little Endian; 0 - 1
    FLOAT Blue  //Little Endian; 0 - 1

// Color Vary
FLOAT Red   //Little Endian; 0 - 1
FLOAT Green //Little Endian; 0 - 1
FLOAT Blue  //Little Endian; 0 - 1

// Alpha Curve
DWORD Count
    FLOAT

FLOAT Alpha Vary

// Surfaces
DWORD Count
    DWORD   Flags //0x3FFF mask?
    QWORD   IID64 of a surface map(see Material Section below)?
    FLOAT   Bounce            //Should be DWORD?
    FLOAT   Slide             //Should be DWORD?
    FLOAT   Collision Radius  //Should be DWORD?
    FLOAT   Death Probability //Should be DWORD?
    DWORD   Pin Offset
    ZSTRING 
    ZSTRING 
    //Surface Points
    DWORD Count
        FLOAT[3] //Little Endian         	
      	
QWORD Emit Map IID64  //0xFFFFFFFFFFFFFFFF
QWORD Color Map IID64 //0xFFFFFFFFFFFFFFFF
QWORD Pin Map IID64   //0xFFFFFFFFFFFFFFFF

FLOAT[2]  Altitude Range //Little Endian

//Resource reference block
QWORD  IID64 //0xFFFFFFFFFFFFFFFF
BYTE   Format
BYTE   DrawMode
if ((DrawMode & 0x80) == 0x80) DWORD 
if ((DrawMode & 0x40) == 0x40) BYTE

// Draw Flags
if (Version >= 6) WORD
else              BYTE

BYTE  Buffer
WORD  Layer
FLOAT Sort Offset
QWORD Second IID64 //0xFFFFFFFFFFFFFFFF

BYTE  Override Set
DWORD Message ID

Ribbon Effect

Overview

Examples of this effect first appear in the Create A Pet Demo

Format
DWORD    Flags //0x3FFF mask?
FLOAT[2] Lifetime

// Offset Curve
DWORD Count
    FLOAT

// Width Curve
DWORD Count
        FLOAT

FLOAT Taper
FLOAT Fade
FLOAT Alpha Decay

// Color Curve
DWORD Count
    FLOAT Red   //Little Endian; 0 - 1
    FLOAT Green //Little Endian; 0 - 1
    FLOAT Blue  //Little Endian; 0 - 1

// Alpha Curve
DWORD Count
    FLOAT

// Length Color Curve
DWORD Count
    FLOAT Red   //Little Endian; 0 - 1
    FLOAT Green //Little Endian; 0 - 1
    FLOAT Blue  //Little Endian; 0 - 1

// Length Alpha Curve
DWORD Count
        FLOAT

// Edge Color Curve
DWORD Count
        FLOAT Red   //Little Endian; 0 - 1
        FLOAT Green //Little Endian; 0 - 1
        FLOAT Blue  //Little Endian; 0 - 1

// Edge Alpha Curve
DWORD Count
    FLOAT

// Start Edge Alpha Curve
DWORD Count
    FLOAT

// End Edge Alpha Curve
DWORD Count
    FLOAT

DWORD Segment Count
FLOAT Segment Length

//Resource reference block
QWORD IID64 of a an image(DDS), model(VPXY), or material(see Material Section below)
BYTE Format
BYTE DrawMode
if ((DrawMode & 0x80) == 0x80) DWORD //BE; ??? 
if ((DrawMode & 0x40) == 0x40) BYTE  //BE; ???

// Draw Flags
if (Version >= 6) WORD
else              BYTE

BYTE  Buffer
WORD  Layer
FLOAT Sort Offset
QWORD Second IID64 //0xFFFFFFFFFFFFFFFF

DWORD Tile UV //0xFFFFFFFF
FLOAT Slip Curve Speed
FLOAT Slip UV Speed

if (Version >= 2) FLOAT UV Repeat

FLOAT[3] Directional Forces Sum //Little Endian
FLOAT    Wind Strength
FLOAT    Gravity Strength
QWORD    Emit Color Map IID64 //0xFFFFFFFFFFFFFFFF
QWORD    Force Map IID64      //0xFFFFFFFFFFFFFFFF
FLOAT    Map Repulse Strength

Sprite Effect

Overview

Examples of this effect first appear in the Create A Pet Demo

Format
DWORD
DWORD
DWORD
FLOAT
WORD
DWORD Count
        FLOAT
DWORD Count
        FLOAT Red //Little Endian
        FLOAT Green //Little Endian
        FLOAT Blue //Little Endian
DWORD Count
        FLOAT
FLOAT
FLOAT
FLOAT
FLOAT //Little Endian
FLOAT //Little Endian
FLOAT //Little Endian
FLOAT //Little Endian
FLOAT //Little Endian
FLOAT //Little Endian
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT

//Resource reference block
QWORD //I64 of a an image(DDS), model(VPXY), or material(see Material Section below)
BYTE
BYTE flag
if((flag & 0x80)==0x80) DWORD
BYTE
BYTE
WORD
FLOAT
QWORD //0xFFFFFFFFFFFFFFFF

BYTE

Resource Sections

Format

 --Repeat until ResourceType 0xFFFF
   // Block List
   WORD    ResourceType
   WORD    Version
   DWORD    Count
   --repeat(Count)
       --Insert resource data(depending on type)

Resources

ID Name
0x0000 Map
0x0001 Material
Map
Overview

It appears to apply operators to a map image. There are currently no examples in The Sims 3 to be sure.

Format
QWORD  Map IID64
DWORD  Flags //0x3FF mask?
BYTE   Map Type
QWORD  Image IID64

//Bounds
FLOAT Left
FLOAT Top
FLOAT Right
FLOAT Bottom

BYTE     Channel
BYTE     Op Kind
QWORD[4] Op Arg Map IID64s 

FLOAT[4] Op Arg Value 1 //Little Endian
FLOAT[4] Op Arg Value 2 //Little Endian
FLOAT[4] Op Arg Value 3 //Little Endian
FLOAT[4] Op Arg Value 4 //Little Endian
Material
Overview

References shaders from "Shaders_Win32.precomp", making them available to the particle effects in the previous section and overriding some parameters.

Format
QWORD Hashed name
QWORD Shader
DWORD Count1
    QWORD Property Id
    BYTE dataType
    switch(dataType)
        case 00: FLOAT 
        case 01: DWORD
        case 02: BYTE  // Boolean 0x00 or 0xFF
        case 03: DWORD Count1
        --repeat Count1
            FLOAT
        case 04: DWORD Count2
        --repeat Count2
            DWORD
        case 05: DWORD Count3
        --repeat Count3
            BYTE // Boolean 0x00 or 0xFF
        case 06: QWORD // DDS IID64
Shaders

FNV32 Hashed shader names from "Shaders_Win32.precomp"

ID Name
0x8FAB3764 Fluid Effect
0x4968A478 Sim Censor
Properties

FNV32 Hashed property names from "Shaders_Win32.precomp"

ID Name
0x6CC0FD85 Diffuse Map
0x6E56548A Normal Map
0x8C27D8C9 Edge Darkening
0xC3C472A1 Refraction Distortion Scale
0x6A203374 Clip Alpha Opacity
0x556010DC Alpha Cutoff
0xF2FCAD8C Specular Scale
0xF43D2BDC Multiply Value
0x3965ECE0 Additive Value

VisualEffect Section

Overview

This section combines multiple effects from the previous sections. The same effects are often used more than once here but with different offsets and parameters.

Format

WORD SectionType //0x0000
WORD Version //0x0002 		
DWORD EffectCount
--Repeat EffectCount
    // Effect Block Table
    DWORD
    DWORD
    DWORD
    FLOAT //Little Endian
    FLOAT //Little Endian
    DWORD
    BYTE
    DWORD Count
         FLOAT
    FLOAT //Little Endian
    FLOAT //Little Endian
    FLOAT //Little Endian
    DWORD
    DWORD BlockIndexCount
    --repeat BlockIndexCount
         BYTE BlockType
         DWORD
         WORD
         FLOAT
         FLOAT[12] Transformation Matrix //Little Endian
         BYTE
         BYTE
         DWORD Count
         --repeat Count
            FLOAT
            FLOAT
            FLOAT
         FLOAT[6] // always 1.0
         FLOAT
         FLOAT
         WORD
         WORD
         FLOAT
         DWORD BlockIndex
         if(version >=2)
             BYTE
             BYTE

VisualEffect Handles

Overview

This is the root of an effect tree. Effects are called via scripts and clip events by the name provided in this section, which links to the other parts.

Format

--Repeat until index 0xFFFFFFFF
	DWORD CompilationIndex //see previous section
	ZSTRING EffectName
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