Saturday, May 19, 2018

VLTedit (MWPS Editing) For Dummies (old modtools)

VLTedit for dummies [VLTedit research update #3]

Tired of the same old slow performance but like how the car looks? Fed up with stock cars being totally lame? Mod car you just downloaded is still slow but at least doesn't look like brick? It can all be changed using only one program. VLTedit is the key to success here.

Stuff necessary for whole modding to work:

Arushan's Ferrari 360 Mod - http://nfscars.net/file/view/mostwanted/6464.aspx Updated VLTedit with extracted databases [also by Arushan] - enclosed to post Notepad, understanding and some patience :P

1) If the car you want to mod is a downloaded custom car then skip steps 2 and 3.

2) Go to CARS directory in your NFS MW installation folder. Use this list for reference if you're not sure which car folder contents you should use. After ascertaining which dir holds data for the car you're looking for, copy the entire folder named as the car you found in the list, go to folder named ADDONS, then go to CARS_REPLACE and paste the folder copied from CARS directory. Example as follows - you think that Lexus IS300 sucks [generally does anyway] and you want to soup it up. Go to CARS folder, find folder IS300, copy it, go to ADDONS/CARS_REPLACE and paste the copied IS300 folder.

3) In the ADDONS/CARS_REPLACE/car-name folder create 3 additional files. First make sure that you can see file extensions. Open any folder, click Tools menu, go to View tab, and [if necessary] uncheck box 'Hide extensions for known file types'. Files that you need to create in the copied car directory: ATTRIBUTES.mpws , CAR.ini, FE.mpws Now you can start some modding. Car I will use for demonstration purposes will be the above mentioned Lexus IS300.

4) Unpack contents of VLTedit.zip some place you'll be able to find it and quickly access. Open vltedit.exe. Blank program window will appear. Click File menu in the upper right and click 'Open'. Window will pop up asking about file. Choose 'db.vlt' and click OK. Data will load after few seconds and 'Database' node will appear on the left side. Click [+] sign to expand database nodes. You'll see a long list of nodes that define all performance and visual aspects of in-game cars. Nodes containing performance related values are: 'brakes', 'chassis', 'engine', 'induction', 'tires' and 'transmission'. 'Ecar' node controls stuff like wheel positioning and visual ride height. 'Pvehicle' controls mass, engine sounds, what performance related components like engine, tires or induction are used and determines how many upgrades can be installed and also what cops call all the cars in game. Other nodes shouldn't be really modified unless you really know what you're doing. Otherwise your game might crash, act in a weird way or not load at all.

5) Main idea behind performance modding is that game uses hexadecimal offsets to define physics, movement, acceleration, top speed and particle system like N2O smoke, exhausts, or even cop lights. Mod uses appropriate files [above mentioned ATTRIBUTES.mwps, FE.mwps] to overwrite game defaults in order to change hex offsets. Most frequently used offsets are those controlling how car wheels are positioned since there are barely any cars that have identical section or track width. But that isn't the only thing that can be overwritten using offset patching [that's how the process is called].

Structure of .mwps files looks as follows:

patch <value_type> bin:0x<hex_offset> <value>

Example with Lexus IS300 having mass changed:

Node: pvehicle/default/cars/racers/is300 ; Field 'MASS' ; default value is 1547

Note that VLTedit displays offset below the black window listing values for currently selected field.

patch float bin:0x31598 1100

The above patching script will modify the mass of IS300 in game. Using this sequence any game value can be changed. Value types are: float [most common] - any number ranging -65000 up to +65000; also decimal numbers; byte - for numbers 0-16; word - same as above [used only to define gear count] dword - for certain offsets to use offset packs [collections] example:

Node: pvehicle/default/cars/racers/is300 ; Field 'engineaudio [0]' patch dword bin:0x31724 0x8db4a27

This will make the unupgraded Lexus use engine sounds from Ferrari 360. Go to node engineaudio/default for reference. Note that pvehicle 'engineaudio' field uses certain nodes in engineaudio node for cars and entire pack needs to be defined. Proper offset for desired audio set can be obtained by typing the following in the text field in the bottom of program window [click proper node first to make sure that correct hash will be listed]: hash fer_360

hash(fer_360)=0x8db4a27

This will give the needed hash to be used use with dword value type. Note that offset to patch audio was bin:0x31724 although bin:0x31720 was displayed. This is because 'Collection' value needs to be patched; not the 'Class'. VLTedit will only show offset for first value in the selected field. To check which offset you need to patch open calculator [view needs to be set to scientific], switch to hexadecimal mode [hotkey F5], type the offset [without 0x], add 4 and press Enter to get the result. Step for offsets is always 4 so 2nd value is +4, 3rd is +8, etc.

Also there is a possibility to make appropriate comments for each offset for user convenience. Example:

## engine audio patch dword bin:0x31724 0x8db4a27

Any character(s) put after ## will be ignored during data parsing and can be used for naming sections for more organized view.

6) Now that you're familiarized with basics of VLTedit, it's time to do some hex modding. Following will be demonstration using modified offsets for STOCK Lexus Is300. It's recommended that all .mwps files [ATTRIBUTES and FE] are blank before proceeding with this demonstration since overlapping offset might cause the game parse mod data incorrectly and crash it or it might not load at all. Mistakes are costly...

As for CAR.ini it's necessary that it contains the following text [below is text needed for IS300 modifications to take effect]:

[car] name=Lexus IS300 manufacturer=lexus internal=is300 modloader=0.2

'name' can be anything you want, manufacturer is asociated with FE.mwps which will be explained in details later, internal needs to exactly the name of directory that the mod car replaces; if it's for example Mercedes SLR then internal will be slr, modloader value is always 0.2

WARNING!!! It's very important that files: ATTRIBUTES.mwps, CAR.ini and FE.mwps are present in the directory. All BIN files like TEXTURES and GEOMETRY also need to be in the folder. Otherwise there won't be any changes in the game or the game might crash.

Before creating any entries in the ATTRIBUTES.mwps file it's suggested but not essential to add the following two lines on the top:

memfile GLOBAL\GlobalMemoryFile.bin vpak GLOBAL\ATTRIBUTES.BIN db

This should allow offset patching to be possible.

IS300 is bit heavy [1547kg]. One of the most simple ways to improve acceleration is to reduce weight. We go to node 'pvehicle', expand 'default', then 'cars', 'racers' and go to 'is300'. Middle window will display all values associated to the currently selected node and its element. MASS value will be 1547 meaning that car weighs 1547 kilograms. Below the Value display there is offsets displayed - 'bin:0x31598' in this case. To change that, which is possible only via Ferrari Modloader, you need to go to the created ATTRIBUTES.mwps and insert this line:

patch float bin:0x31598 700

The above patching script will overwrite default offset value of 1547 at address bin:0x31598 with new value of 700. In game it will make the car lighter which will make it noticeably faster since the same amount of power will be used to propel object with lower mass. Worth noting is that 'pvehicle' values are for both stock and upgraded car. This means that mass for example will remain the same regardless of performance. With pvehicle patching it's possible to change things like number of upgrades [not advised], how cops call the cars and engine audio values to make car sound different.

Now for some basic stuff with transmission. This step will show how to increase top speed by changing only one value. Go to the following path: 'transmission/default/is300'. Find field named 'FINAL_GEAR'. This determines the maximum speed that car can reach. Setting this is different than most values since the lower the value the higher the top speed. Top speed however depends on many values like gear ratios and RPM. Improper transmission modifications can seriously impact car performance. Now to increase that top speed. Stock value is 3.7. In game the stock top speed is 268km/h [~166.5MPH] which is quite modest in the game. To make it more it's necessary to DECREASE the FINAL_GEAR value. To do this add the following line in the ATTRIBUTES.mwps file:

patch float bin:0x1e284 3.2

Decreasing by 0.1 should increase the top speed by about 10km/h. Therefore above value should make top speed bigger by about 50km/h. To add up - if top speed is 200km/h and FINAL_GEAR is 4.0 then 390km/h top speed will be achieved by decreasing the FINAL_GEAR value by 1.9. Give or take 0.20 since it's not super precise and should be checked by launching the game and personally ascertaining that. Setting up gear ratios is rather complicated and should be done with help of programs that can create graphs/charts like Ms Excel or similar.

Now that the car is lighter and has some better top speed it's time to increase overall acceleration. Cars in NFS Most Wanted [as Excel charts show it] have pretty unrealistic torque curves. But that doesn't really matter in an arcade game. There are few rules to keep in mind when setting up torque values: - values can NEVER be identical - they CANNOT only rise - starting at too high or too low values will make the car undriveable or simply too slow - at least 2 final values need to be decreasing assuming that 7th is peak, 8 is lower than 7th, and 6th is bit lower than 7th - gaps between torque values are the actual power increase rate that makes the car move; too small gaps won't give good acceleration while too big will make the car too hard to control

Example of torque values for upgraded, non-junkman Porsche Carrera GT which has the most optimal torque curve in the game [unit used is ft-lb]:

165; 249; 369; 483; 553; 503; 464; 435; 419 +84 +120 +114 +70 -50 -39 -29 -16

Torque for Mercedes CLK500: 242; 374; 660; 748; 682; 572; 495; 435; 385 +132 +286 +88 -66 -110 -77 -60 -50

Note: numbers below ft-lb values are differences in torque curve regarding previous values

Worth noticing is that CLK500 has got pretty impressive power and it starts with a lot of torque. Unfortunately it loses a lot of power quickly. Peak vs final value for Mercedes is over 360 ft-lb while Carrera GT loses only ~140 ft-lb. Simple deduction is that the less power the car loses the faster it will reach the top speed. Therefore Mercedes might be good for drag races but Carrera GT will do better in long distance races. That is also determined by Carrera's lower lower mass [1400kg; CLK500 1629kg] and higher RPM limit with Carrera's red line of 8400 and Mercedes' 6700. Lower RPM engines tend to be more powerful but they lose lots of power. Exotics have less strong engines but they are more efficient. At least that's how it looks in game. Now to put it into hexadecimal gamedate. Navigate to the following node path: 'engine/default/is300'. You'll see a list of fields like engine_braking, idle and torque. Field set that will be discussed for now is torque. After expanding it you can see that it consists of 9 more sub-fields each with a certain float type value. Defaults are:

119; 151; 194; 235; 232; 216; 194; 178; 167 +32 +43 +41 -3 -16 -22 -16 -11

Easy enough to notice that this engine isn't powerful since torque values don't reach high numbers and start very low. But such power output is quite enough considering that first step in modification was decreasing the mass over two times. Therefore light cars like Lotus Elise or Fiat Punto don't need very high torque to be fast. Upgraded, Lotus starts with 108 and has peak value of 284ft-lb. Not much if you don't take 861kg mass into account. Also it loses only 58ft-lb in peak vs final torque which makes its engine very efficient. Offsets for engine torque are simple to figure out. Only 1st field is needed to figure out the rest and following fields are first offset +4 up till the final 9th value. Hexadecimal sequence for stock IS300 torque looks as follows:

patch float bin:0x13398 119 patch float bin:0x1339c 151 patch float bin:0x133a0 194 patch float bin:0x133a4 235 patch float bin:0x133a8 232 patch float bin:0x133ac 216 patch float bin:0x133b0 194 patch float bin:0x133b4 178 patch float bin:0x133b8 167

