Animation Events (File Format): Difference between revisions

Jump to navigation Jump to search
imported>Jackoalan
imported>Darkszero
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{research|1|Some event parameters need research}}
{{research|1|Some event parameters need research}}
The '''EVNT format''' is a companion to [[ANIM (File Format)|ANIM]] resources.
'''Animation events''' control functional events synchronized to rigged animations for things like sound effects, visual effects, character messages, and playback control. The events can be found in different places in each game; in Prime 1, they are stored in their own file format, the '''EVNT format'''. In Echoes, the format is the same as Prime 1, but was merged in to the [[ANCS (File Format)|ANCS format]] instead of getting its own file. In Prime 3 and the Donkey Kong Country series, events can be found in the [[CHAR (File Format)|CHAR format]], as well as Prime 3's [[SAND (File Format)|SAND format]].
Animators are able to synchronize functional events to rigged animations for things like sound effects, visual effects, character messages, and playback control.
 
== Format ==
 
=== File Structure (Metroid Prime 1/2) ===


{| class="wikitable"
{| class="wikitable"
!Data Type
! Type
!Element Count
! Count
!Identifier
! Name
!Notes
! Notes
|-
|-
|long
| u32
|1
| 1
|version
| '''Version'''
|0x1 or 0x2
| Either 1 or 2. Both can appear in Prime 1, while Echoes uses version 2 (the version number wasn't updated in Echoes despite format changes).
|-
|-
|long
| u32
|1
| 1
|loop_event_count
| '''Bool Event Count'''
|
|  
|-
|-
|[[#Loop Event|Loop Event]]
| [[#Bool Event|Bool Event]]
|loop_event_count
| ''Bool Event Count''
|loop_events
| '''Bool Events'''
|
|  
|-
|-
|long
| u32
|1
| 1
|uevt_event_count
| '''Int32 Event Count'''
|Version 0x2 only
|  
|-
|-
|[[#UEVT Event|UEVT Event]]
| [[#Int32 Event|Int32 Event]]
|uevt_event_count
| ''Int32 Event Count''
|uevt_events
| '''Int32 Events'''
|Version 0x2 only
|  
|-
|-
|long
| u32
|1
| 1
|effect_event_count
| '''Particle Event Count'''
|
|  
|-
|-
|[[#Effect Event|Effect Event]]
| [[#Particle Event|Particle Event]]
|effect_event_count
| ''Particle Event Count''
|effect_events
| '''Particle Events'''
|
|  
|-
|-
|long
| u32
|1
| 1
|sound_event_count
| '''Sound Event Count'''
|
| Not present in version 1
|-
|-
|[[#Sound Event|Sound Event]]
| [[#Sound Event|Sound Event]]
|sound_event_count
| ''Sound Event Count''
|sound_events
| '''Sound Events'''
|
| Not present in version 1
|}
|}
=== Event Type ===
Table is accurate to Prime 1, unknown for other games.
{| class="wikitable"
! ID
! Type
|-
| 0
| Loop
|-
| 1
| EmptyBool
|-
| 2
| EmptyInt32
|-
| 4
| SoundInt32
|-
| 5
| Particle
|-
| 6
| UserEvent
|-
| 7
| RandRate
|-
| 8
| Sound
|}


=== Event Base ===
=== Event Base ===
These parameters are common to every event type.


{| class="wikitable"
{| class="wikitable"
!Offset
! Type
!Length
! Count
!Data Type
! Name
!Identifier
! Notes
!Notes
! MP1/2
! MP3
|-
| u16
| 1
| {{unknown|Unknown}}
|
| {{check}}
| {{check}}
|-
| string
| 1
| '''Event Name'''
|
| {{check}}
| {{check}}
|-
| u16
| 1
| '''Event Type'''
| Enumerated event type (unknown values)
| {{check}}
| {{check}}
|-
| [[Char Anim Time]]
| 1
| '''Event Timestamp'''
| Time (in seconds) from start of [[ANIM (File Format)|ANIM]] to trigger event
| {{check}}
| {{check}}
|-
| u32
| 1
| '''Event Index'''
| Index of event unique from other events (perhaps used to maintain a ''triggered'' bitmap)
| {{check}}
| {{check}}
|-
| u32
| 1
| {{unknown}}
|
| {{nocheck}}
| {{check}}
|-
|-
|<start>
| bool
|2
| 1
|short
| '''Unique'''
|unknown0
|  
|
| {{check}}
| {{check}}
|-
|-
|&#43;0x2
| float
|<null-term>
| 1
|string
| '''Weight'''
|event_name
| The likelihood of this event being selected
|
| {{check}}
| {{check}}
|-
|-
|&#43;&#43;0x0
| s32
|2
| 1
|short
| '''Character Index'''
|event_type
| Character index that this event should trigger for. If -1, this event triggers for all characters.
|Enumerated event type (unknown values)
| {{check}}
| {{check}}
|-
|-
|&#43;&#43;0x2
| u32
|4
| 1
|float
| '''Flags'''
|event_timestamp
|  
|Time (in seconds) from start of [[ANIM (File Format)|ANIM]] to trigger event
| {{check}}
| {{check}}
|-
|-
|&#43;&#43;0x6
| u32
|4
| 1
|long
| {{unknown}}
|unknown1
|  
|
| {{nocheck}}
| {{check}}
|-
|-
|&#43;&#43;0xA
| u32
|4
| 1
|long
| {{unknown}}
|event_index
|  
|Index of event unique from other events (perhaps used to maintain a ''triggered'' bitmap)
| {{nocheck}}
| {{check}}
|-
|-
|&#43;&#43;0xE
| u32
|1
| 1
|bool
| {{unknown}}
|unknown2
|  
|Unknown Flag
| {{nocheck}}
| {{check}}
|-
|-
|&#43;&#43;0xF
| float
|4
| 1
|float
| {{unknown}}
|unknown3
|  
|
| {{nocheck}}
| {{check}}
|-
|-
|&#43;&#43;0x13
| float
|4
| 1
|float
| {{unknown}}
|unknown4
|  
|
| {{nocheck}}
| {{check}}
|}
 
=== Bool Event ===
 
{| class="wikitable"
! Type
! Count
! Name
! Notes
|-
|-
|&#43;&#43;0x17
| [[#Event Base|Event Base]]
|4
| 1
|long
| '''Event Base'''
|unknown5
|  
|
|-
|-
| bool
| 1
| '''Value'''
|
|}
|}


'''RWK Note:''' The ''props'' string is formatted as:
=== Int32 Event ===
<code>
Type:<event_type> <unknown1> <unknown2> <unknown3> <unknown4> <unknown5>
</code>


=== Loop Event ===
==== Metroid Prime 1/2 ====


{| class="wikitable"
{| class="wikitable"
!Offset
! Type
!Length
! Count
!Data Type
! Name
!Identifier
! Notes
!Notes
|-
| [[#Event Base|Event Base]]
| 1
| '''Event Base'''
|
|-
|-
|<start>
| s32
|<varies>
| 1
|[[#Event Base|Event Base]]
| '''Value'''
|event_base
| Numeric value for the event
|
|-
|-
|&#43;0x0
| string
|1
| 1
|bool
| '''Bone Name'''
|unknown_flag
| Name of the [[CINF (File Format)|CINF]] bone to attach this event to (for applicable events)
|
|}
|}


=== UEVT Event ===
==== Metroid Prime 3 ====


{| class="wikitable"
{| class="wikitable"
!Offset
! Type
!Length
! Count
!Data Type
! Name
!Identifier
! Notes
!Notes
|-
|-
|<start>
| [[#Event Base|Event Base]]
|<varies>
| 1
|[[#Event Base|Event Base]]
| '''Event Base'''
|event_base
|  
|
|-
|-
|&#43;0x0
| u8
|4
| 1
|long
| {{unknown}}
|uevt_type
|  
|Enumerated UEVT type (unknown values)
|-
|-
|&#43;0x4
| u16
|<null-term>
| 1
|string
| {{unknown}}
|bone_name
|
|[[CINF (File Format)|CINF]] Bone Name (for applicable events)
|-
| u16
| 1
| {{unknown}}
|  
|}
|}


=== Effect Event ===
=== Particle Event ===


{| class="wikitable"
{| class="wikitable"
!Offset
! Type
!Length
! Count
!Data Type
! Name
!Identifier
! Notes
!Notes
! MP1
! MP2
! MP3
|-
|-
|<start>
| [[#Event Base|Event Base]]
|<varies>
| 1
|[[#Event Base|Event Base]]
| '''Event Base'''
|event_base
|
|
| {{check}}
| {{check}}
| {{check}}
|-
|-
|&#43;0x0
| u32
|4
| 1
|long
| '''Frame Count'''
|frame_count
| Number of frames to run the effect emitter for
|Number of frames to run effect-emitter for
| {{check}}
| {{check}}
| {{nocheck}}
|-
|-
|&#43;0x4
| {{FourCC}}
|4
| 1
|long
| '''Effect Type'''
|effect_type
| FourCC of effect's type; either [[PART (File Format)|PART]], [[SWHC (File Format)|SWHC]], or [[ELSC (File Format)|ELSC]]
|FourCC of effect's type ([[PART (File Format)|PART]], [[SWHC (File Format)|SWHC]], [[ELSC (File Format)|ELSC]])
| {{check}}
| {{check}}
| {{check}}
|-
|-
|&#43;0x8
| Asset ID
|4
| 1
|long
| '''Effect ID'''
|effect_ref
| Asset ID of the effect resource
|ID of [[Effect Script|effect]] resource
| {{check}}
| {{check}}
| {{check}}
|-
|-
|&#43;0xC
| string
|<null-term>
| 1
|string
| '''Bone Name'''
|bone_name
| Name of the [[CINF (File Format)|CINF]] bone to attach this effect to
|[[CINF (File Format)|CINF]] Bone Name (for transforming effects)
| {{check}}
| {{nocheck}}
| {{nocheck}}
|-
|-
|&#43;&#43;0x0
| u32
|4
| 1
|float
| '''Bone ID'''
|effect_scale
| ID of the [[CINF (File Format)|CINF]] bone to attach this effect to
|Proportional-scale to applied to effect in scene
| {{nocheck}}
| {{check}}
| {{nocheck}}
|-
|-
|&#43;&#43;0x4
| float
|4
| 1
|long
| '''Effect Scale'''
|transform_type
| Uniform scale of the particle effect
|Enumerated transform-mode relating effect to actor's bone:
| {{check}}
| {{check}}
| {{nocheck}}
|-
| u32
| 1
| '''Transform Type'''
| Enumerated transform-mode relating effect to actor's bone:
<ol start="0">
<ol start="0">
<li>Effect-emitter transformed to bone for initial frame, then retained</li>
<li>Emitter transformed to bone for initial frame, then retained</li>
<li>Effect-emitter continuously transformed to bone</li>
<li>Emitter continuously transformed to bone</li>
<li>Entire effect (particle instances and all) continuously transformed to bone</li>
<li>Entire effect (including particle instances) continuously transformed to bone</li>
</ol>
</ol>
| {{check}}
| {{check}}
| {{nocheck}}
|-
| float
| 1
| {{unknown}}
| Probably effect scale?
| {{nocheck}}
| {{nocheck}}
| {{check}}
|-
| u32
| 1
| {{unknown}}
| Probably bone ID?
| {{nocheck}}
| {{nocheck}}
| {{check}}
|}
|}


=== Sound Event ===
=== Sound Event ===
==== Metroid Prime 1/2 ====


{| class="wikitable"
{| class="wikitable"
!Offset
! Type
!Length
! Count
!Data Type
! Name
!Identifier
! Notes
!Notes
! MP1
! MP2
|-
| [[#Event Base|Event Base]]
| 1
| '''Event Base'''
|
| {{check}}
| {{check}}
|-
| u32
| 1
| '''Sound ID'''
| Lower 16 bits are an [[AGSC (File Format)|AGSC]] sound ID indirected via the [[ATBL (File Format)|ATBL]]; most significant bit is a ''looped'' flag
| {{check}}
| {{check}}
|-
| float
| 1
| '''Reference Amplitude'''
| Reference amplitude for audio attenuation
| {{check}}
| {{check}}
|-
|-
|<start>
| float
|<varies>
| 1
|[[#Event Base|Event Base]]
| '''Reference Distance'''
|event_base
| Reference distance for audio attenuation
|
| {{check}}
| {{check}}
|-
|-
|&#43;0x0
| u32
|4
| 1
|long
| {{unknown|Unknown}}
|sound_id
|  
|16-bit [[AGSC (File Format)|AGSC]] ''sound-id'' indirected via [[ATBL (File Format)|ATBL]]
| {{nocheck}}
| {{check}}
|-
|-
|&#43;0x4
| u16
|4
| 1
|float
| {{unknown|Unknown}}
|ref_amplitude
|  
|Reference amplitude for audio attenuation
| {{nocheck}}
| {{check}}
|-
|-
|&#43;0x8
| u16
|4
| 1
|float
| {{unknown|Unknown}}
|ref_distance
|
|Reference distance for audio attenuation
| {{nocheck}}
| {{check}}
|-
| float
| 1
| {{unknown|Unknown}}
|
| {{nocheck}}
| {{check}}
|}
|}
==== Metroid Prime 3 ====
{| class="wikitable"
! Type
! Count
! Name
! Notes
|-
| [[#Event Base|Event Base]]
| 1
| '''Event Base'''
|
|-
| Asset ID ([[CAUD (File Format)|CAUD]])
| 1
| '''Sound Effect'''
| Sound to be played.
|-
| u32
| 1
| {{unknown}}
|
|-
| u32
| 1
| {{unknown}}
|
|-
| [[#Unknown Typed Structure|Unknown Typed Structure]]
| 1
| {{unknown}}
|
|-
| [[#Unknown Typed Structure|Unknown Typed Structure]]
| 1
| {{unknown}}
|
|}
===== Unknown Typed Structure =====
Contains a 32-bit type value, followed by either:
* Type 0: Nothing
* Type 1: A float
* Type 2: A [[Maya Spline]]


[[Category:File Formats]]
[[Category:File Formats]]
[[Category:Metroid Prime]]
[[Category:Metroid Prime]]
[[Category:Metroid Prime 2: Echoes]]
[[Category:Metroid Prime 2: Echoes]]
[[Category:Metroid Prime 3: Corruption]]
Anonymous user

Navigation menu