Philosophy

The ideals for tuning options, I feel, are that each one is a small self-contained kn5 that anyone who knows how to build kn5s can easily contribute variations into, and a minimum of technical knowhow needed for the end-users to select the one they prefer.

Beyond that, it would be nice if rims that can be swapped between cars in real life can also be swapped between them in the game, with similar results - if they fit on the one car, they should fit on the other.

Some kinds of mods, if they attract the attention of Kunos, could be integrated into the launcher or game - make this as feasible as possible. Having a flexible and popular way to tune cars will make this more likely.

Possibilities

Multiple objects in one kn5, transparent textures to hide them

Pros:

Cons:

Multiple kn5s added via lods.ini

Pros:

Cons:

How To Do Multiple kn5s

This shouldn't be considered a general audience tutorial; get familiar with exporting a full car to AC (functional in showroom and game) elsewhere.

As a matter of principle, I feel it's a good idea to handle wheel offsets at the .ini level - suspensions.ini should contain the stock offset, and wheel empties should be located to make this display correctly ingame. This way, you match real-world behaviour better - if you put low-offset rims on a car that demands high-offset rims, they'll poke out, etc.

Models

I'll be describing this with Blender. It should apply to other editors, you'll just need to know (as above) how to export cars successfully in that editor.

Picture of a wheel and the location of the WHEEL_LF empty

As you can see, the WHEEL_LF empty is not centered - it's set +40mm, same as the back-face of the rim. Positive offset: towards the outside face of the wheel. Negative offset: towards the inside face. Both are measured from the centre of the rim by standard. So when you're modeling your own, or for that matter tuning your real car, you want an offset that puts the wheels the right distance outward. You can add spacers to increase offset but the only way to lower offset would be custom hubs/brakes - more typically, if the wheels stick out too much, you will widen the car's body.

Picture of car body, empties, and 2 types of wheels on separate layers

I have objects on 4 layers for descriptive purposes:

  1. Body
  2. Empties
  3. Stock Wheels 15"
  4. Stock Wheels 16"
Just model these as usual. Keeping them on separate layers makes it easier to export - they're separate objects anyway. Keep in mind that the tree structure should be It's important to maintain empty name consistency so that (a) the car will load, and (b) parts will be interchangeable to other cars.

From these objects you'll export 3 kn5 files:

  1. car.kn5: select layers 1 and 2, export those. Result: kn5 with only the body and empties.
  2. wheels_15.kn5: select layers 2 and 3, export those. Result: kn5 with only 15" wheels and empties.
  3. wheels_16.kn5: select layers 2 and 4, export those. Result: kn5 with only 16" wheels and empties.
They all go through the ksEditor as normal - load up textures, export them as 'Car'. If you have LODs, do the same thing - body and empties, wheels and empties.

Put these all in the car folder.

.ini Files

The general approach I would recommend is to make copies of these files, and append the description of the option they provide. So for example, copy lods.ini to lods_wheels_15.ini and lods_wheels_16.ini. Then to switch, one would delete lods.ini, and copy lods_wheels_15.ini and rename that copy to lods.ini. This sort of thing can and should be automated - it's just moving files around.

lods.ini

This is the most important ini file to modify since it says which models to load.

It's fairly straightforward - at each distance, add an extra section naming the wheel this specific variation loads. For example:

[LOD_0]
FILE=car.kn5
IN=0
OUT=60

[LOD_1]
FILE=wheels_15.kn5
IN=0
OUT=60

[LOD_2]
FILE=car_lod2.kn5
IN=60
OUT=1000

[LOD_3]
FILE=wheels_15_lod2.kn5
IN=60
OUT=1000

suspensions.ini

Modifications are pretty straightforward here, and likely don't need to vary per rim - just type in the offsets the chassis has. As before, the example car has a +40mm offset - positive offsets are positive on left wheels, negative on right. Negative offsets would be the opposite.

[GRAPHICS_OFFSETS]
WHEEL_LF=0.04
WHEEL_LR=0.04
WHEEL_RF=-0.04
WHEEL_RR=-0.04
SUSP_LF=0.04
SUSP_LR=0.04
SUSP_RF=-0.04
SUSP_RR=-0.04
If you wanted to add spacers for specific rims, you would make a copy of this file to do that. Always remember to keep backups.

tyres.ini

For completeness, every set of wheels should come with a tyres.ini that has correct radius/width of the tires in the mesh. In practice it's probably fine to just leave a default one unless you want a specific stance look, since most tunes will only change the rim size and leave tires about the same overall radius as the original.

readme.txt

You'll probably want to mention how to switch parts around so people can try it out, and go into a bit more detail about what each object consists of.

Conclusion

This technique can work for parts other than wheels, but the lods.ini would get more complicated. Certainly one would want to have some sort of automated system for modifying it.

For now, the showroom only loads LOD_0 - so any additional meshes will not be visible there. If you wanted, you could export an entirely different object for use in the showroom (eg. car + lift) and then just have LOD_0 not visible while driving, maybe in the future this will change to match ingame more closely, maybe not.

If you have questions or suggestions PM me as Stereo on the official AC forums for preference, or email me at this domain.