Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
guard3

Vice City Stories GAME.DTZ

Recommended Posts

guard3

hello.png :)

 

VCS mobile is nowhere to be found and most of the game's resources are not easily accessible. In this thread we can discuss about the format of GAME.DTZ of VCS. Don't forget to visit gtamodding.com for more complete and more updated info :p

 

To extract resources, you can use my tool: g3DTZ 😛 

Special thanks to @Ash_735, @cj2000, @Surya926 and @The Hero


Relocatable chunk header (needs more info):

0x0	4b	GTAG	GAME.DTZ Signature
0x4	4b	1	?
0x8	4b	6495D0	size of decompressed GAME.DAT (6.591.952 bytes)
0xC	4b	5A69B0	?
0x10	4b	5B5290	offset to global table of offsets
0x14	4b	250D0	number of offsets in global table (151.760)
0x18	4b	5A69B0	same as 0xC
0x1C	2b	3A22	?
0x1E	2b	16	?

Data:

0x20	4b	346570	offset to Paths (IPL info)
0x24	4b	4C9860	offset to Buildings (IPL info)
0x28	4b	4C9880	offset to Treadables (IPL info)
0x2C	4b	4C9820	offset to Dummys (IPL info)
0x30	4b	4C9840	offset to EntryInfoNode (IPL info)
0x34	4b	4C9900	offset to PtrNode (IPL info)
0x38	4b	1F05	number of offsets in IDE table (7.941)
0x3C	4b	3B64C8	offset to IDE offset table
0x40	4b	345E14	offset to car class table 1
0x44	4b	4C81B8	offset to car class table 2
0x48	4b	4CBEB0	offset to GTA3.ZON
0x4C	4b	3F6E90	?
0x50	4b	4C98F0	?
0x54	4b	2AE	number of 2dfx IDs
0x58	4b	52D260	offset to 2dfx data
0x5C	4b	33B800	?
0x60	4b	4CAA90	offset to Texlist
0x64	4b	0	?
0x68	4b	40964C	offset to col2 files item info
0x6C	4b	0	?
0x70	4b	174D20	offset to empty collision
0x74	4b	452480	offset to OBJECT.DAT
0x78	4b	4CB3F8	?
0x7C	4b	4AE0F0	offset to GTA3PS2.DIR
0x80	4b	185890	offset to animation data
0x84	4b	3EA9F0	offset to FISTFITE.DAT
0x88	4b	4CB7C8	offset to PED.DAT offset table
0x8C	4b	4CC250	offset to PEDSTATS.DAT offset table
0x90	4b	174F00	offset to colour data
0x94	4b	176AB0	?
0x98	4b	277	number of CULL.IPL lines
0x9C	4b	3436A4	offset to CULL.IPL
0xA0	4b	0	number of OCCLU.IPL lines
0xA4	4b	0	offset to OCCLU.IPL
0xA8	4b	419170	offset to WATERPRO.DAT
0xAC	4b	185690	offset to weather types table
0xB0	4b	4CBB50	offset to SURFACE.DAT
0xB4	4b	5931E0	offset to TIMECYC.DAT
0xB8	4b	3EF590	offset to PEDGRP.DAT
0xBC	4b	3B3660	offset to PARTICLE.CFG
0xC0	4b	3828B4	offset to WEAPON.DAT
0xC4	4b	0	?
0xC8	4b	3B2DBC	offset to models offset table
0xCC	4b	5929F0	offset to MOCAPPS2.DIR
0xD0	4b	7FFEB90	?
0xD4	4b	0	?
0xD8	4b	3F2F28	?
0xDC	4b	0	offset to SFX.SDT (unused in PS2 version)
0xE0	4b	581330	offset to zlib/deflate compressed MENU.XTX
0xE4	4b	4CB7A0	?
0xE8	4b	4C6714	?
0xEC	4b	3F0750	?
0xF0	4b	8	?
0xF4	4b	4CB0C0	offset to font data
0xF8	4b	28718	size of decompressed FSFONTS.XTX (165.656 bytes)
0xFC	4b	57BE4C	offset to zlib/deflate compressed FSFONTS.XTX
0x100	4b	592664	offset to radar textures offset table

2DFX Data

 

 

Download

GTA VCS has 686 2dfx data lines, each one being given an ID starting from 0, all the way to 685.

[table]

SizeTypeData

 

4bfloatCoordinate-X (relative to the centre of the object)

 

4bfloatCoordinate-Y (relative to the centre of the object)

 

4bfloatCoordinate-Z (relative to the centre of the object)

 

4bfloatCoordinate-W (relative to the centre of the object)

 

1bintColour-R

 

1bintColour-G

 

1bintColour-B

 

1bintUnknown (like in VC)

 

4bint2dfx Type

 

Type 0

 

SizeTypeData

 

4bfloatView Distance

 

4bfloatOuter Range

 

4bfloatSize

 

4bfloatInner Range

 

1bintFlash

 

1bintWet

 

1bintFlare

 

1bintShadow Intensity

 

4bintFlags

 

4bintOffset to corona texture

 

4bintOffset to shadow texture

 

8b-Padding

 

Type 1

 

SizeTypeData

 

