Difference between revisions of "ANIM"

From GTAMods Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Stub}}
 
 
{{IdeSection
 
{{IdeSection
| game        = [[GTA SA]], [[GTA IV]]
+
| game        = {{Icon|SA}} {{Icon|4}}
| description = Used to define timed map objects
+
| description = Used to define animated map objects
 
}}
 
}}
'''ANIM''' is a section in the [[item definition]] file. It is used to define standart map objects linked to an animation. It's format is similar to [[OBJS|standart map objects]]. [[GTA IV]] does also support time controlled objects linked to animations. For more information about this see [[TANM]].
+
'''ANIM''' is a section in the [[item definition]] file in [[San Andreas]] and [[GTA IV]]. It is used to define standard map objects linked to an animation. Its format is almost exactly like [[OBJS|standard map objects]] but with one additional parameter for the animation file. [[GTA IV]] added a section ([[TANM]]) that supports time controlled objects linked to animations.
  
 
== Format ==
 
== Format ==
  
 
=== San Andreas ===
 
=== San Andreas ===
 +
{{Pre|
 +
anim
 +
Id, ModelName, TxdName, AnimationName, DrawDistance, Flags
 +
end
 +
}}
  
ID, ModelName, TextureName, AnimationName, ObjectCount, DrawDistance, [DrawDistance2, ...], Flags
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
+
! style="width: 3em;"| {{Icon|SA}}
{|{{Prettytable}} width="100%"
+
! style="width: 12em;"| Identifier
!width="250px"|Identifier
+
! style="width: 6em;" | Type
!Description
+
! Description
 
|-
 
|-
|<center>ID</center>||Unique object ID.
+
| A || Id || integer || Unique object ID.
 
|-
 
|-
|<center>ModelName</center>||Name of the <code>.dff</code> [[model file]] without extension.
+
| B || ModelName || string || Name of the <code>.dff</code> [[model file]] without extension.
 
|-
 
|-
|<center>TextureName</center>||Name of the <code>.txd</code> [[texture dictionary]] without extension.
+
| C || TxdName || string || Name of the <code>.txd</code> [[texture dictionary]] without extension.
 
|-
 
|-
|<center>AnimationName</center>||Name of the <code>.ifp</code> [[animation file]] without extension.
+
| D || AnimationName || string || Name of the <code>.ifp</code> [[animation file]] without extension.
 
|-
 
|-
|<center>ObjectCount</center>||Number of [[RenderWare_binary_stream_file|clumps]]. 1 by default and optional for ''San Andreas''.
+
| E || DrawDistance || float || [[Draw distance]] in [[unit]]s.
 
|-
 
|-
|<center>DrawDistance</center>||[[Draw distance]] in [[unit]]s (one for each clump).
+
| F || Flags || integer || [[Item Definition#IDE Flags|Object flags]]
|-
 
|<center>Flags</center>||Object flags (see [[ANIM#Object_Flags|below]]).
 
 
|}
 
|}
  
Note that animated files are still having an static [[COL|collision]]. This means that the collision get's not animated since it does not contain bone information for the animation. If you want to move objects you can do this using [[SCM|mission script]]. {{ref|1}}
+
Note that animated models still have static [[COL|collisions]]. This means that the collision do not animate with the model since it does not contain bone information for the animation. If you want to move objects, you can do this using the [[SCM|script]]. {{ref|1}}
  
 
=== GTA IV ===
 
=== GTA IV ===
 +
{{Pre|
 +
anim
 +
ModelName, TxdName, AnimationName, DrawDistance, Flag, unknown, MinX, MinY, MinZ, MaxX, MaxY, MaxZ, SphereX, SphereY, SphereZ, Radius, LODModel
 +
end
 +
}}
  
{{Incomplete}}
+
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
+
! style="width: 3em;"| {{Icon|4}}
== Object Flags ==
+
! style="width: 12em;"| Identifier
 
+
! style="width: 6em;" | Type
Flags are used to specify the behaviour of objects. They are signed 32-bit integer values where each bit descripes a [[wikipedia:Boolean_algebra_(logic)|boolean]] value of an special aspect.
+
! Description
 
 
{|{{Prettytable}} width="100%" class="collapsible"
 
!width="120px"|Flag
 
!width="100px"|Supported games
 
!width="25%"|Binary
 
!Description
 
|-
 
|<center>-1</center>||<center>&ndash;</center>||<center><code>1111 1111 1111 1111 1111 1111</code></center>||Enables all flags. {{ref|1}} Never used by default.
 
|-
 
|<center>1</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0001</code></center>||Wet effect (objects appear darker).
 
|-
 
|<center>2</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0010</code></center>||Indicates that the object gets rendered at night for objects defined in ''TOBJ''.
 
 
|-
 
|-
|<center>4</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 0100</code></center>||Alpha transparency 1
+
| A || ModelName || string || Name of the <code>[[WDR|.wdr]]</code> model file without extension.
 
|-
 
|-
|<center>8</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0000 1000</code></center>||Alpha transparency 2
+
| B || TxdName || string || Name of the <code>[[WTD|.wtd]]</code> texture dictionary without extension.
 
|-
 
|-
|<center>16</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0001 0000</code></center>||Opposite to flag '''2'''
+
| C || AnimationName || string || Name of the <code>[[WAD|.wad]]</code> animation file without extension.
 
|-
 
|-
|<center>32</center>||<center>{{Icon|3}} {{Icon|VC}} {{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0010 0000</code></center>||Indicates an object to be used inside an interior.
+
| D || DrawDistance || float || Draw distance in units.
 
|-
 
|-
|<center>64</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 0100 0000</code></center>||Disables the [[COLL#Shadow_Mesh|shadow mesh]] to project a shadow.
+
| E || Flag || integer || [[Item Definition#IDE Flags|Object flag]]
 
|-
 
|-
|<center>128</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0000 1000 0000</code></center>||Object surface will not be [[Wikipedia:Hidden_surface_determination|culled]].
+
| F || ''unknown'' || float || Unknown integer (0 by default).
 
|-
 
|-
|<center>256</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0001 0000 0000</code></center>||Disables draw distance (Only used for [[LOD]] objects with an ''LOD'' value greater than 299).
+
| G,H,I || MinX, MinY, MinZ || float[3] || Lower left corner of the bounding box for the object.
 
|-
 
|-
|<center>512</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0010 0000 0000</code></center>||Object is breakable (like glass &ndash; additional parameters defined inside the [[object.dat]] file, otherwise there is no effect).
+
| J,K,L || MaxX, MaxY, MaxZ || float[3] || Upper right corner of the bounding box for the object.
 
|-
 
|-
|<center>1024</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 0100 0000 0000</code></center>||Similar to flag '''512''': object first cracks on a strong collision, then it breaks (does also require ''object.dat'' registration).
+
| M,N,O || SphereX, SphereY, SphereZ || float[3] || Center of the bounding sphere for the object.
 
|-
 
|-
|<center>2048</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 0000 1000 0000 0000</code></center>||Indicates an object as an garage door (for more information see [[GRGE#Types_of_doors|GRGE]] &ndash; requires ''object.dat'' registration).
+
| P || Radius || float || Radius of the bounding sphere into all dimensions.
 
|-
 
|-
|<center>4096</center>||<center>{{Icon|SA}}</center>||<center><code>0000 0000 0001 0000 0000 0000</code></center>||Indicates an [[RenderWare_binary_stream_file|multiclump]] object (Object switches from clump ''2'' to clump ''1'' after collision &ndash; requires ''object.dat'' registration).
+
| Q || LODModel || string || Name of the <code>[[WDD|.wdd]]</code> file that contains the ''lod model'' for the defined modelname.
|-
 
|<center>32768</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0000 1000 0000 0000 0000</code></center>||Uses object brightness from the current weather definition (See [[timecyc.dat]] &ndash; ''PoleShd'').
 
|-
 
|<center>65536</center>||<center>{{Icon|SA}} {{Icon|4}}</center>||<center><code>0000 0001 0000 0000 0000 0000</code></center>||Object explodes after getting hit (requires ''object.dat'' registration).
 
|-
 
|<center>131072</center>||<center>{{Icon|SA}}</center>||<center><code>0000 0010 0000 0000 0000 0000</code></center>||Unknown &ndash; apparently some flag for the [[SCM|Script]].
 
|-
 
|<center>262144</center>||<center>{{Icon|SA}}</center>||<center><code>0000 0100 0000 0000 0000 0000</code></center>||Unknown &ndash; only used 1 time in [[GTA SA|San Andreas]].
 
|-
 
|<center>1048576</center>||<center>{{Icon|SA}}</center>||<center><code>0000 1000 0000 0000 0000 0000</code></center>||Object will switch from clump ''2'' to clump ''1'' after getting sprayed by the player (graffity flag).
 
|-
 
|<center>2097152</center>||<center>{{Icon|SA}}</center>||<center><code>0001 0000 0000 0000 0000 0000</code></center>||Disables backface culling &ndash; as an result the texture will be drawed on both sides of the model (Always enabled for GTA III and [[GTA VC|Vice City]])
 
|-
 
|<center>4194304</center>||<center>{{Icon|SA}}</center>||<center><code>0010 0000 0000 0000 0000 0000</code></center>||Unknown &ndash; apparently related into physics.
 
 
|}
 
|}
 +
 +
== Statistics ==
 +
Total number of ANIM entries in:
 +
:San Andreas: 54
 +
:GTA IV: 158
  
 
== References ==
 
== References ==

Latest revision as of 06:51, 31 May 2019

ANIM (IDE section)
Supported games:San Andreas GTA IV
Brief description:Used to define animated map objects
IDE Sections:
2DFX AMAT ANIM CARS HIER HAND MLO OBJS
PATH PEDS TANM TOBJ TREE TXDP WEAP

ANIM is a section in the item definition file in San Andreas and GTA IV. It is used to define standard map objects linked to an animation. Its format is almost exactly like standard map objects but with one additional parameter for the animation file. GTA IV added a section (TANM) that supports time controlled objects linked to animations.

Format

San Andreas

anim
Id, ModelName, TxdName, AnimationName, DrawDistance, Flags
end
San Andreas Identifier Type Description
A Id integer Unique object ID.
B ModelName string Name of the .dff model file without extension.
C TxdName string Name of the .txd texture dictionary without extension.
D AnimationName string Name of the .ifp animation file without extension.
E DrawDistance float Draw distance in units.
F Flags integer Object flags

Note that animated models still have static collisions. This means that the collision do not animate with the model since it does not contain bone information for the animation. If you want to move objects, you can do this using the script. [1]

GTA IV

anim
ModelName, TxdName, AnimationName, DrawDistance, Flag, unknown, MinX, MinY, MinZ, MaxX, MaxY, MaxZ, SphereX, SphereY, SphereZ, Radius, LODModel
end
GTA IV Identifier Type Description
A ModelName string Name of the .wdr model file without extension.
B TxdName string Name of the .wtd texture dictionary without extension.
C AnimationName string Name of the .wad animation file without extension.
D DrawDistance float Draw distance in units.
E Flag integer Object flag
F unknown float Unknown integer (0 by default).
G,H,I MinX, MinY, MinZ float[3] Lower left corner of the bounding box for the object.
J,K,L MaxX, MaxY, MaxZ float[3] Upper right corner of the bounding box for the object.
M,N,O SphereX, SphereY, SphereZ float[3] Center of the bounding sphere for the object.
P Radius float Radius of the bounding sphere into all dimensions.
Q LODModel string Name of the .wdd file that contains the lod model for the defined modelname.

Statistics

Total number of ANIM entries in:

San Andreas: 54
GTA IV: 158

References

See also