Quantcast

Jump to content

» «
Photo

Vice City Stories GAME.DTZ

59 replies to this topic
guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#31

Posted 20 August 2017 - 09:22 AM Edited by guard3, 20 August 2017 - 09:26 AM.

I'm working on IDE at the moment, but I'll see what I can do about that. I'd like to see people post some info here too, though. I don't know the handling offset.

Anyway, I think that the handling of VCS is the same format as in LCS mobile. Quite different from PC if you ask me. If I get around to extracting it, I'll at least know which is which (I hope). LCS Mobile has the original VC format commented. VCS won't have that :(


csillam_faszlama
  • csillam_faszlama

    Little Willie owner

  • Members
  • Joined: 14 Dec 2014
  • Hungary

#32

Posted 20 August 2017 - 01:34 PM

I haven't found the LCS handlings online, not to mention anything about VCS ones, except, that VCS has extra values, not in LCS.


guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#33

Posted 20 August 2017 - 01:39 PM Edited by guard3, 20 August 2017 - 01:40 PM.

In LCS Mobile everything's non-compiled. And for VCS, I need to know where it's located in the DTZ, to take a look. It's tricky, since the handling is linked to the IDE of the car, so the handling data itself has only values, no names. (IDE has though, so that's a bonus)
  • csillam_faszlama likes this

csillam_faszlama
  • csillam_faszlama

    Little Willie owner

  • Members
  • Joined: 14 Dec 2014
  • Hungary

#34

Posted 20 August 2017 - 01:46 PM

I hope, that if you have the IDE, you will come across the handlings. :) Until that, I will be patient. I know, that LCS mobile handling is not compiled, but google simply didn't give me any download links for the file so far, so I need to continue searching.

  • guard3 likes this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#35

Posted 20 August 2017 - 01:51 PM

I'm working on IDE stuff right now. When I'm done with objs and inst, I'll take a look at car data ;)
  • csillam_faszlama likes this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#36

Posted 21 August 2017 - 10:11 AM

I'm really frustrated with IPL. I've even tried to compare the LCS PS2 with Mobile, but the only values I can match are position. Anyone has any info on this?

48b ?
4b  int Position-X
4b  int Position-Y
4b  int Position-Z
28b ?
2b  int ID
2b  ?
4b  int Hash Type

That's what I know so far... :(


Gladion
  • Gladion

    GTA LCS:PC Team Leader

  • Members
  • Joined: 30 Apr 2011
  • Indonesia

#37

Posted 23 August 2017 - 09:21 AM

Note: Since VCS is Vice City basically, the .dat file works fine with VC, however pedstats seems to be hardcoded, so any modification of the names or the order of the original will cause the game to not even load. So if you want to use my .dat, you'll have to comment out STAT_GANG8 and STAT_GANG9 since they only appear in Stories games. If however you know how to "intervene", then it's ok (I'd like to know how you'd intervene btw :pp)

Set 0x53027F (memory offset) or 0x12FE7F (exe offset via hex editor) to 0x2A. thats how i can use the original LCS pedstats.dat in Vice City without modifying it.

  • guard3 likes this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#38

Posted 23 August 2017 - 03:27 PM

Thank you!

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#39

Posted 25 August 2017 - 11:22 AM Edited by guard3, 04 September 2017 - 06:54 PM.

IDE and IPL is a very difficult case. I still need help with IPL. Here's what I know so far about IDE:

GTA VCS IDE documentation by guard3

COMMON:
8b -
4b int HashName
4b -
1b int Type (1: objs, 3:tobj, 4:weap, 5:hier, 6:cars, 7:ped)
1b int count2dfx
2b ?
4b off offset to col
2b int 2dfx ID
2b int ? (usually -1)
2b -
2b int Texture ID
2b int ?
2b int ?
4b int HashType
4b int ? (DTZ stuff. It's for the wheels, and points somewhere interesting)
4b float Draw Distance

OBJS:
4b flt Draw Distance 2 (if object is LOD, then = 0.0 and Mesh Count = 1)
4b flt Draw Distance 3 (if object is LOD, then disappearing distance / draw distance of normal object))
2b int Mesh Count
2b int Flags (???)
4b int if object is LOD, offset to IDE line of original object, otherwise =0

