Need for Speed Carbon Hex Editing Guide

From NFSUnlimited.net Need for Speed Wiki
Revision as of 15:32, 24 December 2006 by Prince1142003 (Talk | contribs)
Jump to: navigation, search
Templates Clock.png This page is currently undergoing a major edit for a short while.

As a courtesy, please do not edit this page while this message is displayed. The person who added this notice will be listed in the edit history. If this page has not been edited recently, please remove this template.
This message is intended to help reduce edit conflicts; please remove it between major editing sessions.

Here is some information which should help you hex-edit your savegame or memory, of course not every detail is covered. If you aren't yet familiar with hex-editing you might want to read the MW Hex-Editing Guide & Tutorial, which is for MW though but also gives you some basic ideas about hex-editing a savegame. If you have any questions, comments, or concerns, please make a post here. One of our resident hex editors will try to answer your question as soon as possible.

And don't forget:
Before messing with savegames, always make a backup copy!

Contents

Overview

The car data is stored in 5 blocks in the savegame:

  • Car slots:
    A car slot contains the car code, link to customization & career slot and some other stuff (like car category). There is space for 200 car slot entries.
  • Customization slots:
    A customization slot contains a link to the customization2 & vinyl slot and some customization like performance parts, autosculpt settings, car/rimpaint and ride height. There is space for 75 customization entries.
  • Career slots:
    Your heat, impounds and other career related things are stored here. There is space for 10 career slots.
  • Customization2 slots:
    A customization2 slot contains the bodies, rims, spoilers, hoods, scoops, windowtint and sometimes a texture vinyl (Most Wanted style vinyl). There should be space for 75 customization2 slots.
  • Vinylslots:
    These were newly introduced with Carbon. They will hold the vinyl code, color, size & stuff. There is space for 700 vinyl slots. With a total of 75 customization slots, this will leave you with 9.333 vinyls per car

Savegame Structure

Car Slot

A single carslot uses 14h Bytes and is built like this: http://img367.imageshack.us/img367/6679/thecarslotfinaloe3.png

  • Carslot number:
    This is the car slot number, it's usually a subsequent number. However, for some bonus cars it's a unique id.
  • Logocode:
    This is the code of the logo/name which will be displayed for your car (Sometimes this code is useless because the game uses the carcode to decide which logo/name to display).
  • Carcode:
    This is the actual car code identifying your car, check the last section for logo/carcodes.
  • Car membership:
    This identifies where the car will be available (01 = stock, 02 = career, 04 = my cars, 08 = bonus, 10 = custom, 20 = special, 40 = won car, 80 = wingman car).
    The second byte is usually 00, if you change it to 01 the car will show up in the Mazda Dealership and as another side effect it's price will be 0$ in the carlots (Thanks to STAT-X for this info).
  • Car category:
    This identifies which category a car will show up (01 = muscle, 02 = exotic, 04 = tuner (Note: Bonus & addon cars use 08/0F instead)).
  • Customizaion slot link:
    This is the customization slot link number. It's the number of the customization slot which belongs to this car (Note: it is FF if the car is stock).
  • Career slot link:
    This is the career slot link number. It's the number of the career slot which belongs to this car (Note: it is FF if it's not a career car).

Customization Slot

A single customization slot uses 470h Bytes and looks like this (the image only shows the first bytes): http://img367.imageshack.us/img367/1433/thecustslotfinalow0.png

  • Customization2 slot link:
    This is the Customization2 slot link number. It's the pointer to the start of Customization2 slot which belongs to the car's customization.
  • Vinyl slot link:
    This is the Vinyl slot link number. It's the number of the vinyl slot which belongs to the car's customization (Note: it is FF FF if the car has no vinyl applied).
  • Tires:
    This is the current performance upgrade level of the car's tires.
  • Brakes:
    This is the current performance upgrade level of the car's brakes.
  • Suspension:
    This is the current performance upgrade level of the car's suspension.
  • Transmission:
    This is the current performance upgrade level of the car's transmission.
  • Engine:
    This is the current performance upgrade level of the car's engine.
  • Turbo/Supercharger:
    This is the current performance upgrade level of the car's turbo/supercharger.
  • NOS:
    This is the current performance upgrade level of the car's nitrous oxide system.
  • Owned parts:
    This is a number calculated from all the parts you own, so the game know which parts you have to pay in career.
  • Customization slot number:
    This is the customization slot identifier referenced by the car slot.
  • Paint:
    This is the paint of the car.
  • Wheel Paint:
    This is the paint of the car's wheels.
  • Autosculpt values:
    Here are all the settings from the autosculpt parts.
  • Ride Height:
    Not shown in the picture, but the slot ends with the car's ride height.

Career Slot