Fastest way to make a car faster is to simply increase torque values at each point by identical value; 30 for example. Car will accelerate faster but its engine will gain/lose power in the same way as previously since the curve is only moved upwards. Another method of increasing top speed is to increase max RPM and red line values. Note that both stock and upgraded values should be identical for this change to take any effect in game. Max RPM in game isn't limited but values above 10000 will not allow for engine to be blown and will also move gear shifting points up. Optimal and recommended gap between red line and max RPM is 1000. So if red line is 7600 then max RPM should be 8600. Bigger gaps shouldn't affect general performance but will increase time needed to reach top speed from 6th gear.

The previously mediocre in performance Lexus is now lighter, has better top speed and acceleration. Now it's time to make it handle better. As a matter of fact decreasing mass on the car did give satisfying results when it came to handling. But in a fierce police pursuit car light like this will be very easy to overtake and push to the wall or balustrade so it would be a good idea to eventually keep it heavier. Return to the first offset that was used to patch IS300 mass to 650kg and change it back to 1547. This will make it slower and handle worse but will make it harder to push off during pursuits. Other way of making it a road hugger and corner-cutter is by increasing tire grip. Navigate to the following path in VLTedit: 'tires/default/is300'. List of fields like tire_grip*, tire_upgrade#* and steering will appear. Those fields are very crucial if you want your car to handle good and stick to the road. Best and most convenient, yet time consuming, way is to write down offsets and values belonging to all fields starting with 'tires_upgrade'. To make it easier I'll write down whole list with comments for stock IS300 tire values. Each field has 2 values so they are written in pairs. First value's offset is given. Offset for next value in the same field is 'given offset +4'. 1st value is for front and 2nd is for rear so dependant on drive type those values can vary.

## tires_upgrade1* patch float bin:0x22848 1 patch float bin:0x2284c 1

## tires_upgrade2* patch float bin:0x22850 1.4 patch float bin:0x22854 1.42

## tires_upgrade3* patch float bin:0x22868 1.6 patch float bin:0x2286c 1.65

In order to quickly improve grip above values can be increased by 0.25 for satisfactory results.

'tires_upgrade' field values don't differ significantly from car to car and it's also possible to increase grip by modifying 'tire_grip*' field sub-fields.

## tire_grip*; stock patch float bin:0x22838 0.1 patch float bin:0x2283c 0.2 patch float bin:0x22840 0.4 patch float bin:0x22844 0.5

If you want to feel a major difference in grip then above values should be doubled.

One value that controls how fast you car responds to controller signals is in 'steering' field. This value dependant on current number shouldn't be larger than 1.15 or lower than 0.9. The bigger the value the faster the car responds and the smaller the turning circle. Lower values do the opposite - car responds slower and has larger turning circle. Steering ratio that will be too small or too big will make the car undriveable.

So far the modified performance for stock IS300 looks quite promissing. I will cover 2 more important matters: brakes and chassis.

First off are brakes. Generally the faster a car can go the quicker it should be able to brake. Navigate to the following path: 'brakes/default/is300'. Only 3 values control brake behaviour and power and those are in fields named: brakes, brakes_BHP and brake_lock.

Field 'brakes' controls overall hydraulic power distribution to brake blocks. The larger these values are the shorter the braking distance will be. Note that difference between front and rear should be within 75 and 175 dependant on car mass. Front should have values smaller than rear. Offsets are as follows:

## brakes patch float bin:0x242b8 300 patch float bin:0x242bc 425

Brakes_BHP field controls power given to brakes dependant on vehicle mass and engine power. So the faster the car the more power will be needed to stop it effectively. Offset is as follows:

## brakes_BHP patch float bin:0x242c0 475

Brake_lock field values control how power from above brakes_BHP field is multiplied and distributed to front and rear brakes. To have more powerful brakes you can either slightly increase multipliers or increase brakes_BHP value. Offsets for brake_lock ratios are as follows:

## brake_lock patch float bin:0x242b0 1 patch float bin:0x242b4 3

Note that proportion for locks shouldn't be lower than 0.27 or higher than 0.40. Otherwise car will be tough to handle or will brake hard enough to work as reset car position which isn't desired in race or means hard times in police pursuit.

Final matter in this tutorial is chassis data. It's as important as engine or tires. Navigate to the following path: 'chassis/default/is300'. You'll see a list of fields like wheel_base, drag_coefficient and roll_center. I'll write down a list of all named values [identified by proper names] and offsets for stock IS300:

## wheel_base patch float bin:0x9248 2.77

## drag_coefficient patch float bin:0x9264 0.29

## ride_height patch float bin:0x920c 8 patch float bin:0x9210 8

## roll_center patch float bin:0x9244 10

## track_width patch float bin:0x9214 1.534 patch float bin:0x9218 1.544

There are some fields that aren't normally named but I'm still researching those to find out what they change exactly. So now I'll explain how fields listed above affect performance, what they really mean and how to properly change them.

Wheel_base - game uses meters; horizontal distance between the center of the front wheel, and the center of the rear wheel; decrease values to get smaller turning circle and thus quicker handling

Drag_Coefficient - aerodynamic drag produced by car movement; the faster the car moves the more drag it will make and top speed will take longer to reach; decrease for better acceleration at high speeds

Ride_height - in inches; logical height of the car body regarding wheels; decrease values to improve handling but don't go below 3, otherwise car will be scratching the road and lose a lot of speed in the process

Roll_Center - probably in inches; logical vertical center of gravity; decrease to make the car literally stick to the road by lowering its center of gravity; setting to 1 or 0 will make it super stable and improve handling

Track_width - in metres; width of front and rear axles; not sure how affects overall handling but might affect car stability

--------------------------------------- ---------------------------------------

That's about it for basic car modding. Congratulations if you managed to read through this tutorial. More advanced stuff will be covered on forum by demand.

Best regards and luck with car modding

-- DanielKeller

Wednesday, May 16, 2018

How to convert a NFS Shift car to NFSMW (old modtools)

Credits go to Aileron, original post from the old site (GTR/DrivingPassion & Racing Division)

Let''s start.

Things you need:

  1. NFS Shift or NFS Shift Demo
  2. ZModeler 1.07b
  3. ZModeler 2.x.x with NFS Shift import filter.
  4. Any image editing program that has .DDS filter. Paint.net is the best because it is fast and free, but this new version has a lot of bugs. If you don''t have older version, use other program.
  5. Bytesss''s Advanced control trainer.
  6. Of course, Arushan''s mod tools.

1st step: Importing

You can learn how to correctly import a shift geometry file here: http://forum.zmodeler2.com/viewtopic.php?t=4147

2nd step: Preparing the mesh

In this tutorial I will convert Mazda RX-7. Once you imported the mesh, press right click on RX7. Then linking/unlink children. Then delete RX7 because it doesn''t contain files you need.
Delete next parts with all of its subfiles because you don''t need them:
  • a_rx7_tire_lr
  • a_rx7_tire_lf
  • a_rx7_tire_rr
  • a_rx7_kit00_lightglows_r
  • a_rx7_kit00_lightglows_f
  • a_rx7_wheel_lf
  • a_rx7_wheel_lr
  • a_rx7_wheel_rr
  • a_rx7_caliper_lf
  • a_rx7_disc_lf
  • a_rx7_disc_lr
  • a_rx7_caliper_lr
  • a_rx7_kit02_lightglows_f
  • a_rx7_kit08_lightglows_r
First thing on my list is called "a_rx7_kit00_interior". Click +, then + on "a_rx7_kit00_interior_loda". Finally you will see file called "a_rx7_kit00_interior_loda" that doesn''t have any subfiles. Right click on it and then go to linking/unlink. Next delete "a_rx7_kit00_interior" with all of its subfiles because you don''t need it anymore. Then unselect "a_rx7_kit00_interior_loda" to prevent messing things up (You can easily make errors when attaching parts later, so I recommend you to unselect it.) Then do the same thing with all of the rest parts.

Now you have to reduce number of parts. Some parts might be necessary for multiple bigger parts, so you dont want to attach them too early.
  1. Merge all bumpers that are in the same kit (example: attach "a_rx7_kit03_bumper_r_loda" to "a_rx7_kit03_bumper_f_loda")
  2. Attach "a_rx7_tire_rf_loda" to "a_rx7_wheel_rf_loda" and rename it to kit00_front_tire_a.
  3. Attach "a_rx7_caliper_rr_loda" to "a_rx7_disc_rr_loda" and rename it to kit00_rear_brake_a. Do the same thing with "a_rx7_caliper_rf_loda" and "a_rx7_disc_rr_loda" and rename it to kit00_front_brake_a.
  4. Attach left side mirror to right side mirror and rename it to base_a. Base_a is a necessary part that is going to show on all bodykits.

Now lets work on bodykits.
Hide all parts except "a_rx7_kit00_lights_loda". Go to Create/copy. Then rename the copy to kit00_body_a. We need to copy it becase we need it for few bodykits. Copy "a_rx7_kit00_interior_loda" and attach it to kit00_body_a. (Modify/Attach) Then do the same thing for next parts (later we will delete unnecessary backup files):
  • a_rx7_kit00_chassis_loda
  • a_rx7_kit00_boot_loda
  • a_rx7_kit00_steeringwheel_loda
  • a_rx7_kit00_bonnet_loda
  • a_rx7_kit00_engine_loda
  • a_rx7_kit00_body_loda
  • a_rx7_kit00_bumper_f_loda (actually this part is attached front and rear bumpers)

Now you have stock bodykit:


Now we are making kit01_body_a.
We will use parts that include "kit03". Don''t get confused with "a_rx7_kit02_lights_loda". We will use it in one of the next kits.
Parts we use:
  • a_rx7_kit03_steeringwheel_loda
  • a_rx7_kit03_chassis_loda
  • a_rx7_kit03_interior_loda
  • a_rx7_kit03_upgrades_loda
  • a_rx7_kit03_bumper_f_loda (bumpers with skirts)
Backup these files too because you might need tehm in next bodykit(s). After you backuped them, attach them to each other. Then rename it to kit01_body_a. Now, as you can see, we don''t have all parts of this bodykit. That means we have to use parts from pervious bodykit. Make copies of this files and attach them to kit01_body_a:
  • a_rx7_kit00_lights_loda
  • a_rx7_kit00_boot_loda
  • a_rx7_kit00_bonnet_loda
  • a_rx7_kit00_engine_loda
  • a_rx7_kit00_body_loda.
If you did everything right, you will get this:

Next bodykits won''t have parts that are worse than parts in kit1. So now you can delete next backuped files:
  • a_rx7_kit00_steeringwheel_loda
  • a_rx7_kit00_interior_loda.

Next is bodykit 2.
Since there is no parts with kit04, in its name, we will use parts that include kit05. The only part that includes kit05 is a_rx7_kit05_boot_loda, so rename it to kit02_body_a.
Again, we need parts from previous bodykit(s). Use parts you used on previous bodykit, except a_rx7_kit00_boot_loda. Of course, make their backups and backup a_rx7_kit05_boot_loda. Now you can delete a_rx7_kit00_boot_loda. And you can delete a_rx7_kit00_chassis_loda and a_rx7_kit00_bumper_f_loda. We don''t need them anymore. Once you attached all of that parts, you have kit02_body_a finished.

Parts for next bodykit include kit06. So we will use this parts:
  • a_rx7_kit06_bumper_r_loda (bumpers and skirts)
  • a_rx7_kit06_bonnet_loda
  • a_rx7_kit06_chassis_loda
  • a_rx7_kit06_upgrades_loda
  • a_rx7_kit06_interior_loda
Backup and attach them to each other. Rename the final part to kit03_body_a.
Now we must add parts from previous bodykit. As you can see, a_rx7_kit00_lights_loda doesn''t fit with configuration of current WIP kit. So we can delete it and from now we will use a_rx7_kit02_lights_loda. Also, delete a_rx7_kit00_bonnet_loda because we don''t need it anymore. Sorry, I forgot to delete these parts:
  • a_rx7_kit03_chassis_loda
  • a_rx7_kit03_interior_loda
  • a_rx7_kit03_upgrades_loda
  • a_rx7_kit03_bumper_f_loda
Now backup and attach these parts to kit03_body_a:
  • a_rx7_kit00_body_loda
  • a_rx7_kit00_engine_loda
  • a_rx7_kit03_steeringwheel_loda
  • a_rx7_kit02_lights_loda
  • a_rx7_kit05_boot_loda

Next bodykit has parts that include kit08. Backup and attach following parts:
  • a_rx7_kit08_bonnet_loda
  • a_rx7_kit08_body_loda
  • a_rx7_kit08_chassis_loda
  • a_rx7_kit08_bumper_f_loda (both bumpers)
Rename the whole part to kit04_body_a.
Now backup and attach these parts from previous bodykits:
  • a_rx7_kit00_engine_loda
  • a_rx7_kit03_steeringwheel_loda
  • a_rx7_kit02_lights_loda
  • a_rx7_kit05_boot_loda
  • a_rx7_kit06_upgrades_loda
  • a_rx7_kit06_interior_loda
Now you can delete next parts:
  • a_rx7_kit00_body_loda
  • a_rx7_kit06_bumper_r_loda
  • a_rx7_kit06_bonnet_loda
  • a_rx7_kit06_chassis_loda
For next bodykit we will use next parts:
  • a_rx7_kit10_bumper_r_loda (bumpers)
  • a_rx7_kit10_chassis_loda
  • a_rx7_kit10_steeringwheel_loda
  • a_rx7_kit10_upgrades_loda
  • a_rx7_kit10_interior_loda
  • a_rx7_kit10_boot_loda
  • a_rx7_kit10_body_loda
  • a_rx7_kit10_bonnet_loda
Attach them to each other and rename them to kit05_body_a. You don''t have to backup them because this is the last bodykit. Then attach a_rx7_kit02_lights_loda and a_rx7_kit00_engine_loda to kit05_body_a. Delete every unnecessary part.
Now you must rotate your car for 180 degrees. Switch any window to top view. Show all parts. Then Select/All. Turn on Selected mode. Then go to modify/rotate.
Next you must low your car because it is too high. Switch to left or right and them low it a lil bit. BEWARE! Disable X. You must move it only in Y direction. After you finish that go to select/none and turn of selected mode.
Now switch to top view. You must place brakes and wheel exactly in the middle. Look at the red cude in the middle. That''s the center. Place them to look like this:


Now you''re done with preparing beta mesh.

3rd step: Preparing textures

Open your .z3d.
Go to textures browser. It is located near materials editor under "Help".
You will see a bunch of textures, but we don''t need all of them. First texture we need is:
tread_michelin_street1_diffuse_00
Select it and click save. Save it anywhere and name it as "TREAD" (You must use Caps Lock). Later we will move all textures to required folder. Now do the same thing with following textures:
  • mazda_rx7_wheel_diffuse_00 and name it as TIRE
  • mazda_rx7_misc_diffuse and name it as MISC
  • mazda_rx7_lights_glow and name it as KIT00_BRAKELIGHT_ON
  • mazda_rx7_lights_diffuse and name it as KIT00_BRAKELIGHT_OFF
  • mazda_rx7_interior_diffuse and name it as INTERIOR
  • mazda_rx7_engine and name it as ENGINE
  • mazda_rx7_badging_diffuse and name it as BADGING
  • generic_steeringwheel_momo_mod88_loda_diffuse and name it as TIRE_N
  • generic_steeringwheel_momo_mod80_loda_diffuse and name it as BADGING_N
  • generic_cockpit_upgrades01_loda_diffuse and name it as INTERIOR_N
  • common_grille02_diffuse and name it as LOGO
  • common_disk01_diffuse and name it as RIM
  • common_chassis_diffuse and name it as MISC_N
That''s all with textures we need. Later we will add driver texture.
Now you need photoshop or any other image editing/converting software that has .DDS plug-in. You need to compress this .DDS textures:
  • TREAD as DXT1
  • TIRE as DXT1
  • MISC as DXT1
  • KIT00_BRAKELIGHT_ON as DXT1
  • KIT00_BRAKELIGHT_OFF as DXT1 (if you have headlight or brakelight glasses save them as DXT3)
  • ENGINE as DXT1
  • BADGING as DXT3
  • TIRE_N as DXT1
  • BADGING_N as DXT1
  • INTERIOR_N as DXT1
  • LOGO as DXT3
  • TIRE as DXT1
  • MISC_N as DXT1

4th step: Putting the car in mod tools

Create a new folder and name it mazda or however you want. Then put .z3d and textures in it. After that copy mod tools to your folder. Now go to folder/nfsmw mod tools/zmodeler/mwrawfilter.zmf Copy that file to Zmodeler1 directory/filters.
Next go to nfsmw-modtools\\ferrari360\\output\\CARS_REPLACE\\SL65. Delete all files inside except CAR.ini. Open CAR.ini with notepad and do this:

[car]
name=Mazda RX-7
manufacturer=MAZDA
internal=rx7       <-- because I will replace RX-7 from Most Wanted
modloader=0.2


Save and close it. Next rename folder SL65 to RX7. After that delete textures 360misc, 360tire and 360badging in ferrari360 folder.
Now right click on build.bat and left click on edit. Make it look like this:

@echo off
echo =====================================================
echo Compiling Textures...
echo =====================================================
..\bin\mwtc.exe texdefn.txt
..\bin\\texpatch output\FRONTEND\\MANUFACTURERS\6-MAZDA.BIN "CARSELECT_MANUFACTURER_MAZDA"
..\bin\texpatch output\CARS_REPLACE\RX7\SECONDARYLOGO.BIN "SECONDARY_LOGO_RX7_1"
echo.
echo =====================================================
echo Compiling Model...
echo =====================================================
..\\bin\\mwgc -nowait -xname "RX7" -matlist "matlist360.txt" -xlink "xlink360.txt" -source "mw360.mwr" -target "output\CARS_REPLACE\RX7\GEOMETRY.BIN"
echo.
echo =====================================================
echo Complete.
echo =====================================================
pause


In case your car is not a Mazda, here are all manufacturer numbers:

 Aston Martin-21
 Audi-5
 BMW-1
 Cadillac-24
 Chevrolet-19
 Corvette-25
 Dodge-8
 Fiat-23
 Ford-2
 General Motors-7
 Lamborghini-15
 Lexus-17
 Lotus-14
 Mazda-6
 McLaren Mercedes-11
 Mercedes-Benz-12
 Mitsubishi-10
 Pontiac-18
 Porsche-4
 Renault-16
 Subaru-3
 Toyota-9
 Vauxhall-20
 Volkswagen-22.

Now cut all textures and paste them to Mazda RX-7/nfsmw-modtools/ferrari360.
Next open texdefn.txt and modify it to look like this:


 [tpk]
 Identifier=CARTEXTURES
 PipelinePath=Global\Pipeline\CarTemplateTextures_RX7.tpk
 XName=RX7
 Output=output\CARS_REPLACE\RX7\TEXTURES.BIN
 
 [texture]
 Name=MISC
 File=MISC.dds
 
 [texture]
 Name=TIRE
 Usage=Type1
 File=TIRE.dds
 
 [texture]
 Name=BADGING
 File=BADGING.dds
 
 [texture]
 Name=ENGINE
 File=ENGINE.dds
 
 [texture]
 Name=BADGING_N
 File=BADGING_N.dds
 
 [texture]
 Name=INTERIOR
 File=INTERIOR.dds
 
 [texture]
 Name=INTERIOR_N
 File=INTERIOR_N.dds
 
 [texture]
 Name=KIT00_BRAKELIGHT_ON
 File=KIT00_BRAKELIGHT_ON.dds
 
 [texture]
 Name=KIT00_BRAKELIGHT_OFF
 File=KIT00_BRAKELIGHT_OFF.dds
 
 [texture]
 Name=LOGO
 File=LOGO.dds
 
 [texture]
 Name=MISC_N
 File=MISC_N.dds
 
 [texture]
 Name=RIM
 File=RIM.dds
 
 [texture]
 Name=TIRE_N
 File=TIRE_N.dds
 
 [texture]
 Name=TREAD
 File=TREAD.dds
 


Now open xlink360. Don''t delete anything. Just copy this five times:

 KIT00_BODY_B=KIT00_BODY_A
 KIT00_BODY_c=KIT00_BODY_A
 KIT00_BODY_D=KIT00_BODY_A
 KIT00_BODY_E=KIT00_BODY_A

and rename it to

 KIT01_BODY_B=KIT01_BODY_A
 KIT01_BODY_c=KIT01_BODY_A
 KIT01_BODY_D=KIT01_BODY_A
 KIT01_BODY_E=KIT01_BODY_A
 
 KIT02_BODY_B=KIT02_BODY_A
 KIT02_BODY_c=KIT02_BODY_A
 KIT02_BODY_D=KIT02_BODY_A
 KIT02_BODY_E=KIT02_BODY_A

 KIT03_BODY_B=KIT03_BODY_A
 KIT03_BODY_c=KIT03_BODY_A
 KIT03_BODY_D=KIT03_BODY_A
 KIT03_BODY_E=KIT03_BODY_A

 KIT04_BODY_B=KIT04_BODY_A
 KIT04_BODY_c=KIT04_BODY_A
 KIT04_BODY_D=KIT04_BODY_A
 KIT04_BODY_E=KIT04_BODY_A

and

 KIT05_BODY_B=KIT05_BODY_A
 KIT05_BODY_c=KIT05_BODY_A
 KIT05_BODY_D=KIT05_BODY_A
 KIT05_BODY_E=KIT05_BODY_A
 
and finally save your file.
Next we need to compile matlist360.txt. But we can''t do that because material names are too long. So we are going to cut them. Open mazda.z3d. Go to materials editor (red ball under help button). Now rename materials (mazda_rx7_interior (vehicles_basic,VehicleBasic) to mazda_rx7_interior, generic_chassis (vehicles_basic,VehicleBasic) to generic_chassis, etc.). Then click hide all and then show all parts (because of a zmodeler bug). After that click save and close zmodeler2. Now we can work on matlist.
Open matlist360.txt. Delete everything in it. Now copy all material names from .z3d file. Every material has to be in it''s own row.
Now we will assign shaders to this materials. After shaders we need to assign textures. Here is the list of all available shaders:

0xD6D6080A <-- body paint
0x5BC3A3C <-- texture brakelights | If you use them you must assign this texture for it: 0x2B52399 and you must have textures KIT00_BRAKELIGHT_ON and OFF
ALUMINUM
BOTTOM
BRAKEDISC
BRAKELIGHT
BRAKELIGHTGLASS
BRAKES
CALIPER
CALIPERDECAL
CARBONFIBER
CARBONFIBER2
CHAR_CLOTH
CHAR_HAIR
CHAR_LATEX
CHAR_LEATHER
CHAR_PLASTIC
CHAR_RUBBER
CHAR_SKIN
CHROME
CLEARPLASTIC
DECAL
DEFAULT
DIABLOHP
DRIVER
DRIVERHEAD
DULLENGINE
DULLPLASTIC
ENGINE
EXHAUST_TIP
GOLDROTOR
GRILL
HEADLIGHT
HEADLIGHTGLASS
HEADLIGHTREFLECTOR
HOSES <-- damage scratches
INTERIOR
LICENSEPLATE
MAGCHROME
MAGGUNMETAL
MAGSILVER
MAGSILVERGLOSS
MATTEPLASTIC
MESH
METPAINTBLACK
METPAINTBLUE
METPAINTGOLD
METPAINTGRAY
METPAINTGREEN
METPAINTRED
METPAINTSILVER
METPAINTYELLOW
MIRROR
MOLDINGS
PEARL
PLAINNOTHING
PLASTICHUBCAP
RAD
REGPAINTBLACK
REGPAINTBLUE
REGPAINTGRAY
REGPAINTGREEN
REGPAINTORANGE
REGPAINTPINK
REGPAINTRED
REGPAINTWHITE
REGPAINTYELLOW
RIMPEARL
ROAD
RUBBER
SHINYMOLDINGS
SHINYPLASTIC
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


Now textures. If you use internal textures you must write "x_" in front of texture''s name. If you use textures from GlobalB.lzc you mustn''t write anything in front of it''s name. Separate materials from shaders by writing "=" between them and separate shaders from textures by writing "/" between them with NO SPACE BETWEEN them.
Here is my matlist:

 mazda_rx7_interior=INTERIOR/x_INTERIOR
 generic_chassis=BOTTOM/x_MISC_N
 mazda_rx7_misc=DULLPLASTIC/x_MISC
 mazda_rx7_paint=0xD6D6080A/x_SKIN1
 mazda_rx7_badges=DULLPLASTIC/x_BADGING
 mazda_rx7_lights=0x5BC3A3C/0x2B52399
 generic_windows=WINDSHIELD/WINDOW_FRONT
 generic_gloss_black=DULLPLASTIC/WINDOW_MASK
 mazda_rx7_engine=ENGINE/x_ENGINE
 mazda_rx7_wheel_tyre=RUBBER/x_TIRE
 mazda_rx7_tread=RUBBER/x_TREAD
 generic_lightflares
 generic_glass_clear=HEADLIGHTGLASS/WINDOW_FRONT
 generic_carbon=CARBONFIBER/CARBONFIBRE
 mazda_rx7_wheel=MAGSILVER/x_TIRE
 mazda_rx7_wheel_alpha <-- unnecesary material
 mazda_rx7_disc=BRAKES/x_RIM
 generic_cockpit_upgrades_loda=INTERIOR/x_INTERIOR
 generic05_loda=INTERIOR/x_TIRE_N
 generic_grille=GRILL/x_LOGO
 momo_mod80_loda=INTERIOR/x_BADGING_N

Save matlist. Open mazda.z3d and export it to mod-tools/ferrari360/mw360.z3d (zmodeler1 file). Now open the mesh with zmodeler1. In case you don''t have .mwr plug-in copy/cut it from mod-tools/zmodeler and paste it into zmodeler1 directory/filters before opening the file. Export it to mw360.mwr and run build.bat. Now you can test your car.

5th step: Fixing wheel positions and logos

Find FE.MWPS, ATTRIBUTES.MWPS and SECONDARYLOGO.BIN from another addon which replaces the same car. Copy/cut and paste them into mod tools/ferrari360/output/CARS_REPLACE/RX7. Rename 32-FERRARI.BIN from MANUFACTURERS folder to ##-MAKE_OF_YOUR_CAR (in my case 222-NEW_MAZDA) Swap the texturewith your one (It must be 64x64 pixels size and DXT3.) using NFS-TexEd. Edit car.ini and change the name of manufacturer from MAZDA to, in my case NEW_MAZDA. Right click on build.bat and click edit. Change this row:

..\bin\texpatch output\FRONTEND\MANUFACTURERS\6-MAZDA.BIN "CARSELECT_MANUFACTURER_MAZDA"

to (in my case)

..\bin\texpatch output\FRONTEND\MANUFACTURERS\222-NEW_MAZDA.BIN "CARSELECT_MANUFACTURER_NEW_MAZDA"

Manufacturer logo is finished.
Open SECONDARYLOGO.BIN (I don''t need to do this because logos are the same but I''m doing this because most of you won''t convert cars which are already in game.) using NFS-TexEd. Swap the texture with your one (it must be 256x64 pixels size and DXT3). Click save and then exit. Secondary logo is finished.
Open FE.MWPS. Change manufacturer value to 222 (because that is the number of our manufacturer logo file.). You can edit price and required blacklist level if you want. If you don''t want, delete those rows. Save your file. Open ATTRIBUTES.MWPS. Make it look like this:

 ##---------------------------------------------------
 ## 2003 Mazda RX-7
 ## Replacement for Mazda RX-7
 ## Attributes.bin patch script
 ##---------------------------------------------------
 
 memfile GLOBAL\\GlobalMemoryFile.bin
 vpak GLOBAL\\ATTRIBUTES.BIN db
 
 ##---------------------------------------------------
 
 ## TireOffsets
 ## front left
 patch float bin:0x40940 1.25
 patch float bin:0x40944 0.99
 patch float bin:0x40948 0
 patch float bin:0x4094c 0.34
 
 ## front right
 patch float bin:0x40950 1.25
 patch float bin:0x40954 -0.99
 patch float bin:0x40958 0
 patch float bin:0x4095c 0.34
 
 ## rear right
 patch float bin:0x40960 -1.42
 patch float bin:0x40964 -1.03
 patch float bin:0x40968 0
 patch float bin:0x4096c 0.355
 
 ## rear left
 patch float bin:0x40970 -1.42
 patch float bin:0x40974 1.03
 patch float bin:0x40978 0
 patch float bin:0x4097c 0.355
 
 ## TireSkidWidth
 patch float bin:0x40a0c 0.245
 patch float bin:0x40a10 0.245
 patch float bin:0x40a14 0.335
 patch float bin:0x40a18 0.335
 
 ## KitWheelOffsetRear
 patch int8 bin:0x40a38 0
 patch int8 bin:0x40a39 0
 patch int8 bin:0x40a3a 0
 patch int8 bin:0x40a3b 0
 patch int8 bin:0x40a3c 0
 patch int8 bin:0x40a3d 0
 
 ## KitWheelOffsetFront
 patch int8 bin:0x40a46 0
 patch int8 bin:0x40a47 0
 patch int8 bin:0x40a48 0
 patch int8 bin:0x40a49 0
 patch int8 bin:0x40a4a 0
 patch int8 bin:0x40a4b 0

Now you need to change values. First row of tire offsets indicates X and second Y movement of wheels. Third row changes wheels height (DO NOT TOUCH. It must be 0). 4th row changes wheels size. TireSkidWidth changes width of wheels. KitWheelOffsets indicate Y movement of wheels for bodykits. Now save your file and run MW with Bytesss''s trainer (follow instructions in readme.) After you finish with your car, close the game and just copy values to ATTRIBUTES.MWPS.

Next, we''re gonna put liveries as bodykits. Open your .z3d. Hide all parts except kit01_body_a. Go to polygons mode. Go to Select/By Material and choose mazda_rx7_paint. Then go to materials editor. Create a new material and name it to something like "KIT01_LIVERY". Then click "Assign to selection". Repeat this with other 4 kits. Save the file and export it to old .z3d and then to .mwr. Add new materials to matlist. Now it''s up to you to choose the shader for liveries'' material. If you use default body shader you will occur some bugs with paint when painting the car with custom paints (pearlscent, chrome, matte...). If you use CARBONFIBER it won''t have much shine. If you use REGPAINTBLACK it will have too much shine and if you use METPAINTBLACK it will look almost perfect.

Easter Egg

I''ve made one intentional bug in order to teach you how to fix mistakes you might make sometimes. I put side mirrors as base_a. Which means that they won''t be painted if you change the bodykit. So this is how we''re gonna fix it:
Hide all parts except base_a. Go to polygons mode. Select/By Material/mazda_rx7_paint. Click SELECTED MODE. Modify/Submesh/Detach (make sure "keep original" option is not enabled). Now go to the default mode and then Create/Copy and copy this detached part 4 times. Attach each part to an aftermarket bodykit. Then change it''s material using the same method we used in putting liveries as bodykits. Just make sure you deselect everything before selecting body material again.

That''s all, I hope it helps. If you need help PM me. Once you learn converting I suggest these tutorials:
http://gangontheweb.forumotion.com/arg-restricted-tutorials-f30/vltedit-tutorial-t528.htm
http://gangontheweb.forumotion.com/arg-restricted-tutorials-f30/tutorial-making-custom-vinyls-for-mw-t475.htm

Please, don''t abuse this tutorial by using it to reconvert cars which are already converted by other converters unless they are bad.

-Mihailo

Thursday, May 10, 2018

How to make lit brakelight textures with GIMP

(download offline version here)

In this tutorial I will teach you how to make lit brakelight textures in GIMP for the times you can't source lit brakelight textures for your projects

GIMP user interface
In case you are not familiarized with GIMP's interface, here's a quick look to it:
user posted image

-Toolbox: This is the place where are located the painting and selection tools, mostly. The foreground/background color selection is also in there.
-Tool Options: Here you can adjust the selected tool parameters.
-Layers/Channels/Paths Undo: Here you will see the images layers for edition. We´re are going to focus only on the Layers and Undo (in case you screw up).
-Brushes/Patterns/Gradients: IMO these are redundant, since they can be setted up from their respective tools. In fact, the only use I found for them was adding/editting brushes, but we won't make that kind of stuff in here right now.

The toolbars can be customized to your liking, but we're going to use the default layout for this tutorial.

Step 1: Base light
Copy this image and paste it in GIMP as a new image; this is our example file
user posted image

Create a new layer (either by clicking the New Layer button in the Layers dialog, going to the Layer>New Layer menu or pressing the Ctrl+Shift+N keys) and name it light_base.

Then choose the Paintbrush tool in the toolbox (keyboard: P key), choose the 2. Hardness 50 brush, set an appropiate size for it (in this case we will set it at 50) and pick a pure red color (HSV: 0,100,100) and paint over the area you want to be lit. When you're finished, go to the Layers dialog and change the layer Mode (in this case to Value). It should look like this:
user posted image

Step 2: Coloring the light
Now we're gonna create another layer and name it light_color. With the paintbrush we're gonna paint a slightly smaller area than the base light's with HSV 15,100,100 color, then we paint a smaller area with HSV 30,100,100 color. Afterwards go to Filters>Blur>Gaussian Blur and set a value of around 15-20 for this one. Apply the blur and set the layer mode to Color. It should look like this:
user posted image

Step 3: The Final Touches

Duplicate the light_color layer (Duplicate Layer button in Layers dialog, Layer>Duplicate menu or Ctrl+Shift+D keys) and go to Colors>Desaturate and choose the Luminosity optionto turn it into grayscale, Set that layer to Overlay mode...
user posted image

...then right-click on the layer in the Layers dialog and choose Alpha to Selection. Go to the bottom layer, copy it and then paste it, press Ctrl+Shift+N to make it a new layer.

Now go to Colors>Desaturate and choose the Lightness option, then go to Colors>Curves and make a curve like this:
user posted image

Click OK and set the layer mode to Divide. The final result should be this:
user posted image

And there it is, a convincing-looking lit brakelight texture. Just export it (File>Export ; Ctrl+Shift+E) to a suitable format and that's it

Additional notes
Depending of your source image you might have to use other layer modes or values to achieve your desired effect; don't be afraid to experiment.