TOBJ:
4b flt Draw Distance 2 (if object is LOD, then = 0.0 and Mesh Count = 1)
4b flt Draw Distance 3 (if object is LOD, then disappearing distance / draw distance of normal object))
2b int Mesh Count
2b int Flags (???)
4b int if object is LOD, offset to IDE line of original object, otherwise =0
4b int Time On
4b int Time Off
 
CARS:
8b -
4b ?
4b ?
4b ?
4b ?
4b ?
4b ?
4b float ?
4b float ?
4b float Wheel Scale 1
4b float Wheel Scale 2
4b float ?
4b float ?
4b float ?
4b -
4b float ?
4b float ?
4b float ?
36b -
48b ?
128b -
4b int   Comprules
4b int   ?
9b char  GXT Name
1b int   number of colour sets
18b colors
23b ?
224 ?
4b int   ?
more stuff I haven't figured out yet...

PEDS:
4b int Animgroup ID
4b int Pedtype ID
4b int Pedstats ID
4b int Cars Can Drive Mask
4b int Animfile (always null here)
1b int radio 1
1b int radio 2
1b -
1b int number of colour sets
1b int ?
107b color pointers
48b ? (seems to have 4 values with IDs 0,1,2,3 and 3 values)
8b char Ped Name
4b ? (almost always 49)
4b -
4b ?
4b -

Anyone has any more info on this? OBJS and TOBJ flags are a mystery. CARS are completely different from LCS and is a mess. Carcols also seem to be off(?). The IDs don't match correctly, so I don't know how to get the actual ID. Any help appreciated.
 
EDIT: I forgot to mention Ash_735 for helping me a bit with ped colours!


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#40

Posted 25 August 2017 - 11:36 AM Edited by The Hero, 25 August 2017 - 11:39 AM.

I would expect the flags to be very similar to the flags in VC, so probably similar to this:
https://github.com/D...mpleModelInfo.h

Here are some things from my android LCS idb. I have not reversed it a lot but maybe it'll help:
struct __attribute__((aligned(4))) CBaseModelInfo
{
  void *pVmt;
  char field_4;
  char field_5;
  char field_6;
  char field_7;
  char field_8;
  char field_9;
  char field_A;
  char field_B;
  int key;
  char *name;
  char m_nType;
  char m_nNum2dEffects;
  char m_bDoWeOwnTheColModel;
  char field_17;
  int colModel;
  __int16 m_n2dEffectIndex;
  __int16 m_nObjectDataIndex;
  unsigned __int16 m_nRefCount;
  __int16 m_nTxdIndex;
};

struct __attribute__((aligned(4))) CSimpleModelInfo
{
  CBaseModelInfo _;
  RslElement **elements;
  float drawdist[3];
  uchar numObjects;
  ushort flags;
  int relatedObject;
};

struct CElementGroupModelInfo
{
  CBaseModelInfo _;
  RslElementGroup *elementGroup;
  int anim;
};

// this is not quite right. The unknowns have to be moved around a bit
struct CVehicleModelInfo
{
  CElementGroupModelInfo _;
  char m_nLastPrimaryColor;
  char m_nLastSecondaryColor;
  char m_szGameName[10];
  unsigned int m_nVehicleType;
  float m_fWheelSize;
  __int16 m_nWheelModelIndex;
  __int16 m_nHandlingId;
  unsigned __int8 m_nNumDoors;
  unsigned __int8 m_nVehicleClass;
  unsigned __int8 m_nLvl;
  unsigned __int8 m_nNumExtras;
  unsigned __int16 m_nFrq;
  char _pad4E[2];
  char unk[4];
  CVector m_avDummyPos[5];
  char unk1[20];
  unsigned int m_nCompRules;
  float m_fBikeSteerAngle;
  RslMaterial *m_apMaterialsPrimary[25];
  RslMaterial *m_apMaterialsSecondary[25];
  unsigned __int8 m_anPrimaryColors[8];
  unsigned __int8 m_anSecondaryColors[8];
  unsigned __int8 m_nNumColorVariations;
  unsigned __int8 m_nLastColorVariation;
  unsigned __int8 m_nCurrentPrimaryColor;
  unsigned __int8 m_nCurrentSecondaryColor;
  char unk2[4];
  RslElement **m_apExtras;
  char *m_pszAnimName;
};

