Difference between revisions of "Sims 3:0xEA5118B0"

From SimsWiki
Jump to: navigation, search
(Overview: Expanded to include an explanation of swarm binaries, credit to the system's original developer, general facts known about the format, and a summary of how all this info was found.)
(Fixed broken links)
 
(17 intermediate revisions by one user not shown)
Line 12: Line 12:
 
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 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 within PDB files included with leaked dev versions of SimCity 5.
+
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:
 
Format Facts:
Line 28: Line 28:
 
  [[#Resource_Sections|Resource Sections]]
 
  [[#Resource_Sections|Resource Sections]]
 
  [[#VisualEffect_Section|VisualEffect Section]]
 
  [[#VisualEffect_Section|VisualEffect Section]]
  BYTE[4] //FFFFFFFF
+
  [[#VisualEffect_IDs|VisualEffect IDs]]
  [[#VisualEffect_Handles|VisualEffect Handles]]
+
  [[#VisualEffect_Names|VisualEffect Names]]
  
 
===Effect Sections===
 
===Effect Sections===
Line 47: Line 47:
 
|-
 
|-
 
| 0x0001
 
| 0x0001
| [[#Particle_Effect| Particle Effect]]
+
| [[#Particle_Effect|Particle Effect]]
 
|-
 
|-
 
| 0x0002
 
| 0x0002
| [[#Metaparticle_Effect | Metaparticle Effect]]
+
| [[#Metaparticle_Effect|Metaparticle Effect]]
 
|-
 
|-
 
| 0x0003
 
| 0x0003
| [[#Decal_Effect | Decal Effect]]
+
| [[#Decal_Effect|Decal Effect]]
 
|-
 
|-
 
| 0x0004
 
| 0x0004
| [[#Effect_Sequence | Effect Sequence]]
+
| [[#Sequence_Effect|Sequence Effect]]
 
|-
 
|-
 
| 0x0005
 
| 0x0005
| [[#Sound_Effect | Sound Effect]]
+
| [[#Sound_Effect|Sound Effect]]
 
|-
 
|-
 
| 0x0006
 
| 0x0006
| [[#Shake_Effect | Shake Effect]]
+
| [[#Shake_Effect|Shake Effect]]
 
|-
 
|-
 
| 0x0007
 
| 0x0007
| [[#Camera_Effect | Camera Effect]]
+
| [[#Camera_Effect|Camera Effect]]
 
|-
 
|-
 
| 0x0008
 
| 0x0008
| [[#Model_Effect | Model Effect]]
+
| [[#Model_Effect|Model Effect]]
 
|-
 
|-
 
| 0x0009
 
| 0x0009
| [[#Screen_Effect | Screen Effect]]
+
| [[#Screen_Effect|Screen Effect]]
 
|-
 
|-
 
| 0x000A
 
| 0x000A
Line 77: Line 77:
 
|-
 
|-
 
| 0x000B
 
| 0x000B
| [[#Game_Effect | Game Effect]]
+
| [[#Game_Effect|Game Effect]]
 
|-
 
|-
 
| 0x000C
 
| 0x000C
| [[#Fast_Particle_Effect | Fast Particle Effect]]
+
| [[#FastParticle_Effect|Fast Particle Effect]]
 
|-
 
|-
 
| 0x000D
 
| 0x000D
| [[#Distribute_Effect | Distribute Effect]]
+
| [[#Distribute_Effect|Distribute Effect]]
 
|-
 
|-
 
| 0x000E
 
| 0x000E
| [[#Ribbon_Effect | Ribbon Effect]]
+
| [[#Ribbon_Effect|Ribbon Effect]]
 
|-
 
|-
 
| 0x000F
 
| 0x000F
| [[#Sprite_Effect | Sprite Effect]]
+
| [[#Sprite_Effect|Sprite Effect]]
 
|-
 
|-
 
|}
 
|}
Line 96: Line 96:
  
 
======Format======
 
======Format======
  DWORD    //BE; Flags
+
  DWORD    Flags
  FLOAT[2] //le; Particle Lifetime
+
  FLOAT[2] Particle Lifetime //Little Endian
  FLOAT    //BE; Preroll Time
+
  FLOAT    Preroll Time
  FLOAT[2] //le; Emit Delay
+
  FLOAT[2] Emit Delay //Little Endian
  FLOAT[2] //le; Emit Retrigger
+
  FLOAT[2] Emit Retrigger //Little Endian
  FLOAT[3] //le; Emit Direction Bounding Box Minimum
+
  FLOAT[3] Emit Direction Bounding Box Minimum //Little Endian
  FLOAT[3] //le; Emit Direction Bounding Box Maximum
+
  FLOAT[3] Emit Direction Bounding Box Maximum //Little Endian
  FLOAT[2] //le; Emit Speed
+
  FLOAT[2] Emit Speed //Little Endian
  FLOAT[3] //le; Emit Volume Bounding Box Minimum
+
  FLOAT[3] Emit Volume Bounding Box Minimum //Little Endian
  FLOAT[3] //le; Emit Volume Bounding Box Maximum
+
  FLOAT[3] Emit Volume Bounding Box Maximum //Little Endian
  FLOAT    //BE; Emit Torus Width
+
  FLOAT    Emit Torus Width
 
   
 
   
 
  // Emit Rate Curve (Particles/Sim-Minute)
 
  // Emit Rate Curve (Particles/Sim-Minute)
  DWORD Count //BE
+
  DWORD Count  
     FLOAT  //BE
+
     FLOAT   
  FLOAT   //BE; Emit Rate Curve Time
+
  WORD     //BE; Emit Rate Curve Cycles
+
  FLOAT Emit Rate Curve Time
  FLOAT   //BE; Emit Rate Speed Scale
+
  WORD   Emit Rate Curve Cycles
 +
  FLOAT Emit Rate Speed Scale
 
   
 
   
 
  // Size Curve
 
  // Size Curve
  DWORD Count //BE
+
  DWORD Count  
     FLOAT  //BE
+
     FLOAT   
  FLOAT   //BE; Size Vary
+
 +
  FLOAT Size Vary
 
   
 
   
 
  // Aspect Ratio Curve (1 is normal)
 
  // Aspect Ratio Curve (1 is normal)
  DWORD Count //BE
+
  DWORD Count
     FLOAT  //BE
+
     FLOAT   
 
   
 
   
  // Randomization Multipliers:
+
  FLOAT Aspect Ratio Vary
  //  If > 0, randomly scaled between 0 and value for each particle
+
  FLOAT Rotation Vary
//  and multiplied to each value of the specified delta list
+
  FLOAT Rotation Offset
//  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)
 
  // Rotation Curve (1 = one clockwise rotation = 360 degrees)
  DWORD Count //BE
+
  DWORD Count  
     FLOAT  //BE
+
     FLOAT   
 
   
 
   
 
  // Alpha Curve (0 - 1 = transparent - opaque)
 
  // Alpha Curve (0 - 1 = transparent - opaque)
  DWORD Count //BE
+
  DWORD Count  
     FLOAT  //BE
+
     FLOAT   
  FLOAT //BE; Alpha Vary; 0 - 1 = transparent - opaque
+
 +
  FLOAT Alpha Vary // 0 - 1 = transparent - opaque
 
   
 
   
 
  // Color Curve
 
  // Color Curve
  DWORD Count //BE
+
  DWORD Count  
     FLOAT //le ; Red  ; 0 - 1
+
     FLOAT Red  //Little Endian; 0 - 1
     FLOAT //le ; Green ; 0 - 1
+
     FLOAT Green //Little Endian; 0 - 1
     FLOAT //le ; Blue  ; 0 - 1
+
     FLOAT Blue  //Little Endian; 0 - 1
 
   
 
   
  //Color Vary that is added at a random intensity to each particle
+
  //Color Vary
//Example: if set to (0,0,1) with white particles,
+
  FLOAT Red  //Little Endian; 0 - 1
//    some particles will be bright yellow, some will be pale yellow, and most will be white
+
  FLOAT Green //Little Endian; 0 - 1
  FLOAT //le ; Red  ; 0 - 1
+
  FLOAT Blue  //Little Endian; 0 - 1
  FLOAT //le ; Green ; 0 - 1
+
  FLOAT //le ; Blue  ; 0 - 1
+
 
   
 
   
 
  //Resource reference block
 
  //Resource reference block
  QWORD //BE; IID<sub>64</sub> of a an image([[Sims_3:0x00B2D882|DDS]]), model([[Sims_3:0x736884F1|VPXY]]), or material(see [[#Materials|Material Section]] below)
+
  QWORD IID<sub>64</sub> of a an image([[Sims_3:0x00B2D882|DDS]]), model([[Sims_3:0x736884F1|VPXY]]), or material(see [[#Materials|Material Section]] below)
  BYTE //BE; Format
+
  BYTE   Format
  BYTE //BE; DrawMode
+
  BYTE   DrawMode
  if ((DrawMode & 0x80) == 0x80) DWORD //BE; ???  
+
  if ((DrawMode & 0x80) == 0x80) DWORD ???  
  if ((DrawMode & 0x40) == 0x40) BYTE  //BE; ???
+
  if ((DrawMode & 0x40) == 0x40) BYTE  ???
+
  // Draw Flags
  // BE; Draw Flags
+
 
  if (Version >= 6) WORD
 
  if (Version >= 6) WORD
 
  else              BYTE
 
  else              BYTE
 +
BYTE  Buffer
 +
WORD  Layer
 +
FLOAT  Sort Offset
 +
QWORD  Second IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
 
   
 
   
BYTE  //BE; Buffer
+
  BYTE    Physics Type
WORD  //BE; Layer
+
  BYTE    Override Set
FLOAT //BE; Sort Offset
+
  BYTE    Tile Count U
QWORD //BE; Second IID<sub>64</sub>; almost always 0xFFFFFFFFFFFFFFFF
+
  BYTE    Tile Count V
+
  BYTE    Align Mode
  BYTE    //BE; Physics Type
+
  FLOAT    Frame Speed
  BYTE    //BE; Override Set
+
  BYTE    Frame Start
  BYTE    //BE; Tile Count U
+
  BYTE    Frame Count
  BYTE    //BE; Tile Count V
+
  BYTE    Frame Random
  BYTE    //BE; Align Mode
+
  FLOAT[3] Directional Forces Sum //Little Endian
  FLOAT    //BE; Frame Speed
+
  FLOAT    Wind Strength
  BYTE    //BE; Frame Start
+
  FLOAT    Gravity Strength
  BYTE    //BE; Frame Count
+
  FLOAT    Radial Force
  BYTE    //BE; Frame Random
+
  FLOAT[3] Radial Force Location //Little Endian
  FLOAT[3] //le; Directional Forces Sum
+
  FLOAT    Drag
  FLOAT    //BE; Wind Strength
+
  FLOAT    Velocity Stretch
  FLOAT    //BE; Gravity Strength
+
  FLOAT    Screw Rate
  FLOAT    //BE; Radial Force
+
  FLOAT[3] //le; Radial Force Location
+
  FLOAT    //BE; Drag
+
  FLOAT    //BE; Velocity Stretch
+
  FLOAT    //BE; Screw Rate
+
 
   
 
   
 
  // Wiggles  
 
  // Wiggles  
  DWORD Count //BE
+
  DWORD Count  
     FLOAT    //BE; Time Rate
+
     FLOAT    Time Rate
     FLOAT[3] //le; Rate Direction
+
     FLOAT[3] Rate Direction  //Little Endian
     FLOAT[3] //le; Wiggle Direction
+
     FLOAT[3] Wiggle Direction //Little Endian
 
   
 
   
  BYTE //BE; Screen Bloom Alpha Rate; usually 0x00
+
  BYTE Screen Bloom Alpha Rate //0x00
  BYTE //BE; Screen Bloom Alpha Base; usually 0xFF
+
  BYTE Screen Bloom Alpha Base //0xFF
  BYTE //BE; Screen Bloom Size Rate; usually 0x00
+
  BYTE Screen Bloom Size Rate  //0x00
  BYTE //BE; Screen Bloom Size Base; usually 0xFF
+
  BYTE Screen Bloom Size Base; //0xFF
 
   
 
   
 
  // Loop Box Color Curve
 
  // Loop Box Color Curve
  DWORD Count //BE
+
  DWORD Count  
     FLOAT //le ; Red  ; 0 - 1
+
     FLOAT Red  //Little Endian; 0 - 1
     FLOAT //le ; Green ; 0 - 1
+
     FLOAT Green //Little Endian; 0 - 1
     FLOAT //le ; Blue  ; 0 - 1
+
     FLOAT Blue  //Little Endian; 0 - 1
 
   
 
   
 
  // Loop Box Alpha Curve
 
  // Loop Box Alpha Curve
  DWORD Count //BE
+
  DWORD Count  
     FLOAT //BE; 0 - 1 = transparent - opaque
+
     FLOAT // 0 - 1 = transparent - opaque
 
   
 
   
 
  // Surfaces
 
  // Surfaces
  DWORD Count //BE
+
  DWORD Count  
     DWORD //BE; Flags; 0x3FFF mask?
+
     DWORD Flags //0x3FFF mask?
     QWORD //BE; IID<sub>64</sub> of a surface map(see [[#Materials|Material Section]] below)?
+
     QWORD IID<sub>64</sub> of a surface map(see [[#Materials|Material Section]] below)?
     FLOAT //BE; Bounce            ; Should be DWORD?
+
     FLOAT Bounce            //Should be DWORD?
     FLOAT //BE; Slide            ; Should be DWORD?
+
     FLOAT Slide            //Should be DWORD?
     FLOAT //BE; Collision Radius  ; Should be DWORD?
+
     FLOAT Collision Radius  //Should be DWORD?
     FLOAT //BE; Death Probability ; Should be DWORD?
+
     FLOAT Death Probability //Should be DWORD?
     DWORD //BE; Pin Offset
+
     DWORD Pin Offset
     ZSTRING //???
+
     ZSTRING  
     ZSTRING //???
+
     ZSTRING
     DWORD Count //BE
+
    // Surface Points
         FLOAT[3] //le; Surface Point
+
     DWORD Count  
 +
         FLOAT[3] //Little Endian
 
   
 
   
  FLOAT    //BE; Map Bounce
+
  FLOAT    Map Bounce
  FLOAT    //BE; Map Repulse Height
+
  FLOAT    Map Repulse Height
  FLOAT    //BE; Map Repulse Strength
+
  FLOAT    Map Repulse Strength
  FLOAT    //BE; Map Repulse Scout Distance
+
  FLOAT    Map Repulse Scout Distance
  FLOAT    //BE; Map Repulse Vertical
+
  FLOAT    Map Repulse Vertical
  FLOAT    //BE; Map Repulse Kill Height; usually -1000000000.0
+
  FLOAT    Map Repulse Kill Height // -1000000000.0
  FLOAT    //BE; Probability Death; usually 0.0
+
  FLOAT    Probability Death // 0.0
  FLOAT[2] //le; Altitude Range; usually (-10000.0, 10000.0)
+
  FLOAT[2] Altitude Range //Little Endian (-10000.0, 10000.0)
  QWORD    //BE; Force Map IID<sub>64</sub>;     usually 0xFFFFFFFFFFFFFFFF
+
  QWORD    Force Map IID<sub>64</sub>      //0xFFFFFFFFFFFFFFFF
  QWORD    //BE; Emit Rate Map IID<sub>64</sub>; usually 0xFFFFFFFFFFFFFFFF
+
  QWORD    Emit Rate Map IID<sub>64</sub>  //0xFFFFFFFFFFFFFFFF
  QWORD    //BE; Emit Color Map IID<sub>64</sub>; usually 0xFFFFFFFFFFFFFFFF
+
  QWORD    Emit Color Map IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
 
   
 
   
 
  // Random Walk
 
  // Random Walk
  FLOAT[2] //le; Time
+
  FLOAT[2] Time    //Little Endian
  FLOAT[2] //le; Strength
+
  FLOAT[2] Strength //Little Endian
  FLOAT    //BE; Turn Range
+
  FLOAT    Turn Range
  FLOAT    //BE; Turn Offset
+
  FLOAT    Turn Offset
  FLOAT    //BE; Mix
+
  FLOAT    Mix
 
  // Turn Offset Curve
 
  // Turn Offset Curve
  DWORD Count //BE
+
  DWORD Count  
      FLOAT  //BE
+
    FLOAT   
  BYTE    //BE; Walk Loop Type
+
  BYTE    Walk Loop Type
 +
 +
FLOAT[3] Attractor Origin //Little Endian
 
   
 
   
FLOAT[3] //le; Attractor Origin
 
 
  // Attractor Strength Curve
 
  // Attractor Strength Curve
  DWORD Count //BE
+
  DWORD Count  
     FLOAT  //BE
+
     FLOAT   
  FLOAT //BE; Range
+
  FLOAT Range
  FLOAT //BE; Kill Range
+
  FLOAT Kill Range
 
   
 
   
 
  // Path Points
 
  // Path Points
  DWORD Count //BE
+
  DWORD Count  
     FLOAT[3] //le; Position
+
     FLOAT[3] Position //Little Endian
     FLOAT[3] //le; Velocity
+
     FLOAT[3] Velocity //Little Endian
     FLOAT    //BE; Time
+
     FLOAT    Time
 
   
 
   
 
  if (Version >= 2)
 
  if (Version >= 2)
     FLOAT[3] //le; ???
+
     FLOAT[3] //Little Endian
     DWORD Count //BE
+
     DWORD Count  
         FLOAT[3] //le; ???
+
         FLOAT[3] //Little Endian
 
   
 
   
  if (Version >=3) BYTE  //BE; ???
+
  if (Version >=3) BYTE   
  if (Version >=4) FLOAT //BE; ???
+
  if (Version >=4) FLOAT  
  if (Version >=5) FLOAT //BE; ???
+
  if (Version >=5) FLOAT  
  
 
====Metaparticle Effect====
 
====Metaparticle Effect====
Line 275: Line 269:
 
This type takes an existing effect and modifies it
 
This type takes an existing effect and modifies it
 
=====Format=====
 
=====Format=====
  DWORD
+
  QWORD    Flags
DWORD
+
  FLOAT[2] Particle Lifetime //Little Endian
  FLOAT //Little Endian
+
  FLOAT   Preroll Time
  FLOAT //Little Endian
+
  FLOAT[2] Emit Delay //Little Endian
  FLOAT //Little Endian
+
  FLOAT[2] Emit Retrigger //Little Endian
  FLOAT //Little Endian
+
  FLOAT[3] Emit Direction Bounding Box Minimum //Little Endian
  FLOAT //Little Endian
+
  FLOAT[3] Emit Direction Bounding Box Maximum //Little Endian
  FLOAT //Little Endian
+
  FLOAT[2] Emit Speed //Little Endian
  FLOAT //Little Endian
+
  FLOAT[3] Emit Volume Bounding Box Minimum //Little Endian
  FLOAT //Little Endian
+
  FLOAT[3] Emit Volume Bounding Box Maximum //Little Endian
  FLOAT //Little Endian
+
  FLOAT   Emit Torus Width
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT
+
DWORD Count
+
FLOAT
+
FLOAT
+
DWORD
+
DWORD Count
+
FLOAT
+
FLOAT
+
DWORD Count
+
FLOAT
+
DWORD Count
+
FLOAT
+
DWORD Count
+
FLOAT
+
FLOAT
+
FLOAT
+
FLOAT
+
FLOAT
+
FLOAT
+
FLOAT
+
DWORD Count
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
DWORD Count
+
FLOAT
+
FLOAT
+
ZSTRING Base Effect //See [[#Effect_Handles|Effect Handles]] below
+
ZSTRING Death Effect //See [[#Effect_Handles|Effect Handles]] below
+
BYTE
+
FLOAT //Little Endian  
+
  FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
 
   
 
   
  FLOAT
+
  // Emit Rate Curve (Particles/Sim-Minute)
  FLOAT
+
  DWORD Count
FLOAT
+
    FLOAT  
 
   
 
   
  FLOAT //Little Endian
+
  FLOAT   Emit Rate Curve Time
  FLOAT //Little Endian
+
  DWORD    Emit Rate Curve Cycles; Should be FLOAT?
  FLOAT //Little Endian
+
  FLOAT   Emit Rate Speed Scale
 
   
 
   
  FLOAT
+
  // Size Curve
FLOAT
+
  DWORD Count  
DWORD Count
+
    FLOAT  
FLOAT
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
BYTE[4] //00FF00FF
+
  DWORD Count
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
DWORD Count
+
FLOAT
+
DWORD Count
+
DWORD
+
QWORD
+
FLOAT
+
FLOAT
+
FLOAT
+
FLOAT
+
BYTE[4]
+
ZSTRING
+
ZSTRING
+
DWORD Count
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT
+
FLOAT
+
FLOAT
+
FLOAT
+
FLOAT 
+
FLOAT //-1000000000.0
+
FLOAT // 0.0
+
FLOAT //-10000.0 Little Endian
+
FLOAT // 10000.0 Little Endian
+
QWORD //0xFFFFFFFFFFFFFFFF
+
QWORD //0xFFFFFFFFFFFFFFFF
+
QWORD //0xFFFFFFFFFFFFFFFF
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT
+
FLOAT
+
FLOAT
+
DWORD Count
+
FLOAT
+
BYTE
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT
+
FLOAT
+
FLOAT
+
DWORD Count
+
FLOAT
+
BYTE
+
 
   
 
   
  FLOAT //Little Endian
+
  FLOAT  Size Vary
  FLOAT //Little Endian
+
FLOAT //Little Endian
+
 
   
 
   
  FLOAT
+
  // Pitch Curve
  FLOAT
+
  DWORD Count
FLOAT
+
    FLOAT  
 
   
 
   
  FLOAT //Little Endian
+
  // Roll Curve
  FLOAT //Little Endian
+
  DWORD Count
FLOAT //Little Endian
+
    FLOAT  
 
   
 
   
  DWORD Count
+
// Heading (Yaw) Curve
FLOAT
+
  DWORD Count  
  FLOAT
+
    FLOAT  
  FLOAT
+
  DWORD Count
+
  FLOAT Pitch Vary
FLOAT //Little Endian
+
  FLOAT Roll Vary
FLOAT //Little Endian
+
FLOAT Heading (Yaw) Vary
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT Pitch Offset
FLOAT //Little Endian
+
FLOAT Roll Offset
FLOAT //Little Endian
+
FLOAT Heading (Yaw) Offset
FLOAT timecode
+
  FLOAT
+
// 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 (0 - 1 = transparent - opaque)
 +
DWORD Count
 +
    FLOAT  
 +
 +
  FLOAT Alpha Vary
 +
 +
ZSTRING Base Effect  //See [[#VisualEffect_Names|Effect Names]] below
 +
ZSTRING Death Effect //See [[#VisualEffect_Names|Effect Names]] below
 +
 +
BYTE    Align Mode
 +
FLOAT[3] Directional Forces Sum //Little Endian
 +
FLOAT[3] Global Forces Sum //Little Endian
 +
FLOAT    Wind Strength
 +
FLOAT    Gravity Strength
 +
FLOAT    Radial Force
 +
FLOAT[3] Radial Force Location //Little Endian
 +
FLOAT    Drag
 +
FLOAT    Screw Rate
 +
 +
// Wiggles
 +
DWORD Count
 +
    FLOAT    Time Rate
 +
    FLOAT[3] Rate Direction  //Little Endian
 +
    FLOAT[3] Wiggle Direction //Little Endian
 +
 +
BYTE  Screen Bloom Alpha Rate //0x00
 +
BYTE  Screen Bloom Alpha Base //0xFF
 +
BYTE  Screen Bloom Size Rate  //0x00
 +
BYTE  Screen Bloom Size Base  //0xFF
 +
 +
// Loop Box Color Curve
 +
DWORD Count
 +
    FLOAT Red  //Little Endian; 0 - 1
 +
    FLOAT Green //Little Endian; 0 - 1
 +
    FLOAT Blue  //Little Endian; 0 - 1
 +
 +
// Loop Box Alpha Curve
 +
DWORD Count
 +
    FLOAT // 0 - 1 = transparent - opaque
 +
 +
// Surfaces
 +
DWORD Count
 +
    DWORD  Flags //0x3FFF mask?
 +
    QWORD  IID<sub>64</sub> of a surface map(see [[#Materials|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
 +
 +
FLOAT    Map Bounce
 +
FLOAT    Map Repulse Height
 +
FLOAT    Map Repulse Strength
 +
FLOAT    Map Repulse Scout Distance
 +
FLOAT    Map Repulse Vertical
 +
FLOAT    Map Repulse Kill Height // -1000000000.0
 +
FLOAT    Probability Death // 0.0
 +
FLOAT[2] Altitude Range //Little Endian (-10000.0, 10000.0)
 +
QWORD    Force Map IID<sub>64</sub>      //0xFFFFFFFFFFFFFFFF
 +
QWORD    Emit Rate Map IID<sub>64</sub>  //0xFFFFFFFFFFFFFFFF
 +
QWORD    Emit Color Map IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
 +
 +
// Random Walk 1
 +
FLOAT[2] Time    //Little Endian
 +
FLOAT[2] Strength //Little Endian
 +
FLOAT    Turn Range
 +
FLOAT    Turn Offset
 +
FLOAT    Mix
 +
// Turn Offset Curve
 +
DWORD Count
 +
      FLOAT 
 +
BYTE    Walk Loop Type
 +
 +
// Random Walk 2
 +
FLOAT[2] Time    //Little Endian
 +
FLOAT[2] Strength //Little Endian
 +
FLOAT    Turn Range
 +
FLOAT    Turn Offset
 +
FLOAT    Mix
 +
// Turn Offset Curve
 +
DWORD Count
 +
      FLOAT 
 +
BYTE    Walk Loop Type
 +
 +
FLOAT[3] Random Walk Preferred Direction //Little Endian
 +
 +
FLOAT Align Damping
 +
FLOAT Bank Amount
 +
FLOAT Bank Damping
 +
 +
FLOAT[3] Attractor Origin //Little Endian
 +
 +
// Attractor Strength Curve
 +
DWORD Count
 +
    FLOAT 
 +
FLOAT  Range
 +
FLOAT  Kill Range
 +
 +
// Path Points
 +
DWORD Count
 +
    FLOAT[3] Position //Little Endian
 +
    FLOAT[3] Velocity //Little Endian
 +
    FLOAT    Time
 +
 +
FLOAT  Tractor Reset Speed
  
 
====Decal Effect====
 
====Decal Effect====
Line 441: Line 442:
 
=====Format=====
 
=====Format=====
  
  DWORD
+
  DWORD Flags; 0x7F mask?
  QWORD //I<sub>64</sub> of a [[Sims_3:0x00B2D882|DDS Resource]]
+
  QWORD IID<sub>64</sub> of a [[Sims_3:0x00B2D882|DDS Resource]]
  BYTE
+
  BYTE
  FLOAT
+
  FLOAT  
  BYTE
+
  BYTE
  FLOAT
+
  FLOAT Lifetime
  DWORD Count1
+
FLOAT
+
// Rotation Curve
 +
  DWORD Count1  
 +
    FLOAT  
 +
 +
// Size Curve
 
  DWORD Count2  
 
  DWORD Count2  
FLOAT
+
    FLOAT  
 +
 +
// Alpha Curve
 
  DWORD Count3  
 
  DWORD Count3  
FLOAT
+
    FLOAT  
  //Color Deltas
+
  DWORD Count4
+
  // Color Curve
  FLOAT Red //Little Endian
+
  DWORD Count4  
  FLOAT Green //Little Endian
+
  FLOAT Red   //Little Endian; 0 - 1
  FLOAT Blue //Little Endian
+
  FLOAT Green //Little Endian; 0 - 1
  DWORD Count5
+
  FLOAT Blue //Little Endian; 0 - 1
FLOAT
+
  FLOAT
+
// Aspect Ratio Curve
  FLOAT
+
  DWORD Count5  
  FLOAT
+
    FLOAT  
  FLOAT
+
   
  FLOAT //Little Endian
+
  FLOAT   Alpha Vary
  FLOAT //Little Endian
+
  FLOAT   Size Vary
  QWORD //0xFFFFFFFFFFFFFFFF
+
  FLOAT   Rotation Vary
  if(version >= 2)BYTE
+
  FLOAT   Texture Repeat
 +
  FLOAT[2] Texture Offset //Little Endian
 +
  QWORD   Emit Color Map IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
 +
  if (Version >= 2) BYTE
  
 
====Sequence Effect====
 
====Sequence Effect====
Line 475: Line 485:
  
 
  DWORD Count1  
 
  DWORD Count1  
  FLOAT //Little Endian
+
  FLOAT[2] Time Range //Little Endian
FLOAT //Little Endian
+
  ZSTRING Effect Name //See [[#VisualEffect_Names|Effect Names]] below
  ZSTRING Effect Name //See [[#Effect_Handles|Effect Handles]] below
+
  DWORD Flags //0xF mask?
  DWORD
+
 
+
  
 
====Sound Effect====
 
====Sound Effect====
Line 486: Line 494:
 
=====Format=====
 
=====Format=====
  
  DWORD
+
  DWORD  Flags //0xF mask?
  QWORD //I<sub>64</sub> of an [[Sims_3:0x8070223D|Audio Tuner]]
+
QWORD  IID<sub>64</sub> of an [[Sims_3:0x8070223D|Audio Tuner]]
  FLOAT
+
  FLOAT Location Update Delta
  FLOAT
+
  FLOAT Play Time
  FLOAT
+
  FLOAT Volume
 +
if (Version >= 2) BYTE
  
 
====Shake Effect====
 
====Shake Effect====
 
=====Format=====
 
=====Format=====
  
  FLOAT
+
  FLOAT Lifetime
  FLOAT
+
  FLOAT Fade Time
  DWORD Count1
+
FLOAT
+
// Strength Curve
  DWORD Count2
+
  DWORD Count1  
FLOAT
+
    FLOAT  
  FLOAT
+
  BYTE
+
// Frequency Curve
  FLOAT
+
  DWORD Count2  
 +
    FLOAT  
 +
 +
  FLOAT Aspect Ratio
 +
  BYTE Base Table Type
 +
  FLOAT Falloff
  
 
====Camera Effect====
 
====Camera Effect====
 
=====Format=====
 
=====Format=====
  
  DWORD
+
  DWORD Flags //0x3FF mask?
  WORD
+
  WORD   View Flags
  FLOAT
+
  FLOAT Lifetime
  DWORD Count1
+
FLOAT
+
// Heading (Yaw) Curve
  DWORD Count2
+
  DWORD Count1  
FLOAT
+
    FLOAT  
  DWORD Count3
+
FLOAT
+
// Pitch Curve
  DWORD Count4
+
  DWORD Count2  
FLOAT
+
    FLOAT  
  DWORD Count5
+
FLOAT
+
// Roll Curve
  DWORD Count6
+
  DWORD Count3  
     FLOAT
+
    FLOAT  
  DWORD Count7
+
     FLOAT
+
// Distance Curve
  QWORD
+
  DWORD Count4  
  WORD
+
    FLOAT  
 +
 +
// FOV Curve
 +
  DWORD Count5  
 +
    FLOAT  
 +
 +
// Near Clip Curve
 +
  DWORD Count6  
 +
     FLOAT  
 +
 +
// Far Clip Curve
 +
  DWORD Count7  
 +
     FLOAT  
 +
 +
  QWORD Camera ID
 +
  WORD   Cubemap Resource
  
 
====Model Effect====
 
====Model Effect====
 
=====Format=====
 
=====Format=====
  DWORD
+
  DWORD Flags //0x3 mask?
  QWORD
+
  QWORD Resource IID<sub>64</sub>
  FLOAT
+
  FLOAT Size
  FLOAT //Little Endian
+
  FLOAT //Little Endian
+
// Color
  FLOAT //Little Endian
+
  FLOAT Red  //Little Endian; 0 - 1
  FLOAT
+
  FLOAT Green //Little Endian; 0 - 1
  DWORD Count
+
  FLOAT Blue  //Little Endian; 0 - 1
FLOAT //Little Endian
+
FLOAT //Little Endian
+
  FLOAT Alpha // 0 - 1 = transparent - opaque
DWORD Count
+
--repeat(Count)
+
// Animation Curves
    FLOAT
+
  DWORD Count  
DWORD
+
    FLOAT[2] Length Range //Little Endian
DWORD
+
    // Curve
BYTE
+
    DWORD Count  
BYTE
+
        FLOAT
  QWORD //0xFFFFFFFFFFFFFFFF
+
    DWORD Curve Vary
  BYTE
+
    DWORD Speed Scale
 +
    BYTE   Channel ID
 +
    BYTE   Mode
 +
 +
  QWORD Material IID<sub>64</sub>; usually 0xFFFFFFFFFFFFFFFF
 +
  BYTE   Override Set
  
 
====Screen Effect====
 
====Screen Effect====
 
=====Format=====
 
=====Format=====
  BYTE
+
  BYTE Mode
  DWORD
+
  DWORD Flags //0x3 mask?
  DWORD Count
+
  FLOAT Red //Little Endian
+
// Color Curve
  FLOAT Green //Little Endian
+
  DWORD Count  
  FLOAT Blue //Little Endian
+
  FLOAT Red   //Little Endian; 0 - 1
  DWORD Count
+
  FLOAT Green //Little Endian; 0 - 1
FLOAT
+
  FLOAT Blue //Little Endian; 0 - 1
  DWORD Count
+
FLOAT
+
// Strength Curve
  FLOAT
+
  DWORD Count  
  DWORD
+
    FLOAT  
  DWORD
+
  DWORD
+
// Distance Curve
  QWORD
+
  DWORD Count  
  DWORD Count
+
    FLOAT  
     BYTE
+
     BYTE
+
  FLOAT Lifetime
     QWORD
+
  FLOAT  Delay
 +
  FLOAT  Falloff
 +
  FLOAT  Distance Base
 +
  QWORD Texture IID<sub>64</sub>
 +
 +
// Filters
 +
  DWORD Count  
 +
     BYTE   Type
 +
     BYTE   Destination
 +
     QWORD Source
 +
    // Parameters
 
     DWORD Count
 
     DWORD Count
 
         BYTE
 
         BYTE
  DWORD Count
+
     FLOAT
+
// Temporary Filter Buffers
     FLOAT
+
  DWORD Count  
  DWORD Count
+
     FLOAT Screen Ratio //Should be DWORD?
     DWORD
+
     FLOAT Size        //should be DWORD?
  DWORD Count
+
     FLOAT //Little Endian
+
// Float Parameters
    FLOAT //Little Endian
+
  DWORD Count  
  DWORD Count
+
     FLOAT 
     FLOAT //Little Endian
+
    FLOAT //Little Endian
+
// Vector 3 Parameters
  DWORD Count
+
  DWORD Count
     DWORD    
+
     FLOAT[3] //Little Endian
 +
 +
// Vector 2 Parameters
 +
  DWORD Count
 +
     FLOAT[2] //Little Endian
 +
 +
// Resource ID Parameters
 +
  DWORD Count  
 +
     DWORD  
 +
 
 
====Game Effect====
 
====Game Effect====
No examples to decode
+
=====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====
 
====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    Flags //0x1FFF mask?
 +
FLOAT[2] Particle Lifetime //Little Endian
 +
FLOAT    Preroll Time
 +
FLOAT[2] Emit Delay //Little Endian
 +
FLOAT[2] Emit Retrigger //Little Endian
 +
FLOAT[3] Emit Direction Bounding Box Minimum //Little Endian
 +
FLOAT[3] Emit Direction Bounding Box Maximum //Little Endian
 +
FLOAT[2] Emit Speed //Little Endian
 +
FLOAT[3] Emit Volume Bounding Box Minimum //Little Endian
 +
FLOAT[3] Emit Volume Bounding Box Maximum //Little Endian
 +
 +
// Emit Rate Curve (Particles/Sim-Minute)
 +
DWORD Count
 +
    FLOAT
 +
 
 +
FLOAT    Emit Rate Curve Time
 +
WORD    Emit Rate Curve Cycles
 +
FLOAT    Emit Rate Speed Scale
 +
 +
// Size Curve
 +
DWORD Count
 +
    FLOAT 
 +
 +
// Color Curve
 +
DWORD Count
 +
    FLOAT Red  //Little Endian; 0 - 1
 +
    FLOAT Green //Little Endian; 0 - 1
 +
    FLOAT Blue  //Little Endian; 0 - 1
 +
 +
// Alpha Curve (0 - 1 = transparent - opaque)
 +
DWORD Count
 +
    FLOAT 
 +
 +
//Resource reference block
 +
QWORD IID<sub>64</sub> of a an image([[Sims_3:0x00B2D882|DDS]]), model([[Sims_3:0x736884F1|VPXY]]), or material(see [[#Materials|Material Section]] below)
 +
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 IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
 +
 +
BYTE    Align Mode
 +
FLOAT[3] Directional Forces Sum //Little Endian
 +
FLOAT    Wind Strength
 +
FLOAT    Gravity Strength
 +
FLOAT    Radial Force
 +
FLOAT[3] Radial Force Location //Little Endian
 +
FLOAT    Drag
  
 
====Distribute Effect====
 
====Distribute Effect====
Line 596: Line 712:
 
Note: there is only one of these
 
Note: there is only one of these
 
=====Format=====
 
=====Format=====
  DWORD
+
  DWORD   Flags //0x3FFF mask?
  DWORD
+
  DWORD   Density
  ZSTRING
+
  ZSTRING ComponentName
  DWORD
+
  DWORD   Start
  BYTE
+
  BYTE   Source Type
  FLOAT  
+
  FLOAT   Source Size
  WORD
+
  FLOAT
+
// Pre-Transform
  FLOAT[12] Transform Matrix//Little Endian  
+
  WORD     Flags
 +
  FLOAT   Scale
 +
  FLOAT[9] Orientation //Little Endian  
 +
FLOAT[3] Position    //Little Endian
 +
 +
// Size Curve
 
  DWORD Count
 
  DWORD Count
FLOAT
+
    FLOAT
  DWORD
+
 +
  DWORD Size Vary
 +
 +
// Pitch Curve
 
  DWORD Count
 
  DWORD Count
FLOAT
+
    FLOAT
 +
 +
// Roll Curve
 
  DWORD Count
 
  DWORD Count
 
     FLOAT
 
     FLOAT
 +
 +
// Heading (Yaw) Curve
 
  DWORD Count
 
  DWORD Count
 
     FLOAT
 
     FLOAT
  DWORD
+
   
  DWORD
+
  FLOAT Pitch Vary
  DWORD
+
  FLOAT Roll Vary
  DWORD
+
  FLOAT Heading (Yaw) Vary
  DWORD
+
  FLOAT Pitch Offset
  DWORD
+
  FLOAT Roll Offset
 +
FLOAT Heading (Yaw) Offset
 +
 +
// Color Curve
 
  DWORD Count
 
  DWORD Count
FLOAT Red //Little Endian
+
    FLOAT Red   //Little Endian; 0 - 1
FLOAT Green //Little Endian
+
    FLOAT Green //Little Endian; 0 - 1
FLOAT Blue //Little Endian
+
    FLOAT Blue //Little Endian; 0 - 1
  FLOAT //Little Endian
+
  FLOAT //Little Endian
+
// Color Vary
  FLOAT //Little Endian
+
  FLOAT Red  //Little Endian; 0 - 1
 +
  FLOAT Green //Little Endian; 0 - 1
 +
  FLOAT Blue  //Little Endian; 0 - 1
 +
 +
// Alpha Curve
 
  DWORD Count
 
  DWORD Count
 
     FLOAT
 
     FLOAT
  DWORD
+
   
 +
FLOAT Alpha Vary
 +
 +
// Surfaces
 
  DWORD Count
 
  DWORD Count
     DWORD
+
     DWORD   Flags //0x3FFF mask?
     QWORD
+
     QWORD   IID<sub>64</sub> of a surface map(see [[#Materials|Material Section]] below)?
     FLOAT  
+
     FLOAT   Bounce            //Should be DWORD?
     FLOAT
+
     FLOAT   Slide            //Should be DWORD?
     FLOAT
+
     FLOAT   Collision Radius  //Should be DWORD?
     FLOAT
+
     FLOAT   Death Probability //Should be DWORD?
     DWORD
+
     DWORD   Pin Offset
     ZSTRING
+
     ZSTRING  
     ZSTRING
+
     ZSTRING  
 +
    //Surface Points
 
     DWORD Count
 
     DWORD Count
          FLOAT //Little Endian
+
        FLOAT[3] //Little Endian        
          FLOAT //Little Endian 
+
          FLOAT //Little Endian         
+
 
      
 
      
  QWORD //0xFFFFFFFFFFFFFFFF
+
  QWORD Emit Map IID<sub>64</sub>  //0xFFFFFFFFFFFFFFFF
  QWORD //0xFFFFFFFFFFFFFFFF
+
  QWORD Color Map IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
  QWORD //0xFFFFFFFFFFFFFFFF
+
  QWORD Pin Map IID<sub>64</sub>  //0xFFFFFFFFFFFFFFFF
  FLOAT //Little Endian
+
  FLOAT //Little Endian
+
  FLOAT[2]  Altitude Range //Little Endian
  QWORD //0xFFFFFFFFFFFFFFFF
+
   
  BYTE
+
//Resource reference block
  BYTE flag
+
  QWORD IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
  if(flag & 0x80) DWORD
+
  BYTE   Format
  BYTE
+
  BYTE   DrawMode
  BYTE
+
  if ((DrawMode & 0x80) == 0x80) DWORD  
  WORD
+
  if ((DrawMode & 0x40) == 0x40) BYTE
  DWORD
+
  // Draw Flags
  QWORD //0xFFFFFFFFFFFFFFFF
+
if (Version >= 6) WORD
  BYTE
+
else              BYTE
  DWORD
+
BYTE  Buffer
 +
  WORD Layer
 +
  FLOAT Sort Offset
 +
  QWORD Second IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
 +
 +
  BYTE Override Set
 +
  DWORD Message ID
 +
 
 
====Ribbon Effect====
 
====Ribbon Effect====
 
=====Overview=====
 
=====Overview=====
 
Examples of this effect first appear in the Create A Pet Demo
 
Examples of this effect first appear in the Create A Pet Demo
 
=====Format=====
 
=====Format=====
  DWORD
+
  DWORD   Flags //0x3FFF mask?
  DWORD
+
  FLOAT[2] Lifetime
  DWORD
+
   
 +
// Offset Curve
 
  DWORD Count
 
  DWORD Count
        FLOAT
+
    FLOAT
 +
 +
// Width Curve
 
  DWORD Count
 
  DWORD Count
 
         FLOAT
 
         FLOAT
  FLOAT
+
  FLOAT
+
  FLOAT Taper
  FLOAT
+
  FLOAT Fade
 +
  FLOAT Alpha Decay
 +
 +
// Color Curve
 
  DWORD Count
 
  DWORD Count
        FLOAT Red //Little Endian
+
    FLOAT Red   //Little Endian; 0 - 1
        FLOAT Green //Little Endian
+
    FLOAT Green //Little Endian; 0 - 1
        FLOAT Blue //Little Endian
+
    FLOAT Blue //Little Endian; 0 - 1
 +
 +
// Alpha Curve
 
  DWORD Count
 
  DWORD Count
        FLOAT
+
    FLOAT
 +
 +
// Length Color Curve
 
  DWORD Count
 
  DWORD Count
        FLOAT //Little Endian
+
    FLOAT Red  //Little Endian; 0 - 1
        FLOAT //Little Endian
+
    FLOAT Green //Little Endian; 0 - 1
        FLOAT //Little Endian
+
    FLOAT Blue  //Little Endian; 0 - 1
 +
 +
// Length Alpha Curve
 
  DWORD Count
 
  DWORD Count
 
         FLOAT
 
         FLOAT
 +
 +
// Edge Color Curve
 
  DWORD Count
 
  DWORD Count
         FLOAT //Little Endian
+
         FLOAT Red  //Little Endian; 0 - 1
         FLOAT //Little Endian
+
         FLOAT Green //Little Endian; 0 - 1
         FLOAT //Little Endian
+
         FLOAT Blue  //Little Endian; 0 - 1
 +
 +
// Edge Alpha Curve
 
  DWORD Count
 
  DWORD Count
        FLOAT
+
    FLOAT
 +
 +
// Start Edge Alpha Curve
 
  DWORD Count
 
  DWORD Count
        FLOAT
+
    FLOAT
 +
 +
// End Edge Alpha Curve
 
  DWORD Count
 
  DWORD Count
        FLOAT
+
    FLOAT
  DWORD
+
  FLOAT
+
  DWORD Segment Count
 +
  FLOAT Segment Length
 
   
 
   
 
  //Resource reference block
 
  //Resource reference block
  QWORD //I<sub>64</sub> of a an image([[Sims_3:0x00B2D882|DDS]]), model([[Sims_3:0x736884F1|VPXY]]), or material(see [[#Materials|Material Section]] below)
+
  QWORD IID<sub>64</sub> of a an image([[Sims_3:0x00B2D882|DDS]]), model([[Sims_3:0x736884F1|VPXY]]), or material(see [[#Materials|Material Section]] below)
  BYTE
+
  BYTE Format
  BYTE flag
+
  BYTE DrawMode
  if((flag & 0x80)==0x80) DWORD
+
  if ((DrawMode & 0x80) == 0x80) DWORD  
  BYTE
+
  if ((DrawMode & 0x40) == 0x40) BYTE
  BYTE
+
  // Draw Flags
  WORD
+
if (Version >= 6) WORD
  FLOAT
+
else              BYTE
  QWORD //0xFFFFFFFFFFFFFFFF  
+
BYTE  Buffer
 +
  WORD Layer
 +
  FLOAT Sort Offset
 +
  QWORD Second IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
 
   
 
   
  DWORD //0xFFFFFFFF
+
  DWORD Tile UV //0xFFFFFFFF
  FLOAT
+
  FLOAT Slip Curve Speed
  FLOAT
+
  FLOAT Slip UV Speed
  FLOAT
+
   
  FLOAT //Little Endian
+
  if (Version >= 2) FLOAT UV Repeat
  FLOAT //Little Endian
+
   
  FLOAT //Little Endian
+
  FLOAT[3] Directional Forces Sum //Little Endian
  FLOAT
+
  FLOAT   Wind Strength
  FLOAT
+
  FLOAT   Gravity Strength
  QWORD //0xFFFFFFFFFFFFFFFF
+
  QWORD   Emit Color Map IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
  QWORD //0xFFFFFFFFFFFFFFFF
+
  QWORD   Force Map IID<sub>64</sub>      //0xFFFFFFFFFFFFFFFF
  DWORD
+
  FLOAT    Map Repulse Strength
 +
 
 
====Sprite Effect====
 
====Sprite Effect====
 
=====Overview=====
 
=====Overview=====
Line 733: Line 902:
 
  WORD
 
  WORD
 
  DWORD Count
 
  DWORD Count
        FLOAT
+
    FLOAT
 
  DWORD Count
 
  DWORD Count
        FLOAT Red //Little Endian
+
    FLOAT Red   //Little Endian; 0 - 1
        FLOAT Green //Little Endian
+
    FLOAT Green //Little Endian; 0 - 1
        FLOAT Blue //Little Endian
+
    FLOAT Blue //Little Endian; 0 - 1
 
  DWORD Count
 
  DWORD Count
        FLOAT
+
    FLOAT
 
  FLOAT
 
  FLOAT
 
  FLOAT
 
  FLOAT
 
  FLOAT
 
  FLOAT
  FLOAT //Little Endian
+
  FLOAT[3] //Little Endian
  FLOAT //Little Endian
+
  FLOAT[3] //Little Endian
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
FLOAT //Little Endian
+
 
  FLOAT
 
  FLOAT
 
  FLOAT
 
  FLOAT
Line 767: Line 932:
 
   
 
   
 
  //Resource reference block
 
  //Resource reference block
  QWORD //I<sub>64</sub> of a an image([[Sims_3:0x00B2D882|DDS]]), model([[Sims_3:0x736884F1|VPXY]]), or material(see [[#Materials|Material Section]] below)
+
  QWORD IID<sub>64</sub> of a an image([[Sims_3:0x00B2D882|DDS]]), model([[Sims_3:0x736884F1|VPXY]]), or material(see [[#Materials|Material Section]] below)
  BYTE
+
  BYTE   Format
  BYTE flag
+
  BYTE   DrawMode
  if((flag & 0x80)==0x80) DWORD
+
  if ((DrawMode & 0x80) == 0x80) DWORD  
  BYTE
+
  if ((DrawMode & 0x40) == 0x40) BYTE
  BYTE
+
  // Draw Flags
  WORD
+
if (Version >= 6) WORD
  FLOAT
+
else              BYTE
  QWORD //0xFFFFFFFFFFFFFFFF
+
BYTE  Buffer
 +
  WORD Layer
 +
  FLOAT Sort Offset
 +
  QWORD Second IID<sub>64</sub> //0xFFFFFFFFFFFFFFFF
 
   
 
   
 
  BYTE
 
  BYTE
Line 801: Line 969:
 
|}
 
|}
 
=====Map=====
 
=====Map=====
No examples to decode
+
======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 IID<sub>64</sub>
 +
DWORD  Flags //0x3FF mask?
 +
BYTE  Map Type
 +
QWORD  Image IID<sub>64</sub>
 +
 +
//Bounds
 +
FLOAT Left
 +
FLOAT Top
 +
FLOAT Right
 +
FLOAT Bottom
 +
 +
BYTE    Channel
 +
BYTE    Op Kind
 +
QWORD[4] Op Arg Map IID<sub>64</sub>s
 +
 +
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=====
 
=====Material=====
 
======Overview======
 
======Overview======
Line 809: Line 999:
 
  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"
Line 869: Line 1,071:
 
====Format====
 
====Format====
 
  WORD SectionType //0x0000
 
  WORD SectionType //0x0000
  WORD Version //0x0002
+
  WORD Version     //0x0002
 
  DWORD EffectCount
 
  DWORD EffectCount
 
  --Repeat EffectCount
 
  --Repeat EffectCount
 
     // Effect Block Table
 
     // Effect Block Table
     DWORD
+
     DWORD   Flags
     DWORD
+
     DWORD   Component App Flags Mask
     DWORD
+
     DWORD   Notify Message ID
     FLOAT //Little Endian
+
     FLOAT[2] Screen Size Range //Little Endian
     FLOAT //Little Endian
+
     FLOAT   Cursor Active Distance
     DWORD
+
     BYTE    Cursor Button
     BYTE
+
     // LOD Distances
 
     DWORD Count
 
     DWORD Count
          FLOAT
+
        FLOAT
     FLOAT //Little Endian
+
     FLOAT[3] Extended LOD Weights //Little Endian
    FLOAT //Little Endian
+
     DWORD   Seed
    FLOAT //Little Endian
+
     DWORD
+
 
     DWORD BlockIndexCount
 
     DWORD BlockIndexCount
 
     --repeat BlockIndexCount
 
     --repeat BlockIndexCount
           BYTE BlockType
+
           BYTE Block Type
           DWORD
+
           DWORD Flags
           WORD
+
          // Local Transform
           FLOAT
+
           WORD     Flags
           FLOAT[12] Transformation Matrix //Little Endian
+
           FLOAT   Scale
           BYTE
+
           FLOAT[9] Orientation //Little Endian
           BYTE
+
          FLOAT[3] Position    //Little Endian
 +
           BYTE LOD Begin
 +
           BYTE LOD End
 +
          // LOD Scales
 
           DWORD Count
 
           DWORD Count
 
           --repeat Count
 
           --repeat Count
             FLOAT
+
             FLOAT Emit Scale
             FLOAT
+
             FLOAT Size Scale
             FLOAT
+
             FLOAT Alpha Scale
           FLOAT[6] // always 1.0
+
           FLOAT Emit Scale Begin  // always 1.0
           FLOAT
+
           FLOAT Emit Scale End    // always 1.0
           FLOAT
+
           FLOAT Size Scale Begin  // always 1.0
           WORD
+
          FLOAT Size Scale End    // always 1.0
           WORD
+
          FLOAT Alpha Scale Begin // always 1.0
           FLOAT
+
          FLOAT Alpha Scale End  // always 1.0
 +
          DWORD App Flags
 +
          DWORD App Flags Mask
 +
           WORD Selection Group
 +
           WORD Selection Chance
 +
           FLOAT Time Scale
 
           DWORD BlockIndex
 
           DWORD BlockIndex
           if(version >=2)
+
           if (Version >= 2)
 
               BYTE
 
               BYTE
 
               BYTE
 
               BYTE
 +
          if (Version >= 3)
 +
              DWORD Count
 +
              --repeat Count
 +
                  FLOAT
  
 
===VisualEffect Handles===
 
===VisualEffect Handles===
 
====Overview====
 
====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.   
 
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====
+
 
 +
====Visual Effect IDs====
 +
=====Format=====
 +
--Repeat until index 0xFFFFFFFF
 +
DWORD CompilationIndex //see previous section
 +
QWORD Effect ID //FNV Hash of effect name?
 +
 
 +
====VisualEffect Names====
 +
=====Format=====
 
  --Repeat until index 0xFFFFFFFF
 
  --Repeat until index 0xFFFFFFFF
 
  DWORD CompilationIndex //see previous section
 
  DWORD CompilationIndex //see previous section

Latest revision as of 22:08, 13 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

[edit] 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.

[edit] 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
VisualEffect IDs
VisualEffect Names

[edit] Effect Sections

[edit] Format

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

[edit] Blocks

BlockType
0x0001 Particle Effect
0x0002 Metaparticle Effect
0x0003 Decal Effect
0x0004 Sequence Effect
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

[edit] Particle Effect

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

// Emit Rate Curve (Particles/Sim-Minute)
DWORD Count 
    FLOAT   

FLOAT  Emit Rate Curve Time
WORD   Emit Rate Curve Cycles
FLOAT  Emit Rate Speed Scale

// Size Curve
DWORD Count 
    FLOAT   

FLOAT  Size Vary

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

FLOAT  Aspect Ratio Vary
FLOAT  Rotation Vary
FLOAT  Rotation Offset

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

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

FLOAT  Alpha Vary // 0 - 1 = transparent - opaque

// 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

//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 ??? 
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     Physics Type
BYTE     Override Set
BYTE     Tile Count U
BYTE     Tile Count V
BYTE     Align Mode
FLOAT    Frame Speed
BYTE     Frame Start
BYTE     Frame Count
BYTE     Frame Random
FLOAT[3] Directional Forces Sum //Little Endian
FLOAT    Wind Strength
FLOAT    Gravity Strength
FLOAT    Radial Force
FLOAT[3] Radial Force Location //Little Endian
FLOAT    Drag
FLOAT    Velocity Stretch
FLOAT    Screw Rate

// Wiggles 
DWORD Count 
    FLOAT    Time Rate
    FLOAT[3] Rate Direction   //Little Endian
    FLOAT[3] Wiggle Direction //Little Endian

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

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

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

// 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

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

// Random Walk
FLOAT[2] Time     //Little Endian
FLOAT[2] Strength //Little Endian
FLOAT    Turn Range
FLOAT    Turn Offset
FLOAT    Mix
// Turn Offset Curve
DWORD Count 
    FLOAT  
BYTE     Walk Loop Type

FLOAT[3] Attractor Origin //Little Endian

// Attractor Strength Curve
DWORD Count 
    FLOAT   
FLOAT  Range
FLOAT  Kill Range

// Path Points
DWORD Count 
    FLOAT[3] Position //Little Endian
    FLOAT[3] Velocity //Little Endian
    FLOAT    Time

if (Version >= 2)
    FLOAT[3] //Little Endian
    DWORD Count 
        FLOAT[3] //Little Endian

if (Version >=3) BYTE  
if (Version >=4) FLOAT 
if (Version >=5) FLOAT 

[edit] Metaparticle Effect

[edit] Overview

This type takes an existing effect and modifies it

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

// Emit Rate Curve (Particles/Sim-Minute)
DWORD Count 
    FLOAT   

FLOAT    Emit Rate Curve Time
DWORD    Emit Rate Curve Cycles; Should be FLOAT?
FLOAT    Emit Rate Speed Scale

// Size Curve
DWORD Count 
    FLOAT   

FLOAT  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 (0 - 1 = transparent - opaque)
DWORD Count 
    FLOAT   

FLOAT Alpha Vary

ZSTRING Base Effect  //See Effect Names below
ZSTRING Death Effect //See Effect Names below

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

// Wiggles 
DWORD Count 
    FLOAT    Time Rate
    FLOAT[3] Rate Direction   //Little Endian
    FLOAT[3] Wiggle Direction //Little Endian

BYTE  Screen Bloom Alpha Rate //0x00
BYTE  Screen Bloom Alpha Base //0xFF
BYTE  Screen Bloom Size Rate  //0x00
BYTE  Screen Bloom Size Base  //0xFF

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

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

// 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

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

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

// Random Walk 2
FLOAT[2] Time     //Little Endian
FLOAT[2] Strength //Little Endian
FLOAT    Turn Range
FLOAT    Turn Offset
FLOAT    Mix
// Turn Offset Curve
DWORD Count 
     FLOAT  
BYTE     Walk Loop Type

FLOAT[3] Random Walk Preferred Direction //Little Endian

FLOAT Align Damping
FLOAT Bank Amount
FLOAT Bank Damping

FLOAT[3] Attractor Origin //Little Endian

// Attractor Strength Curve
DWORD Count 
    FLOAT   
FLOAT  Range
FLOAT  Kill Range

// Path Points
DWORD Count 
    FLOAT[3] Position //Little Endian
    FLOAT[3] Velocity //Little Endian
    FLOAT    Time

FLOAT  Tractor Reset Speed

[edit] Decal Effect

[edit] Overview

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

[edit] Format
DWORD Flags; 0x7F mask?
QWORD  IID64 of a DDS Resource
BYTE  
FLOAT 
BYTE  
FLOAT  Lifetime

// Rotation Curve
DWORD Count1 
    FLOAT    

// Size Curve
DWORD Count2 
    FLOAT    

// Alpha Curve
DWORD Count3 
    FLOAT    

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

// Aspect Ratio Curve
DWORD Count5 
    FLOAT    

FLOAT    Alpha Vary
FLOAT    Size Vary
FLOAT    Rotation Vary
FLOAT    Texture Repeat
FLOAT[2] Texture Offset //Little Endian
QWORD    Emit Color Map IID64 //0xFFFFFFFFFFFFFFFF
if (Version >= 2) BYTE

[edit] Sequence Effect

[edit] Overivew

Combines effect compilations so they play out sequentially

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

[edit] Sound Effect

[edit] Overview

Plays a sound

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

[edit] Shake Effect

[edit] Format
FLOAT  Lifetime
FLOAT  Fade Time

// Strength Curve
DWORD Count1 
    FLOAT    

// Frequency Curve
DWORD Count2 
    FLOAT    

FLOAT Aspect Ratio
BYTE  Base Table Type
FLOAT Falloff

[edit] Camera Effect

[edit] Format
DWORD  Flags //0x3FF mask?
WORD   View Flags
FLOAT  Lifetime

// Heading (Yaw) Curve
DWORD Count1 
    FLOAT    

// Pitch Curve
DWORD Count2 
    FLOAT    

// Roll Curve
DWORD Count3 
    FLOAT    

// Distance Curve
DWORD Count4 
    FLOAT    

// FOV Curve
DWORD Count5 
    FLOAT    

// Near Clip Curve
DWORD Count6 
    FLOAT    

// Far Clip Curve
DWORD Count7 
    FLOAT    

QWORD  Camera ID
WORD   Cubemap Resource

[edit] Model Effect

[edit] Format
DWORD  Flags //0x3 mask?
QWORD  Resource IID64
FLOAT  Size

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

FLOAT Alpha // 0 - 1 = transparent - opaque

// Animation Curves
DWORD Count 
    FLOAT[2] Length Range //Little Endian
    // Curve
    DWORD Count 
        FLOAT  
   DWORD  Curve Vary
   DWORD  Speed Scale
   BYTE   Channel ID
   BYTE   Mode

QWORD  Material IID64; usually 0xFFFFFFFFFFFFFFFF
BYTE   Override Set

[edit] Screen Effect

[edit] Format
BYTE  Mode
DWORD Flags //0x3 mask?

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

// Strength Curve
DWORD Count 
    FLOAT   

// Distance Curve
DWORD Count 
    FLOAT   

FLOAT  Lifetime
FLOAT  Delay
FLOAT  Falloff
FLOAT  Distance Base
QWORD  Texture IID64

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

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

// Float Parameters
DWORD Count 
    FLOAT   

// Vector 3 Parameters
DWORD Count  
    FLOAT[3] //Little Endian

// Vector 2 Parameters
DWORD Count  
    FLOAT[2] //Little Endian

// Resource ID Parameters
DWORD Count 
    DWORD   

[edit] Game Effect

[edit] 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.

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

[edit] FastParticle Effect

[edit] 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.

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

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

// Size Curve
DWORD Count 
    FLOAT   

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

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

//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 
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     Align Mode
FLOAT[3] Directional Forces Sum //Little Endian
FLOAT    Wind Strength
FLOAT    Gravity Strength
FLOAT    Radial Force
FLOAT[3] Radial Force Location //Little Endian
FLOAT    Drag

[edit] Distribute Effect

[edit] Overview

Note: there is only one of these

[edit] 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

[edit] Ribbon Effect

[edit] Overview

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

[edit] 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 
if ((DrawMode & 0x40) == 0x40) BYTE  
// 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

[edit] Sprite Effect

[edit] Overview

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

[edit] Format
DWORD
DWORD
DWORD
FLOAT
WORD
DWORD Count
    FLOAT
DWORD Count
    FLOAT Red   //Little Endian; 0 - 1
    FLOAT Green //Little Endian; 0 - 1
    FLOAT Blue  //Little Endian; 0 - 1
DWORD Count
    FLOAT
FLOAT
FLOAT
FLOAT
FLOAT[3] //Little Endian
FLOAT[3] //Little Endian
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT
FLOAT

//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 
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

[edit] Resource Sections

[edit] Format

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

[edit] Resources

ID Name
0x0000 Map
0x0001 Material
[edit] Map
[edit] Overview

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

[edit] 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
[edit] Material
[edit] Overview

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

[edit] 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
[edit] Shaders

FNV32 Hashed shader names from "Shaders_Win32.precomp"

ID Name
0x8FAB3764 Fluid Effect
0x4968A478 Sim Censor
[edit] 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

[edit] VisualEffect Section

[edit] 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.

[edit] Format

WORD SectionType //0x0000
WORD Version     //0x0002 		
DWORD EffectCount
--Repeat EffectCount
    // Effect Block Table
    DWORD    Flags
    DWORD    Component App Flags Mask
    DWORD    Notify Message ID
    FLOAT[2] Screen Size Range //Little Endian
    FLOAT    Cursor Active Distance
    BYTE     Cursor Button
    // LOD Distances
    DWORD Count
        FLOAT
    FLOAT[3] Extended LOD Weights //Little Endian
    DWORD    Seed
    DWORD BlockIndexCount
    --repeat BlockIndexCount
         BYTE  Block Type
         DWORD Flags
         // Local Transform
         WORD     Flags
         FLOAT    Scale
         FLOAT[9] Orientation //Little Endian
         FLOAT[3] Position    //Little Endian
         BYTE LOD Begin
         BYTE LOD End
         // LOD Scales
         DWORD Count
         --repeat Count
            FLOAT Emit Scale
            FLOAT Size Scale
            FLOAT Alpha Scale
         FLOAT Emit Scale Begin  // always 1.0
         FLOAT Emit Scale End    // always 1.0
         FLOAT Size Scale Begin  // always 1.0
         FLOAT Size Scale End    // always 1.0
         FLOAT Alpha Scale Begin // always 1.0
         FLOAT Alpha Scale End   // always 1.0
         DWORD App Flags
         DWORD App Flags Mask
         WORD  Selection Group
         WORD  Selection Chance
         FLOAT Time Scale
         DWORD BlockIndex
         if (Version >= 2)
             BYTE
             BYTE
         if (Version >= 3)
             DWORD Count
             --repeat Count
                 FLOAT

[edit] VisualEffect Handles

[edit] 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.

[edit] Visual Effect IDs

[edit] Format
--Repeat until index 0xFFFFFFFF
	DWORD CompilationIndex //see previous section
	QWORD Effect ID //FNV Hash of effect name?

[edit] VisualEffect Names

[edit] 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