Repository navigation
Wheel Mods
Replace a shipped wheel, or add a wheel the game does not ship. Source: src/mc_engine/modloader/modloader.cpp (ScanFolder, BuildRimMods), src/mc_engine/modloader/rim_names.h. Read Mod Loader first.
<mod folder>/<mod>/
rims/
<wheel name>.glb replaces the shipped wheel with that name
<wheel name>.donor optional, one line: the shipped wheel to build from
all.glb stands in for every wheel
textures/ optional loose images, by material name
- Wheels live in
rims/, not beside characters, because a name alone cannot say whether a mesh is a character or a wheel. Mesh extensions:.obj,.gltf,.glb. - The file name without extension is the wheel name, for example
whl_am_volk_te37orwhl_am_bbs_lm. - A wheel is two resources. The mesh goes into
resources/rims/<name>/body_lod_0.xrsc; any image the mod brought goes into the texture pack beside it (<name>.xtp). Replacing only the first leaves the shipped paint. -
allstands in for every wheel in the built-in catalog (kRimAssets, the 176 names of Shipped wheels). A mesh named after one wheel still wins for that wheel. Each catalog entry is checked against the archive before it is built, so an entry missing in another build costs nothing. The log readsstanding in for N wheel(s).
A new car's stock wheel is looked up by a name derived from the car's (the game strips vp_ and asks for whl_stk_<rest>), so a new car needs a wheel with that name, and no template exists under it. A one-line sidecar names the shipped wheel to use as the template:
rims/whl_stk_my_car.glb
rims/whl_stk_my_car.donor contains: whl_am_bbs_ch
The sidecar has the same base name as the mesh and extension .donor. Leading and trailing whitespace is trimmed; only the first line is read. The wheel lands under the new name, built from the donor's resources. A donor wheel's paint is written under the new name too.
Wheels are not part of a car's model. A car's wheels are a separate resource found through its car config (<car>.xcc), which holds one byte (offset 0x844) naming a rim:
- The byte is an index into the rim catalog: the
rimsblock oftune/vehicle/wheel_models.list, then those ofwheel_models0001.listtowheel_models0007.list, in that order.- A byte past the end of the catalog (new cars use0xFF) means "the car's own wheel". The game then builds a name from the car's and looks that wheel up: drop the first three characters (vp_) and prefixwhl_stk_, so a new car namedvp_my_carasks forwhl_stk_my_car. A car name withvpd_drops four and prefixeswhld_stk_; a name containingDUBgetswhl_am_tis_tis07. - That lookup only happens once the car is driven. The loader resolves it earlier: a car config shipped as a raw file (
files/...xcc) that names its rim is written with the catalog index already filled in, so the garage shows the wheels at once. Log:rim byte ... resolved to catalog index N. Without it a bought car stands in the garage with no wheels until it has been on the street.
So a car mod has two ways to get its own wheels:
- Ship a wheel named for the car (
rims/whl_stk_<name>.glb, with a.donorsidecar as above). The car's own-wheel lookup finds it. - Ship a car config whose rim byte names a shipped wheel, or one you added to the catalog. A raw file
files/tune/vehicle/wheel_models000N.listshipped by a mod is read by the loader in place of the archive's when it counts the catalog.
Wheel mods and car mods do not touch each other's files. A wheel mod changes what a named wheel looks like for every car that uses it; a car mod only picks which wheel its car asks for.
garage_tire_offset (default on) adds a TIRE OFFSET row to the garage's wheels > dimensions screen. It edits the per-car TireOffset0/1 bytes that the retail game parses and never uses, and moves the wheel sideways: tire_offset_step metres per notch, 17 notches from -8 to +8 (about 10 cm each way at the default 0.012). tire_offset_targets is a bitmask of the five per-wheel matrix blocks it moves (31 = all). It adjusts how far a wheel sits out of the body on one car; it does not change the wheel mesh or its fit on the axle, which is what model_mods_rim_* does.
For four-wheel cars, the garage's WHEELS > DIMENSIONS screen lets you set the wheel tilt for the front, rear or both axles. CAMBER runs from -15 to +5 degrees and is saved with the car. 0 keeps the wheels upright. garage_camber enables the row and defaults to on.
Applied automatically, with restart-only cvars to adjust. Full rows in Settings Reference.
| Option | Default | Effect |
|---|---|---|
model_mods_rim_autoalign |
true |
Turn the thinnest axis of the model onto the axle, then push the face flush with the shipped wheel's. Off places the wheel entirely by hand. |
model_mods_rim_yaw, model_mods_rim_pitch, model_mods_rim_roll
|
0.0 |
Manual rotation in degrees, applied on top of auto-align. |
model_mods_rim_offset_x |
0.0 |
Nudge along the axle; one unit is the wheel's own diameter. |
model_mods_rim_scale |
1.0 |
Size multiplier on top of the automatic fit. |
model_mods_rim_texture_mode |
-1 |
Where the mod's image goes: -1 auto, 0 the hub cap, 1 the whole rim. Auto decides on the image's alpha: an image with real transparency is a badge and goes on the hub cap quad; an opaque one is a rim skin. |
model_mods_rim_keep_badge |
true |
Keep the shipped badge quad. The first thing to try when a textured wheel mod misbehaves. |
model_mods_rim_shade_profile |
true |
Rebuild baked shading from the template instead of one flat average. |
model_mods_rim_shade_occlusion |
true |
Bake the shade lane from occlusion measured on the replacement. |
model_mods_rim_band_profile |
false |
Carry the template's material bands onto the replacement. |
model_mods_rim_inherit_shade |
false |
Diagnostic: copy the shipped shading vertex by vertex. |
| Log text | Meaning |
|---|---|
<mod>/rims/<wheel>: <error> |
Mesh unreadable, or the template wheel is not in the archive. |
<mod>/rims/<wheel>: no texture pack: <reason> |
The texture pack beside the wheel could not be read. |
<mod>/rims/<wheel>: paint not replaced: <reason> / paint not packed: <reason>
|
The mod's image could not be written. |
<mod>/rims/<wheel>: <reason> -- keeping the original paint |
The image was ignored. |
A wheel does not have to fit the shipped wheel it replaces. The loader grows it by itself when it needs to; there is no file or setting to add.
- The mesh is first written into the buffers of the template wheel (the shipped wheel being replaced, or the one the
.donorfile names). A wheel that fits is built into them and nothing is enlarged. - If it does not fit, the loader starts again from the untouched template, gives the wheel a larger physical segment and enlarges its submeshes, the largest first, until the whole mesh fits. Nothing is welded away.
The room before growing is the vertex count and the index count of all the template's submeshes, each added up, so it differs from wheel to wheel. When the mod brings an image and model_mods_rim_keep_badge is on, the submeshes drawn by the shader that samples the wheel's texture are held back and do not count, unless that would leave none. With model_mods_submeshes off, only the largest submesh counts.
| Limit | Value |
|---|---|
| Vertices of the whole wheel | About 37,400. The wheel's vertex data, 28 bytes a vertex, has to fit one 1 MB block of memory. |
| Triangles of one submesh | 21,845 (65,535 indices). A bigger mesh is dealt over several submeshes, so the total depends on how many the template has. |
The vertex count is the one after import: a vertex is split wherever the model has a hard edge or a UV seam, so it can be well above what a modelling program shows.
| Case | A mesh that does not fit |
|---|---|
model_mods_decimate on |
Growth is off. Vertices are merged until the mesh fits the template. If triangles are still left over when they are dealt to the submeshes, it tries again with four fifths of the vertex target, a limited number of times, and then gives up. |
A wheel with an .overlay file beside it |
It stays inside the template's buffers. If it does not fit, the shipped wheel is kept. |
| Tires | They are never grown; a tire that does not fit is welded down. |
model_mods_grow has no effect on wheels: it concerns car parts and characters. The model_mods_... settings named in this section are debug settings: set them in larecomp.toml or on the command line, and restart.
A grown wheel ends its build line with grown past the donor:
[mods] <mod> -> rim <wheel> (N tris in S submesh(es), grown past the donor, ...)
A wheel that is not built keeps the shipped model and logs the reason after [mods] <mod>/rims/<wheel>::
-
cannot grow: N vertices do not fit one block. The mesh is over the vertex limit above; reduce it. -
mesh does not fit the drawable's submeshes: X of Y triangles left over(withand decimation is offwhen it is). The submeshes cannot hold all the triangles; reduce the mesh. -
mesh needs N vertices and M indices, the drawable holds A and B across K submesh(es); decimation is off, so the shipped model is kept. A wheel that cannot grow (.overlay) is larger than its template. -
mesh cannot be reduced to N vertices / M indices. Only withmodel_mods_decimateon.
Source: BuildRimMods and GrowRimBlocks in src/mc_engine/modloader/modloader.cpp, RewriteDrawableGeometry in rsc5.cpp.
The game's resources/rims/ has 176 folders. These are their names: what a mesh in rims/ or a line in a .donor file can say.
Wheels starting with whl_: 145 (click to open)
whl_am_5zigen_5zrwhl_am_5zigen_sportenginewhl_am_amer_aerowhl_am_amer_cl200swhl_am_amer_razorwhl_am_amer_rebelwhl_am_amer_redlinewhl_am_amer_saltflatwhl_am_amer_smoothiewhl_am_amer_stingwhl_am_amer_torqlitewhl_am_amer_torquethrustiiwhl_am_asnti_af129whl_am_asnti_af139whl_am_asnti_af140whl_am_asnti_af141whl_am_asnti_roma2whl_am_basewheelwhl_am_bbs_air_i_aiwhl_am_bbs_chwhl_am_bbs_lmwhl_am_bbs_rs_gtwhl_am_davin_rev71whl_am_davin_rev72whl_am_davin_revlswhl_am_davin_speedspwhl_am_dpstr_ds01whl_am_dpstr_ds01awhl_am_dpstr_ds02whl_am_dpstr_ds02awhl_am_dpstr_ds03whl_am_dpstr_ds03awhl_am_dpstr_ds04whl_am_dpstr_ds04awhl_am_dpstr_ds05whl_am_dpstr_ds05awhl_am_ggrames_57whl_am_ggrames_rays99bwhl_am_iforg_classicwhl_am_iforg_conceptwhl_am_iforg_daytonawhl_am_iforg_equipwhl_am_iforg_essenwhl_am_iforg_monacowhl_am_iforg_synergywhl_am_iforg_vertexwhl_am_konig_ffgraphitewhl_am_konig_rewindgwhl_am_konig_sidewayswhl_am_konig_unknownwhl_am_lexan_901whl_am_lexan_daggerwhl_am_lexan_firewhl_am_lexan_ignitewhl_am_lexan_marqiwhl_am_lexan_mystikwhl_am_lexan_vertexwhl_am_momo_revwhl_am_momo_rpmwhl_am_momo_stormwhl_am_placeholderwhl_am_pm_perf_dominowhl_am_pm_perf_gatlinwhl_am_pm_perf_judgewhl_am_pm_perf_marqueewhl_am_pm_perf_tantrumwhl_am_rc_comp_gladiatorwhl_am_rc_comp_havocwhl_am_rc_comp_ravenwhl_am_rc_comp_savagewhl_am_rc_comp_vegawhl_am_rezax_universalwhl_am_tenzo_gf7whl_am_tenzo_gt5whl_am_tenzo_mach10whl_am_tenzo_passion5whl_am_tis_9whl_am_tis_m301whl_am_tis_m302whl_am_tis_m303whl_am_tis_m304whl_am_tis_m305whl_am_tis_tis06whl_am_tis_tis07whl_am_tis_tis10whl_am_tis_tis11whl_am_tis_tis12whl_am_volk_24whl_am_volk_gt7whl_am_volk_gtcwhl_am_volk_gtvwhl_am_volk_le28nwhl_am_volk_sfchallengerwhl_am_volk_te37whl_am_works_emotionwhl_am_works_equip1whl_am_works_equip3whl_am_works_s2rwhl_am_works_vskfwhl_am_works_vsxxwhl_am_works_xd9whl_stk_am_vantage_07whl_stk_aud_r8_08whl_stk_aud_rs4_07whl_stk_buk_grandnational_87whl_stk_chv_camaro_06whl_stk_chv_camaross_69whl_stk_chv_cobalt_05whl_stk_chv_corvettez06_07whl_stk_chv_impala_96whl_stk_chv_police_96whl_stk_cry_300c_06whl_stk_dge_challenger_06whl_stk_dge_challenger_70whl_stk_dge_charger_06whl_stk_dsn_280z_75whl_stk_duc_999r_06whl_stk_duc_monster_s4r_07whl_stk_frd_boss302_69whl_stk_frd_cobra_04whl_stk_frd_focus_04whl_stk_frd_gt_06whl_stk_frd_mustang_06whl_stk_kaw_ninja_zx14_06whl_stk_lam_gallardo_06whl_stk_lam_miura_71whl_stk_lam_murcielago_06whl_stk_mbz_s600whl_stk_mbz_sl65_07whl_stk_mit_3000gt_99whl_stk_mit_eclipse_99whl_stk_mit_evo_06whl_stk_mzd_rx7_95whl_stk_mzd_rx8_06whl_stk_nsn_240sx_98whl_stk_nsn_350z_06whl_stk_nsn_gtr_08whl_stk_nsn_skyline_99whl_stk_pon_solstice_06whl_stk_pon_transam_79whl_stk_sln_s281_06whl_stk_sln_s7_06whl_stk_vw_golf_07whl_stk_vw_golf_83whl_stk_vw_scirocco_88
Wheels starting with whld_: 31 (click to open)
whld_am_5zigen_fn01rcwhld_am_5zigen_zr520whld_am_dpstr_ds06whld_am_dpstr_ds07whld_am_dytn_c2_crosswellwhld_am_dytn_knockoff_otdwhld_am_dytn_knockoff_rlreversewhld_am_dytn_knockoff_sceptrewhld_am_dytn_rlwelllacewhld_am_konig_afterburnerwhld_am_konig_againwhld_am_konig_csharpwhld_am_konig_toxxinwhld_am_tis_tis13whld_am_tis_tis14whld_stk_am_db9_08whld_stk_aud_s5_08whld_stk_buk_riviera_63whld_stk_cad_xlrv_08whld_stk_chv_belair_55whld_stk_chv_chevelle_70whld_stk_chv_impala_64whld_stk_chv_malibu_65whld_stk_duc_1098_07whld_stk_lr_hse_08whld_stk_lr_sport_08whld_stk_mbz_cl65amg_08whld_stk_mbz_clk63amg_08whld_stk_mit_eclipse_09whld_stk_mit_evox_08whld_stk_pon_gto_66
LARecomp
Settings
Game Features
Mods
Content Modding
Development
Online
Server Hosting