First of all:
This tutorial is intended only for mods you created or personal use. Do not attempt to upload cars converted from other authors as yours without prior permission since we can tell whether a car is stolen by just looking at file size of geometry.bin and the part names in BINViewer/a hex editor. You have been warned.
Note: the bracketed (< >) terms are meant to be substitued without brackets (duh) and respecting their own capitalization. So for example <MANUFACTURER> is substituted for HONDA and <color> gets substituted by green
If you're going to add cars with Ed The Car Dealer (deprecated method)
Once you have all the files set up, proceed to the next step
You will need to create new nodes for the addon car, but it's better to copy an existing one since creating a new one is rather buggy. And since we're dealing with a car from modloader, it's better to copy them from the original car it's replacing. Normally that would be a tedious process, but I prepared a script that will cut some work here:
copy_node brakes <original_xname> default <added_xname>
copy_node brakes <original_xname>_top <added_xname> <added_xname>_top
copy_node chassis <original_xname> default <added_xname>
copy_node chassis <original_xname>_top <added_xname> <added_xname>_top
copy_node ecar <original_xname> racers <added_xname>
copy_node frontend <original_manufacturer> <region> <added_manufacturer>
copy_node frontend <original_xname> <manufacturer> <added_xname>
copy_node engine <original_xname> default <added_xname>
copy_node engine <original_xname>_top <added_xname> <added_xname>_top
copy_node induction <original_xname> default <added_xname>
copy_node induction <original_xname>_top <added_xname> <added_xname>_top
copy_node pvehicle <original_xname> racers <added_xname>
copy_node tires <original_xname> default <added_xname>
copy_node tires <original_xname>_top <added_xname> <added_xname>_top
copy_node transmission <original_xname> default <added_xname>
copy_node transmission <original_xname>_top <added_xname> <added_xname>_top
copy_node camerainfo <original_xname>_hood hood <added_xname>_hood
update_field pvehicle <added_xname> MODEL Visual <MODEL_XNAME (IN ALL CAPS)>
update_field pvehicle <added_xname> MODEL Collision <MODEL_XNAME (IN ALL CAPS)>
update_field pvehicle <added_xname> MODEL Collision64 <MODEL_XNAME (IN ALL CAPS))>
update_field pvehicle <added_xname> transmission[0] Collection <added_xname>
update_field pvehicle <added_xname> transmission[1] Collection <added_xname>_top
update_field pvehicle <added_xname> tires[0] Collection <added_xname>
update_field pvehicle <added_xname> tires[1] Collection <added_xname>_top
update_field pvehicle <added_xname> induction[0] Collection <added_xname>
update_field pvehicle <added_xname> induction[1] Collection <added_xname>_top
update_field pvehicle <added_xname> frontend Collection <added_xname>
update_field pvehicle <added_xname> engine[0] Collection <added_xname>
update_field pvehicle <added_xname> engine[1] Collection <added_xname>_top
update_field pvehicle <added_xname> chassis[0] Collection <added_xname>
update_field pvehicle <added_xname> chassis[1] Collection <added_xname>_top
update_field pvehicle <added_xname> brakes[0] Collection <added_xname>
update_field pvehicle <added_xname> brakes[1] Collection <added_xname>_top
* some induction nodes have _base attached to it, that's for cars that don't come with turbo/supercharger, in that case the nodes related to induction will be the following:
copy_node induction <original_xname>_base default <added_xname>_base
copy_node induction <original_xname>_top <added_xname>_base <added_xname>_top
update_field pvehicle <added_xname> induction[1] Collection <added_xname>_base
update_field pvehicle <added_xname> induction[2] Collection <added_xname>_top
**some induction nodes have only the _top node, mostly for high-tier cars, in that case the nodes related to induction will be the following:
copy_node induction <original_xname>_top default <added_xname>_top
update_field pvehicle <added_xname> induction[1] Collection <added_xname>_top
*** If you're adding the car GLOBALB entry with Binary or Ed, set the <XNAME> in the Collision and Collision64 lines as the XNAME of the added car. If you're adding the car GLOBALB entry with ReCompiler, you have to change the Collision and Collsion64 lines to another original car XNAME; your car might float above/sinking on the ground so it might take a few tries to get it right.
Copy and paste this into a text editor (Notepad will do), replace the bracketed names as suggested (for example, <added_xname> to mustanggt and so on) and save it as <addon_car>.nfsms.
Back to VLTEd, import the .nfsms file with File>Import>ModScript. Click "Install" in the following dialog.
Next, import the the FE.MWPS file of the modloader car with File > Import > MWPS. Click "Import", then OK. You will see the script editor pane (lower right quadrant) now has some commands, but we need to make a slight change: delete the line that contains "manufacturer" since that has to be taken care later. (if there is any)
Now import the ATTRIBUTES.MWPS file. However MWPS import is not perfect and you will notice there might be some errors as noted in the import results window; scroll down to check what those might be.
For example, here it says "No value has been found at offset"; in this case it refers to the gear count value in the transmission node, which can be fixed by right-clicking on the car's transmission node, selecting "edit fields" and changing the GEAR_RATIO count to the desired value. Also some values like the copspeech and engine/turbo sounds might not be imported at first; you could either check if those have any other type than dword next to patch in their lines in the MWPS file in Notepad and try importing it again or change them manually in VLTEd
Click OK, then copy the contents of the script editor and paste them into a text editor. Replace the xname of the original car for the addon car, copy the whole thing; open the .nfsms file with the text editor and paste the copied script at the bottom of script file, save the script.
Back to VLTEd, reload the file to undo changes and import the script again. Now, change the missing values (engine/turbo sounds, copspeech, etc.) if any and then go to the frontend node of the added car (and added manufacturer, if there is any). Set the manufacturer number according to the Unlimiter list in the .ini (you can add manufacturers to the ini file and use them as well).
Once when you're done, save, export the script (overwrite the old one) and clear the script editor window. Now try out your new add-on car by creating a new save! (or by patching an existing save -see below-)
First export the vinyls with TexEd to a folder. Then open AntRenamer and add the folder containing the exported vinyls.
Then click on "Actions", go to "String replacement", in "Search for" put (in this example PUNTO vinyls are converted to SENTRAB13)
Click Go and check if all the files were renamed correctly, correct if neccessary.
Download this vinyls_base file, rename it to vinyls.bin and open it with Tex-Ed. Go to "Texture" > "Add from folder", select the folder containing the vinyls and click OK. Save the file (it might take a couple of minutes) to finish.
Unzip the Save Patcher to a folder. The folder structure should be like this
And the contents of the <XNAME>.ini are the following:
Now run the NfSMW - SavePatcher program, open Patch Save and click on the save you want to patch. You will hear a confirmation sound if done correctly.
Finally, open the NFSMW Save Editor, open the patched save and save it to make it work. You're done!
Hope you found this tutorial useful, cya!
This tutorial is intended only for mods you created or personal use. Do not attempt to upload cars converted from other authors as yours without prior permission since we can tell whether a car is stolen by just looking at file size of geometry.bin and the part names in BINViewer/a hex editor. You have been warned.
Things you will need:
- NFSMW Unlimiter [download] - needed to make add-on cars work properly
- MWInside's ReCompiler v190609 [download] - recompiles models and textures, adds cars to globalb.bun/lzc, logos to fronta.bun, strings to language files. (however, for adding cars it's being deprecated in favor of Binary)
- Base files for ReCompiler by nlgzrgn [download] - basic file structure for recompiler
- Binary [download] - edits GlobalB.lzc, FrontB.lzc, language files and others
- VLTEd [download] - edits VLT database
- NFSTexEd 1.7 [download] - import/extract textures from .bin/.bun/.lzc files
Optional:
- AntRenamer [download | portable] - a little useful program for renaming multiple files
- Save Patcher by MWInside [download] - to patch existing saves with addon cars
- NFS-Hasher [download] - to calculate the hashes needed for the ini file
Note: the bracketed (< >) terms are meant to be substitued without brackets (duh) and respecting their own capitalization. So for example <MANUFACTURER> is substituted for HONDA and <color> gets substituted by green
Step 1: File Structure
Make sure to install you have installed the NFSMW Unlimiter first or the add-on cars won't work properlyIf you're going to add cars with Binary
If you're going to add cars with Ed The Car Dealer (deprecated method)
If you're going to add cars with ReCompiler (even more deprecated method)
Once you have all the files set up, proceed to the next step
Step 2: (Re)Compiling Geometry/Textures and adding the GlobalB/Frontend/Language data
If you're going to add cars with Binary
If you're going to add cars with Ed The Car Dealer (deprecated method)
If you're going to add cars with ReCompiler (even more deprecated method)
Step 3: VLT Editing
Open VLTEd and go to File > Open; select your NFSMW folder. You will see the VLT nodes like this:You will need to create new nodes for the addon car, but it's better to copy an existing one since creating a new one is rather buggy. And since we're dealing with a car from modloader, it's better to copy them from the original car it's replacing. Normally that would be a tedious process, but I prepared a script that will cut some work here:
copy_node brakes <original_xname> default <added_xname>
copy_node brakes <original_xname>_top <added_xname> <added_xname>_top
copy_node chassis <original_xname> default <added_xname>
copy_node chassis <original_xname>_top <added_xname> <added_xname>_top
copy_node ecar <original_xname> racers <added_xname>
copy_node frontend <original_manufacturer> <region> <added_manufacturer>
copy_node frontend <original_xname> <manufacturer> <added_xname>
copy_node engine <original_xname> default <added_xname>
copy_node engine <original_xname>_top <added_xname> <added_xname>_top
copy_node induction <original_xname> default <added_xname>
copy_node induction <original_xname>_top <added_xname> <added_xname>_top
copy_node pvehicle <original_xname> racers <added_xname>
copy_node tires <original_xname> default <added_xname>
copy_node tires <original_xname>_top <added_xname> <added_xname>_top
copy_node transmission <original_xname> default <added_xname>
copy_node transmission <original_xname>_top <added_xname> <added_xname>_top
copy_node camerainfo <original_xname>_hood hood <added_xname>_hood
update_field pvehicle <added_xname> MODEL Visual <MODEL_XNAME (IN ALL CAPS)>
update_field pvehicle <added_xname> MODEL Collision <MODEL_XNAME (IN ALL CAPS)>
update_field pvehicle <added_xname> MODEL Collision64 <MODEL_XNAME (IN ALL CAPS))>
update_field pvehicle <added_xname> transmission[0] Collection <added_xname>
update_field pvehicle <added_xname> transmission[1] Collection <added_xname>_top
update_field pvehicle <added_xname> tires[0] Collection <added_xname>
update_field pvehicle <added_xname> tires[1] Collection <added_xname>_top
update_field pvehicle <added_xname> induction[0] Collection <added_xname>
update_field pvehicle <added_xname> induction[1] Collection <added_xname>_top
update_field pvehicle <added_xname> frontend Collection <added_xname>
update_field pvehicle <added_xname> engine[0] Collection <added_xname>
update_field pvehicle <added_xname> engine[1] Collection <added_xname>_top
update_field pvehicle <added_xname> chassis[0] Collection <added_xname>
update_field pvehicle <added_xname> chassis[1] Collection <added_xname>_top
update_field pvehicle <added_xname> brakes[0] Collection <added_xname>
update_field pvehicle <added_xname> brakes[1] Collection <added_xname>_top
* some induction nodes have _base attached to it, that's for cars that don't come with turbo/supercharger, in that case the nodes related to induction will be the following:
copy_node induction <original_xname>_base default <added_xname>_base
copy_node induction <original_xname>_top <added_xname>_base <added_xname>_top
update_field pvehicle <added_xname> induction[1] Collection <added_xname>_base
update_field pvehicle <added_xname> induction[2] Collection <added_xname>_top
**some induction nodes have only the _top node, mostly for high-tier cars, in that case the nodes related to induction will be the following:
copy_node induction <original_xname>_top default <added_xname>_top
update_field pvehicle <added_xname> induction[1] Collection <added_xname>_top
*** If you're adding the car GLOBALB entry with Binary or Ed, set the <XNAME> in the Collision and Collision64 lines as the XNAME of the added car. If you're adding the car GLOBALB entry with ReCompiler, you have to change the Collision and Collsion64 lines to another original car XNAME; your car might float above/sinking on the ground so it might take a few tries to get it right.
Copy and paste this into a text editor (Notepad will do), replace the bracketed names as suggested (for example, <added_xname> to mustanggt and so on) and save it as <addon_car>.nfsms.
Back to VLTEd, import the .nfsms file with File>Import>ModScript. Click "Install" in the following dialog.
Next, import the the FE.MWPS file of the modloader car with File > Import > MWPS. Click "Import", then OK. You will see the script editor pane (lower right quadrant) now has some commands, but we need to make a slight change: delete the line that contains "manufacturer" since that has to be taken care later. (if there is any)
Now import the ATTRIBUTES.MWPS file. However MWPS import is not perfect and you will notice there might be some errors as noted in the import results window; scroll down to check what those might be.
For example, here it says "No value has been found at offset"; in this case it refers to the gear count value in the transmission node, which can be fixed by right-clicking on the car's transmission node, selecting "edit fields" and changing the GEAR_RATIO count to the desired value. Also some values like the copspeech and engine/turbo sounds might not be imported at first; you could either check if those have any other type than dword next to patch in their lines in the MWPS file in Notepad and try importing it again or change them manually in VLTEd
Click OK, then copy the contents of the script editor and paste them into a text editor. Replace the xname of the original car for the addon car, copy the whole thing; open the .nfsms file with the text editor and paste the copied script at the bottom of script file, save the script.
Back to VLTEd, reload the file to undo changes and import the script again. Now, change the missing values (engine/turbo sounds, copspeech, etc.) if any and then go to the frontend node of the added car (and added manufacturer, if there is any). Set the manufacturer number according to the Unlimiter list in the .ini (you can add manufacturers to the ini file and use them as well).
Once when you're done, save, export the script (overwrite the old one) and clear the script editor window. Now try out your new add-on car by creating a new save! (or by patching an existing save -see below-)
Optional step 1: Vinyls
If the car came with vinyls, you can convert those for addon use.First export the vinyls with TexEd to a folder. Then open AntRenamer and add the folder containing the exported vinyls.
Then click on "Actions", go to "String replacement", in "Search for" put (in this example PUNTO vinyls are converted to SENTRAB13)
Click Go and check if all the files were renamed correctly, correct if neccessary.
Download this vinyls_base file, rename it to vinyls.bin and open it with Tex-Ed. Go to "Texture" > "Add from folder", select the folder containing the vinyls and click OK. Save the file (it might take a couple of minutes) to finish.
Optional step 2: Patching save to use add-on cars
In case you're not in the mood to make a new save every time you add a new car, you can patch an existing save file. Keep on mind to make a backup of the original save because you cannot remove cars from save files. Also, it will break existing cars in My Cars, Career Garage and Bonus CarsUnzip the Save Patcher to a folder. The folder structure should be like this
And the contents of the <XNAME>.ini are the following:
You will need NFS-Hasher to hash the frontend and xnames. Open it up and in the "Input Text" field type the frontend name, then click the "Copy" button next to "VLT File". Paste the hashed name in the frontend and remove the "0x" in front of it. Do the same for the xname/pvehicle line and save.[MAIN] frontend = <hashed frontend name> pvehicle = <hashed xname>
Now run the NfSMW - SavePatcher program, open Patch Save and click on the save you want to patch. You will hear a confirmation sound if done correctly.
Finally, open the NFSMW Save Editor, open the patched save and save it to make it work. You're done!
Hope you found this tutorial useful, cya!