NFS Undercover - All Cars - Savegave Editing

Discuss editing Need for Speed Undercover.
Be a part of the modding scene as it happens!
Bytesss
Turbo Charged
Turbo Charged
Posts: 75
Joined: 15 Dec 2007, 20:05

Re: Need For Speed Undercover mystery meshes

Post by Bytesss »

Albtraum wrote:Didn't work - crashed my game, I'll look into extracting some of the regular cars codes out of the savegame later...
Albtraum,
I found that if I purchase a swapped car after swapping it shows up in the showroom and garage correctly. You might try doing that and then doing a file compare of the save game. Just a thought.
arushan
Valued Member
Valued Member
Posts: 106
Joined: 02 Nov 2004, 12:24

Re: Need For Speed Undercover mystery meshes

Post by arushan »

Albtraum wrote:Didn't work - crashed my game, I'll look into extracting some of the regular cars codes out of the savegame later...
Okay, got a list for you and I think its the right one this time... I was looking in the wrong place... I thought EA might have gotten rid of these after the car_vault business.... but apparently not. This is just going to make my life harder yet again with adding new cars (instead of replacing them).

And since you're having trouble naming it, I'll help you out a bit... these codes are essentially hashes of the model name... so I just called it the "Modelcode" :) Updated list @ here.
Albtraum wrote:But yes, CoDeRiPPeR did a small money editor with checksum fixing abilities for ProStreet.
Shouldn't work with Undercover, but he included source code for it.
I guess it could be modified to work with Undercover, as the savefile hasn't changed that much from what i've seen.
http://www.nfsplanet.com/nfsps_files.php -> NFS ProStreet Mini Save Editor / Checksum Fixer
command line parameter -f skips the money editing part and just fixes checksums.
Looks like it should work without the money editing part as the header looks to be the same... I do see a 16 byte sequence starting at 0x38 of the save game which seems to change with every save though... Hopefully this isn't a MD5 hash of some sort.
Albtraum
Turbo Charged
Turbo Charged
Posts: 60
Joined: 18 Dec 2007, 16:13
Location: Behind the Screen.

Re: Need For Speed Undercover mystery meshes

Post by Albtraum »

Arushan wrote:Okay, got a list for you and I think its the right one this time... I was looking in the wrong place... I thought EA might have gotten rid of these after the car_vault business.... but apparently not. This is just going to make my life harder yet again with adding new cars (instead of replacing them).

And since you're having trouble naming it, I'll help you out a bit... these codes are essentially hashes of the model name... so I just called it the "Modelcode" :) Updated list @ here.
/worship arushan - those are the correct codes =D>
and, model codes - that name fits perfectly :D
Image
now we could assemble an all-in-one savegame for everyone :wink:
Arushan wrote:Looks like it should work without the money editing part as the header looks to be the same... I do see a 16 byte sequence starting at 0x38 of the save game which seems to change with every save though... Hopefully this isn't a MD5 hash of some sort.
it only needs some alteration for the changed savegame size, i guess?
i don't think thats MD5 hash, just multiple CRC32s, guessing from the source code:

Code: Select all

typedef struct tagSaveHeader
{
	unsigned long    Magic;           // 20CM ('MC02')
	unsigned long    SizeOfFile;      // file size
	unsigned long    SizeOfData1;     // size of data block 1 (after this header)
	unsigned long    SizeOfData2;     // size of data block 2 (main data, after data block 1)
	unsigned long    CRC32Data1;      // crc32b of data block 1
	unsigned long    CRC32Data2;      // crc32b of data block 2
	unsigned long    CRC32Header;     // crc32b of the above header data
} SaveHeader;
but i have no experience with that and and slim to none expertise in C...
got some crc32 code samples for visual basic, but didn't care to look at, yet... anyone here good at coding in C?
User avatar
prince1142003
Valued Member
Valued Member
Posts: 3862
Joined: 23 Feb 2005, 06:03
Location: Enjoying college life.
Contact:

Re: Need For Speed Undercover mystery meshes

Post by prince1142003 »

1. Are you guys planning on making a guide on how to get the locked cars?
2. Is the savegame editable, or do we need to wait for a checksum fixer?
3. Is it possible to make a trainer that can unlock the locked cars, or must it be done by hexing the game files?

Wonderfully amazing work!

EDIT: @Albtraum
Your image doesn't work.
Image
arushan
Valued Member
Valued Member
Posts: 106
Joined: 02 Nov 2004, 12:24

Re: Need For Speed Undercover mystery meshes

Post by arushan »

Albtraum wrote:it only needs some alteration for the changed savegame size, i guess?
i don't think thats MD5 hash, just multiple CRC32s, guessing from the source code:

Code: Select all

typedef struct tagSaveHeader[/quote]

No no.. the crcs are there too.. but I meant this: (the one selected in blue)

[url=http://img227.imageshack.us/img227/8252/ucsavegamenh0.jpg][img]http://img227.imageshack.us/img227/8252/ucsavegamenh0.th.jpg[/img][/url]

Well, I guess the best way to find out would to be to try changing something in the file and fix the crcs and load it up.
Albtraum
Turbo Charged
Turbo Charged
Posts: 60
Joined: 18 Dec 2007, 16:13
Location: Behind the Screen.

Re: Need For Speed Undercover mystery meshes

Post by Albtraum »

Oh...k, thought it remained the same as it was in prostreet, it had these 16bytes at 38h, too
guess it's worth a try... :lol: ... checksum fixer from prostreet works for undercover - how sweet is that?
edit: money editing feature doesn't work, obviously - as that has changed from prostreet, see here:
http://forum.nfsunlimited.net/viewtopic.php?f=2&t=16815

btw: that 010 Editor looks really mighty, just what I was looking for last year to ease up hex editing prostreet saves.
my beloved Ultraedit and other hex editors I've tried are lacking a comfortable scripting feature, this could be the one.

@prince
1) maybe... I have to finish the not-actually-a-guide for prostreet first, but this here is keeping my busy ;)
2) see above :D
3) should be possible, if someone stumbles over the unlocking byte some day
edit)uploaded to another picture hoster( this is the now fully replaced 240sx from the beginning:
Image
Last edited by Albtraum on 24 Nov 2008, 05:11, edited 1 time in total.
User avatar
prince1142003
Valued Member
Valued Member
Posts: 3862
Joined: 23 Feb 2005, 06:03
Location: Enjoying college life.
Contact:

Re: Need For Speed Undercover mystery meshes

Post by prince1142003 »

So is it possible now to unlock those cars instead of replacing them?

Since I don't have the ability to try this now, I have to ask this: if I replace the 240SX with the Dodge Challenger (like you did), is that permanent? Or is it possible to have both cars in the garage?
Image
Albtraum
Turbo Charged
Turbo Charged
Posts: 60
Joined: 18 Dec 2007, 16:13
Location: Behind the Screen.

Re: Need For Speed Undercover mystery meshes

Post by Albtraum »

unlocking.. well, no. not yet without the unlocking cheat code.

but, yes and yes.
it's permanent and i could buy another 240SX* to have both in garage.
or buy a couple 240SX and get the other cars as well ;)

edit: carlot remains unchanged that way - challenger (and other ce cars) would be/are hidden anyway
time to go to bed, i'm already quoting myself instead of editing :-s good thing that such posts can be deleted here. edit: one more: hooray, i'm turbocharged now :D

maximum tuning slots of 70 is a bit limiting here, as theres already 55+5 regular+ce cars and all the traffic/cop/additional cars like terlingua mustang...
i think i'll have to split them into two savegames ;)
Last edited by Albtraum on 24 Nov 2008, 05:31, edited 2 times in total.
User avatar
prince1142003
Valued Member
Valued Member
Posts: 3862
Joined: 23 Feb 2005, 06:03
Location: Enjoying college life.
Contact:

Re: Need For Speed Undercover mystery meshes

Post by prince1142003 »

Ah, that's good. I assume then that as soon as the "model-code" is replaced, the game finds the right parts, etc, for the car?

What about My Cars? Is there a limit there as well?

Edit
And thanks for your hard work. I'm sure I echo the community's appreciation.
Image
Albtraum
Turbo Charged
Turbo Charged
Posts: 60
Joined: 18 Dec 2007, 16:13
Location: Behind the Screen.

Re: Need For Speed Undercover mystery meshes

Post by Albtraum »

uh, didn't thought about my cars... but there are only around 70 tuning slots present in the save file.
i guess garage and my cars have to share them.
the actual soft limit is way lower - 30 i've heard, but that could be bypassed by adding 80 to category (82)
it was possible to combine garage (02) and my cars (04?) to 06 and they show up in both, wasn't it?

