Difference between revisions of "Sims 3:0x02D5DF13"

From SimsWiki
Jump to: navigation, search
(S_St - State Definition)
Line 1: Line 1:
 
==Overview==
 
==Overview==
Jazz data is a graph representing a [http://en.wikipedia.org/wiki/Nondeterministic_finite_state_machine Finite State Machine], which is processed by the SACS engine in The Sims 3 to handle animation events.  A glimpse at a visual representation of the jazz data can be seen in [http://www.youtube.com/watch?v=3_GoaADx2_4 The Sims 3 - Behind the Scenes] video.  At 2:08, a Sim is seen performing the actions associated with the "deathreactions" state machine, traversing from the Enter state through the "Shocked" state into the "Evil" state.  At 3:44 a toddler Sim is seen playing with a teddy bear as controlled by the "stuffedAnimal" state machine.
+
Jazz data is a graph representing a [http://en.wikipedia.org/wiki/Finite_state_machine Finite State Machine], which is processed by the SACS engine in The Sims 3 to handle animation events.  A glimpse at a visual representation of the jazz data can be seen in [http://www.youtube.com/watch?v=3_GoaADx2_4 The Sims 3 - Behind the Scenes] video.  At 2:08, a Sim is seen performing the actions associated with the "deathreactions" state machine, traversing from the Enter state through the "Shocked" state into the "Evil" state.  At 3:44 a toddler Sim is seen playing with a teddy bear as controlled by the "stuffedAnimal" state machine.
  
 
==Format==
 
==Format==
Line 6: Line 6:
 
===Definition Chunks===
 
===Definition Chunks===
 
====S_SM - State Machine Definition====
 
====S_SM - State Machine Definition====
<pre>
+
DWORD 'S_SM'
DWORD 'S_SM'
+
DWORD Version    // 0x202
DWORD Version    // 0x202
+
DWORD Name      // Hashed state machine name (Typically same as filename w/o path or extension)
DWORD Name      // Hashed state machine name (Typically same as filename w/o path or extension)
+
DWORD count1    // Actor definitions
DWORD count1    // Actor definitions
+
REP count1
REP count1
+
  DWORD [S_AD index]
  DWORD [S_AD index]
+
DWORD count2    // Property definitions
DWORD count2    // Property definitions
+
REP count2
REP count2
+
  DWORD [S_PD index]
  DWORD [S_PD index]
+
DWORD count3    // States
DWORD count3    // States
+
REP count3
REP count3
+
  DWORD [S_St index]
  DWORD [S_St index]
+
REP count4
REP count4
+
  DWORD filename //Hash of a .ma filename with extension
  DWORD filename //Hash of a .ma filename with extension
+
  DWORD actor1  //hash of actor name - animation parameter?
  DWORD actor1  //hash of actor name - animation parameter?
+
  DWORD actor2  //hash of actor name - animation parameter?
  DWORD actor2  //hash of actor name - animation parameter?
+
DWORD 0xDEADBEEF
DWORD 0xDEADBEEF
+
DWORD Properties // State machine properties
DWORD Properties // State machine properties
+
DWORD Priority  // Automation priority
DWORD Priority  // Automation priority
+
DWORD            // Value that's 0-5
DWORD            // Value that's 0-5
+
DWORD Empty
DWORD Empty
+
DWORD Empty
DWORD Empty
+
DWORD Empty
DWORD Empty
+
DWORD Empty
DWORD Empty
+
</pre>
+
  
 
====S_St - State Definition====
 
====S_St - State Definition====
<pre>
+
DWORD 'S_St'
DWORD 'S_St'
+
DWORD version        // 0x101
DWORD version        // 0x101
+
DWORD Name          // Hashed state name
DWORD Name          // Hashed state name
+
DWORD Flags          // State Flags
DWORD Flags          // State Flags
+
DWORD [S_DG index]  // State decision graph
DWORD [S_DG index]  // State decision graph
+
DWORD count          // State transitions
DWORD count          // State transitions
+
REP count
REP count
+
  DWORD [S_St index] // Valid transitions out
  DWORD [S_St index] // Valid transitions out
+
DWORD // Values 0-6
DWORD // Values 0-6
+
</pre>
+
  
 
====S_PD - Parameter Definition====
 
====S_PD - Parameter Definition====
<pre>
+
DWORD 'S_PD'
DWORD 'S_PD'
+
DWORD version // 0x100
DWORD version // 0x100
+
DWORD hash    // Hashed parameter name
DWORD hash    // Hashed parameter name
+
DWORD hash    // Default value
DWORD hash    // Default value
+
</pre>
+
  
 
====S_AD - Actor Definition====
 
====S_AD - Actor Definition====
<pre>
+
DWORD 'S_AD'
DWORD 'S_AD'
+
DWORD version // 0x100
DWORD version // 0x100
+
DWORD Name    //hashed actor parameter name
DWORD Name    //hashed actor parameter name
+
DWORD Empty  //null in all JazzData.package cases
DWORD Empty  //null in all JazzData.package cases
+
</pre>
+
  
 
====S_DG - Decision Graph====
 
====S_DG - Decision Graph====
<pre>
+
DWORD 'S_DG'
DWORD 'S_DG'
+
DWORD version        // 0x101
DWORD version        // 0x101
+
DWORD blank          // In all cases in JazzData.package
DWORD blank          // In all cases in JazzData.package
+
DWORD count1
DWORD count1
+
REP count1
REP count1
+
    DWORD [DGN index] // List of all decision graph nodes descendant from this S_DG
    DWORD [DGN index] // List of all decision graph nodes descendant from this S_DG
+
DWORD count2
DWORD count2
+
REP count2
REP count2
+
    DWORD [DGN index] // Root of the decision graph
    DWORD [DGN index] // Root of the decision graph
+
DWORD (DEADBEEF filler)
DWORD (DEADBEEF filler)
+
</pre>
+
  
 
===Decision Graph Node Chunks===
 
===Decision Graph Node Chunks===
 
====SoPn - Select on Parameter Node====
 
====SoPn - Select on Parameter Node====
<pre>
+
DWORD 'SoPn'
DWORD 'SoPn'
+
DWORD version            // 0x101
DWORD version            // 0x101
+
DWORD index              // Parameter to select on
DWORD index              // Parameter to select on
+
DWORD count              // Possible cases to select
DWORD count              // Possible cases to select
+
REP count
REP count
+
    DWORD Value          //hashed value to compare
    DWORD Value          //hashed value to compare
+
    DWORD indexcount
    DWORD indexcount
+
    REP indexcount
    REP indexcount
+
        DWORD [DGN index] // Action to take on match
        DWORD [DGN index] // Action to take on match
+
4BYTE filler(DEADBEEF)
4BYTE filler(DEADBEEF)
+
DWORD '/DGN'
DWORD '/DGN'
+
</pre>
+
  
 
====SNSN - Next State Node====
 
====SNSN - Next State Node====
<pre>
+
DWORD 'SNSN'
DWORD 'SNSN'
+
DWORD version            // 0x101
DWORD version            // 0x101
+
DWORD S_St index          // Next state
DWORD S_St index          // Next state
+
DWORD '/DGN' (end entry)
DWORD '/DGN' (end entry)
+
</pre>
+
  
 
====Rand - Random Node====
 
====Rand - Random Node====
<pre>
+
DWORD 'Rand'
DWORD 'Rand'
+
DWORD version            // 0x101
DWORD version            // 0x101
+
DWORD count              // Possible outcomes
DWORD count              // Possible outcomes
+
REP count
REP count
+
    FLOAT                // Random weight
    FLOAT                // Random weight
+
    DWORD subcount
    DWORD subcount
+
    REP subcount
    REP subcount
+
        DWORD [DGN index] // Action on selection
        DWORD [DGN index] // Action on selection
+
DWORD - DEADBEEF
DWORD - DEADBEEF
+
DWORD flags              // Random node flags
DWORD flags              // Random node flags
+
DWORD '/DGN'
DWORD '/DGN'
+
</pre>
+
  
 
====Play - Play Animation Node====
 
====Play - Play Animation Node====
Line 175: Line 159:
  
 
====AcOp - Actor Operation Node====
 
====AcOp - Actor Operation Node====
<pre>
+
DWORD 'AcOp'
DWORD 'AcOp'
+
DWORD version // 0x100
DWORD version // 0x100
+
DWORD index  // Actor to operate on
DWORD index  // Actor to operate on
+
DWORD 1      // Count? Always 1 in jazzdata.package, but there is also only one defined operation
DWORD 1      // Count? Always 1 in jazzdata.package, but there is also only one defined operation
+
DWORD op      // Actor operation
DWORD op      // Actor operation
+
3 DWORDS blank
3 DWORDS blank
+
DWORD count
DWORD count
+
REP count
REP count
+
  DWORD [DGN index]
  DWORD [DGN index]
+
DWORD '/DGN'
DWORD '/DGN'
+
</pre>
+
  
 
====Stop - Stop Animation Node====
 
====Stop - Stop Animation Node====
Line 192: Line 174:
 
  DWORD 'Stop'
 
  DWORD 'Stop'
 
  DWORD version      // 0x104
 
  DWORD version      // 0x104
  DWORD             // Value of 0, 1, 4 or 5
+
  DWORD Flags        // Animation node flags
 
  DWORD Priority    // Animation Priroity
 
  DWORD Priority    // Animation Priroity
 
  DWORD Empty
 
  DWORD Empty

Revision as of 01:51, 23 July 2009

Contents

Overview

Jazz data is a graph representing a Finite State Machine, which is processed by the SACS engine in The Sims 3 to handle animation events. A glimpse at a visual representation of the jazz data can be seen in The Sims 3 - Behind the Scenes video. At 2:08, a Sim is seen performing the actions associated with the "deathreactions" state machine, traversing from the Enter state through the "Shocked" state into the "Evil" state. At 3:44 a toddler Sim is seen playing with a teddy bear as controlled by the "stuffedAnimal" state machine.

Format

Follows the RCOL format, with its own custom chunks. All data is aligned on DWORD boundries. These chunks have a lot of filler data(0xDEADBEEF) which is a "serialization sentinel" according to enum definitions. There are two types of chunks, definition chunks and decision graph node chunks. The definition chunks form a simple structure with data about the state machine. Decision graph nodes form a recursive data structure. References to decision graph node indexes can validly refer to any decision graph node.

Definition Chunks

S_SM - State Machine Definition

DWORD 'S_SM'
DWORD Version    // 0x202
DWORD Name       // Hashed state machine name (Typically same as filename w/o path or extension)
DWORD count1     // Actor definitions
REP count1
  DWORD [S_AD index]
DWORD count2     // Property definitions
REP count2
  DWORD [S_PD index]
DWORD count3     // States
REP count3
  DWORD [S_St index]
REP count4
  DWORD filename //Hash of a .ma filename with extension
  DWORD actor1   //hash of actor name - animation parameter?
  DWORD actor2   //hash of actor name - animation parameter?
DWORD 0xDEADBEEF
DWORD Properties // State machine properties
DWORD Priority   // Automation priority
DWORD            // Value that's 0-5
DWORD Empty
DWORD Empty
DWORD Empty
DWORD Empty

S_St - State Definition

DWORD 'S_St'
DWORD version        // 0x101
DWORD Name           // Hashed state name
DWORD Flags          // State Flags
DWORD [S_DG index]   // State decision graph
DWORD count          // State transitions
REP count
  DWORD [S_St index] // Valid transitions out
DWORD // Values 0-6

S_PD - Parameter Definition

DWORD 'S_PD'
DWORD version // 0x100
DWORD hash    // Hashed parameter name
DWORD hash    // Default value

S_AD - Actor Definition

DWORD 'S_AD'
DWORD version // 0x100
DWORD Name    //hashed actor parameter name
DWORD Empty   //null in all JazzData.package cases

S_DG - Decision Graph

DWORD 'S_DG'
DWORD version         // 0x101
DWORD blank           // In all cases in JazzData.package
DWORD count1
REP count1
    DWORD [DGN index] // List of all decision graph nodes descendant from this S_DG
DWORD count2
REP count2
    DWORD [DGN index] // Root of the decision graph
DWORD (DEADBEEF filler)

Decision Graph Node Chunks

SoPn - Select on Parameter Node

DWORD 'SoPn'
DWORD version             // 0x101
DWORD index               // Parameter to select on
DWORD count               // Possible cases to select
REP count
    DWORD Value           //hashed value to compare
    DWORD indexcount
    REP indexcount
        DWORD [DGN index] // Action to take on match
4BYTE filler(DEADBEEF)
DWORD '/DGN'

SNSN - Next State Node

DWORD 'SNSN'
DWORD version             // 0x101
DWORD S_St index          // Next state
DWORD '/DGN' (end entry)

Rand - Random Node

DWORD 'Rand'
DWORD version             // 0x101
DWORD count               // Possible outcomes
REP count
    FLOAT                 // Random weight
    DWORD subcount
    REP subcount
        DWORD [DGN index] // Action on selection
DWORD - DEADBEEF
DWORD flags               // Random node flags
DWORD '/DGN'

Play - Play Animation Node

If the string value below is defined, it a UTF-16 value null terminated, padded to the next DWORD boundry after the null termination. If the string length is 0, there is no data at all for the string, including no null termination.

When the animation name string is set, the CLIP and TkMk resource references are set to 00000000:00000000:6b20c4f302d5df12 and the string is hashed to get the animation ID after parameter substitution. Parameters are the named parameters defined by S_PD, and a substitution inside the string is indicated by enclosing a parameter name between curly braces ("{" and "}").

DWORD 'Play'
DWORD version     // 0x105
TGI64 (CLIP)
TGI64 (TkMk)
DWORD count1
3 DWORDS blank     // Blank in all existing jazzdata.package entries
REP count1
  DWORD Empty      // 0 in all 1 entry this count is non-zero in
  DWORD Empty      // 0 in all 1 entry this count is non-zero in
  DWORD Actor      // Hashed actor parameter name
  DWORD Slot       // Hashed slot name (Only one instance of this in jazzdata.package)
DWORD count2
REP count2
  DWORD actor      // Hashed actor name
  DWORD suffix     // Hashed parameter name for IkSuffix
DWORD filler(DEADBEEF)
4 DWORDS blank     // In all instances in existing jazzdata.package
DWORD len          // Length of the following string - a value of 0 indicates no data
WSTRING animation  // Animation name to play.  See above notes on this value.
VAR WCHAR (0) pad  // As needed for string (If len > 0) - see above note on string padding
DWORD Empty
DWORD filler(DEADBEEF)
DWORD Flags        // Animation node flags
DWORD Priority     // Animation Priroity
DWORD Empty
FLOAT
FLOAT
FLOAT              // Always 0
FLOAT              // Always 1
DWORD [S_AD Index] // Actor to animate
DWORD Priority     // Animation Priroity
DWORD              // Always 16
5 DWORDS Empty
DWORD filler(DEADBEEF)
DWORD count3
REP count3
  DWORD [DGN Index] // Additional actions (On animation complete?)
DWORD '/DGN'

Prop - Create Prop Node

The catalog resource ID references type 0x139f7591 (CatalogObjectResourceID) which does not exist in any packages. However, the instance does reference a valid catalog object ID.

Current speculation is that the blank values may be object create parameters, since the prop is created with no script intervention. However, none of the values are set in existing jazz data.

DWORD 'Prop' 
DWORD version       // 0x100
DWORD [S_Ad Index]  // Prop actor to create
DWORD blank
TGI64 propobject    // Catalog reference of prop to create
5 DWORDS blank
DWORD count
REP count
    DWORD [DGN index]
DWORD '/DGN'

AcOp - Actor Operation Node

DWORD 'AcOp'
DWORD version // 0x100
DWORD index   // Actor to operate on
DWORD 1       // Count? Always 1 in jazzdata.package, but there is also only one defined operation
DWORD op      // Actor operation
3 DWORDS blank
DWORD count
REP count
  DWORD [DGN index]
DWORD '/DGN'

Stop - Stop Animation Node

The fields in a Stop node are structurally identical to the end part of a Play node.

DWORD 'Stop'
DWORD version      // 0x104
DWORD Flags        // Animation node flags
DWORD Priority     // Animation Priroity
DWORD Empty
FLOAT
FLOAT
FLOAT              // Always 0
FLOAT              // Always 1
DWORD [S_AD Index] // Actor to stop animating
DWORD Priority     // Animation Priroity
DWORD              // Always 16
5 DWORDS Empty
DWORD filler(DEADBEEF)
DWORD count
REP count
  DWORD [DGN index]
DWORD '/DGN'
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox