Difference between revisions of "2d Effect (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
(Entry Type 10 - Escalators)
m (Entry Type 10 - Escalators)
Line 73: Line 73:
  
 
===Entry Type 10 - Escalators===
 
===Entry Type 10 - Escalators===
[[Image:Escalator 3dsmax.jpg|thumb|250px|An Escalator in 3ds Max. The dummies stand for the position-info in the Section/Header.]]
 
  
 
This type defines escalators and has a size of 40 bytes.
 
This type defines escalators and has a size of 40 bytes.
Line 81: Line 80:
 
  12b - FLOAT[3] - escalator end (Z pos, matches top Z if escalator goes up, bottom Z if it goes down)
 
  12b - FLOAT[3] - escalator end (Z pos, matches top Z if escalator goes up, bottom Z if it goes down)
 
   4b - DWORD    - direction 0/1 (down/up)
 
   4b - DWORD    - direction 0/1 (down/up)
 +
 +
[[Image:Escalator 3dsmax.jpg|thumb|250px|An Escalator in 3ds Max. The dummies stand for the position-info in the Section/Header.]]
  
 
The normal position info of the header gets the same function of th estart-position in opposite to the end-position.
 
The normal position info of the header gets the same function of th estart-position in opposite to the end-position.
Line 86: Line 87:
 
Legend to the picture:
 
Legend to the picture:
  
Escalator_Standart_Position - Positioninfo from the Header
+
Escalator_Standart_Position - Positioninfo from the header<br>
Escalator_Bottom - Bottominfo from the section
+
Escalator_Bottom - Bottominfo from the section<br>
Escalator_Top - Topinfo from the section
+
Escalator_Top - Topinfo from the section<br>
Escalator_End - Endinfo from the section
+
Escalator_End - Endinfo from the section<br>
  
 
==Tools and Scripts==
 
==Tools and Scripts==

Revision as of 15:30, 23 May 2007

{{{NAME}}}
RenderWare Stream Section
Vendor {{{VENDORNAME}}}
Module {{{MODULENAME}}}
Module ID 0x{{{MODULEID}}}
Identifier 0x{{{IDENTIFIER}}}
Chunk ID 0x{{{MODULEID}}}{{{IDENTIFIER}}}
Versions All
Hierarchy
Parents:
None
Children:
None
Extensions:
None
File Format

2dfx is one of Rockstar's custom sections. In GTA San Andreas it is used to store particle and light effects, which were located in ide files in previous versions. The typical location in a SA dff section hierarchy is Clump > Geometry List > Geometry > Extension > 2dfx.

There can be multiple effects per section, their types are defined by an ID.

Header

A 2dfx section starts with a 4 byte DWORD which is the number of 2dfx entries that follow.

Entries

There is a common 20 byte header for 2dfx entries:

12 byte - FLOAT[3] - Position Vector (xyz)
 4 byte - DWORD    - Entry Type
 4 byte - DWORD    - Data Size

"Entry Type" defines the type of the 2dfx entry, and "Data Size" the number of bytes that follow the first 20, until the next entry starts.

Entry Type 0 - Light

This type defines lights and has a size of 80 bytes.

 4b - BYTE[4]  - RGBX, where X = 200d
 4b - FLOAT    - draw distance
 4b - FLOAT    - outer range
 4b - FLOAT    - size
 4b - FLOAT    - inner range
 5b - BYTE[5]  - parameters
24b - CHAR[24] - corona texture name
24b - CHAR[24] - shadow texture name
 3b - ?        - padding?
 4b - FLOAT    - unknown

For additional info see this post.

Entry Type 1 - Particle Effects

This type defines particle effects and has a size of 24 bytes.

24b - CHAR[24] - particle effect name

The particle effect name is an entry in effects.fxp.

Entry Type 3

Size is 56 bytes, apparently has to do with scripted objects (i.e. black jack cards).

Entry Type 6

unknown

Entry Type 7 - Street Signs

This type defines the texts that appear on street signs and has a size of 88 bytes.

 8b - FLOAT[2] - scale (xy)
12b - FLOAT[3] - rotation (xyz)
 2b - WORD     - possibly unused
64b - CHAR[64] - sign text, 16 byte per line
 2b - ?        - padding

The lines can start with arrows, such as <, ^ and >; also _ is used instead of a whitespace.

Entry Type 8

Size is 4 bytes, probably position & index of scripted objects (e.g. slot machine wheels).

Entry Type 9

Size is 12 bytes, used quite often and in large ammounts per file. Could be simple lights that use the default corona/shadow textures?

Entry Type 10 - Escalators

This type defines escalators and has a size of 40 bytes.

12b - FLOAT[3] - bottom of escalator (xyz)
12b - FLOAT[3] - top of escalator (xyz)
12b - FLOAT[3] - escalator end (Z pos, matches top Z if escalator goes up, bottom Z if it goes down)
 4b - DWORD    - direction 0/1 (down/up)
An Escalator in 3ds Max. The dummies stand for the position-info in the Section/Header.

The normal position info of the header gets the same function of th estart-position in opposite to the end-position. This got the effect that a Escalator looks like in the picture (Example: vgseesc01.dff). Legend to the picture:

Escalator_Standart_Position - Positioninfo from the header
Escalator_Bottom - Bottominfo from the section
Escalator_Top - Topinfo from the section
Escalator_End - Endinfo from the section

Tools and Scripts