A single career slot uses 34h Bytes and looks like this: http://img147.imageshack.us/img147/9349/thecareerslotfinalsq6.png

  • Career slot number:
    This is the number identifying the career slot, it's the number referenced from the car slot.
  • Max impounds:
    This is the max number of impound strikes your car can get before it's taken away by the cops (min 03, max 05).
  • Current impounds:
    This is the amount of imounds strikes the car currently has.
  • Car heat:
    This is the car's heat.
  • Career specific car info:
    Here is some career specific car info like times busted/escaped etc.

Customization2 Slot

There is nothing like a customization2 slot (as a whole block), instead there are many part slots which are chained together. This means the customization2 will vary in size (the chain expands/shrinks with adding/removing parts) and it might be spread over a large area. One single part slot uses 4 Bytes and looks like this:
http://img143.imageshack.us/img143/7400/thecust2slotfinalvq2.png

  • Part code:
    This is the code of the part. The code can represent things like rims, spoilers, hoods, scoops, skirts, side mirrors, vinyl textures, window tint etc.
  • Next slot link:
    This is the pointer to the next part slot belonging to the car. It is FF FF if the end of the chain has been reached and there are no more parts for the car.

The savegame offers space for 9500 part slots, this should be enough for the 75 customization slots which have a "customization2".

Vinyl Slot

A single vinyl slot uses 1Ch Bytes and looks like this: http://img90.imageshack.us/img90/3066/thevinylslotfinalvc8.png

  • Move:
    This is the value the vinyl has been moved.
  • Rotate:
    This is the value the vinyl has been rotated.
  • Skew:
    This is the value the vinyl has been skewed.
  • Scale:
    this is the vinyl's scale value.
  • Vinyl code:
    This is the vinyl code identifying the vinyl. Check the last section for vinyl codes.
  • Next slot link:
    Like the part slots for customization2 the vinyl slots can be linked. This is used whenever you apply more than one vinyl to the car. The link is the number of the vinyl slot used for the next vinyl.
  • Color1:
    This is the vinyl's first color value.
  • Color2:
    This is the vinyl's seconds color value.
  • Color3:
    3rd color value.
  • Color4:
    4th color value.

Finding a Block

If you know exactly what you are looking for, you can always search for the representing bytes. Just make sure that what you found is really what you were looking for, or you might end up editing something else.

Car Slot

Hex Editor