4bintParticle Type

 

4bfloatStrength-X

 

4bfloatStrength-Y

 

4bfloatStrength-Z

 

4bfloatScale

 

20b-Padding

 

Type 3

 

SizeTypeData

 

4bfloatRotation-X

 

4bfloatRotation-Y

 

4bfloatRotation-Z

 

4bfloatRotation-X (again)

 

4bfloatRotation-Y (again)

 

4bfloatRotation-Z (again)

 

4bintBehaviour

 

12b-Padding[/table]

 

 

 


Color Data (Used by both peds and cars)

 

 

Download

[table]

SizeTypeData

 

1bintegerColour-R

 

1bintegerColour-G

 

1bintegerColour-B[/table]

 

 

 


CULL.IPL

 

 

Aqcuired from gtamodding.ru

Download

[table]

SizeTypeData

 

2bintegerLower X Coordinate

 

2bintegerUpper X Coordinate

 

2bintegerLower Y Coordinate

 

2bintegerUpper Y Coordinate

 

2bintegerLower Z Coordinate

 

2bintegerUpper Z Coordinate

 

2bintegerAttribute

 

2bintegerWanted Level Drop[/table]

 

 

 


PARTICLE.CFG

 

 

 

 

 

 

 

 

 

Grand Theft Auto Vice City Stories PARTICLE.CFG documentation by guard3Letters correspond to Vice City PARTICLE.CFG-	ID				LE	integer		4 bytesA	Name				BE	character	20 bytesCR	Create Range			LE	float		4 bytesE	Default Initial Radius		LE	float		4 bytesF	Expansion Rate		        LE	float		4 bytesH	Fade Time			LE 	integer		2 bytesG	Initial Intensity		LE	integer		2 bytesI	Fade Amount			LE	integer		2 bytesGA	Initial Intensity		LE 	integer		2 bytesHA	Fade Time			LE 	integer		2 bytesIA	Fade Amount			LE	integer		2 bytesK	Start Animation Frame	        -	integer		1 byteL	Final Anim Frame		-	integer		1 byteJ	Anim Speed			-	integer		1 byte-	-				-	-		1 byteM	Rotation Speed		        LE	integer		4 bytesN	Gravitatioan Acceleration	LE	float		4 bytesO	Friction Decceleration		LE	integer		4 bytesP	Default Life Span		LE	integer		4 bytesQ	Position Random Error	        LE	float		4 bytesR	Velocity Random Error	        LE	float		4 bytesS	Expansion Rate Error		LE	float		4 bytesT	Rotation Rate Error		LE	integer		4 bytesU	Life Soan Error Shape		LE	integer		4 bytesV	Trail Length Multiplier	        LE	float		4 bytesZ	Flags				LE	integer		4 bytesB	Render Coloring R		-	integer		1 byteC	Render Coloring G		-	integer		1 byteD	Render Coloring B		-	integer		1 byte-	-				-	-		1 byteCV	Initial Color Variation		LE	integer		4 bytesB2	Fade Destination Color R	-	integer		1 byteC2	Fade Destination Color G	-	integer		1 byteD2	Fade Destination Color B	-	integer		1 byte-	-				-	-		1 byteFT	Color Fade Time		        LE	integer		4 bytesWX	x-axis Stretch Value		LE	float		4 bytesWY	y-axis Stretch Value		LE	float		4 bytesWI	Wind Factor			LE	float		4 bytes?	?				LE	?		4 bytes?	?				LE	?		4 bytes

 

 


TIMECYC.DAT

 

 

Provided by The Hero: http://aap.papnet.eu...timecyc_vcs.dat

 

