• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Adding Teamcolor to Units in 5 steps

Wonderblunder

Part Time Monster in the Closet
Joined
Nov 8, 2008
Messages
454
Here's a tutorial that I wrote that explaining how to add teamcolor using a free porgram called DXTBMP. This is simply a tutorial on how to add teamcolor, and not about how to make certain parts of units transparent.

To any expert unit makers-if I missed anything, tell me and I'll add it to the tutorial.


Step 1:The Program-The first step is to have the right program. For me, I use a program called DXTBMP when adding teamcolr to units. The download link is here.

Step 2: Knowing What is Teamcolored and What is Not-You may notice that a few units have white or grey areas on the their texture.

That area marks the place where the Teamcolor will appear in-game. It's possible to assign the teamcolor to areas that are not white or grey, but it's recommended that you do not do that. if you assign a colored part of the skin a certain degree of a grey , the two colors mix.

Step 3: Alpha Properties- Every teamcolored units' texture file has an extra "alpha" property assigned to it. The alpha property is what assign the teamcolor to the texture file. The alpha property for the Worker_128 and Warrior_128 DDS files will look like this.


Notice how the Worker's Alpha still has the fabric wrinkles visible, while the Warrior's does not. Since the worker's teamcolor assigned areas has a texture(fabric wrinkles), the Alpha image will also have the wrinkles. Since the warrior's teamcolor area has no texture on it, neither will the Alpha image. Notice how the Warrior's Alpha is completely black? When something is black on the Alpha image, that means that that area will be completely transparent, or that the teamcolor will be completely visible. In the worker's Alpha image, there are some gray areas. That means that the teamcolor will not be completely visible. Since it's not completely visible, you will be able to see the wrinkles of the fabric, but still have it teamcolored. As you may have guessed, the white areas means that the teamcolor will not appear at all.

Step 4: Using DXTBMP to Add Teamcolor- Now, here's where you use DXTBMP. In this example, we will be trying to turn the Infantry unit's helmet completely teamcolored. Open DXTBMP and open the Infantry's DDS texture file.
Spoiler :

The image in the center of the screen is the regular DDS image, while the image on the top-right corner is the Alpha image.
Spoiler :


You'll notice that, even though I changed the helmet into the greyish color, it's still transparent around the band. In DXTBMP, the transparent areas show you where the teamcolor will appear in-game.
Spoiler :

We need to change that. To do so, click on the alpha image, that will open up paint, and turn the area where the helmet is black. Once you have saved the alpha image, you must click on the folder with the green arrow, go to the file where you saved the Alpha image, and click on the image. Now the whole helmet will be transparent.
Spoiler :

Now save the image in the Infantry folder. (The program should automatically save it as the correct DDS image type)
Spoiler :

We're not done yet. We need to open the Infantry_FX. nif file. The helmet should be mostly transparent. In the property box these should be the same as the following:
  • Has Shader bool - YES
  • Shader Name string -TCiv4Skinning
  • Unknown In.. Int -1
Spoiler :

If these are not checked in the FX version of the infantry, the teamcolor will not appear. In the regular infantry.nif file, you do not add anything to the property box. I'll try to post how you change the regular nif versions soon.

Step 5: Test it In-Game- Now to test it in-game.
Spoiler :

Success!! If your unit looks like this, then you have just graduated from Charle88's School of Teamcoloring.:goodjob:

Credits
Spoiler :
veBear-read the tutorial and tested the process to see if it actually works
SaibotLieh-for reading and reviewing the tutorial
 
Perhaps for the sake of completeness you should expand your unit part. First of all, not only TCiv4Skinning is able to display teamcolor, afaik most of the shaders can display teamcolor (and the ones without have iirc NoTC or NoTeamColor or something similar in the name).

Also perhaps you could add the texture setup to the non shader case, teamcolor.bmp (from the shared folder) as base and the diff texture as decal0. (but not for col units)

Beside this :goodjob:
 
might have to use this to add team colour to some of the units in my mod :D
 
Sorry to resurrect an old thread, but I have a question.

In which of the main sections is the correct properties box that has; Has Shader bool,
Shader Name string and Unknown In? I searched for over an hour in the FX files of a unit that has it enabled and I still couldn't find it. Any help is much appreciated. :)
 
Nifskope open your units *.nif -> NiTriShape of your mesh


Spoiler :
auwny8.png
 
Back
Top Bottom