The car slots start at 00010BD0h. As there are already 138 slots used, your first player car (with slot number 8A) is at 00011698h. Searching for the car code of the car (and it's membership and category) should get you to the car slot you are looking for. If you know the car slot number you can of course multiply the car slot number with 14h (the size of one car slot) and add the result to 00010BD0h.

Memory Editor

As your memory is quite big, you need to search for a value you want to edit (if you know it) or which is located near the value you want to edit. For example the first car slot number is 78563412, that should be a good value.

Customization Slot

Hex Editor

The customization slots start at 00011B70h. To get to your car's customization read the customization link number in the car slot of your car, multiply it with 470h (the size of one customization slot) and add it to 00011B70h (Slot number x slot size + start of block).
Example: If your customization link number is 21, you should go to 21h x 470h = 9270h + 00011B70h = 0001ADE0h.

Memory Editor

As the data will most certainly be located at another memory location the next time you start the game, you need to find a value to start and calculate the offsets from there. A good start would be the beginning of the car slot block. Search for 78563412 and note down the address you found.
Next, you find your car's customization link number, mulitply it with 470h and add the result to the above address + FA0h (FA0h = C8h x 14h = 200 car slots with a size of 14h Bytes).
Example: My carslot block starts at 0E44228Ch. Customization slot 21 will start at 21h x 470h = 9270h + 0E44228Ch + FA0h = 0E44C49Ch.

Career Slot

Hex Editor

The career slots start at 00026840h. To get to your car's career slot, read the career slot link number in the car slot of your car, multiply it with 34h (the size of one careerslot) and add it to 00026840h (Slot number x slot size + start of block).
Example: If your career slot link number is 02, go to 02h x 34h = 68h + 00026840h = 000268A8h.

Memory Editor

Like for the customization above find the address of the beginning of car slot block, then mulitply your career slot link number with 34h and add it to the found address + 15C70h (15C70h = FA0h + 14CD0h (14CD0h = 4Bh x 470h = 75 customization slots with a size of 470h Bytes)).
Example: My carslot block starts at 0E44228Ch. Career slot 02 will then start at 02h x 34h = 68h + 0E44228Ch + 15C70h = 0E457F64h.

Customization2 Slot

As mentioned in the previous section, there is no block of code with fixed size & position representing a customization2 slot. Instead there are plenty of 4 Byte part slots linked together and most certainly spread over the whole area for customization2. However, if you buy/add a new car or edit a premade one, the chain will be in one block, it will start to fragment when doing changes ingame. The customization2 link in the customization slot is the pointer to the first element in the chain. All elements can be located the same way:

  • To get to the address where the first element of your part chain is located, read the customization2 link number (Note: the number is 2 Bytes in size) in the customization slot of your car.
  • To get to the address of the next element in the chain, read the next link number of the current part slot (2 Bytes).

As the 2 Bytes for the link are in little endian order (this means the lowest order number comes first) you need to reverse the Byte order (not the numbers representing one byte) to bring them into big endian order.

Hex Editor

The part slots start at 00026A48h. Multiply the big endian value you read above with 4h (as one part slot is 4 Bytes in size) and add the result to 00026A48h.
Example: The customization2 link in my customization slot is 64 06. Reversing the byte order to bring it into big endian format will give us 06 64. So the start of the part slot chain is at 664h x 4h = 1990h + 00026A48h = 000283D8h.

Memory Editor

Like for the career and customization slots above, find the address of the beginning of car slot block, then multiply your part slot link number with 4h and add it to the found address + 15E78h (15E78h = FA0h + 14CD0h (14CD0h = 4Bh x 470h = 75 customization slots with a size of 470h Bytes) + 208h (208h = Ah x 34h = 10 career slots with a size of 34h Bytes)).
Example: My carslot block starts at 0E44228Ch. The first part slot (which is linked as 64 06) will then start at 664h x 4h = 1990h + 0E44228Ch + 15E78h = 0E459A94h.

Vinyl Slot

Hex Editor

The vinyl slots start at 0002FEB8h. To get to your car's vinyl slot, read the vinyl slot link number in the customization slot of your car (or the next slot link from the current vinyl slot), multiply it with 1ch (the size of one vinyl slot) and add the result to 0002FEB8h (Slot number x slot size + start of block).
Example: If your vinyl slot link is 08, you will find the vinyl slot at 08h x 1Ch = E0h + 0002FEB8h = 0002FF98h.

Memory Editor

As we did for finding all other blocks in memory, find the start of the car slot block and we calculate from there. Multiply the vinyl slot link number from the customization slot (or the next slot link from the current vinyl slot) with 1Ch (the size of a vinyl slot) and add the result to the found address + 1F2E8h (1F2E8h = FA0h + 14CD0h (14CD0h = 4Bh x 470h = 75 customization slots with a size of 470h Bytes) + 208h (208h = Ah x 34h = 10 career slots with a size of 34h Bytes) + 9470h (9470h = 251Ch x 04h = 9500 part slots with size 4 Bytes)).
Example: My carslot block starts at 0E44228Ch. My vinyl slot 08 will then start at 08h x 1Ch = E0h + 0E44228Ch + 1F2E8h = 0E461654h.

Making Changes

Basic Modifications

Basic modifcations have been explained in the Most Wanted Hex Editing topic

Remove the texture vinyl from a car you added/bought

Some of the cars (which aren't meant to be bought) come with a texture vinyl and not a true carbon vinyl. In order to put your own carbon vinyls on, you need to remove the texture vinyl first. 1) Check the list at the bottom if there is a texture code for your car. 2) Find the customization2 slot for the car you want to remove the texture. If you haven't messed around with the parts yet, all part slots should be near each other and you should be able to find the texture code from 1) near the end of the chain. 3) Replace the code with something you can find again (in case of an error) and something that isn't another texture code itself. 1234 might be a good choice.

Add a special vinyl to your car

Special vinyls are vinyls that cannot be chosen from the ingame menu, of course you can add normal vinyls (which can be chosen ingame) as well.
As adding a vinyl to a car which doesn't have one yet is prone to errors, we are going to add a vinyl ingame and then replace it's code with another code.
1) Find the vinyl slot for your car.
2) Replace the old vinyl code with the new one (Check the list for vinyl codes).

Codes

Car Codes