struct CVuVector{	float x, y, z, w;};struct CTimeCycle{	CVuVector m_VectorToSun[16];	float m_fShadowFrontX[16];	float m_fShadowFrontY[16];	float m_fShadowSideX[16];	float m_fShadowSideY[16];	float m_fShadowDisplacementX[16];	float m_fShadowDisplacementY[16];	uchar m_nAmbientRed[192];	uchar m_nAmbientGreen[192];	uchar m_nAmbientBlue[192];	uchar m_nAmbientRed_Obj[192];	uchar m_nAmbientGreen_Obj[192];	uchar m_nAmbientBlue_Obj[192];	uchar m_nAmbientRed_Bl[192];	uchar m_nAmbientGreen_Bl[192];	uchar m_nAmbientBlue_Bl[192];	uchar m_nAmbientRed_Obj_Bl[192];	uchar m_nAmbientGreen_Obj_Bl[192];	uchar m_nAmbientBlue_Obj_Bl[192];	uchar m_nDirectionalRed[192];	uchar m_nDirectionalGreen[192];	uchar m_nDirectionalBlue[192];	uchar m_nSkyTopRed[192];	uchar m_nSkyTopGreen[192];	uchar m_nSkyTopBlue[192];	uchar m_nSkyBottomRed[192];	uchar m_nSkyBottomGreen[192];	uchar m_nSkyBottomBlue[192];	uchar m_nSunCoreRed[192];	uchar m_nSunCoreGreen[192];	uchar m_nSunCoreBlue[192];	uchar m_nSunCoronaRed[192];	uchar m_nSunCoronaGreen[192];	uchar m_nSunCoronaBlue[192];	uchar m_fSunSize[192];                   // *10.0; schar in VC	uchar m_fSpriteSize[192];                // *10.0; schar in VC	uchar m_fSpriteBrightness[192];          // *10.0; schar in VC	uchar m_nShadowStrength[192];	uchar m_nLightShadowStrength[192];	uchar m_nPoleShadowStrength[192];	short m_fFarClip[192];	short m_fFogStart[192];	uchar m_radiosityIntensity[192];         // VCS specific	uchar m_radiosityLimit[192];             // VCS specific	uchar m_fLightsOnGroundBrightness[192];  // *10.0	uchar m_nLowCloudsRed[192];	uchar m_nLowCloudsGreen[192];	uchar m_nLowCloudsBlue[192];	uchar m_nFluffyCloudsTopRed[192];	uchar m_nFluffyCloudsTopGreen[192];	uchar m_nFluffyCloudsTopBlue[192];	uchar m_nFluffyCloudsBottomRed[192];	uchar m_nFluffyCloudsBottomGreen[192];	uchar m_nFluffyCloudsBottomBlue[192];	uchar m_fBlurRed[192];	uchar m_fBlurGreen[192];	uchar m_fBlurBlue[192];	uchar m_fWaterRed[192];	uchar m_fWaterGreen[192];	uchar m_fWaterBlue[192];	uchar m_fWaterAlpha[192];	float m_blurAlpha[192];                  // VCS specific	float m_blurOffset[192];                 // VCS specific	float m_fCurrentAmbientRed;	float m_fCurrentAmbientGreen;	float m_fCurrentAmbientBlue;	float m_fCurrentAmbientRed_Obj;	float m_fCurrentAmbientGreen_Obj;	float m_fCurrentAmbientBlue_Obj;	float m_fCurrentAmbientRed_Bl;	float m_fCurrentAmbientGreen_Bl;	float m_fCurrentAmbientBlue_Bl;	float m_fCurrentAmbientRed_Obj_Bl;	float m_fCurrentAmbientGreen_Obj_Bl;	float m_fCurrentAmbientBlue_Obj_Bl;	float m_fCurrentDirectionalRed;	float m_fCurrentDirectionalGreen;	float m_fCurrentDirectionalBlue;	float m_nCurrentSkyTopRed;	float m_nCurrentSkyTopGreen;	float m_nCurrentSkyTopBlue;	float m_nCurrentSkyBottomRed;	float m_nCurrentSkyBottomGreen;	float m_nCurrentSkyBottomBlue;	float m_nCurrentFogColourRed;	float m_nCurrentFogColourGreen;	float m_nCurrentFogColourBlue;	float m_nCurrentSunCoreRed;	float m_nCurrentSunCoreGreen;	float m_nCurrentSunCoreBlue;	float m_nCurrentSunCoronaRed;	float m_nCurrentSunCoronaGreen;	float m_nCurrentSunCoronaBlue;	float m_fCurrentSunSize;	float m_fCurrentSpriteSize;	float m_fCurrentSpriteBrightness;	short m_nCurrentShadowStrength;	short m_nCurrentLightShadowStrength;	short m_nCurrentPoleShadowStrength;	float m_fCurrentFarClip;	float m_fCurrentFogStart;	float m_currentRadiosityIntensity;	float m_currentRadiosityLimit;	float m_fCurrentLightsOnGroundBrightness;	float m_nCurrentLowCloudsRed;	float m_nCurrentLowCloudsGreen;	float m_nCurrentLowCloudsBlue;	float m_nCurrentFluffyCloudsTopRed;	float m_nCurrentFluffyCloudsTopGreen;	float m_nCurrentFluffyCloudsTopBlue;	float m_nCurrentFluffyCloudsBottomRed;	float m_nCurrentFluffyCloudsBottomGreen;	float m_nCurrentFluffyCloudsBottomBlue;	float m_fCurrentBlurRed;	float m_fCurrentBlurGreen;	float m_fCurrentBlurBlue;	float m_fCurrentWaterRed;	float m_fCurrentWaterGreen;	float m_fCurrentWaterBlue;	float m_fCurrentWaterAlpha;	float m_currentBlurAlpha;	float m_currentBlurOffset;	int m_CurrentStoredValue;	int m_FogReduction;	int m_ExtraColour;	int m_bExtraColourOn;	float m_ExtraColourInter;	int field_337C;};CTimeCycle *pTimeCycle; // at 0x486B38 in SLES_546.22; loaded by the game starting at instruction 0x332688

 

 


PEDSTATS.DAT

 

 

 

Download documentation, values and a .dat (set memory address 0x53027F to 0x2A) from here.

 

Grand Theft Auto Vice City Stories PEDSTATS.DAT Documentation by guard3-cj20000x4CC250 is a table (B0, or 176 bytes). It's composed of 42 4-byte values,each representing an offset that corresponds to a line of PEDSTATS.DATEach line is 34 (52 bytes) in size and is defined like so:-	ID			LE	integer		4 bytesB	Flee Distance		LE	float		4 bytesC	Heading Change Rate	LE	float		4 bytesH	Attack Strength   	LE	float		4 bytesI	Defend Weekness 	LE	float		4 bytesJ	Flags			-	integer		1 byte-	-			-	integer		1 byteD	Fear			-	integer		1 byteE	Temper		        -	integer		1 byteF	Lawfulness		-	integer		1 byteG	Sexiness		-	integer		1 byteA	Name			BE	character	26 bytes

 

Edited by guard3
more info added

Share this post


Link to post
Share on other sites
The Hero

Timecycle starts at 0x593460

Share this post


Link to post
Share on other sites
guard3

Thank you very much! Do you also happen to know about the data before it? it has a float 0.0001 21 times!

Edited by guard3

Share this post


Link to post
Share on other sites
The Hero

No. I haven't looked at this file until today. At 0xAC there is the offset to weather types list (0x185690) with 256 2 byte entries.

Share this post


Link to post
Share on other sites
guard3

Thanks again, though I'd assume they are 254 (4 bytes at the end are blank, like placeholders). If you know anything else, anyone, feel free to post.

 

*UPDATED*

Edited by guard3

Share this post


Link to post
Share on other sites
The Hero

Timecycle defintion:

 

 

struct CVuVector{	float x, y, z, w;};struct CTimeCycle{	CVuVector m_VectorToSun[16];	float m_fShadowFrontX[16];	float m_fShadowFrontY[16];	float m_fShadowSideX[16];	float m_fShadowSideY[16];	float m_fShadowDisplacementX[16];	float m_fShadowDisplacementY[16];	uchar m_nAmbientRed[192];	uchar m_nAmbientGreen[192];	uchar m_nAmbientBlue[192];	uchar m_nAmbientRed_Obj[192];	uchar m_nAmbientGreen_Obj[192];	uchar m_nAmbientBlue_Obj[192];	uchar m_nAmbientRed_Bl[192];	uchar m_nAmbientGreen_Bl[192];	uchar m_nAmbientBlue_Bl[192];	uchar m_nAmbientRed_Obj_Bl[192];	uchar m_nAmbientGreen_Obj_Bl[192];	uchar m_nAmbientBlue_Obj_Bl[192];	uchar m_nDirectionalRed[192];	uchar m_nDirectionalGreen[192];	uchar m_nDirectionalBlue[192];	uchar m_nSkyTopRed[192];	uchar m_nSkyTopGreen[192];	uchar m_nSkyTopBlue[192];	uchar m_nSkyBottomRed[192];	uchar m_nSkyBottomGreen[192];	uchar m_nSkyBottomBlue[192];	uchar m_nSunCoreRed[192];	uchar m_nSunCoreGreen[192];	uchar m_nSunCoreBlue[192];	uchar m_nSunCoronaRed[192];	uchar m_nSunCoronaGreen[192];	uchar m_nSunCoronaBlue[192];	uchar m_fSunSize[192];                   // *10.0; schar in VC	uchar m_fSpriteSize[192];                // *10.0; schar in VC	uchar m_fSpriteBrightness[192];          // *10.0; schar in VC	uchar m_nShadowStrength[192];	uchar m_nLightShadowStrength[192];	uchar m_nPoleShadowStrength[192];	short m_fFarClip[192];	short m_fFogStart[192];	uchar m_radiosityIntensity[192];         // VCS specific	uchar m_radiosityLimit[192];             // VCS specific	uchar m_fLightsOnGroundBrightness[192];  // *10.0	uchar m_nLowCloudsRed[192];	uchar m_nLowCloudsGreen[192];	uchar m_nLowCloudsBlue[192];	uchar m_nFluffyCloudsTopRed[192];	uchar m_nFluffyCloudsTopGreen[192];	uchar m_nFluffyCloudsTopBlue[192];	uchar m_nFluffyCloudsBottomRed[192];	uchar m_nFluffyCloudsBottomGreen[192];	uchar m_nFluffyCloudsBottomBlue[192];	uchar m_fBlurRed[192];	uchar m_fBlurGreen[192];	uchar m_fBlurBlue[192];	uchar m_fWaterRed[192];	uchar m_fWaterGreen[192];	uchar m_fWaterBlue[192];	uchar m_fWaterAlpha[192];	float m_blurAlpha[192];                  // VCS specific	float m_blurOffset[192];                 // VCS specific	float m_fCurrentAmbientRed;	float m_fCurrentAmbientGreen;	float m_fCurrentAmbientBlue;	float m_fCurrentAmbientRed_Obj;	float m_fCurrentAmbientGreen_Obj;	float m_fCurrentAmbientBlue_Obj;	float m_fCurrentAmbientRed_Bl;	float m_fCurrentAmbientGreen_Bl;	float m_fCurrentAmbientBlue_Bl;	float m_fCurrentAmbientRed_Obj_Bl;	float m_fCurrentAmbientGreen_Obj_Bl;	float m_fCurrentAmbientBlue_Obj_Bl;	float m_fCurrentDirectionalRed;	float m_fCurrentDirectionalGreen;	float m_fCurrentDirectionalBlue;	float m_nCurrentSkyTopRed;	float m_nCurrentSkyTopGreen;	float m_nCurrentSkyTopBlue;	float m_nCurrentSkyBottomRed;	float m_nCurrentSkyBottomGreen;	float m_nCurrentSkyBottomBlue;	float m_nCurrentFogColourRed;	float m_nCurrentFogColourGreen;	float m_nCurrentFogColourBlue;	float m_nCurrentSunCoreRed;	float m_nCurrentSunCoreGreen;	float m_nCurrentSunCoreBlue;	float m_nCurrentSunCoronaRed;	float m_nCurrentSunCoronaGreen;	float m_nCurrentSunCoronaBlue;	float m_fCurrentSunSize;	float m_fCurrentSpriteSize;	float m_fCurrentSpriteBrightness;	short m_nCurrentShadowStrength;	short m_nCurrentLightShadowStrength;	short m_nCurrentPoleShadowStrength;	float m_fCurrentFarClip;	float m_fCurrentFogStart;	float m_currentRadiosityIntensity;	float m_currentRadiosityLimit;	float m_fCurrentLightsOnGroundBrightness;	float m_nCurrentLowCloudsRed;	float m_nCurrentLowCloudsGreen;	float m_nCurrentLowCloudsBlue;	float m_nCurrentFluffyCloudsTopRed;	float m_nCurrentFluffyCloudsTopGreen;	float m_nCurrentFluffyCloudsTopBlue;	float m_nCurrentFluffyCloudsBottomRed;	float m_nCurrentFluffyCloudsBottomGreen;	float m_nCurrentFluffyCloudsBottomBlue;	float m_fCurrentBlurRed;	float m_fCurrentBlurGreen;	float m_fCurrentBlurBlue;	float m_fCurrentWaterRed;	float m_fCurrentWaterGreen;	float m_fCurrentWaterBlue;	float m_fCurrentWaterAlpha;	float m_currentBlurAlpha;	float m_currentBlurOffset;	int m_CurrentStoredValue;	int m_FogReduction;	int m_ExtraColour;	int m_bExtraColourOn;	float m_ExtraColourInter;	int field_337C;};CTimeCycle *pTimeCycle; // at 0x486B38 in SLES_546.22; loaded by the game starting at instruction 0x332688
Haven't figured out the four unknown values yet, but they all are used for drawing the colour filter (which is the reason I'm reversing this in the first place)

EDIT: updated. radiosity limit is the value above which a color is considered a highlight. radiosity intensity is a multiplier after half the limit has been subtracted from the frame buffer. blur alpha (internally multiplied by 0.8) is the strength of the blur effect, blur offset is the pixel offset (the current frame is blended three times for the blur effect, at offset,0; 0,offset, offset,offset)

Edited by The Hero

Share this post


Link to post
Share on other sites
guard3

That's helpful for converting it to pc format. I plan to upload the extracted files for convenience, so thanks again :)

Share this post


Link to post
Share on other sites
guard3

This post was "about" 2dfx. Scroll down a bit for complete info ;)

