Call of Duty 5: Fixing 2048 materials Assets Error
Background on Error
After testing quite extensively we finally discovered the reason as to why only some players with some mods would get the error on detailed maps.
Note that I say detailed because this only starts to happen when a map uses a total number of materials assets (Textures, Techsets, Probes, FXs..) over 680 (you can check your total using Launcher > BSP Info).
So when a map is detailed you can get easily over 680 materials assets and this combine with materials loaded by the engine as default - Thats all the MP game/hud stuff - you can be near the limit already (the limit is 2048).
There are however a few more factors which tip the balance and trigger the message:
- The Mod assets: Of course the more materials the mod has the more change you have of triggering the error! At present AWE counts 12 materials, ACE has 11 and X5 has about 16.
- COD4 assets: yes you heard correctly, Treyarch has left several COD4 materials assets in the rawfile and in the stock .ff so about 25 of them (maybe more) are taken up for no reason!
- Duplicates: I don't know the origin of this problem yet but a lot of materials are listed in the count 2,3 sometimes 4 times!
- Loadscreens from other stock/custom maps: This is where the difference is usually as the number of loadscreens materials (along with the thumbnail created - _ig) will varie depending on how many custom maps a user has in his <LocalAppData> Usermaps folder.
So how to fix it? Couple of things you can do as a mapper:
- Decals: each time you place one a Techset will be created, a Techset can use 1 or more material files! An excellent workaround is to place your decal (nodraw brush or patch) exactly 0.25 Units above the brush/patch its meant to go on.
- Textures: Dont go mad on textures is probably the best advice here, try and stay at around 180 - 200 textures in use to allow for overhead on the limit. Note that Xmodels/FXs also count as they all use materials, sometimes more than one file!
- TIP #1: When making a map i suggest placing extra Destructable models in the map (hidden from view) and test with a few mods regularely during mapping, the extra destructables will provide a safety net if you reach the limit - you could then remove them.
- TIP #2: Always test your map on local server (+set dedicated 1) using the main Mods, also tests on an online dedicated server before release if possible.
Not much you can do, you can have as many maps you wish and it shouldnt make a difference on server.
The only thing you can do is go to your LocalAppData folder, under usermaps and remove any map you arent playing anymore to free up materials when maps are loading.
Avoid Duplicate Materials
To avoid loading redundant assets you should remove the redundant assets from your fast files using the “ignore” command in the fast file CSV. Follow these steps when building your mod and level fast files:
- When you build your mod.ff fast file, a CSV named mod.csv will be created in
/zone_source/english/assetlist. This file is a list of all the assets currently in the mod.ff. Rename mod.csv to mod_ignore.csv.
- Open mod_ignore.csv and remove, from the CSV, the assets you have modified specifically for your mod.
- At the top of mod.csv, add this line: ignore, mod_ignore
- Build your mod.ff fast file again. The new fast file that is created will only contain your modified and new assets.
Make sure your main Map Zone File has the following lines:
And that your Map Localized_ Zone file has:
ignore,code_post_gfx_mp ignore,localized_code_post_gfx_mp ignore,common_mp ignore,localized_common_mp