Texture Override vs. Texture Replace (How, When and Why)
Well, this is my first real tutorial, so bear with me for a second, more than a tutorial it is a reference to the difference between this two properties in the units editor.
First, these two properties have the function to replace the texture of a model in-game, so using this we don't need to have multiple meshes to use different material. Normaly this doesn't really matter, since one or two extra meshes won't bloat the mod size, but for the sake of optimization this should be the way to go.
Like in a lot of things there are two ways to do this, one is to edit the unit .dat file directly with notepad, notepad+ or the text editor of your preference, and the other way is using the GUTS Units editor.
Editing the .dat file directly, the line that needs to be re-writen is:
and point it to the new texture to use, in this case to the second Mirka texture.
We need to go to: Data Editors, Units and then the type of unit we want to edit since all the editors have the field for this option.
Now, just like in the dat file this field should be filled with the relative direction of the texture file
Now lets see the results:
Left we have the normal mirka with the texture defined in the material file, and right we have the one with the textureoverride string added, both using the same mesh.
Now, let's see how to use TextureReplace.
If we want to edit the .dat file directly, the code will be:
[TEXTURE_REPLACE] <STRING>NAME:sturm_melee_mat <STRING>TEXTURE:media/models/monsters/Corrupted_Sturmbeorn/C_sturm_melee/sturm_melee2.dds [/TEXTURE_REPLACE]
In the NAME field, we need to write the internal material name . This is the name of the material that appears inside the .material file (open it with notepad++ or other text editor to see it). Just like in TextureOverride, in the TEXTURE field we use the relative direction of the new texture file.
Just like with TextureOverride we need to go to any of the units editor, and there to the “TextureReplace” tab, there we find a table with both fields, MATERIALNAME and TEXTUREFILE.
And the results are:
Left we have the Sturmbeorn with the TextureReplace strings, and right we have the normal sturmbeorn, with the original texture defined in the material file.
Now, you are going to say… “Both do the same thing, DUH!” But you can't use them in every mesh, well you can't use TextureOverride in every mesh. So that makes for the second part of this… when to use one or the other.
To be Continued