Edited by guard3

Share this post


Link to post
Share on other sites
The Hero

Updated previously unknown timecycle values in the post above.

Share this post


Link to post
Share on other sites
guard3
Grand Theft Auto Vice City Stories PARTICLE.BIN documentation by guard3
Letters correspond to Vice City PARTICLE.CFG
-	ID				LE	integer		4 bytes
A	Name				BE	character	20 bytes
CR	Create Range			LE	float		4 bytes
E	Default Initial Radius		LE	float		4 bytes
F	Expansion Rate		        LE	float		4 bytes
H	Fade Time			LE 	integer		2 bytes
G	Initial Intensity		LE	integer		2 bytes
I	Fade Amount			LE	integer		2 bytes
GA	Initial Intensity		LE 	integer		2 bytes
HA	Fade Time			LE 	integer		2 bytes
IA	Fade Amount			LE	integer		2 bytes
K	Start Animation Frame	        -	integer		1 byte
L	Final Anim Frame		-	integer		1 byte
J	Anim Speed			-	integer		1 byte
-	-				-	-		1 byte
M	Rotation Speed		        LE	integer		4 bytes
N	Gravitational Acceleration	LE	float		4 bytes
O	Friction Decceleration		LE	integer		4 bytes
P	Default Life Span		LE	integer		4 bytes
Q	Position Random Error	        LE	float		4 bytes
R	Velocity Random Error	        LE	float		4 bytes
S	Expansion Rate Error		LE	float		4 bytes
T	Rotation Rate Error		LE	integer		4 bytes
U	Life Soan Error Shape		LE	integer		4 bytes
V	Trail Length Multiplier	        LE	float		4 bytes
Z	Flags				LE	integer		4 bytes
B	Render Coloring R		-	integer		1 byte
C	Render Coloring G		-	integer		1 byte
D	Render Coloring B		-	integer		1 byte
-	-				-	-		1 byte
CV	Initial Color Variation		LE	integer		4 bytes
B2	Fade Destination Color R	-	integer		1 byte
C2	Fade Destination Color G	-	integer		1 byte
D2	Fade Destination Color B	-	integer		1 byte
-	-				-	-		1 byte
FT	Color Fade Time		        LE	integer		4 bytes
WX	x-axis Stretch Value		LE	float		4 bytes
WY	y-axis Stretch Value		LE	float		4 bytes
WI	Wind Factor			LE	float		4 bytes
?	?				LE	?		4 bytes
?	?				LE	?		4 bytes 

