• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Teamflag for Units and Ships

PPQ_Purple

Purple Cube (retired)
Joined
Oct 11, 2008
Messages
5,764
For quite some time now I have abandoned teamcolor as a way of identifying units. Instead I have developed a new way of doing this based on the shader code already existing within Civilization4. I call this approach Teamflag.

Put simply Teamflag is a way of rendering the flag of the owning civilization onto a unit in the form of a rectangular flag. Examples of this can be seen on my ships here:
civ4screenshot0009-jpg.537386

civ4screenshot0000-jpg.502962


The work was inspired by a great warlord model found in Fall from Heaven modmods. It's original source is unknown.


Instructions for use:
The *.nif file contains a single node called FLAG. To use the flag in your model simply copy the entire object into your units *.nif file and place it where ever you like. As an example on my ships the flags are pasted so that they are a direct child of the mast bones.
If you are having problems doing so or getting it to work feel free to contact me.

The download for the file can be found here.
 
I didn't know you could link to textures outside the nifs own folder. How clever.
I am always underwhelmed with the solid colored flags with most units. This will save some effort.
 
Just make sure to include the credits file with it in some form. Or like link to this thread or the downloads thread in some credits file of your own. I am sort of obsessed by keeping tabs on who did what. Which is why mods like VD drive me insane some times. But I digress.
 
ed2.png


What is "VD mod"? I've never played any of the mods.
I don't care about credits, or what anyone does, or whatever. The only people that care about credits are other modders. Unless they are making that internet money. I'm very interested in that.

I know its important to you so I would of course mention it. ;)
 
What is "VD mod"? I've never played any of the mods.
Varias Delectat It's a huge mod package made back in the day that basically picked the download database clean to create (as much as was possible at the time) a complete list of unique unit models for every civ. Awesome, and a great source of both models and inspiration for my own work. But because there are no individual credits in it (as opposed to my OCD style credits in my module) and most of the original threads or uploads are nowhere to be found I can't credit the original authors when I remodel or rework their units for my purposes. Which is sad. These people deserve it. I freely admit that a lot of my work would have been impossible without them.
 
Oh, yeah, I've heard of that one. I remember seeing it was a huge d/l and passed. I actually only played warlords until a couple years ago because it had a cooler name than BTS. Shows what I know.

Anyway, this is why I try not to use other people's work. One, because copying other people is not how you learn. Two, because you never know if you are stepping on toes, or don't even know who made it in the first place.

But individually we are but weak sticks. Together we are a mighty faggot.
 
I am a programmer which means that I am used to having to use the work of others. The key is to add enough value to it to make it a significant enough change to be a new unique product. Take for example those two ships in the first post.
The first one is an original model from Europa Universalis 4. It was extracted and converted to a nif by ramzay1945. His work however isn't animated at all, just in a nif. I than took the nif, rigged it to bones and animated it, moved the masts, made a whole new texture for it, added a teamflag, added and animated the paddle wheels on the side. And yes, the paddle wheels are animated with my own unique kfm. The second ship is a vanilla carrack which I modified by adding a new texture and the icicle decorations as well as making my own kfm with a magic ice ball effect instead of the cannon.

In both cases, I claim that enough work has been done to make the resulting model my own product. But I credit everyone along the line newer the less because without their work mine could not have been. And in both cases I would absolutely love to see the units used on by others again and again to create more cool stuff.
 
Last edited:
I am a programmer

That explains a lot. :lol:
My cavalier attitude hasn't allowed me to think about this as extensively as you have. But, with some self reflecting I'm not really as much a lone wolf as I would like to believe.

Anyway, something that would be cool is if this flag thing could be incorporated into the main sail texture. Sort of like the vanilla ships have that generic team color thing on their sails.
 
That explains a lot. :lol:
My cavalier attitude hasn't allowed me to think about this as extensively as you have. But, with some self reflecting I'm not really as much a lone wolf as I would like to believe.

Anyway, something that would be cool is if this flag thing could be incorporated into the main sail texture. Sort of like the vanilla ships have that generic team color thing on their sails.
You should be able to apply the material in question to anything, I think. You'd just have to judiciously copy over the material, texture mapping and any other options from the flag to your object. Although I am not sure how it would look stretched over a sail. It's certainly worth a shot.
 
Nice work. :)

The TFlagGloss shader is also applied to the Charlemagne units using shields by the way, namely the Heavy Cavalry, Heavy Spearman, Heavy Swordsman and the Mounted Infantry. They did some interesting stuff with the units in Beyond the Sword. Another interesting example for fancy stuff is the Afterworld Gravebringer.

I also tried adding the civ flag to a building at one point, but was not successful. I think the problem with that is that buildings do not "know" their owning civ, but never went deeper into that.
 
Hey there, I possess a few questions.

How do you copy all of that nif stuff from one nif to another? As far as I can see, there's no copy function. Or do I have to manually add each line?

When you say, "put it wherever I like," how do I notate location on the nif?
 
1. Open the nif you want to copy from using nifscope.
2. Click on the node you want to copy.
3. Right click
4. Copy copy branch
5. Open the nif you want to copy to using nifscope. DO NOT CLOSE THE ORIGINAL FILE OR THE COPY WILL BE LOST.
6. Right click where you want to paste.
7. Click paste branch.
8. Adjust coordinates as needed.

Spoiler Video Tutorial :
TUTORIAL.gif
 
Last edited:
Back
Top Bottom