Fix store.jsonc vehiclePacks nesting and gjn field name, matchingApiFunc callback argument order, and DaGui CSS @import/lowercase rules; add stock archive inspection steps, BR-to-mrank table, cloned vehicle walkthrough, tuning field reference, and official-map-selector full-stack trace while bringing en/01..07.md to full 1:1 parity with zh-CN/.
8.2 KiB
03 · Adding Custom 3D Vehicle Models & Textures
This chapter explains how to build brand-new 3D vehicle mods shipping custom geometry (.grp) and texture packs (.dxp.bin) in WTOffline so multiple vehicle packs from different authors stack cleanly, mount across drives with zero copying, and roll back cleanly when disabled.
1. Plain-Language Asset Glossary & Zero-Copy Mounting
When working with 3D vehicle mods, you will encounter four core asset and filesystem terms:
| Term / Extension | Plain-Language Meaning |
|---|---|
.grp |
Dagor Engine 3D geometry & skeleton archive (exported from the official War Thunder CDK AssetViewer / exporter), containing multi-LOD meshes, animation skeleton nodes (animChar), collision volumes, and internal damage-model (DM) parts. |
.dxp.bin |
Dagor Engine compressed texture pack, bundling multiple diffuse, normal, and metallic/roughness DDSx textures referenced by name inside .grp materials. |
.ddsx |
A single Dagor compressed texture file (DDSx), commonly used for UI stat-card vehicle portraits (ui/images.vromfs.bin/units/<unit_id>.ddsx) or standalone skin textures. |
| NTFS Directory Junction | Think of it as an OS-level zero-copy folder shortcut built into Windows NTFS: when the game engine opens <copy>/content/pkg_user/<modId>, Windows transparently serves the files straight from your mods/ folder on any drive—no administrator rights needed, works across drives, consumes 0 extra disk bytes, and mounts/unmounts in ~1 ms! |
How the Engine Discovers client/addon/ Automatically
Verified directly against 2.61.0.x aces.exe (dlContent.cpp) and aces.vromfs.bin/config/settings.blk:
- The patcher automatically registers every enabled mod's addon mount path into
addons,addons_no_check, andaddonsWithBasePathinsideconfig/settings.blk; - Any addon path under
/pkg_user/(mounted by default at<copy>/content/pkg_user/<safeModId>) skips the mandatoryres/grp_hdr.vromfs.binheader check and directly scans<addon>/res/for all.grpmodel and.dxp.bintexture archives, registering them into the global asset manager; - If your mod ships an official CDK-compiled
res/grp_hdr.vromfs.bin, the patcher mounts it at<copy>/content/pkg_wto_<safeModId>so the nativegrp_hdrloader handles it; - Disabling a mod removes only the directory junction itself and never deletes or modifies your source files inside
mods/.
2. 6-Step Checklist for a Custom 3D Vehicle
Suppose your mod ID is demo.new-mbt and your new vehicle's internal ID is us_mbt_demo:
mods/demo-new-mbt/
├─ mod.jsonc
└─ client/
├─ addon/
│ └─ res/
│ ├─ us_mbt_demo.grp # ① 3D meshes, skeleton & collision (CDK export)
│ └─ us_mbt_demo.dxp.bin # ① Compressed texture pack (DDSx)
└─ packs/
├─ aces.vromfs.bin/
│ └─ gamedata/units/tankmodels/
│ └─ us_mbt_demo.blk # ② Physics, armor, turret & weapons (text BLK compiles automatically)
├─ char.vromfs.bin/
│ └─ config/
│ ├─ wpcost.blk.patch.jsonc # ③ Price, RP, BR & modifications (fastest via cloneBlock)
│ ├─ shop.blk.patch.jsonc # ④ Tech-tree column & position
│ └─ unittags.blk.patch.jsonc # ④ Unit class, hangar slot, test-drive mission & tags
├─ lang.vromfs.bin/
│ └─ lang/
│ └─ units.csv.patch.csv # ⑤ Localized names (_shop, _0, _1, _2)
├─ ui/atlases.vromfs.bin/
│ └─ gameuiskin/
│ └─ us_mbt_demo_ico.svg # ⑥ Tech-tree & local web store silhouette icon (all lowercase!)
└─ ui/images.vromfs.bin/
└─ units/
└─ us_mbt_demo.ddsx # ⑥ Stat-card / crew-slot portrait (optional; falls back to placeholder)
Key Verification Checks
- Keep the vehicle's internal ID identical everywhere: the
tankmodels/us_mbt_demo.blkfilename (orflightmodels/us_jet_demo.blkfor aircraft) and the block names inwpcost.blk,shop.blk, andunittags.blkmust match character for character. ui/atlases.vromfs.binicon paths must be all lowercase: stock icon packs store paths in lowercase, so name your icongameuiskin/<lowercase_unit_id>_ico.svg(the local web store also displays this exact SVG on pack cards!).- Match
.blkasset names to.grpexports:model:t="..."insidegamedata/units/tankmodels/us_mbt_demo.blkmust match the exact asset name exported into your.grparchive from the CDK.
3. Regular Tech-Tree Vehicles vs gift Store Packs (& AI Bot Pool Rules)
In wpcost.blk.patch.jsonc and shop.blk.patch.jsonc, you can wire your custom vehicle either as a regular Silver Lions researchable vehicle or as a local web store pack vehicle:
Option A: Regular Silver Lions Tech-Tree Vehicle (Recommended If You Want AI Bots to Drive It)
- Set normal
value(Silver Lions price) andreqExp(Research Points) inwpcost.blk, and omitgift,premPackAir,costGold,event, andresearchType(squadron tag), as well asshowOnlyWhenBought:b=yesinshop.blk; - Automatically joins the AI bot pool: the local server's matchmaking bot selector (
battle-ranks.ts) automatically includes tech-tree vehicles (inTechTreeinshop.blk) that have none ofgift,premPackAir,event,researchType, orshowOnlyWhenBought! Both friendly and enemy AI bots at matching BRs and nations will spawn in your custom vehicle during offline battles.
Option B: Local Web Store Pack Vehicle (gift:t="msi_notebook")
Modders inspecting stock wpcost.blk / shop.blk often wonder: why do dozens of pack vehicles say gift:t="msi_notebook"?
- In stock War Thunder, any non-empty
gift:t="..."string (Gaijin historically reused promo strings like"msi_notebook"across countless store vehicles) marks the vehicle as an external store pack/gift unit whose Order button opens the web store instead of spending Silver Lions or Golden Eagles; - WTOffline auto-generates a local web store bundle: during copy building, WTOffline scans every vehicle carrying
giftinwpcost.blkand automatically registers a deterministic local store product IDwto_pack_<unitId>(e.g.wto_pack_us_mbt_demo) and bundle GUID:- Even with zero server config, the local web store automatically prices the pack using
vehiclePacks.byRankfor the vehicle'sranktier so players can buy and unlock it right away in the in-game store! - To customize its GJN price, Golden Eagles bonus, or Premium days, simply add an entry under
vehiclePacks.byVehicleinserver/tuning/store.jsonc(see Chapter 05).
- Even with zero server config, the local web store automatically prices the pack using
- AI Bot Pool Note: vehicles carrying
gift,premPackAir,event,researchType, orshowOnlyWhenBoughtare intentionally excluded from the automatic AI bot pool so rare pack prototypes do not flood standard bot lineups.
4. Companion Skins, Sights, Sounds & the Native Folder Boundary
- Standalone skins, sights & single-player missions: players should continue placing standalone files directly into the game's native
UserSkins/,UserSights/, andUserMissions/folders—the launcher never touches or deletes player-managed native folders, and they do not need to be wrapped as mods; - Companion assets bundled inside a large vehicle overhaul mod: if your custom vehicle mod includes dedicated camouflages, custom FCS gun sights, or custom cannon sound banks, place them under
client/files/so they mount and unmount together with the mod:client/files/UserSkins/mod_us_mbt_demo_camo/...(mod-exclusive subfolder → mounts across drives via zero-copy NTFS Junction)client/files/UserSights/us_mbt_demo/...(mod-exclusive subfolder → mounts across drives via zero-copy NTFS Junction)client/files/sound/mod/my_cannon.bank(shared flat directory file → tries file symlink → same-drive hardlink → size/mtime incremental cached copy)
- Native Player File Protection: if any target path under
client/files/already exists in the game folder as a player-created native file or folder, the launcher skips that item with a log warning and never overwrites or deletes player content.