VCS has 90 different particle entries. The values are very similar to Vice City's ones. However, the CR seems to be to the second power, compared to Vice City (ex VC:20.0 -> VCS 400.0) I have no idea what the last 8 bytes are.

Edited by guard3

Share this post


Link to post
Share on other sites
guard3

Nice one! I talked with cj2000 and I have some explanation about the header, though I really haven't checked those myself, so I haven't updated those...

That relocatable chunk really is a big thing :p

 

He has also made a pdf with stuff about mdl. I don't know if you've taken a look at it, but it could be useful

 

Share this post


Link to post
Share on other sites
The Hero

I've seen it. Not too useful although I noticed he had the different modelinfo types that I only recently figured out. Well whatever.

Share this post


Link to post
Share on other sites
The Hero

For reference here the structure of an android LCS game.dtz. I know the game doesn't use it but the code that would load it is still there. All the values are simply copied to the variable on the right (except the timecycle data is memcpy'ed to a statically allocated region). I have made no effort comparing this to the PS2 games yet, but they don't seem to match 100%. (EDIT: judging by http://gtamodding.ru/wiki/DTZit looks like the PS2 version is only missing the unused value at 0xB4).

 

 

0x00	gpThePaths0x04	CPools::ms_pBuildingPool0x08	CPools::ms_pTreadablePool0x0C	CPools::ms_pDummyPool0x10	CPools::ms_pEntryInfoNodePool0x14	CPools::ms_pPtrNodePool0x18	CModelInfo::msNumModelInfos0x1C	CModelInfo::ms_modelInfoPtrs0x20	CCarCtrl::CarArrays0x24	CCarCtrl::TotalNumOfCarsOfRating0x28	gpTheZones0x2C	CWorld::ms_aSectors0x30	CWorld::ms_bigBuildingsList0x34	ms_2dEffectStore0x38	gp2dEffects0x3C	gpModelIndices0x40	CTexListStore::ms_pTexListPool0x44	CTexListStore::ms_pStoredTexList0x48	CColStore::ms_pColPool0x4C	CColStore::m_onlyBB0x50	gpTempColModels0x54	CObjectData::ms_aObjectInfo0x58	CVehicleModelInfo::mspInfo0x5C	CStreaming::mspInst0x60	CAnimManager::mspInst0x64	tFightMoves0x68	PedAnimInfo0x6C	CPedType::ms_apPedType0x70	CPedStats::ms_apPedStats0x74	CCullZones::NumAttributeZones0x78	CCullZones::aAttributeZones0x7C	COcclusion::NumOccludersOnMap0x80	COcclusion::aOccluders0x84	CWaterLevel::mspInst0x88	pmod_HandlingManager0x8C	CSurfaceTable::ms_aAdhesiveLimitTable0x90	pTimeCycle (memcpy)0x94	CPopulation::ms_pPedGroups0x98	mod_ParticleSystemManager0x9C	gpWeaponTables0xA0	C3dMarkers::m_pRslElementGroupArray0xA4	CCutsceneMgr::ms_pCutsceneDir0xA8	CFerry::mspInst0xAC	CTrain::mspInst0xB0	CPlane::mspInst0xB4	unused?0xB8	CMenuManager::mpCompressedTextures0xBC	CFont::msTexListSize0xC0	CFont::mspCompressedTexList
EDIT:

 