i'll try that later.
deadlok
Stock
Stock
Posts: 3
Joined: 24 Nov 2008, 08:50

Re: Need For Speed Undercover mystery meshes

Post by deadlok »

Well i managed to permanently replace a car in my garage (a pink slip, Audi TT) with the Mercedes SL65 AMG, using the logocode/carcode. The method used was "brutal", just made a 'search / replace all' Audi TT code with Mercedes code, because i have no idea how to pinpoint the exact memory address i need.
The problem is, the replaced car (in this case Audi TT) permanently disappears. I can buy the Mercedes SL65AMG, and works ok, but no more Audi TT.

Can anyone please tell me how to use the modelcode to do the same job, without removing completely the replaced car ?
I just need to know where to make the changes; what are the important memory addresses that have to be changed.

It's my first attempt at modding NFS, so i'm quite in the dark here. Thanks.
Albtraum
Turbo Charged
Turbo Charged
Posts: 60
Joined: 18 Dec 2007, 16:13
Location: Behind the Screen.

Re: Need For Speed Undercover mystery meshes

Post by Albtraum »

@prince
It isn't just hard work - it's fun for me, too. I'm kinda addicted with that stuff since ProStreet :D

@deadlok
By replacing every single instance of the TT, you kinda completely took it out of the game ;)
See, the Carlist basically has:
Bonus/AI Cars
CarLot
Garage/My Cars

you just want to edit the Cars in Garage (as CE cars are hidden in CarLot) :wink:
If you're using ArtMoney, i recommend to set 'number of value columns' to 28, the size of a single CarSlot.
That way, you have one CarSlot per Line (if adjusted by offset, so the AAAA values are at the end)

should look something like this: (offsets do vary)
ImageCars in Garage have category of 02 (marked green) - my cars should be 04
Now, to find the correct customization block and model code bytes for that car (240SX here), have a look at the customization/career link bytes (marked yellow). In this example it's 03.
scroll down to the end of the carslots and note the address of the first byte of customization block (28668h here) - this is your customization base address.
now multiply cust.link with the size of a cust.block (2700/A8Ch) and add the result to the base address above.
the model codes are at bytes 2512/9D0h and 2664/A68h, add that too (or just scroll down)

a simpler method would be to just search for model codes - but be careful with multiple instances of a car.
they're ordered just like they appear in carlist/game, 2 results per car. result 3&4 would be the 2nd, 5&6 the 3rd car and so on..

oh, and don't forget to backup the savefile before doing changes, just in case :!:
deadlok
Stock
Stock
Posts: 3
Joined: 24 Nov 2008, 08:50

Re: Need For Speed Undercover mystery meshes

Post by deadlok »

Thanks a lot for the answer.
I tried the simpler method first (raw search for model codes); i managed to change a car into a BMW Z4 by replacing the modelcodes, but it appears as a Z4 only in the garage. When i start driving, i still have the Nissan Silvia i replaced.

Gonna try the more complex method. :)

If you have more advice, my eyes are wide open. :shock:


// Late edit : man, it worked ! I didn't figure out from the start that i also have to change the "owned car" modelcode/logocode. Thanks a LOT!
Last edited by deadlok on 24 Nov 2008, 15:23, edited 1 time in total.
Albtraum
Turbo Charged
Turbo Charged
Posts: 60
Joined: 18 Dec 2007, 16:13
Location: Behind the Screen.

Re: Need For Speed Undercover mystery meshes

Post by Albtraum »

deadlok wrote:When i start driving, i still have the Nissan Silvia i replaced.
thats because you need to replace all 3 codes ;)
-modelcode is for the car displayed in menu only
-logocode is for the name displayed and (maybe) performance data (edit - not sure about perf data anymore)
-carcode is what car will appear on the street
thanks to arushan, we know all the codes now :D

the more complex method is just another method that gets you to the same locations.
Last edited by Albtraum on 29 Nov 2008, 01:12, edited 1 time in total.
deadlok
Stock
Stock
Posts: 3
Joined: 24 Nov 2008, 08:50

Re: Need For Speed Undercover mystery meshes

Post by deadlok »

Got it and it worked ! Huge thanks !
arushan
Valued Member
Valued Member
Posts: 106
Joined: 02 Nov 2004, 12:24

Re: Need For Speed Undercover mystery meshes

Post by arushan »

