Animation Events (File Format): Difference between revisions

Jump to navigation Jump to search
imported>Jackoalan
No edit summary
imported>Darkszero
 
(30 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
|-
| u32
| 1
| '''Version'''
| 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).
|-
| u32
| 1
| '''Bool Event Count'''
|
|-
| [[#Bool Event|Bool Event]]
| ''Bool Event Count''
| '''Bool Events'''
|
|-
| u32
| 1
| '''Int32 Event Count'''
|
|-
| [[#Int32 Event|Int32 Event]]
| ''Int32 Event Count''
| '''Int32 Events'''
|
|-
| u32
| 1
| '''Particle Event Count'''
|
|-
| [[#Particle Event|Particle Event]]
| ''Particle Event Count''
| '''Particle Events'''
|
|-
| u32
| 1
| '''Sound Event Count'''
| Not present in version 1
|-
|-
|long
| [[#Sound Event|Sound Event]]
|1
| ''Sound Event Count''
|version
| '''Sound Events'''
|0x1 or 0x2
| Not present in version 1
|}
 
=== Event Type ===
 
Table is accurate to Prime 1, unknown for other games.
 
{| class="wikitable"
! ID
! Type
|-
|-
|long
| 0
|1
| Loop
|loop_event_count
|
|-
|-
|[[#Loop Event|Loop Event]]
| 1
|loop_event_count
| EmptyBool
|loop_events
|
|-
|-
|long
| 2
|1
| EmptyInt32
|uevt_event_count
|Version 0x2 only
|-
|-
|[[#UEVT Event|UEVT Event]]
| 4
|uevt_event_count
| SoundInt32
|uevt_events
|Version 0x2 only
|-
|-
|long
| 5
|1
| Particle
|effect_event_count
|
|-
|-
|[[#Effect Event|Effect Event]]
| 6
|effect_event_count
| UserEvent
|effect_events
|
|-
|-
|long
| 7
|1
| RandRate
|sound_event_count
|
|-
|-
|[[#Sound Event|Sound Event]]
| 8
|sound_event_count
| Sound
|sound_events
|
|}
|}


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


=== UEVT Event ===
=== Particle Event ===


=== Effect Event ===
{| class="wikitable"
! Type
! Count
! Name
! Notes
! MP1
! MP2
! MP3
|-
| [[#Event Base|Event Base]]
| 1
| '''Event Base'''
|
| {{check}}
| {{check}}
| {{check}}
|-
| u32
| 1
| '''Frame Count'''
| Number of frames to run the effect emitter for
| {{check}}
| {{check}}
| {{nocheck}}
|-
| {{FourCC}}
| 1
| '''Effect Type'''
| FourCC of effect's type; either [[PART (File Format)|PART]], [[SWHC (File Format)|SWHC]], or [[ELSC (File Format)|ELSC]]
| {{check}}
| {{check}}
| {{check}}
|-
| Asset ID
| 1
| '''Effect ID'''
| Asset ID of the effect resource
| {{check}}
| {{check}}
| {{check}}
|-
| string
| 1
| '''Bone Name'''
| Name of the [[CINF (File Format)|CINF]] bone to attach this effect to
| {{check}}
| {{nocheck}}
| {{nocheck}}
|-
| u32
| 1
| '''Bone ID'''
| ID of the [[CINF (File Format)|CINF]] bone to attach this effect to
| {{nocheck}}
| {{check}}
| {{nocheck}}
|-
| float
| 1
| '''Effect Scale'''
| Uniform scale of the particle effect
| {{check}}
| {{check}}
| {{nocheck}}
|-
| u32
| 1
| '''Transform Type'''
| Enumerated transform-mode relating effect to actor's bone:
<ol start="0">
<li>Emitter transformed to bone for initial frame, then retained</li>
<li>Emitter continuously transformed to bone</li>
<li>Entire effect (including particle instances) continuously transformed to bone</li>
</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"
! Type
! Count
! Name
! 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}}
|-
| float
| 1
| '''Reference Distance'''
| Reference distance for audio attenuation
| {{check}}
| {{check}}
|-
| u32
| 1
| {{unknown|Unknown}}
|
| {{nocheck}}
| {{check}}
|-
| u16
| 1
| {{unknown|Unknown}}
|
| {{nocheck}}
| {{check}}
|-
| u16
| 1
| {{unknown|Unknown}}
|
| {{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