0x0000C8 (4): LE value=3B2DBC  ?

 

That's C3dMarkers::m_pRslElementGroupArray Edited by The Hero

Share this post


Link to post
Share on other sites
guard3

Waaait... Android has a dtz? Where's that code?

Share this post


Link to post
Share on other sites
The Hero

Well, it has no dtz, but it *could* load one. See LoadResourceImage

 

 

 

 

  gResourceMem = base::cMemoryManager::Allocate(v0, 0x5DC000u);  v1 = (char *)gResourceMem;  if ( gUseChunkFiles && !gSecondExportPass )  {    v51 = (cUmdFile *)UmdOpen("CHK/PS2/GAME.DTZ");    v52 = UmdLength(v51) + 15;    v53 = UmdLength(v51);    v54 = &v1[6144000 - (v52 & 0xFFFFFFF0)];    UmdRead(v51, v54, v53);    UmdClose(v51);    Inflate(v1, v54, 0x5DC000u);  }  else  {    v2 = (cUmdFile *)UmdOpen("CHK/PS2/GAME.DAT");    v3 = v2;    v4 = UmdLength(v2);    UmdRead(v3, v1, v4);    UmdClose(v3);  }  v55.shrink = 1;  v55.ident = 'GTAG';  result = (ResourceImage *)base::cRelocatableChunk::Load(&v55, v1, 1);  v6 = result;  v56 = result;  if ( result )  {    v7 = result->buildingPool;    gpThePaths = result->thePaths;    v8 = result->treadablePool;    CPools::ms_pBuildingPool = v7;    v9 = (_DWORD *)v6->dummyPool;    CPools::ms_pTreadablePool = v8;    v10 = v6->entryInfoNodePool;    CPools::ms_pDummyPool = v9;    v11 = v6->ptrNodePool;    CPools::ms_pEntryInfoNodePool = v10;    v12 = v6->CarArrays;    CPools::ms_pPtrNodePool = v11;    v13 = v6->TotalNumOfCarsOfRating;    CCarCtrl::CarArrays = v12;    v14 = v6->theZones;    CCarCtrl::TotalNumOfCarsOfRating = v13;    v15 = (void *)v6->sectors;    gpTheZones = v14;    v16 = (void *)v6->bigBuildingList;    v17 = v6->_2deffectstore;    CWorld::ms_aSectors = v15;    v18 = v6->_2deffects;    CWorld::ms_bigBuildingsList = v16;    CModelInfo::Load2dEffects(v17, v18);    v19 = v6->storedTexList;    v20 = v6->texlistPool;    gpModelIndices = v6->modelIndices;    CTexListStore::Load(v19, v20);    v21 = (_DWORD *)v6->colPool;    v22 = v6->colOnlyBB;    gpTempColModels = v6->tempColModels;    CColStore::Load(v22, v21);    v23 = v6->vehicleModelInfo;    CObjectData::ms_aObjectInfo = v6->objectInfo;    CVehicleModelInfo::Load(v23, v24);    CAnimManager::Initialise(v6->animManagerInst, v25);    if ( !gbLoadResourceForMemoryCard[0] )      CStreaming::Init((CStreaming *)v6->streamingInst, v26);    CPed::LoadFightData((CPed *)v6->fightMoves, v26);    CPed::SetAnimOffsetForEnterOrExitVehicle(v6->pedAnimInfo, v27);    CPedType::Initialise(v6->pedType, v28);    CPedStats::Initialise(v6->pedStats, v29);    CCullZones::Init(v6->numAttributeZones, v6->attributeZones);    COcclusion::Init((COcclusion *)v6->numOccludersOnMap, v6->occluders, v30);    if ( !gbLoadResourceForMemoryCard[0] )      WaterLevelInitialise((const char *)gbLoadResourceForMemoryCard[0], (void *)v6->waterLevelInst);    v31 = v6->adhesiveLimitTable;    pmod_HandlingManager = v6->handlingManager;    v32 = (const void *)v6->timecycle;    CSurfaceTable::ms_aAdhesiveLimitTable = v31;    memcpy(pTimeCycle, v32, 0x2BF0u);    v33 = v6->particleSystemManager;    v34 = v6->weaponTables;    CPopulation::ms_pPedGroups = v6->pedGroups;    mod_ParticleSystemManager = v33;    CWeaponInfo::Initialise(v34, &CPopulation::ms_pPedGroups);    C3dMarkers::Init((C3dMarkers *)v6->_3dmarkerArray, v35);    CCutsceneMgr::Initialise(v6->cutsceneDir, v36);    CModelInfo::Load((CBaseModelInfo *)v6->numModelInfos, v6->modelInfoPtrs, v37);    if ( gbLoadResourceForMemoryCard[0]      || (CFerry::Init((CFerry *)v6->ferryInst, v38), CTrain::Init(v6->trainInst, v46), gbLoadResourceForMemoryCard[0]) )    {      v39 = v6->fontTexListSize;      CMenuManager::mpCompressedTextures = v6->menuCompressedTextures;      v40 = v6->fontCompressedTexList;      CFont::msTexListSize = v39;      CFont::mspCompressedTexList = v40;    }    else    {      CPlane::Init(v6->planeInst, v47, v48, 0);      v49 = v6->fontTexListSize;      CMenuManager::mpCompressedTextures = v6->menuCompressedTextures;      v40 = v6->fontCompressedTexList;      CFont::msTexListSize = v49;      CFont::mspCompressedTexList = v40;      if ( !gbLoadResourceForMemoryCard[0] )      {        CStreaming::ResetLists((CStreaming *)&CFont::msTexListSize);        if ( !gbLoadResourceForMemoryCard[0] )        {          if ( gSecondExportPass )          {            CStreaming::Init2ndPass((CStreaming *)v6->streamingInst, v50);            SaveResourceImage();          }        }      }    }    if ( CModelInfo::msNumModelInfos > 182 )      v41 = *((_DWORD *)CModelInfo::ms_modelInfoPtrs[0] + 182);    else      v41 = 0;    (*(void (__cdecl **)(int, void **, int))(*(_DWORD *)v41 + 28))(v41, &off_65EEF0, v40);    if ( CModelInfo::msNumModelInfos > 182 )      v44 = *((_DWORD *)CModelInfo::ms_modelInfoPtrs[0] + 182);    else      v44 = 0;    v45 = (CColStore *)(*(int (__cdecl **)(int, int, int))(*(_DWORD *)v44 + 32))(v44, v42, v43);    if ( gbLoadResourceForMemoryCard[0] )    {      result = (ResourceImage *)1;    }    else    {      CColStore::RemoveAllCollision(v45);      result = (ResourceImage *)1;    }  }

 

