Wednesday, February 17, 2021

NFSMW General Modding Information (old version archive)

General Information

Car Modding

Tools you need:

  • NFSMW Mod Tools by Arushan [NFSCars] - tools required to compile geometry and textures, includes .mwr export plugin for ZModeler 1
    • Recommended:
      • VLTEdit 1.2 by MWisBest [download] since it has more hashes than Aru's release
      • nlgzrgn's mwgc fork [download], which improves on the original by adding automatic mountpoint rotation and possibility to attach mountpoints to bodykits
      • My improved batch files for mwgc [download]: no more opening up and editing batch files: just run, follow some prompts and that's it! Best used with nlgzrgn's mwgc.
    • You can also use the NFSU2 texture compiler included in the NFSU2 ModTools [nfsu360]
  • ZModeler 1.07b [download] (modelling program)
  • Some image editing program able to open/save .dds files (like DXTBmp or GIMP with the DDS plug-in)
  • Notepad or similar (for .MWPS editing)

Optional tools:

  • BINViewer and MTGUI [download] - tool used for editing mountpoints (best used with this hash values file) and graphical interface for modtools, respectively.
  • MWPS Templates by FOX [download] - ready-made .MWPS templates



How do NFSMW (mod) cars work

NFSMW cars are made mainly of a geometry file (GEOMETRY.BIN) and textures (TEXTURES.BIN). Using modloader, mod cars are stored in the ADDONS folder like this:


ADDONS
+---cars_replace
¦ ¦
¦ +---<carname>
¦         ATTRIBUTES.MWPS <---performance, sounds
¦         CAR.INI <---settings for modloader, car name
¦         FE.MWPS <---manufacturer, unlock and price settings
¦         GEOMETRY.BIN
¦         SECONDARYLOGO.BIN <---secondary logo
¦         TEXTURES.bin
¦         VINYLS.BIN
¦
+---frontend
        +---MANUFACTURERS
                ###-<MANUFACTURER>.BIN <---manufacturer logo


Part names


For any car:
base_x
kit00_driver_x
kit00_front_tire_x
kit00_front_brake_x *
kit00_rear_brake_x *

For racer cars
kit##_body_x <----00: stock; 01-05: aftermarket
kit00_doorline_x
kit00_door_left_x
kit00_door_right_x
kit00_front_bumper_x
kit00_front_bumper_badging_set_x
kit00_rear_bumper_x
kit00_rear_bumper_badging_set_x
kit00_decal_right_door_rect_medium_x
kit00_decal_left_door_rect_medium_x
kit00_decal_right_quarter_rect_medium_x
kit00_decal_left_quarter_rect_medium_x
kit00_exhaust_x
kit00_hood_x
kit00_interior_x
kit00_left_brakelight_x
kit00_right_brakelight_x
kit00_left_headlight_x
kit00_right_headlight_x
kit00_left_headlight_glass_x
kit00_right_headlight_glass_x
kit00_left_side_mirror_x
kit00_right_side_mirror_x
kit00_front_window_x
kit00_rear_window_x
kit00_front_left_window_x
kit00_front_right_window_x
kit00_rear_left_window_x
kit00_rear_right_window_x
kit00_spoiler_x
kit00_universal_spoiler_base_x
style##_hood_x <-----## stands for hood #, see below under "Hood Order"
kit00_damage0_frontleft_x <----- damage 0 here is for scratches
kit00_damage0_frontright_x
kit00_damage0_rearleft_x
kit00_damage0_rearright_x
kit00_damage0_front_x
kit00_damage0_rear_x
decal_front_window_wide_medium_x
decal_rear_window_wide_medium_x
decal_left_door_rect_medium_x
decal_right_door_rect_medium_x
decal_left_quarter_rect_medium_x
decal_right_quarter_rect_medium_x

For cop cars
kit00_damage0_body_x
kit00_damage0_hood_x
kit00_damage0_spoiler_x
kit00_damage0_trunk_x
kit00_damage0_left_door_x
kit00_damage0_right_door_x
kit00_damage0_left_rear_door_x
kit00_damage0_right_rear_door_x
kit00_damage0_hood_x
kit00_damage0_cop_lights
kit00_damage1_body_x
kit00_damage1_hood_x
kit00_damage1_spoiler_x
kit00_damage1_trunk_x
kit00_damage1_left_door_x
kit00_damage1_right_door_x
kit00_damage1_left_rear_door_x
kit00_damage1_right_rear_door_x
kit00_damage1_hood_x
kit00_damage1_cop_lights_x