struct CPedModelInfo
{
  CElementGroupModelInfo _;
  int m_nAnigGroupId;
  int m_nPedType;
  int m_nPedStatType;
  unsigned int m_nCarsCanDriveMask;
  void *m_pHitColModel;
  char m_anPreferredRadioStations[2];
};


guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#41

Posted 25 August 2017 - 11:39 AM

I'd expect the same, but I wasn't able to match them. I also got some weird values here and there that don't fit any other value in the VC format, but they don't seem to be flags either, WTF! I'll take a look at that info you shared, thanks.


guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#42

Posted 25 August 2017 - 11:55 AM

As a precaution, the spoiler is quite long

According to what you (The Hero) provided, we agree on where the flags are located, but take a look at this:

Spoiler

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#43

Posted 25 August 2017 - 12:05 PM Edited by The Hero, 25 August 2017 - 12:06 PM.

Please print the flags as hexadecimal. It's unreadable in decimal.
This is how android LCS interprets the flags from the file:
Spoiler

So your flag 2048 is IDE flag 128 and means the object is not to receive shadows (as per http://www.gtamoddin...n#GTA_Vice_City )

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#44

Posted 25 August 2017 - 12:11 PM

How about that?

Spoiler

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#45

Posted 25 August 2017 - 12:16 PM

So what's the problem? To me the flags look like they match perfectly.

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#46

Posted 25 August 2017 - 12:48 PM Edited by guard3, 25 August 2017 - 12:48 PM.

Hmm... I didn't know there was a separate "Model info flag" that's interpreted as the IDE flag. After reading that page, does that mean that ex. 801 = 800 = 128, or 802 = 800 = 128? Because it says it starts with 0x04.


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#47

Posted 25 August 2017 - 12:52 PM

You can ignore the lower 2 bits. They're calculated from the draw distances. So it indeed starts with 4 and 0x10 is the big-building flag.
  • guard3 and Rachel Amber like this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#48

Posted 25 August 2017 - 12:58 PM

I think it's clear now. I'll update my script. You really are a hero!

 

Now, back to my most desired request: Any info on IPL, anyone?


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#49

Posted 25 August 2017 - 01:14 PM

Have you looked at the VC file structures? DK has them in the plugin SDK (in a slightly strange way though). All buildings should be of type CBuilding. So the whole thing should look something like this (modified it a bit to fit your description above):

struct RwMatrixTag
{
	RwV3d      right;
	RwUInt32   flags;
	RwV3d      up;
	RwUInt32   pad1;
	RwV3d      at;
	RwUInt32   pad2;
	RwV3d      pos;
	RwUInt32   pad3;
};

struct CMatrix
{
	RwMatrix rwmatrix;
	RwMatrix *m_pAttachMatrix;
	uint m_bOwnsAttachedMatrix;
};

struct CBuilding
{
	void *table;

	// CPlaceable
	CMatrix matrix;

	// CEntity
	union {
		RwObject *m_pRwObject;
		RpAtomic *m_pRwAtomic;
		RpClump  *m_pRwClump;
	};
	uint32 flags[5]; // not sure around this area. but should not matter for generating an IPL file anyway
	short m_nModelIndex;
	char m_nLevel;
	unsigned char m_nInterior;
	CReference *m_pFirstRef;

}; 

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#50

Posted 25 August 2017 - 02:04 PM

If I tell you that the only programming language I know is python (which I learn alongside this research). Unfortunately, I don't understand what you sent.


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#51

Posted 25 August 2017 - 03:22 PM

That's C(++) structure definitions. If you want to get anywhere in reverse engineering and modding/hacking you have to understand C and C++.
Don't worry, the basics are not too difficult and similar to python. I can't explain everything here, but just to get you started:
Take these structs:
Spoiler


The first is always a data type, the second a name. The first struct declares a type RwV3d that holds three variables of type RwReal (a RenderWare type, just a 32 bit IEEE754 float) and names x, y and z.
In memory you'd have x at offset 0, y at offset 4 and z at offset 8, the size of the structure is 12 bytes.
The second declares a RenderWare matrix that consists of four vectors with some flags and padding in between (because you want the vectors to be 16 bytes apart and the whole thing to be 64 bytes). So right is at 0, the flags at 0xC, up at 0x10, at at 0x20 and pos at 0x30.
  • guard3 and Rachel Amber like this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#52

Posted 26 August 2017 - 02:20 PM Edited by guard3, 05 September 2017 - 08:33 AM.

BIG thanks to The Hero for helping me understand (yeah, right) matrices! This is IPL:

4b float m00
4b float m10
4b float m20
4b float ?
4b float m01
4b float m11
4b float m21
4b float ?
4b float m02
4b float m12
4b float m22
4b float ?
4b float Position-X
4b float Position-Y
4b float Position-Z
4b int   ?
4b int   Is Interior
20b ?
2b int   ID
2b int   ?
4b int   Hash Type (?)

The IPL is basically a matrix:

[m00, m01, m02, Position-X]
[m10, m11, m12, Position-Y]
[m20, m21, m22, Position-Z]
[0,   0,   0,   1         ]

The bottom row in the file is actually this:

[?, ?, ?, ?]

which is Leeds Engine stuff, not useful for generating IPL. They only matter in memory.

 

In general, it's all about vectors and stuff that I still don't understand (I haven't been taught about matrices at school, hoping for the best in a few years in university). But this is a java algorithm I found from here. It calculates quaternion values from a matrix:

float tr = m00 + m11 + m22

if (tr > 0) { 
  float S = sqrt(tr+1.0) * 2; // S=4*qw 
  qw = 0.25 * S;
  qx = (m21 - m12) / S;
  qy = (m02 - m20) / S; 
  qz = (m10 - m01) / S; 
} else if ((m00 > m11)&(m00 > m22)) { 
  float S = sqrt(1.0 + m00 - m11 - m22) * 2; // S=4*qx 
  qw = (m21 - m12) / S;
  qx = 0.25 * S;
  qy = (m01 + m10) / S; 
  qz = (m02 + m20) / S; 
} else if (m11 > m22) { 
  float S = sqrt(1.0 + m11 - m00 - m22) * 2; // S=4*qy
  qw = (m02 - m20) / S;
  qx = (m01 + m10) / S; 
  qy = 0.25 * S;
  qz = (m12 + m21) / S; 
} else { 
  float S = sqrt(1.0 + m22 - m00 - m11) * 2; // S=4*qz
  qw = (m10 - m01) / S;
  qx = (m02 + m20) / S;
  qy = (m12 + m21) / S;
  qz = 0.25 * S;
}

And finally, since 3DS Max that originally created IPL negates X,Y,Z:

Rotation X = -qx
Rotation Y = -qy
Rotation Z = -qz
Rotation W = qw

...Enjoy, I guess :)


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#53

Posted 04 September 2017 - 10:21 AM

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

weapon.dat is no problem, but handling.cfg no idea, it´s completly different even to LCS format.


guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#54

Posted 04 September 2017 - 06:24 PM Edited by guard3, 05 September 2017 - 08:41 AM.

As I have already said, CARS section of IDE is a mess (and completely different from LCS), but I have progress:

8b -
4b ?
4b ?
4b ?
4b ?
4b ?
4b ?
4b float How much the normals are splayed by to improve the environment mapping on PSP
4b int   Type (0:car, 1:boat, 2:jetski, 4:heli, 5:plane, 6:bike, 8:bmx, 9:quad) 
4b float Wheel Scale 1
4b float Wheel Scale 2
4b float headlights Position X
4b float headlights Position Y
4b float headlights Position Y
4b padding
4b float taillights Position X
4b float taillights Position Y
4b float taillights Position Z
4b padding
32b -
4b float ped_frontseat Position X
4b float ped_frontseat Position Y
4b float ped_frontseat Position Z
4b padding
4b float ped_backseat Position X
4b float ped_backseat Position Y
4b float ped_backseat Position Z
4b padding
4b float exhaust Position X
4b float exhaust Position Y
4b float exhaust Position Z
4b padding
128b -
4b int   Comprules
4b int   Unknown (the equivalent of wheel ID for bikes, otherwise =999.99)
9b char  GXT Name
1b int   number of colour sets
1b int   ?
18b -    Colour IDs
247b ?
4b int   ?
2b int   Wheel Model ID
2b int   Frequency
1b int   Number of doors
1b int   Class ID (-1:ignore, 0:normal, 1:poorfamily, 2:richfamily, 3:executive, 4:worker, 5:big, 6:taxi, 7:moped, 8:motorbike, 9:leisureboat, 10:workerboat, 11:?, 12:?)
2b int   Level
40b ?

Thanks to cj2000 for some stuff from his documentation. If you know how exactly the ped colouring system works, then car colouring seems to be the same and vice versa. It is weird, though...

 
EDIT: I also updated IPL in previous post with more info. OP tba ;)
EDIT2: I added the dummy coordinates

  • Tomasak likes this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#55