Share this post


Link to post
Share on other sites
guard3

Well, that's interesting. Good find :^:

Share this post


Link to post
Share on other sites
guard3


Grand Theft Auto Vice City Stories PEDSTATS.DAT Documentation by guard3-cj2000

0x4CC250 is a table (B0, or 176 bytes). It's composed of 42 4-byte values,

each representing an offset that corresponds to a line of PEDSTATS.DAT

Each line is 34 (52 bytes) in size and is defined like so:

 

- ID LE integer 4 bytes

B Flee Distance LE float 4 bytes

C Heading Change Rate LE float 4 bytes

H Attack Strength LE float 4 bytes

I Defend Weekness LE float 4 bytes

J Flags - integer 1 byte

- - - integer 1 byte

D Fear - integer 1 byte

E Temper - integer 1 byte

F Lawfulness - integer 1 byte

G Sexiness - integer 1 byte

A Name BE character 26 bytes

 

Share this post


Link to post
Share on other sites
guard3

Here you can download pedstats.dat! .docx (documentation), .xlsx (values), and a .dat file. Because pedstats are hardcoded, in order to use that .dat without modification, simply set 0x53027F (memory offset) or 0x12FE7F (exe offset via hex editor) to 0x2A. Thank you !

Edited by guard3

Share this post