Hood order
style06_hood_a Overdial
style07_hood_a Trident
style13_hood_a Fusion
style16_hood_a Colix
----------------
style17_hood_a Airomax
style20_hood_a DJM Hyde
style02_hood_a Double-V
style03_hood_a Tri-Slot
style04_hood_a Speed
----------------
style23_hood_a Factor X
style26_hood_a Speedline
style32_hood_a Tremor
----------------
style05_hood_a G-Force
style09_hood_a Mongoose
----------------
style10_hood_a Twister
style21_hood_a Eraser
style31_hood_a Tsunami

  • "x" stands for the LOD used (from most detailed (a) to least detailed (e)
  • *: does not work for traffic cars


Shaders

0xD6D6080A ; body paint (aka CARSKIN)
ALUMINUM
BADGING
BODY
BODY_ALUMINUM
BODY_CHROME
BODY_CLEAR_PLASTIC
BODY_DULL_PLASTIC
BODY_LEFT
BODY_MISC
BODY_MOLDINGS
BODY_PLAINNOTHING
BODY_REAR
BODY_RIGHT
BODY_RUBBER_ACCORDIAN
BODY_TOP
BOTTOM
BRAKEDISC
BRAKELIGHT
BRAKELIGHTGLASS
CALIPER
CALIPERDECAL
CARBONFIBER
CARBONFIBER2
CENTRE_BRAKELIGHT
CHAR_CLOTH
CHAR_HAIR
CHAR_LATEX
CHAR_LEATHER
CHAR_PLASTIC
CHAR_RUBBER
CHAR_SKIN
CHROME
CLEARPLASTIC
CUSTOMPAINT_x (x: 1 - 20)
DAMAGE0
DECAL
DECAL1
DECAL2
DECAL3
DECAL4
DECAL5
DECAL6
DECAL7
DECAL8
DEFAULT
DIABLOHP
DOORLINE
DRIVER
DRIVER_COP (for cop cars)
DRIVER_CUTOUT (for 2D drivers for lower details)
DRIVER_PLAYER (for racer cars)
DRIVERHEAD
DULLENGINE
DULLPLASTIC
ENGINE
EXHAUST_TIP
GLASS
GOLDROTOR
GRILL
HEADLIGHT
HEADLIGHTGLASS
HEADLIGHTREFLECTOR
HOSES
INTERCOOLER
INTERIOR
LICENSEPLATE
LOGO
MAGCHROME
MAGGUNMETAL
MAGSILVER
MAGSILVERGLOSS
MATTEPLASTIC
MESH
METPAINTx (x: BLACK, BLUE, GOLD, GRAY, GREEN, RED, SILVER, YELLOW)
MIRROR
MISC
MOLDINGS
PEARL[x] x: 1 - 9
PLAIN_ALUMINUM
PLAIN_CHROME
PLAINNOTHING
PLASTICHUBCAP
RAD
RADIATOR
REGPAINTx (x: BLACK, BLUE, GRAY, GREEN, ORANGE, PINK, RED, WHITE, YELLOW)
RIM_KIT00_BLACK
RIM_DULL_PLASTIC
RIM_KIT00_CHROME
RIM_KIT00_GUN_METAL
RIM_KIT00_SILVER
RIMPEARL[x] (x: 1 - 9)
ROAD
ROTOR (For police helicopters with spinning blades)
RUBBER
SHINYMOLDINGS
SHINYPLASTIC
SIDEWALL
TREAD
TRAFFIC
TRAFFICWINDOWS
USER_CALIPERS
USER_EXHAUST
USER_EXHAUST2
USER_HOSES
USER_RIMS
USER_RIMS_CHROME
USER_RIMS_GLOSS
USER_RIMS_GUNMETAL
USER_RIMS_MAGSILVER
USER_RIMS_MET
USER_RIMS_SILVERGLOSS
USER_SPOILER
WHEELBLUR
WHITE
WINDOWMASK
WINDSHIELD


Textures

BADGING
BADGING_EU *
BADGING_N
BRAKELIGHT_CENTRE ^
BRAKELIGHT_LEFT ^
BRAKELIGHT_RIGHT ^
BRAKELIGHT_GLASS_CENTRE ^
BRAKELIGHT_GLASS_LEFT ^
BRAKELIGHT_GLASS_RIGHT ^
DOOR_HANDLE
DRIVER
ENGINE
ENGINE_N
HEADLIGHT_LEFT ^
HEADLIGHT_RIGHT ^

HEADLIGHT_GLASS_LEFT ^
HEADLIGHT_GLASS_RIGHT ^
INTERIOR
INTERIOR_N
KIT00_BRAKELIGHT_DAMAGE0
KIT00_BRAKELIGHT_GLASS_DAMAGE0
KIT00_BRAKELIGHT_GLASS_OFF
KIT00_BRAKELIGHT_GLASS_ON
KIT00_BRAKELIGHT_OFF
KIT00_BRAKELIGHT_ON
KIT00_HEADLIGHT_DAMAGE0
KIT00_HEADLIGHT_GLASS_DAMAGE0
KIT00_HEADLIGHT_GLASS_OFF
KIT00_HEADLIGHT_GLASS_ON
KIT00_HEADLIGHT_OFF
KIT00_HEADLIGHT_ON
LICENSE_PLATE
LOGO
MISC
MISC_N
NEON
RIM
RIM_BLUR
SHADOWFE
SHADOWIG
SIDELIGHT
SKIN1
SKIN1B
SKIN2
SKIN3
SKIN4
TIRE
TIRE_N
TREAD
TREAD_N


* replaces BADGING in EU-region games
^ not an actual texture but an assignation for the matlist file (for example BRAKELIGHT=CHROME/BRAKELIGHT_RIGHT)


Mountpoints

#COPLIGHTRED
#COPLIGHTBLUE
#COPLIGHTWHITE
#LEFT_BRAKELIGHT
#RIGHT_BRAKELIGHT
#CENTRE_BRAKELIGHT
#LEFT_REVERSE
#RIGHT_REVERSE
#LEFT_EXHAUST
#RIGHT_EXHAUST
#LEFT_HEADLIGHT
#RIGHT_HEADLIGHT
#ROOF_SCOOP
#SPOILER

If you are using nlgzrgn's mwgc, you can attach a mountpoint to a bodykit by putting a number before the mountpoint name (eg: 0#LEFT_EXHAUST for an exhaust mountpoint attached to the stock bodykit, 2#RIGHT_REVERSE for a reverse light attached to bodykit 2, etc.)


build.bat/materials.txt/textures.txt/link.txt syntax, internal values and folder names

build.bat syntax
@echo off
echo =====================================================
echo Compiling Textures...
echo =====================================================
..\bin\mwtc.exe textures.txt
..\bin\texpatch output\FRONTEND\MANUFACTURERS\###-<MANUFACTURER>.BIN "CARSELECT_<MANUFACTURER>_NAME"
..\bin\texpatch output\CARS_REPLACE\<CAR FOLDER>\SECONDARYLOGO.BIN "SECONDARY_LOGO_<INTERNAL NAME>_1"
echo.
echo =====================================================
echo Compiling Model...
echo =====================================================
..\bin\mwgc -nowait -xname "<CAR FOLDER>" -matlist "materials.txt" -xlink "link.txt" -source "<your model>.mwr" -target "output\CARS_REPLACE\<CAR FOLDER>\GEOMETRY.BIN"
echo.
echo =====================================================
echo Complete.
echo =====================================================
pause

  • ###-<MANUFACTURER>.bin: manufacturer logo, ### is the manufacturer number (used in the FE.MWPS file) and the <MANUFACTURER> bit is the manufacturer name used in CAR.INI
  • <CAR FOLDER>: car folder, game calls the geometry and textures with that name.
  • <INTERNAL NAME>: the internal name of the car in the VLT database, used in CAR.INI to load the MWPS files and secondary logo
  • <your model>: the car model .mwr file you're gonna use for compiling the geometry (duh)
Keep in mind both the car folder and internal name are case-sensitive

Car folder names - Racer cars
911GT2 Porsche 911 GT2
911TURBO Porsche 911 Turbo S
997S Porsche 911 Carrera S
A3 Audi A3
A4 Audi A4
BMWM3 BMW M3 (Street Version)
BMWM3GTRE46 BMW M3 GTR's Hero
CAMARO Chevrolet Camaro SS
CARRERAGT Porsche Carrera GT
CAYMANS Porsche Cayman S
CLIO Renault Clio
CLK500 Mercedes-Benz CLK500
COBALTSS Chevrolet Cobalt SS
CORVETTE Chevrolet Corvette C6
CORVETTEC6R Chevrolet Corvette C6R
CTS Cadilliac CTS
DB9 Aston Martin DB9
ECLIPSEGT Mitsubishi Eclipse GT
ELISE Lotus Elise
FORDGT Ford GT
GALLARDO Lamborghini Gallardo
GTI Volkswagen Golf GTi
GTO Pontiac GTO
IMPREZAWRX Subaru Impreza WRX STi
IS300 Lexus IS300
MURCIELAGO Lamborghini Murcielago
MUSTANGGT Ford Mustang GT
PUNTO Fiat Punto
RX7 Mazda RX-7
RX8 Mazda RX-8
SL500 Mercedes-Benz SL500
SL65 Mercedes-Benz SL65
SLR Mercedes-Benz SLR McLaren
SUPRA Toyota Supra
TT Audi TT
VIPER Dodge Viper SRT-10


Car folder names - Traffic cars
CEMTR Cement Truck (Challenge Series)
GARB Garbage Truck (Challenge Series)
MINIVAN Minivan (Challenge Series)
PICKUPA Pickup Truck (Challenge Series)
PIZZA Pizza Car (Challenge Series)
SEMI Semi-Trailer (Challenge Series)
TAXI Taxi Car (Challenge Series)
TRAF4DSEDA Sedan 1
TRAF4DSEDB Sedan 2
TRAF4DSEDC Sedan 3
TRAFAMB Ambulance
TRAFCAMPER Camper
TRAFCEMTR Cement Truck (Traffic version)
TRAFCOURT Courtesy Car
TRAFDMPTR Dump Truck
TRAFFICCOUP Coupe
TRAFFIRE Fire Truck
TRAFGARB Garbage Truck (Traffic version)
TRAFHA Hatchback
TRAFMINIVAN Minivan (Traffic version)
TRAFNEWS News Van
TRAFPICKUPA Pickup Truck (Traffic version)
TRAFPIZZA Pizza Car (Traffic
TRAFSTWAG Station Wagon
TRAFSUVA SUV
TRAFTAXI Taxi Car (Traffic version)
TRAFVANB Panel Van
TRAILERA Oil Tanker
TRAILERB Car Carrier
TRAILERCMT Piper Trailer
TRAILERCON Container Trailer
TRAILERCRATE Crate Trailer
TRAILERLOG Log Trailer


Car folder names - Cop cars
COPGHOST Heat 2 car (undercover unit)
COPGTO Heat 3 car (GTO state unit)
COPGTOGHOST Heat 4 car (GTO state undercover unit)
COPHELI Police helicopter
COPMIDSIZEINT Cut scene car
COPMIDSIZE Heat 1 car
COPSPORT Cross' Corvette C6
COPSPORTGHOST Heat 6 car (Corvette C6 federal undercover unit)
COPSPORTHENCH Heat 5 car (Corvette C6 federal unit)
COPSUVL Light SUV
COPSUV Heavy SUV


Internal names - Racer cars
sl65 Mercedes-Benz SL65 AMG
monaro Vauxhall Monaro VXR
db9 Aston Martin DB9
a3_20t Audi A3 3.2 quattro
a4_32 Audi A4 3.2 FSI quattro
tt Audi TT 3.2 quattro
m3_gtr BMW M3 GTR (Street version)
m3_gtre46 BMW M3 GTR (Race version)
cts Cadillac CTS
cobaltss Cobalt SS
corvette_car Corvette C6
corvettec6r Corvette C6.R
viper Dodge Viper SRT10
punto Fiat Punto
fordgt Ford GT
mustanggt Ford Mustang GT
gallardo Lamborghini Gallardo
murcielago Lamborghini Murcielago
is300 Lexus IS300
elise Lotus Elise
rx7 Mazda RX-7
rx8 Mazda RX-8
clk500 Mercedes-Benz CLK 500
sl500 Mercedes-Benz SL 500
slr Mercedes-Benz SLR McLaren
eclipsegt Mitsubishi Eclipse
lancerevo8 Mitsubishi Lancer EVOLUTION VIII
gto Pontiac GTO
997s Porsche 911 Carrera S
911gt2 Porsche 911 GT2
911turbo Porsche 911 Turbo S
carrera_gt Porsche Carrera GT
caymans Porsche Cayman S
clio Renault Clio V6
imprezzawrx Subaru Impreza WRX STi
supra Toyota Supra
gti VW Golf GTI
camaro Camaro SS


Internal names - Traffic cars
cemtr Cement truck (Challenge Series)
garb Garage truck (Challenge Series)
minivan Minivan (Challenge Series)
pickupa Pickup truck (Challenge Series)
pizza Pizza car (Challenge Series)
semi Semi-trailer (Challenge Series)
taxi Taxi car (Challenge Series)
traf4dseda Sedan 1
traf4dsedb Sedan 2
traf4dsedc Sedan 3
trafamb Ambulance
trafcamper Camper
trafcemtr Cement truck traffic version
trafcourt Courtesy car
trafdmptr Dump truck
trafficcoup Coupe
traffire Fire truck
trafgarb Garbage truck traffic version
trafha Hatchback
trafminivan Minivan traffic version
trafnews News van
trafpickupa Pickup truck traffic version
trafpizza Pizza car traffic version
trafstwag Station wagon
trafsuva SUV
traftaxi Taxi car traffic version
trafvanb Panel van
trailera Oil tanker
trailerb Car carrier
trailercmt Pipe trailer
trailercon Container trailer
trailercrate Crate trailer
trailerlog Log trailer


Internal names - Cop cars
copghost Heat 2 car
copgto Heat 3 car
copgtoghost Heat 4 car
copheli Police Helicopter
copmidsizeint Cut Scene car
copmidsize Heat 1 car
copsport Cross' Corvette
copsportghost Heat 6 car
copsporthench Heat 5 car


textures.txt syntax
[tpk]
Identifier=CARTEXTURES
PipelinePath=Global\Pipeline\CarTemplateTextures_<CAR FOLDER>.tpk
XName=
<CAR FOLDER>
Output=output\CARS_REPLACE\<CAR FOLDER>\TEXTURES.BIN

[texture]
Name=<TEXTURE NAME>
File=<TEXTURE>.dds
  • <CAR FOLDER>: same as in build.bat, see Car folder sections above
  • <TEXTURE NAME>: texture name, see Textures section above for reference
  • <TEXTURE>.dds: file used for the texture. Use DXT1 or DXT3 textures
  • All of these names are case-sensitive, keep that on mind.
materials.txt syntax
<Material>=<SHADER>/x_<TEXTURE NAME>
  • <Material>: Material name in Zmodeler
  • <SHADER>: shader the material will use, see the Shaders section above for reference
  • x_<TEXTURE NAME>: car texture the material will use; if you want to use a global texture just skip the "x_" part
  • All of these names are case-sensitive, keep that on mind.
link.txt syntax
<part you want to make>=<part to be copied from>


Some notes

  • Parts shouldn't exceed ~35k polygons each, otherwise the compiler will crash.
  • Due to a bug in the game's renderer, you cannot tile mapping on DXT1 textures from the car's TEXTURES.BIN; it will look broken in-game.

Thanks to:
  • The folks of NFS Police HQ for keeping a copy of Dark Ritual's "MW Basics" thread, which is the basis for this documentation.
  • nlgzrgn for the updated shader (material) and texture lists


Tutorials


Parts

See NFSU2 Parts

2 comments:

  1. Hola amigo
    Está excelente el tutorial, quiero descargar las herramientas pero en una esta caído el link es esta herramienta: My improved batch files for mwgc [download].
    Puedes arreglarlo?
    Gracias.

    ReplyDelete