Test Drive Unlimited 2 (TDU2) - modding and handling editor

Talk about game mods, modding and editing (stuff that is officially supported by the game devs). NO game hacking here (cheat engine..etc)
Locked
User avatar
Sethioz
Admin
Admin
Posts: 4779
Joined: Fri Jul 27, 2007 5:11 pm
Custom: Gaming YT > https://youtube.com/SethiozEntertainment
Game Hacking YT > https://youtube.com/sethioz
Game Hacks Store > https://sethioz.com/shopz
Location: unknown
Contact:

Test Drive Unlimited 2 (TDU2) - modding and handling editor

Post by Sethioz »

/////////////////////////////////////////////////////////////////////

This thread is locked and continues in Test Drive Unlimited 2 Hacks and Hacking

/////////////////////////////////////////////////////////////////////



Knowledge Database Article of Test Drive Unlimited 2 - Hacks, Hacking and Modding is now available. all detailed tutorials will go there. only discussion stays on forum, so for updates check that article


NOTE - you should read my TDU handling editor post first, where is included tdudec tool and more !
> TDU handling editor and hacks

no tutorials yet, but i see that ppl are struggling with this once again.
you can use tdudec to decrypt tdu2 files, however extracting them from .big files is different story.
i have successfully decrypted physics so i can see and edit the base physics, like grip on tarmac, wet, offroad..etc. steering and other base physics.
like this example is part of Physics.cpr file (its decrpyted using tdudec).

Code: Select all

[Car]
//------------------ Tire model params
TireParamsList				=	13		Tarmac1	Tarmac2	Tarmac3 TarmacR	Police	Classic1	Classic2	Offroad1	Offroad2	Offroad3	BikeTarmac1	BikeTarmac2 BikeOffroad
//	TireFrictionParam		TireName	=	Global friction		Lateral Coef		Brake Coef			
//	TireModelParam			TireName	=	Max SlipRatio		Max SlipAngle		StartLooseLateral	MaxLossLateral	ResistiveCoefLongitudinal	LateralResistiveCoefLongitudinal

TireFrictionParam			Classic1		=	1.4					1.4					1.4					
TireModelParam				Classic1		=	30.0				5.0					0.5					0.1				1.0							1.0
	
TireFrictionParam			Classic2		=	1.7					1.7					1.7					
TireModelParam				Classic2		=	30.0				5.0					0.6					0.1				1.0							1.0

TireFrictionParam			Tarmac1			=	1.4					1.4					1.4				
TireModelParam				Tarmac1			=	30.0				5.0					0.6					0.05			1.0							1.0

TireFrictionParam			Tarmac2			=	1.7					1.7					1.7				
TireModelParam				Tarmac2			=	40.0				5.0					0.8					0.1				1.0							1.0

TireFrictionParam			Tarmac3			=	2.0					2.0					2.0				
TireModelParam				Tarmac3			=	50.0				5.0					1.3					0.1			1.0							1.0

TireFrictionParam			TarmacR			=	2.2					2.2					2.2			

what i just found out is that they have added public tdu2 serials into a banlist of serials. i googled for one of the serials and it shows up in many places. what lamers ehehe. so by modifying this file, you can still use those banned serials.
i found them in "SystemPC.cpr" file. note that you need to decrypt this file, before you can read it !

i have attached few decrypted files here, just as an example that it is possible.
decrypted_tdu2_files.rar
(11.87 KiB) Downloaded 1510 times
however i have not yet tested if changes are even possible, most likely updater will find it and redownload the files if they have changed, but feel free to test and post feedback about this.

See also TDU2 hacks and hacking
Racer22
Newbie..
Newbie..
Posts: 2
Joined: Fri Feb 25, 2011 4:07 am

Re: Test Drive Unlimited 2 (TDU2) - modding and handling edi

Post by Racer22 »

When I try to open the Pyhsics.cpr file with the tdudec it does nothing. I did take a look at the files, that you did decrypt. The problem I have is what do I need to type in the Windows Batch File (.bat) to place the physics file back into the game? I want to see if anything that I did change in physics has any effect on making the cars have better control.
User avatar
Sethioz
Admin
Admin
Posts: 4779
Joined: Fri Jul 27, 2007 5:11 pm
Custom: Gaming YT > https://youtube.com/SethiozEntertainment
Game Hacking YT > https://youtube.com/sethioz
Game Hacks Store > https://sethioz.com/shopz
Location: unknown
Contact:

Re: Test Drive Unlimited 2 (TDU2) - modding and handling edi

Post by Sethioz »

you do not need .bat file, it is just to make things easier, but here:

Code: Select all

tdudec d physics.cpr physics.cpr_dec 1
this is for decrypting, where "physics.cpr_dec" is the decrypted output file, you can name it whatever you want.

to encrypt, you do this:

Code: Select all

tdudec e physics.cpr_dec physics.cpr 1
where "physics.cpr_dec" is the decrypted file with the changes
let me know if it works and if there are any changes. also remember that most likely there is a file size check, if file size is not same, game wont allow it.
so you cant replace 1 with 10. you can replace 1 with 9 ..etc. im not sure, but most games have this.
also make backup, before changing anything.

> tdudec - name of the tool
> d - to Decrypt
> e - to Encrypt
> first comes input file, then output.
> 1 - for game files
> 0 - for savegame files, but it does not work on tdu2. works only in tdu

NOTE - im not sure if TDU2 can only be played via steam or is there other ways, but be careful if you are steam user. changing physics.cpr should not result in VAC ban, but you never know. it is smart to kill the steam.exe.
> start game
> minimize
> alt-ctrl-del
> kill steam.exe
> play and test
User avatar
Sethioz
Admin
Admin
Posts: 4779
Joined: Fri Jul 27, 2007 5:11 pm
Custom: Gaming YT > https://youtube.com/SethiozEntertainment
Game Hacking YT > https://youtube.com/sethioz
Game Hacks Store > https://sethioz.com/shopz
Location: unknown
Contact:

Re: Test Drive Unlimited 2 (TDU2) - modding and handling edi

Post by Sethioz »

theres also long discussion about this on XentaX forums, but they are noobing around too much. i got quickbms script from their forum.
if someone wants to mess around with quickBMS script, go ahead.
it works with Luigi's QuickBMS and you can optain it on his site aluigi.org

Code: Select all

IDString "XMBF"
Open FDDE big 1
Endian big
GetDString DUMMY 12
Get OFFS long
GoTo OFFS
Get DUMMY long
Get NUMHASHES long
Get HASHOFFSET long
Math HASHOFFSET += OFFS
Get NUMFILEREC long
Get FILERECOFFSET long
Math FILERECOFFSET += OFFS
If NUMHASHES != NUMFILEREC
  CleanExit
EndIf
For I = 0 < NUMHASHES
  GoTo HASHOFFSET
  Get HASH1 long
  Get HASH2 long
  Set EXT string ".bin"
  SavePos HASHOFFSET
  GoTo FILERECOFFSET
  Get FILESIZE long
  Get DUMMY long # compression?
  Get FILEOFFSET long
  SavePos FILERECOFFSET
  Math MEMSIZE = FILESIZE
  Math MEMSIZE x 4
  Log MEMORY_FILE FILEOFFSET MEMSIZE 1
  If MEMSIZE != FILESIZE
    Math MEMSIZE -= 4
    GetVarChr TMP MEMORY_FILE MEMSIZE long
    Math TMP ^= 0xD7A8E2D4
    PutVarChr MEMORY_FILE MEMSIZE TMP long
  EndIf
 
  GetVarChr HEADER MEMORY_FILE 0 long
  Math HEADER ^= 0xD7A8E2D4
  If HEADER == 0x584D4246
    Set EXT string ".xmb"
  ElseIf HEADER == 0x49474532
    Set EXT string ".ige"
  Else
    GetVarChr HEADER MEMORY_FILE 8 long
    Math HEADER ^= 0xD7A8E2D4
    If HEADER == 0x4B4E4142
      Set EXT string ".bnk"
    ElseIf HEADER == 0x57415645
      Set EXT string ".wav"
    Else
      GetVarChr HEADER MEMORY_FILE 12 long
      Math HEADER ^= 0xD7A8E2D4
      If HEADER == 0x2E324442
        Set EXT string ".2db"
      ElseIf HEADER == 0x584D4246
        Set EXT string ".xmb2"
      EndIf
    EndIf
  EndIf
 
  String NAME p= "%08X%08X%s" HASH1 HASH2 EXT
  FileXOR "\xD7\xA8\xE2\xD4"
  Log NAME 0 FILESIZE MEMORY_FILE
  FileXOR ""
Next I
Locked