Using Custom Texture Suffix In Editor and bf2meshviewer
Posted: 2013-02-21 17:56
I'm writing this down because quite a few people have asked me this already
If it's in the wrong place or a duplicate of an old one please remove!
BF2 has the handy feature that it can load a different set of textures for certain objects if the mappers chooses too. For example quite a few vehicles, statics and other objects have a woodland texture next to their normal one. For example this US m1a2 tank:
This happens because of this specific object there are existing 'woodland' textures.
When you look at it's main color texture called:
'A2partc_c.dds'
you can see there is also a copy of that called
'A2parts_c_Woodland.dds'
So if a mapper chooses his map is a woodland map, he can choose this in his editor settings and then all objects that have textures with a woodland texture suffix will be loaded. By standard the editor and bf2meshviewer already have the option to load these, i'll show you.
BF2MESHVIEWER
In bf2meshviewer, after loading your object go to Options->Texture Suffix--> and then choose the one you want. Since you are still at default settings you will only see None and woodland.
So now your meshviewer will load up the woodland textures (if they exist of your object). Now maybe you have made a costum texture and gave it it's own suffix( _snow,_syria,_desert,...) and you want to see them in meshviewer, this is how you do it.
Open the config.ini file in the directory you installed bf2meshviewer in. Open it with a text editor and in there you will find the following piece of code:
Now it's as simply as copying the last line and changing the suffix to yours, so it for example for _snow becomes this:
Save this file and now you will see your new suffix in bf3meshviewer.
BF2EDITOR
Now you can do the same for working in the editor. When mapping if you select a certain suffix and you save your map, it will save this in your init.con so if you then load the map ingame it will also load up the correct suffix if you selected one.
When in the editor, go to Render-> Object Costum Texture Mode and select the suffix of your choosing.
then it will load all woodland textures. Now again I will explain how you can add a custom one to that list to load. go to your battlefield2/bf2editor/Settings/Init. So default location is:
Like last time simply copy this line and add your own suffix to it, so it looks like this:
. Now when you restart the editor your costum suffix will be in the list to be loaded. You can also manually add your suffix to your map by opening your levelname/init.con file. In there you will find:
simply add your suffix between the "" and it will load the correct suffix. So it looks like this:
However if you did not add your suffix to the editor recourceinit.con then next time you safe it will go back to default. i hope this was helpful, if not feel free to ask a question.
BF2 has the handy feature that it can load a different set of textures for certain objects if the mappers chooses too. For example quite a few vehicles, statics and other objects have a woodland texture next to their normal one. For example this US m1a2 tank:

When you look at it's main color texture called:
'A2partc_c.dds'
you can see there is also a copy of that called
'A2parts_c_Woodland.dds'
So if a mapper chooses his map is a woodland map, he can choose this in his editor settings and then all objects that have textures with a woodland texture suffix will be loaded. By standard the editor and bf2meshviewer already have the option to load these, i'll show you.
BF2MESHVIEWER
In bf2meshviewer, after loading your object go to Options->Texture Suffix--> and then choose the one you want. Since you are still at default settings you will only see None and woodland.

Open the config.ini file in the directory you installed bf2meshviewer in. Open it with a text editor and in there you will find the following piece of code:
Code: Select all
[Texture Paths]
texpath=1,C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr_edit
suffix=woodlandCode: Select all
[Texture Paths]
texpath=1,C:\Program Files (x86)\EA GAMES\Battlefield 2\mods\pr_edit
suffix=woodland
suffix=snowBF2EDITOR
Now you can do the same for working in the editor. When mapping if you select a certain suffix and you save your map, it will save this in your init.con so if you then load the map ingame it will also load up the correct suffix if you selected one.
When in the editor, go to Render-> Object Costum Texture Mode and select the suffix of your choosing.

in there open the RecourceInit.con with a texteditor. In there you will find at the bottom:C:\Program Files (x86)\EA GAMES\Battlefield 2\bf2editor\Settings\Init
Code: Select all
ResourceHandler.AddCustomTextureSuffix "Woodland"Code: Select all
ResourceHandler.AddCustomTextureSuffix "Woodland"
ResourceHandler.AddCustomTextureSuffix "Snow"Code: Select all
if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix ""
else
texturemanager.customTextureSuffix ""
endIfCode: Select all
if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix "Snow"
else
texturemanager.customTextureSuffix "Snow"
endIf