Difference between revisions of "2DFX"

From GTAMods Wiki
Jump to navigation Jump to search
(columns testing)
Line 23: Line 23:
 
| <center>E,F,G</center> || <center>R, G, B</center> || integer[3] || color of the light and everything associated with it in RGB format, also affects the intensity of the light so that darker the color the dimmer the light (meaning black (0,0,0) will yield a light so dim that it's not visible)
 
| <center>E,F,G</center> || <center>R, G, B</center> || integer[3] || color of the light and everything associated with it in RGB format, also affects the intensity of the light so that darker the color the dimmer the light (meaning black (0,0,0) will yield a light so dim that it's not visible)
 
|-
 
|-
| <center>H</center> || <center>Corona</center> || string || corona texture associated to the light, texture defined in <code>particle.txd</code>, usually "coronastar" for lights
+
| <center>H</center> || <center>''unknown''</center> || integer || usually 0 or 200
 
|-
 
|-
| <center>I</center> || <center>Shadow</center> || string || light texture that is cast on the ground, texture defined in <code>particle.txd</code>, usually "shad_exp" for lights
+
| <center>I</center> || <center>2DFX type</center> || integer || always 0 for lights
 
|-
 
|-
| <center>J</center> || <center>Distance</center> || integer || view distance of the light, is limited by the draw distance of the host object
+
| <center>J</center> || <center>Corona</center> || string || corona texture associated to the light, texture defined in <code>particle.txd</code>, usually "coronastar" for lights
 
|-
 
|-
| <center>K</center> || <center>Outer range</center> || float || the range the light can cast on objects, cars, and peds
+
| <center>K</center> || <center>Shadow</center> || string || light texture that is cast on the ground, texture defined in <code>particle.txd</code>, usually "shad_exp" for lights
 
|-
 
|-
| <center>L</center> || <center>Size</center> || float || the size of the corona, can be a float or integer, size 0 means no visible corona but effect of light still visible
+
| <center>L</center> || <center>Distance</center> || float || view distance of the light, is limited by the draw distance of the host object
 
|-
 
|-
| <center>M</center> || <center>Inner range</center> || float || the range the light can cast on the ground
+
| <center>M</center> || <center>Outer range</center> || float || the range the light can cast on objects, cars, and peds
 
|-
 
|-
| <center>N</center> || <center>IDE flag</center> || integer || [[OBJS#Object_Flags|IDE flag]], only the time-dependent flags are useable
+
| <center>N</center> || <center>Size</center> || float || the size of the corona, can be a float or integer, size 0 means no visible corona but effect of light still visible
 
|-
 
|-
| <center>O</center> || <center>Flash</center> || integer || sets the type of flashing ([[2DFX#Types of Flashes|see below]])
+
| <center>O</center> || <center>Inner range</center> || float || the range the light can cast on the ground
 
|-
 
|-
| <center>P</center> || <center>Wet</center> || integer || sets the particle to be "reflective" on wet grounds, will only work if the ground around the light is set to wet when raining<br>0 - not reflective when wet, 1 - reflective when wet
+
| <center>P</center> || <center>IDE flag</center> || integer || [[OBJS#Object_Flags|IDE flag]], only the time-dependent flags are useable
 
|-
 
|-
| <center>Q</center> || <center>Flare</center> || integer || sets the particle to create a lens flare on the screen, similar to what the sun does<br>0 - no lens flare, 1 - yellow lens flare, 2 - white lens flare
+
| <center>Q</center> || <center>Flash</center> || integer || sets the type of flashing ([[2DFX#Types of Flashes|see below]])
 
|-
 
|-
| <center>R</center> || <center>Dust</center> || integer || sets the intensity of light reflecting off dust, values 4 to 7 have visible effects
+
| <center>R</center> || <center>Wet</center> || integer || sets the particle to be "reflective" on wet grounds, will only work if the ground around the light is set to wet when raining<br>0 - not reflective when wet, 1 - reflective when wet
 +
|-
 +
| <center>S</center> || <center>Flare</center> || integer || sets the particle to create a lens flare on the screen, similar to what the sun does<br>0 - no lens flare, 1 - yellow lens flare, 2 - white lens flare
 +
|-
 +
| <center>T</center> || <center>Dust</center> || integer || sets the intensity of light reflecting off dust, values 4 to 7 have visible effects
 
|}
 
|}
  
Line 104: Line 108:
 
| <center>E,F,G</center> || <center>R, G, B</center> || integer[3] || useless values
 
| <center>E,F,G</center> || <center>R, G, B</center> || integer[3] || useless values
 
|-
 
|-
| <center>H</center> || <center>Particle</center> || integer || particle type ([[2DFX#Types of Particles|see below]])
+
| <center>H</center> || <center>''unknown''</center> || integer || usually 63 or 200
 
|-
 
|-
| <center>I,J,K</center> || <center>unk1, unk2, unk3</center> || float[3] || unknown, rotation of particle?
+
| <center>I</center> || <center>2DFX type</center> || integer || always 1 for particles
 
|-
 
|-
| <center>L</center> || <center>Size</center> || float || the size of the particle
+
| <center>J</center> || <center>Particle</center> || integer || particle type ([[2DFX#Types of Particles|see below]])
 +
|-
 +
| <center>K,L,M</center> || <center>unk1, unk2, unk3</center> || float[3] || unknown, rotation of particle?
 +
|-
 +
| <center>N</center> || <center>Size</center> || float || the size of the particle
 
|}
 
|}
  
Line 137: Line 145:
  
 
===Type 2===
 
===Type 2===
It is unknown what this type does. This type is only used in GTA III but can be used in Vice City.
+
It is unknown what this type does. This type was used in GTA III but should be usable in Vice City.
ID, X, Y, Z, R, G, B, unknown (63 or 200), 2, unk1, unk2, unk3, unk4, unk5
+
 
 +
{|{{Prettytable}} width="100%"
 +
! width="36px"| {{Icon|3}} {{Icon|VC}}
 +
! width="150px"| Identifier
 +
! width="100px"| Type
 +
! Description
 +
|-
 +
| <center>A</center> || <center>ID</center> || integer ||
 +
|-
 +
| <center>B,C,D</center> || <center>X, Y, Z</center> || float[3] ||
 +
|-
 +
| <center>E,F,G</center> || <center>R, G, B</center> || integer[3] ||
 +
|-
 +
| <center>H</center> || <center>''unknown''</center> || integer || usually 63 or 200
 +
|-
 +
| <center>I</center> || <center>2DFX type</center> || integer || always 2
 +
|-
 +
| <center>J</center> || <center>''unknown''</center> || integer ||
 +
|-
 +
| <center>K,L,M</center> || <center>''unknown''</center> || float[3] ||
 +
|-
 +
| <center>N</center> || <center>''unknown''</center> || integer ||
 +
|}
  
 +
==Vice City==
 
===Type 3: Peds===
 
===Type 3: Peds===
This can make a ped have simple behaviors around the object. This type is only available in Vice City.
+
This can make a ped have simple behaviors around the object.
ID, X, Y, Z, R, G, B, unknown (200), 3, Behavior, unk1, unk2, unk3, RotX, RotY, RotZ
 
  
 
{|{{Prettytable}} width="100%"
 
{|{{Prettytable}} width="100%"
!width="250px"|Identifier
+
! width="36px"| {{Icon|VC}}
!Description
+
! width="150px"| Identifier
 +
! width="100px"| Type
 +
! Description
 
|-
 
|-
|<center>ID</center>||associated to existing object ID defined in [[OBJS]] or [[TOBJ]] section
+
| <center>A</center> || <center>ID</center> || integer || associated to existing object ID defined in [[OBJS]] or [[TOBJ]] section
 +
|-
 +
| <center>B,C,D</center> || <center>X, Y, Z</center> || float[3] || X, Y, and Z coordinates relative to the center of the object
 +
|-
 +
| <center>E,F,G</center> || <center>R, G, B</center> || integer[3] || useless values
 
|-
 
|-
|<center>X, Y, Z</center>||X, Y, and Z coordinates relative to the center of the object
+
| <center>H</center> || <center>''unknown''</center> || integer || usually 0 or 200
 
|-
 
|-
|<center>R, G, B</center>||useless values
+
| <center>I</center> || <center>2DFX type</center> || integer || always 3 for peds
 
|-
 
|-
|<center>Behavior</center>||behavior type ([[2DFX#Types of Behaviors|see below]])
+
| <center>J</center> || <center>Behavior</center> || integer || behavior type ([[2DFX#Types of Behaviors|see below]])
 
|-
 
|-
|<center>unk1, unk2, unk3</center>||unknown, useless values?
+
| <center>K,L,M</center> || <center>unk1, unk2, unk3</center> || float[3] || unknown, useless values?
 
|-
 
|-
|<center>RotX, RotY, RotZ</center>||rotation of ped when animation is playing
+
| <center>N,O,P</center> || <center>RotX, RotY, RotZ</center> || float[3] || rotation of ped when animation is playing
 
|}
 
|}
  
 
====Types of Behaviors====
 
====Types of Behaviors====
{| border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; border: 1px #aaa solid; border-collapse: collapse;"
+
{| {{prettytable}}
 
| 0
 
| 0
 
| walks to the coordinates to use an ATM then walks away
 
| walks to the coordinates to use an ATM then walks away
Line 180: Line 216:
  
 
===Type 4: Sun Reflections===
 
===Type 4: Sun Reflections===
This can create a sun "reflection" exactly and behaving like the ones seen on cars. This type is only available in Vice City.
+
This can create a sun "reflection" exactly and behaving like the ones seen on cars.
ID, X, Y, Z, R, G, B, unknown (120), 4
 
  
 
{|{{Prettytable}} width="100%"
 
{|{{Prettytable}} width="100%"
!width="250px"|Identifier
+
! width="36px"| {{Icon|VC}}
!Description
+
! width="150px"| Identifier
 +
! width="100px"| Type
 +
! Description
 
|-
 
|-
|<center>ID</center>||associated to existing object ID defined in [[OBJS]] or [[TOBJ]] section
+
| <center>A</center> || <center>ID</center> || integer || associated to existing object ID defined in [[OBJS]] or [[TOBJ]] section
 +
|-
 +
| <center>B,C,D</center> || <center>X, Y, Z</center> || float[3] || X, Y, and Z coordinates relative to the center of the object
 +
|-
 +
| <center>E,F,G</center> || <center>R, G, B</center> || integer[3] || useless values
 
|-
 
|-
|<center>X, Y, Z</center>||X, Y, and Z coordinates relative to the center of the object
+
| <center>H</center> || <center>''unknown''</center> || integer || usually 120
 
|-
 
|-
|<center>R, G, B</center>||useless values
+
| <center>I</center> || <center>2DFX type</center> || integer || always 4 for sun reflections
 
|}
 
|}

Revision as of 23:32, 21 September 2010

This article describes the usage of the 2dfx section inside a plain text IDE. For the RW Section of models see 2DFX (RW Section), for the GTA IV IPL section see 2DFX (IPL Section).
2DFX (IDE section)
Supported games:GTA III, GTA VC
Brief description:Used to place 2D effects and ped behaviors on objects
IDE Sections:
2DFX AMAT ANIM CARS HIER HAND MLO OBJS
PATH PEDS TANM TOBJ TREE TXDP WEAP

2DFX is a section in the item definition file. It is used to place 2D effects (like lights and particles) and ped behaviors on objects. This section is somewhat unique compared to other sections because it needs to be attached to an existing object rather than defining itself. If too much effects are loaded or drawn in the game, some of the effects will load in and out or won't appear at all.

GTA III and Vice City

Type 0: Lights

This can create a complex light source on an object. If the object has a sub object, the light will disappear when the main object changes into the sub object (like when lampposts are knocked).

GTA III Vice City Identifier Type Description
A
ID
integer associated to existing object ID defined in OBJS or TOBJ section
B,C,D
X, Y, Z
float[3] X, Y, and Z coordinates relative to the center of the object
E,F,G
R, G, B
integer[3] color of the light and everything associated with it in RGB format, also affects the intensity of the light so that darker the color the dimmer the light (meaning black (0,0,0) will yield a light so dim that it's not visible)
H
unknown
integer usually 0 or 200
I
2DFX type
integer always 0 for lights
J
Corona
string corona texture associated to the light, texture defined in particle.txd, usually "coronastar" for lights
K
Shadow
string light texture that is cast on the ground, texture defined in particle.txd, usually "shad_exp" for lights
L
Distance
float view distance of the light, is limited by the draw distance of the host object
M
Outer range
float the range the light can cast on objects, cars, and peds
N
Size
float the size of the corona, can be a float or integer, size 0 means no visible corona but effect of light still visible
O
Inner range
float the range the light can cast on the ground
P
IDE flag
integer IDE flag, only the time-dependent flags are useable
Q
Flash
integer sets the type of flashing (see below)
R
Wet
integer sets the particle to be "reflective" on wet grounds, will only work if the ground around the light is set to wet when raining
0 - not reflective when wet, 1 - reflective when wet
S
Flare
integer sets the particle to create a lens flare on the screen, similar to what the sun does
0 - no lens flare, 1 - yellow lens flare, 2 - white lens flare
T
Dust
integer sets the intensity of light reflecting off dust, values 4 to 7 have visible effects

Types of Flashes

0 constantly lit all time
1 constantly lit at night
2 occasional flicker all time
3 occasional flicker at night
4 ~1 second flashes
5 ~1 second flashes at night
6 ~2 seconds flashes
7 ~2 seconds flashes at night
8 ~3 seconds flashes
9 ~3 seconds flashes at night
10 random flicker
11 random flicker at night
12 hardcoded traffic lights properties

Type 12 is involved in hardcoded properties of traffic lights. It is mainly used to position the lights on the traffic light. A traffic light without a 2DFX entry will crash the game when the traffic light is loading.

Type 1: Particles

This can create simple particles on an object

GTA III Vice City Identifier Type Description
A
ID
integer associated to existing object ID defined in OBJS or TOBJ section
B,C,D
X, Y, Z
float[3] X, Y, and Z coordinates relative to the center of the object
E,F,G
R, G, B
integer[3] useless values
H
unknown
integer usually 63 or 200
I
2DFX type
integer always 1 for particles
J
Particle
integer particle type (see below)
K,L,M
unk1, unk2, unk3
float[3] unknown, rotation of particle?
N
Size
float the size of the particle

Types of Particles

Ordered from 6 to 0 from left to right, all size is 1 with Tommy at the bottom for comparison
0 small white smoke
1 small white smoke
2 larger white smoke
3 fire (it doesn't burn)
4 black smoke
5 water fountain (Vice City only, will spray water droplets on the screen)
6 water spray (Vice City only, will spray water droplets on the screen)

Type 2

It is unknown what this type does. This type was used in GTA III but should be usable in Vice City.

GTA III Vice City Identifier Type Description
A
ID
integer
B,C,D
X, Y, Z
float[3]
E,F,G
R, G, B
integer[3]
H
unknown
integer usually 63 or 200
I
2DFX type
integer always 2
J
unknown
integer
K,L,M
unknown
float[3]
N
unknown
integer

Vice City

Type 3: Peds

This can make a ped have simple behaviors around the object.

Vice City Identifier Type Description
A
ID
integer associated to existing object ID defined in OBJS or TOBJ section
B,C,D
X, Y, Z
float[3] X, Y, and Z coordinates relative to the center of the object
E,F,G
R, G, B
integer[3] useless values
H
unknown
integer usually 0 or 200
I
2DFX type
integer always 3 for peds
J
Behavior
integer behavior type (see below)
K,L,M
unk1, unk2, unk3
float[3] unknown, useless values?
N,O,P
RotX, RotY, RotZ
float[3] rotation of ped when animation is playing

Types of Behaviors

0 walks to the coordinates to use an ATM then walks away
1 walks to the coordinates to sit down for a while then stand back up and walks away
2 walks to the coordinates to wait for a bus; additional peds will line up behind each other
3 walks to the coordinates, stands for a very short while, then leave (like window shopping)
4 unknown, used in game

Type 4: Sun Reflections

This can create a sun "reflection" exactly and behaving like the ones seen on cars.

Vice City Identifier Type Description
A
ID
integer associated to existing object ID defined in OBJS or TOBJ section
B,C,D
X, Y, Z
float[3] X, Y, and Z coordinates relative to the center of the object
E,F,G
R, G, B
integer[3] useless values
H
unknown
integer usually 120
I
2DFX type
integer always 4 for sun reflections