Posted 05 September 2017 - 11:12 AM

As I have already said, CARS section of IDE is a mess (and completely different from LCS), but I have progress:

8b -
4b ?
4b ?
4b ?
4b ?
4b ?
4b ?
4b float How much the normals are splayed by to improve the environment mapping on PSP
4b int   Type (0:car, 1:boat, 2:jetski, 4:heli, 5:plane, 6:bike, 8:bmx, 9:quad) 
4b float Wheel Scale 1
4b float Wheel Scale 2
4b float headlights Position X
4b float headlights Position Y
4b float headlights Position Y
4b padding
4b float taillights Position X
4b float taillights Position Y
4b float taillights Position Z
4b padding
32b -
4b float ped_frontseat Position X
4b float ped_frontseat Position Y
4b float ped_frontseat Position Z
4b padding
4b float ped_backseat Position X
4b float ped_backseat Position Y
4b float ped_backseat Position Z
4b padding
4b float exhaust Position X
4b float exhaust Position Y
4b float exhaust Position Z
4b padding
128b -
4b int   Comprules
4b int   Unknown (the equivalent of wheel ID for bikes, otherwise =999.99)
9b char  GXT Name
1b int   number of colour sets
1b int   ?
18b -    Colour IDs
247b ?
4b int   ?
2b int   Wheel Model ID
2b int   Frequency
1b int   Number of doors
1b int   Class ID (-1:ignore, 0:normal, 1:poorfamily, 2:richfamily, 3:executive, 4:worker, 5:big, 6:taxi, 7:moped, 8:motorbike, 9:leisureboat, 10:workerboat, 11:?, 12:?)
2b int   Level
40b ?