Link to post
Share on other sites
guard3

Not that important, but:

GTA VCS Car Color DataR integer 1byteG integer 1byteB integer 1byte

That simple. Though VCS has 230 colors for cars (more that any 3d era game!)

 

 


VCS Cull.IPL     2b: Box Lower X Coord  2b: Box Upper X Coord  2b: Box Lower Y Coord  2b: Box Upper Y Coord  2b: Box Lower Z Coord  2b: Box Upper Z Coord  2b: Flag 1  2b: Flag 2

That one I acquired from gtamodding.ru.

But I converted it, so grab both files here:

CARCOLS.DAT

CULL.IPL

 

 

:D

sSbBa3D.png

 

 

Share this post


Link to post
Share on other sites
Ash_735

Though VCS has 230 colors for cars (more that any 3d era game!)

This is because it's split into two, one batch is used for peds (the colour of pedestrian clothing) and THEN you have the carcols.

Share this post


Link to post
Share on other sites
guard3

I think that ped colours are stored in the IDE section of each ped. No?

Share this post


Link to post
Share on other sites
guard3
GTA VCS 2dfx data Documentation by guard3GTA VCS has 686 2dfx data lines, each one being given an ID starting from 0, all the way to 685.The IDE section loads a 2dfx ID, which is then assigned to an object. The structure and format is (almost)the same as GTA VC. Each line is 64 bytes, 24 of which are common among all 2dfx types, and 40 more, whose structuresdiffer according to the 2dfx type.COMMON:Assuming VC is structured as: A, B, C, D, E, F, G, H, I, then VCS is:4b float   B Coordinate-X (relative to the centre of the object)4b float   C Coordinate-Y (relative to the centre of the object)4b float   D Coordinate-Z (relative to the centre of the object)4b -1b integer E Colour-R1b integer F Colour-G1b integer G Colour-B1b integer H Unknown (like in VC)4b integer I 2dfx TypeType 0 (Lights):Assuming VC is structured as: J, K, L, M, N, O, P, Q, R, S, T, then VCS is:4b float   L View Distance4b float   M Outer Range4b float   N Size4b float   O Inner Range1b integer Q Flash1b integer R Wet1b integer S Flare1b integer P Shadow Intensity4b integer T Flags4b offset  offset to corona texture (J)4b offset  offset to shadow texture (K)8b -Type 1 (Particles):Assuming VC is structured as: J, K, L, M, N, then VCS is:4b integer J Particle Type4b float   K Strength-X4b float   L Strength-Y4b float   M Strength-Z4b float   N Scale20b -Type 3 (Peds):Assuming VC is structured as: J, K, L, M, N, O, P, then VCS is:4b float   K Rotation-X4b float   L Rotation-Y4b float   M Rotation-Z4b float   N same as K4b float   O same as L4b float   P same as M4b integer J Behaviour12b - 

Download 2dfx.IDE

Share this post


Link to post
Share on other sites
Ash_735

I think that ped colours are stored in the IDE section of each ped. No?

Nope, they're apart of carcols dat, just come first in the order (which was throwing us off when we first used it), for VCS PC we split them up into carcols and pedcols but the source just has all of it in carcols.

Share this post


Link to post
Share on other sites
guard3

Ok then, thanks for the info :^:

Share this post


Link to post
Share on other sites
csillam_faszlama

Could you get handling.cfg and weapon.dat files extracted?

Share this post


Link to post
Share on other sites
Ash_735

Those two have already been found and documented I think, but would be good to list here too. VCS has quite a few additional values though compared to other GTA's which is where people tend to get thrown off.

Share this post


Link to post
Share on other sites
csillam_faszlama

Additional values for handlings, for weapons, or for both? I hope, that those files are mostly similar to their Vice City variants, so I can convert the lines for San Andreas... Will check, if I find anything about them anywhere else.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.