Albtraum wrote:Oh...k, thought it remained the same as it was in prostreet, it had these 16bytes at 38h, too
guess it's worth a try... :lol: ... checksum fixer from prostreet works for undercover - how sweet is that?
edit: money editing feature doesn't work, obviously - as that has changed from prostreet, see here:
http://forum.nfsunlimited.net/viewtopic.php?f=2&t=16815
That's great news :). Stuff like money, career progression, etc is inside a SQLite DB which is part of the saved game... this is compressed/encrypted... and that 16 byte key might not be a MD5 checksum... but rather a random encryption key for the DB (AES or TEA perhaps?), as I noticed the first chunk also changed when that 16 byte key changed between save files. Encryption is my archnemesis... so I'll sit this one out. You can dump a copy of the SQLite DB from memory if you wish by searching memory for "SQLite format 3" and dump about 1 MB of data.

Edit: Nevermind... I spoke too soon... all I needed was some coffee :). Its encrypted, not compressed... that 16 byte value is not the key... the key is the first 16 bytes of the chunk starting @ 0x228, the encrypted data follows after that. Not too sure about the algorithm yet... but doesn't look too complicated.
Albtraum wrote:btw: that 010 Editor looks really mighty, just what I was looking for last year to ease up hex editing prostreet saves.
my beloved Ultraedit and other hex editors I've tried are lacking a comfortable scripting feature, this could be the one.
Yes yes... 010 Editor is awesome compared to Ultraedit... been using it for a few years now since the Underground days.

Anyway, the file format for the saved games seems somewhat more logical to me now... should be easy to write a proper saved game editor that can edit the CarSlots, Customization, Parts, etc... but I have no idea how useful such a tool would be. Any ideas/comments on that?
User avatar
prince1142003
Valued Member
Valued Member
Posts: 3862
Joined: 23 Feb 2005, 06:03
Location: Enjoying college life.
Contact:

Re: Need For Speed Undercover mystery meshes

Post by prince1142003 »

I would want to have your babies.

J/K. But in all seriousness, such a tool would be awesome! It would beat having to hex edit everytime I wanted a bonus car.
Image
Albtraum
Turbo Charged
Turbo Charged
Posts: 60
Joined: 18 Dec 2007, 16:13
Location: Behind the Screen.

Re: Need For Speed Undercover mystery meshes

Post by Albtraum »

Arushan wrote:Anyway, the file format for the saved games seems somewhat more logical to me now... should be easy to write a proper saved game editor that can edit the CarSlots, Customization, Parts, etc... but I have no idea how useful such a tool would be. Any ideas/comments on that?
Shouldn't be that big of a deal:
just a search for say, the first bonus carslot, and all further address calculations based on that.

But such a simple tool would be great. Imho, car customization/parts aren't really needed, as all of that can be done in game already. And thats the reason I never finished that tool for ProStreet, I wanted to much for first version...
ah, maybe some option for unique vinyl skins.. have to extract that out of bought bonus cars first, though.

Maybe I can work something out of the unfinished prostreet save tool, but with car replacement features only this time :roll:
never finished it, because it became way too complex.
Last edited by Albtraum on 25 Nov 2008, 02:37, edited 1 time in total.
User avatar
RedCarDriver
Drift King
Drift King
Posts: 692
Joined: 20 Jan 2008, 05:33

Re: Need For Speed Undercover mystery meshes

Post by RedCarDriver »

Arushan, on NFSNation.net wrote:north_america/saleen/s7
Wait, what? Sweet, never noticed that, anyone willing to post pics?