Thanks to cj2000 for some stuff from his documentation. If you know how exactly the ped colouring system works, then car colouring seems to be the same and vice versa. It is weird, though...

 
EDIT: I also updated IPL in previous post with more info. OP tba ;)
EDIT2: I added the dummy coordinates

The carcolsIDs are stored as signed values from -127 to 100, not shure about 100.

The dummy coordinates are diferent for the boats.

  • guard3 likes this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#56

Posted 06 September 2017 - 10:44 PM

That's the closest I can get to handlings for the time being:

4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float ?
4b float TransmissionData.fEngineInertia [0.0-50.0]
4b float ?
4b float ?
4b float ?
1b char  TransmissionData.nDriveType [F/R/4] - Front/Rear/4-wheel
1b char  TransmissionData.nEngineType [P/D/E] - Petrol/Diesel/Electric
1b int   TransmissionData.nNumberOfGears [1-5]
1b int   ?
4b float ?
4b float fBrakeBias
4b float fSteeringLock [10.0-40.0]
4b float fTractionLoss [0.0>x>1.0]
4b float fTractionBias
4b float fSuspensionForceLevel
4b float fSuspensionDampingLevel
4b float suspension upper limit
4b float suspension lower limit
4b float suspension bias between front and rear
4b float suspension anti-dive multiplier
4b float fSeatOffsetDistance
4b int   nMonetaryValue
1b int   front lights (0:long, 1:small, 2:big, 3:tall)
1b int   rear lights (0:long, 1:small, 2:big, 3:tall)
2b int   ? (=0)
4b float fDragMult
4b float ? (=0)
4b float CentreOfMass.x
4b float CentreOfMass.y
4b float CentreOfMass.z
4b float ? (=0)
4b int   nPercentSubmerged [10-120]
4b float ?
4b float TransmissionData.fMaxVelocity
4b float fMass
4b float fTurnMass
4b float fTractionMultiplier
4b float ?
4b int   ?
4b int   ?
12b -

I tried to figure it out by comparing to LCS. The first 6 unknowns for cars on IDE are offsets to handling data (the general one here, and others more specific to the vehicle type). That's how I got to them, since DTZ header doesn't point to them.

  • Tomasak likes this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#57

Posted 10 September 2017 - 03:53 PM Edited by guard3, 11 September 2017 - 02:05 PM.