Player Cars
Hexadecimal code Car Name
03E618F9 500AA602 Shelby G.T. 500
08D4BE6E 08D4BE6E Dodge Viper SRT10
0A4F24BA 4A3E5F1D Jaguar XK
0BC42C7B 0BC42C7B Lamborghini Gallardo
12AC7670 12AC7670 Mazdaspeed 3
16431235 16431235 Toyota Corolla GT-S
19459490 19459490 Chevrolet Camaro SS
21BF2B94 21BF2B94 VW Golf R32
2C327487 2C327487 Audi LeMans Quattro
2C327487 CB5A6245 Audi LeMans Quattro
2FAF7782 2FAF7782 Mercedes CLK 500
33C8098E 33C8098E Mazda RX-7
3434F166 3434F166 Toyota Supra
34898C19 C5ED32A2 Subaru Impreza WRX
36493D31 36493D31 Lotus Elise
374433D6 374433D6 Mazda RX-8
38AF78B9 38AF78B9 Dodge Challenger Concept
39851335 39851335 Nissan 350Z
39947F5A 39947F5A Porsche 911 Turbo
3A6BA4E2 3A6BA4E2 Dodge Charger SRT8
4B95353B 33417A6E Chevrolet Corvette Z06
4D94417D 4D94417D Mitsubishi Lancer Evo IX
4DFD939B 4DFD939B Ford Mustang GT
4E4ACC23 0EE2332A BMW M3 GTR #2
4E4ACC23 B35F084E BMW M3 GTR #1
4E7EE003 4E7EE003 Chevrolet Chevelle SS
60B9FFF2 A3879E6A Porsche 911 GT3 RS
6A1CB6A4 6A1CB6A4 Aston Martin DB9
708E3EE7 708E3EE7 Infiniti G35
726790A3 726790A3 Dodge Challenger
756F8D86 756F8D86 Dodge Charger R/T
75D7DF4F 00A497C0 Chevrolet Camaro Concept
860C8930 860C8930 Toyota MR2
89F654AD 89F654AD Pagani Zonda F
929986C4 D43D0667 Porsche Carrera GT
9901A8DB 9901A8DB Nissan Skyline GTR
A1E1D3D8 A1E1D3D8 Vauxhall Monaro
A1F94771 A1F94771 Mercedes SL65 AMG
A6DCC132 A6DCC132 Koenigsegg CCX
ACBD671B ACBD671B Plymouth Road Runner
B02FFF5B B02FFF5B Lexus IS300
B40AA291 B40AA291 Lotus Europa S
B6FA2498 4EB727B9 Shelby GT500
B778D032 1685BFB3 Mitsubishi Eclipse 1999
BBD92AE3 BBD92AE3 Mercedes SLR McLaren
BD0BD7A2 BD0BD7A2 Mitsubishi Eclipse GT
C4053AF9 09E1311B Porsche Carrera GT
C4053AF9 0A2EAACD Chevrolet Corvette Z06
C4053AF9 0B01D71F Porsche Cayman S
C4053AF9 14589FE1 Mazda RX-7
C4053AF9 149A47E3 Toyota Supra
C4053AF9 2E1636B3 Palmont PD2
C4053AF9 35A8BC22 Ford GT
C4053AF9 36DEB2C1 Lamborghini Gallardo
C4053AF9 48BA06AC Lamborghini Murcielago
C4053AF9 50D247AB Mazdaspeed 3
C4053AF9 5D29CF87 Mitsubishi Lancer Evo IX
C4053AF9 68CC4A72 Dodge Charger R/T
C4053AF9 69AD7DF5 Palmont PD1
C4053AF9 74AEF516 Aston Martin DB9
C4053AF9 76531977 Palmont DT1
C4053AF9 770FE131 Dodge Charger R/T
C4053AF9 79F2F4F0 Dodge Challenger
C4053AF9 7F414C7B Subaru Impreza WRX
C4053AF9 928F0F95 Palmont PD2
C4053AF9 961642D4 BMW M3 GTR #1
C4053AF9 A7EED9AC Palmont FD1
C4053AF9 B31784EA Jaguar XK
C4053AF9 BDEE5F65 Audi LeMans Quattro
C4053AF9 C3B6D9D2 Plymouth Hemi Cuda
C4053AF9 C81AD48C Mazda RX-7
C4053AF9 CB4FF03E Mitsubishi Eclipse GT
C4053AF9 CD8A9F1D Dodge Charger R/T
C4053AF9 D3ACA1C8 Chrysler 300c Hemi SRT8
C4053AF9 DA9CA2D0 Palmont PD3
C4053AF9 E83BB3AC Alfa Romeo Brera
C63D48AA C63D48AA Pontiac GTO
C642ADD6 B367DBE4 Lamborghini Murcielago LP640
C6F46D5F C6F46D5F Plymouth Hemi Cuda
D1A01768 D1A01768 Chrysler 300c Hemi SRT8
D43C67F8 D43C67F8 Alfa Romeo Brera
EAA5C042 EAA5C042 Ford GT
EB5B5541 EB5B5541 Porsche Cayman S
EB6718EB EB6718EB Renault Clio V6
EB77CDC1 EB77CDC1 Lamborghini Murcielago
FC2B6FA8 FC2B6FA8 Nissan 240sx

Personal tools
Namespaces
Variants
Actions
NFSUnlimited
Need for Speed Wiki
NFSUnlimited.net Wiki
Toolbox