Also, sorry to bother you Arushan, but I have a question about BinTex for UG2 (yeah, I know, you probably don't support that anymore): Did Cars\TEXTURES.BIN support ever work for UG2? I know you addressed that as a problem in MW and fixed it, but the fix doesn't help with UG2. I'm using BinTex 0.5 and I don't think there's a newer version.

I emailed you about that but I don't know if you got the email.
arushan
Valued Member
Valued Member
Posts: 106
Joined: 02 Nov 2004, 12:24

Re: Need For Speed Undercover mystery meshes

Post by arushan »

Albtraum wrote:Shouldn't be that big of a deal:
just a search for say, the first bonus carslot, and all further address calculations based on that.
Don't really have to search... First Car Slot = 230h + (32bit int value @ 208h)
That should be simple enough? :)
RedCarDriver wrote:
Arushan, on NFSNation.net wrote:north_america/saleen/s7
Wait, what? Sweet, never noticed that, anyone willing to post pics?
Just the fe entry is there... theres no real model or the vehicle node for it included...
RedCarDriver wrote:Also, sorry to bother you Arushan, but I have a question about BinTex for UG2 (yeah, I know, you probably don't support that anymore): Did Cars\TEXTURES.BIN support ever work for UG2? I know you addressed that as a problem in MW and fixed it, but the fix doesn't help with UG2. I'm using BinTex 0.5 and I don't think there's a newer version.

I emailed you about that but I don't know if you got the email.
Heh BinTex.. blast from the past. Haven't touched it in a few years, code is somewhere on an archived dvd and its painful VB6 code, which I can't stand to read anymore. Anyway, I thought textures.bin should have worked... try a version older than 0.5 if you can find one?
User avatar
prince1142003
Valued Member
Valued Member
Posts: 3862
Joined: 23 Feb 2005, 06:03
Location: Enjoying college life.
Contact:

Re: Need For Speed Undercover mystery meshes

Post by prince1142003 »

Just wanted a confirmation. The checksum fixer from ProStreet works for Undercover as well?
Image
Albtraum
Turbo Charged
Turbo Charged
Posts: 60
Joined: 18 Dec 2007, 16:13
Location: Behind the Screen.

Re: Need For Speed Undercover mystery meshes

Post by Albtraum »

Yes, it works, if the money editing part is skipped with -f parameter ;)
Arushan wrote:Don't really have to search... First Car Slot = 230h + (32bit int value @ 208h)
That should be simple enough? :)
Oh - k again :) thx for pointing that out
I'd simply searched for the Slotnum of the first car in list, but knowing this it's even easier :D
cparty
Valued Member
Valued Member
Posts: 91
Joined: 23 Apr 2006, 21:08

Re: Need For Speed Undercover mystery meshes

Post by cparty »

Some kind of SaveEditor would probably be nice, but I'm not sure if it's worth the time when you can do the most useful changes with some easy hex-editing. A savegame as a start is simpler, so I threw together something. It contains the CE cars, the Terlingua and the cop cars. I also added the cop 911, however I replaced the carcode with the true 911 to have it show up in the garage (although it also uses its performance settings now).

To add the cars, I found that the best working method is replacing the carcode of an existing car in the lot (eg: RX8) then buying it to have the game do the rest. Just make sure you are already in the menu for japanese cars before changing the codes in memory (to avoid the filtering of special cars). Replace the carcode, then add the pretune code right after the carcode as well and change car category from 01 to 09 or 11, this will have the pretuned customization slot built too when buying the car. Note that the cars won't show up pretuned at the dealer, but they are when bought. Now simply replace the RX8 logocode with the proper logocode for the replaced car and you're done.

Have fun :)
cparty
Attachments
cop.rar
0% savegame with CE and cop cars added to garage.
(157.8 KiB) Downloaded 414 times
User avatar
RedCarDriver
Drift King
Drift King
Posts: 692
Joined: 20 Jan 2008, 05:33

Re: Need For Speed Undercover mystery meshes

Post by RedCarDriver »

arushan wrote:...try a version older than 0.5 if you can find one?
Well, in 0.4, I just can't import into UG2 and MW files at all (I can export but that's it), and I doubt there's a 0.45 or anything. I know you probably addressed this problem in MW (a similar problem occured there but it seems to be fixed because people are importing decals and side-numbers), but it also occurs in UG2. If there's a workaround of any sort, that'd be great, but if not I'll probably figure something out. Thank you again, and sorry to everyone for hijacking this thread - Arushan, continuing this over PM may work better.

On-topic:
Because the buying system appears to be similar to MW's (dunno yet, I don't have the game), then yeah, it does seem logical that the way to buy the cars is the same as the way to buy addon cars in MW. That's interesting that the customization works that way though. But then again, my input here isn't very helpful since I don't have the game and I don't plan on getting it for a month or two, if even then :lol: so I'll stop posting here.
User avatar
vZv
Turbo Charged
Turbo Charged
Posts: 85
Joined: 26 Aug 2008, 13:30

Re: Need For Speed Undercover mystery meshes

Post by vZv »

2 cparty
If this is "that" easy, then can you describe editing process, in details please I'm a noob of HEX, to get CE car's, Terlingua mustang and Subaru, please :D
Image
Post Reply

Return to “Editing”