How about some OBJECT.DAT? I thought I'd also take a look at LCS one, structure is a tiny bit different:

OBJECT.DAT Documentation by guard3
LCS:
4b float B Mass
4b float C TurnMass
4b float D Air Resistance
4b float E Elasticity
4b float ?
4b float G Uproot Limit
4b float H Collision Damage Multiplier
1b int   I Collision Damage Effect
1b int   J Special Collision Response Cases
1b int   K Camera to avoid this object
1b -

VCS:
4b float B Mass
4b float C TurnMass
4b float D Air Resistance
4b float E Elasticity
4b float ?
4b float G Uproot Limit
4b float H Collision Damage Multiplier
1b int   ?
1b int   J Special Collision Response Cases
1b int   K Camera to avoid this object
1b int   ?
1b int   ?
3b -

Each line is given an ID (starting from 0 and counting...) The "Percent Submerged" is either ignored, or it may need some magic to find it, because I wasn't able to find values that match (it's usually 50.0 normally, in DTZ it varies from 0.96 to 1599.98!). VCS seems to introduce new values at the end (the collision damage effect may be stored differently)

 

And for IDE:

 

8b -
4b int HashName
4b -
1b int Type (1: objs, 3:tobj, 4:weap, 5:hier, 6:cars, 7:ped)
1b int count2dfx
2b ?
4b off offset to col
2b int 2dfx ID
2b int ? (usually -1) Object ID (null: -1)
........

  • Tomasak likes this

_CP_
  • _CP_

    Boss

  • Feroci
  • Joined: 27 Dec 2007
  • Poland
  • Most Helpful Modding 2016 [Runner-up]
    Best Vehicle 2016 [IVPack]
    Best Map 2013 "ViceCityStories PC Edition"

#58

Posted 10 September 2017 - 08:58 PM

@guard3
Are you able to extract object.dat from VCS?

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#59

Posted 11 September 2017 - 12:42 PM

Yep.

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#60

Posted 15 September 2017 - 04:43 PM Edited by guard3, 3 weeks ago.

Updates on IDE:

8b -
4b int Name of the object (CRC32 Hash encryption)
4b -
1b int Type (1: objs, 3:tobj, 4:weap, 5:hier, 6:cars, 7:ped)
1b int Count 2dfx (ex. if 2dfxID=8 and Count2dfx=4, then the assigned IDs are 8, 9, 10, 11)
2b int Collision in .DTZ (boolean, 0:not in DTZ, 1:in DTZ)
4b int offset to collision (.col2)
2b int 2dfx ID
2b int Object.DAT ID
2b -
2b int Texture ID
2b ?
2b -
4b int Type (CRC32 Hash encryprion)
4b int offset to model (if no .mdl exists in .DTZ, then it's 0)

Type 1: OBJS

4b float Draw Distance 1
4b float Draw Distance 2
4b float Draw Distance 3 (if object is LOD, then disappearing distance)
1b int   Mesh Count
1b int   ?
2b int   Flags
4b int   if object is LOD, offset to IDE ID of original object, otherwise =0

Type 3: TOBJ

4b float Draw Distance 1
4b float Draw Distance 2
4b float Draw Distance 3 (if object is LOD, then disappearing distance)
1b int   Mesh Count
1b int   ?
2b int   Flags
4b int   if object is LOD, offset to IDE ID of original object, otherwise =0
4b int   Time On
4b int   Time Off

Type 4: WEAP

4b float Draw Distance 1
4b float Draw Distance 2
4b float Draw Distance 3 (if object is LOD, then disappearing distance)
1b int   Mesh Count
1b int   ?
2b int   Flags
4b int   Weapon.DAT ID
4b int   Animation ID

The first part has all the values (except one) named. The one I didn't find is only present in VCS and is followed by 0x0000 (don't know if it's used / it must be an ID for something VCS exclusive if it is). Also, I was comparing to LCS format and mesh count is 1b (the other one in LCS is -1, or the whole short integer is signed, which is weird... Whatever...)

 

EDIT: In IDE, VCS models have either a texture that has the same name as the MDL, or "knackers.xtx". As a result, those whose names can be found are quite a lot. Is it possible to use this info to decrypt the rest of the hashnames??? Of course it's not :(

  • Tomasak and Rachel Amber like this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users