PDA

View Full Version : HOW TO: Change Flag Textures


Jarhead
14th Jan 07, 4:30 AM
I've seen quite a few posts about changing these; I’ve managed to change them to my liking with much frustration.


I haven’t already seen a post for this, so thought id share what I’ve discovered.


Firstly I will assume everyone is familiar with Corsix's ModStudio, in addition you will need the DDS plug-in for Photoshop, which can be downloaded from here http://developer.nvidia.com/object/photoshop_dds_plugins.html


Step 1
Locate the texture to change, ill use the resource flag for an example.

This is located in data\art\models\gameplay\resource_points\flags\model. Double-click the resource_tc.rgt file, make note of the popup as to how the file is extracted, most flags are extracted as DDS DXT5 with MIP levels.

Step 2
Locate the now extracted file with the same name in windows explorer within your mod folder. Open it in Photoshop.

N/B: Make sure you have the Channels window open; this can be opened by clicking Window on the toolbar, and checking Channels


Step 3
I always begin by removing the current MIP maps, by switching to Alpha channel in the Channels window. Select the largest white area on the left and crop the remaining smaller areas (unfortunately this has to be to the pixel)

Step 4
Switch back to RGB channel and modify the flag to your desire, keeping a similar size and shape to the one already placed

Step 5
Switch back to Alpha channel and colour the area of the flag black, this has to match the same size to the RGB channel.

Tip: I do this by selecting the area around the flag in RGB channel before switching to Alpha for guidance

Step 6
Save the new texture by, clicking Save As in File on the toolbar.

Locate the folder where the original file was opened, change Format to D3D/DDS (*.DDS). Make sure the File name matches the one in the window.

Click Save.

A new popup appears nVidia DDS Format. In the drop down list change the save type to DXT5 (from Step 1); check that MIP Map Generation has the option Generate MIP Maps selected, with the drop-down list showing All.

Step 7
Switch back to ModStudio; double click the resource_tc.dds file to convert it back to an RGT (compatible for the game)

Step 8
In order for the map to work correctly, we need to remove the team colours that are added to the textures in game.


So locate teamcolours.lua in the data folder. Open it as a .txt file.

Amend the file to the following:

team_colours =
{
{ -- self
colour = { 255, 255, 255 },
tint = 0,
badge="Wolfhead.tga"
},
{ -- ally
colour = { 255, 255, 255 },
tint = 0,
badge="Wolfhead.tga"
},
{ -- enemy
colour = { 255, 255, 255 },
tint = 0,
badge="Wolfhead.tga"
},
{ -- neutral
colour = { 255, 255, 255 },
tint = 0,
badge="Wolfhead.tga"
},
}

Save the file.

You can run the Mod to check out the new resource flag.

For further information, other textures you might want to change:

data\art\models\environment\art_ambient\objects\base_perimeter

allies_side_flag or allies_side_flag02 (appear to be the same texture - havent figured out the difference yet
axis_ledge or axis_ledge02 (appear to be the same texture - havent figured out the difference yet)
gaurd_tower


data\art\models\gameplay\resource_points\shared_textures

tex_capture_dif - the flag that is hoisted up the resource pole (if anyone can figure out why it’s always the allied flag that goes up, please let me know!)

N/B: With the texture, leave the Alpha channel as it is

tex_capture_tc - the small flag at the base of the resource flag


data\art\models\races\axis or allies\structures\flag\model

Axis
ax_flag_dif
ax_flag_tc

Allies
tex_al_flag_tc

The following are supplied courtesy of VIC -

Data\art\models\environment\art_ambient\buildings\ normandy_industrial\shared_textures\accessories

accessories_industrial_01.rgt

Data\art\models\environment\art_ambient\buildings\ normandy_rural\shared_textures\accessories

rural_accessories_01.rgt

Data\art\models\environment\art_ambient\buildings\ normandy_urban\shared_textures\accessories

urban_accessories_01.rgt

Data\art\models\races\axis or allies\structures\shared_tex tures

tex_al_structures_dif.rgt
tex_ax_structures_dif.rgt

data\art\models\gameplay\bonus_points\victorypoint\shared_textures

src_victory_point_diffuse.rgt

data\art\models\gameplay\bonus_points\victorypoint\model

tex_victory_point_diffuse.rgt

N/B: It appears that some axis flags are either back to front or up side down and are slightly smaller than they could be, so you may need to play around with these to get a size to your liking

Due to some demand, here is a small mod to change the flags for those who like realsim:

http://hosted.filefront.com/COHJarHead/

Vic
17th Jan 07, 11:31 AM
Jarhead, thanks so much for posting this. I don't know how you figured this all out, but man......you impressed me. Plus gave me a kick in the right direction on what I wanted to do.

Anyway, for many years I have been modding MOH, bf42 and now bf2, so this is all new to me. COH is a lot different.

There are still a few problems and I wonder if you have resolved any of this.

I have changed all the files you mentioned in your post pluse some called "src_victory_point_diffuse.rgt" and "tex_victory_point_diffuse.rgt.

And as you can see from the pics there are still some flags not changed.

Just wondering if you can give me anymore help on this subject.

http://premium1.uploadit.org/marker//relic00004.jpg

http://premium1.uploadit.org/marker//relic00003.jpg

Please people don't turn this in to a political thing. I don't want to hear your views on politics. I came here to learn how to mod this game. Thanks.

Vic
18th Jan 07, 9:21 AM
After much much frustration, I have found out what else needed changeing.
I also had to change the texture "rural_accessories_01.rgt"
Located in:"Data\art\models\environment\art_ambient\buildings\normandy_rural\shared_textures\accessories

And I had to change the texture "tex_al_structures_dif.rgt"

Located in: "Data\art\models\races\allies\structures\shared_textures"

http://premium1.uploadit.org/marker//relic00006.jpg


Now I will work on getting the good old stars and stripes in game.

Jarhead
18th Jan 07, 9:27 AM
Glad to be of help VIC, actually you returned the favour cos i was looking for that last texture for the HQ!

Ill add it to the post.

Have you figured out why the Allied flag is always hoisted up when capturing a resource point by any chance?

Anything else i could help with, ill try.

Vic
18th Jan 07, 9:46 AM
I think the reason for that is because just one model is used for the flag being raised. So no matter what side your on it uses the same texture. (Which happens to be the Allied)

To solve this, you could just make the texture a white flag. That way no matter what side your on a white flag will raise and once to the top it changes to what ever side your on. (Thats kinda how it works in bf42/bf2)

Or, I saw in a post somewhere here that a guy gave the M26 Persing tank (one model) Four different skins.

Maybe this would work with the raising flag model. That way you could have the Axis flag going up for the Axis and the Allied flag go up for the Allies.

Like I said I'm brand new to modding this game. So I have more studying to do on this matter.

Keep up the good work Jarhead!

Jarhead
18th Jan 07, 10:12 AM
Well for someone new to modding this, your doing pretty good so far

Vic
18th Jan 07, 2:13 PM
I forgot a texture, after looking through hundreds of textures my brain is like jello heh.

The other texture is "tex_ax_structures_dif.rgt"

So inorder for me to change all the flag textures on the Reich Headquarters building, I had to change the textures:

tex_ax_structures_dif.rgt

tex_al_structures_dif.rgt

rural_accessories_01.rgt

Jarhead
18th Jan 07, 2:34 PM
Added to the thread

Vic
18th Jan 07, 7:10 PM
Oh well, back to the drawing board again.

I went into a different map and the Reich Headquarters had un changed textures again.

Must be some more textures to change.

Man they made something that should be so easy, so hard to do.

All the flags for one country should be read off of one texture not 50 different ones.

Oh well I guess thats what makes this so fun....heh

Back at it.

Ok add another one to the list.

Seems there are two different (they don't look much different) Reich headquarters.

Other file to change: "urban_accessories_01.rgt"

Found in "Data\art\models\environment\art_ambient\buildings\normandy_urban\shared_textures\accessories"

Vic
18th Jan 07, 10:43 PM
U.S. is off to a good start:

http://premium1.uploadit.org/marker//relic00015.jpg

Vic
19th Jan 07, 7:36 AM
Ok Americans all set (I think) I just got this game and there are many maps I haven't even seen yet. So far so good.



http://premium1.uploadit.org/marker//relic00029.jpg


Also I changed the flag that goes up the pole when you capture a point. It is a white flag for both German and American. Once flag gets to top (point is captured) The flag changes to American or German depending who captured the point.

http://premium1.uploadit.org/marker//relic00016.jpg

Oops white flag idea didn't work. That flag is used by the allies for one of their main base flags.

It's strange because when a German captures a point an American flag goes up the pole. When Americans capture a point a German flag goes up the pole.

So you say easy fix just swap textures in texture sheet. But you can't because that texture sheet is used for some flags around the American Headquarters (not sure about the German HQ)

Sounds like maybe a code thing or maybe the models must be re exported with changed uv mapping...I don't know.

I guess I'll just leave that alone for now.

Jarhead
19th Jan 07, 3:18 PM
Nice to see the US flag looking so good... now all we need is for the UK one to look as good ;)

I am curious though, how you managed to keep the texture quality so good, when i use a texture, the quality seems to go right out the window.

I havent really been focusing much time with these textures as of last, changing, sorry messing with the squad setups etc. Ill take a look, see if there is any logic there, but like you say, it could be coded.

Vic
19th Jan 07, 6:55 PM
I am curious though, how you managed to keep the texture quality so good, when i use a texture, the quality seems to go right out the window.


What I did was with all the flag textures that had a texture size of 128 X 128 I changed them to a texture size of 256 X 256 then edited them to my likeing, saved as DXT 5 .dds and then converted them with the mod tools to .rgt

By saving it as a larger texture size it dosen't break down so bad (distort) as a smaller texture sizes do.

All other textures I left orginal size. Only the 128 X 128 size textures were made bigger.

Jarhead
20th Jan 07, 10:26 AM
Interesting... see yo do know more than me :Hail:

Ill give that one a try, see how it works with my textures

And the net result afer a quick change is..

Jarhead
21st Jan 07, 11:03 AM
Ive just discovered the MIP map filters... if this is changed to Kaiser, the highest setting, the quality of the MIP maps are MUCH better with finer detail, so texture quality isnt lost.

Corsix
21st Jan 07, 11:21 AM
So you say easy fix just swap textures in texture sheet. But you can't because that texture sheet is used for some flags around the American Headquarters (not sure about the German HQ)Then set the american HQ to use different texture sheets.

Jarhead
21st Jan 07, 11:31 AM
Good point.. simple fix, make a copy of the texture with different flag maps, and get the resource points to use one, and the HQ buildings use the other..

Only problem is, when i tried this the Allied flag changed also, but can do the same there too i guess..

Soldat-Hans
22nd Jan 07, 2:07 PM
Jarhead, Release your german flags!! Its is looking very realistic!! Great job!!

Jarhead
22nd Jan 07, 3:06 PM
Thanks... i have new and improved ones now :)

Just finishing one last flag...

Only thing is.. i havent changed the Allied ones yet!

On a side note, so far, there doesnt seem to be a limit as to high how the resolution is before you convert it.. obviously i suspect too high with impact on game performance, but it helps to keep good texture quality. Ill post some pics too see my new flag textures..

Vic
22nd Jan 07, 7:05 PM
Nice!

Jarhead
23rd Jan 07, 6:38 AM
Thanks - was your help that got em like that lol

You may be able to help with this one..

When i change the Axis Ledge texture, i get part of this texture appearing at the base of the HQ, peaking out of the corner sand bags. As this is bright red, its kinda obvious.. any thoughts?

Vic
23rd Jan 07, 8:40 AM
Not sure. Could you post a pic?

Jarhead
23rd Jan 07, 3:09 PM
Ahhh figured it out.. texture was too big, thus causing the problem. So fixed

Jarhead
26th Jan 07, 11:28 AM
Actually im still having this problem.. even if i dont change the texture size, leave at 128 x 128. Then change the texture, try to make it bigger to remove the grey arear around the banner ingame, and i get the red in the sandbags. I havent chaned the Axis Structure texture... any thoughts?

Vic
26th Jan 07, 6:35 PM
Still not sure, gotta see a pic,

anarchy
3rd Feb 07, 12:19 PM
Wow... nice Mods.

@Vic and Jarhead: would you post your flagmod textures for download? Iīd like to use them in my game.

Jarhead
3rd Feb 07, 2:18 PM
They look better in game too :agree:


Let me see what i can do? Although i dont want to cause any offense as i know these symbols are banned in some countries.. ? :Police:

anarchy
4th Feb 07, 8:01 AM
Cool, would be fine.

But I know what you mean. I`m from germany... :rolleyes: If a german asks for this things: :bricks: Most people would call me a nazi.
however... itīs more funny to play realistic games. If you have problems with the legality, please send me a PM.

This mod looks too good to go stale somewhere :D

Jarhead
4th Feb 07, 10:17 AM
Well i believe that the symbol is not evil, but the person with an evil cause using that symbol is. :disgust:

Before i get any :handbag:, my only reason to include the symbol was for realism.. where do you want me to upload it?

Ace40k
4th Feb 07, 1:03 PM
Quick question: are both the altered Axis flags and the Allies flags usable in online games?

Jarhead
4th Feb 07, 1:15 PM
havent tired them.. so dont know?:crazy:

anarchy
5th Feb 07, 7:33 AM
Jear, youīr right. Symbolīs not the evil... itīs the person howis using it for an idear.

Upload... where ever you want. Just let me know the link:rolleyes:

And a big THANK YOU!!! :hug:

Jarhead
5th Feb 07, 12:56 PM
So here goes, my first mod, although i would add, ripped from my own mod, so not fully tested. So comments welcome

http://files.filefront.com/6691745

anarchy
6th Feb 07, 1:17 PM
Jear...

Iīve needed some time und a little bit testing ... but ist works... and look better than good.

The axis buildings, bunkers and points are perfekt.

Now Iīve just two questions, before I call you god of modding

Frist: please take a look at the screenshot. If axis build the post, the flag on the post is white...


Second: do you have flagtextures for allies too? They are the same... my mistake? Or didnīt you make them?

Jarhead
6th Feb 07, 2:26 PM
Thanks.. hadnt fully tested them properly to be honest, so didnt pick that up. Ill fix that flag.. im currently using this Allied flag in my mod, if you wish i can change it. Any preference? Old Glory?

anarchy
6th Feb 07, 2:49 PM
You are the modder. :D

No preferences... just the flags like you have done them. Or just the normal stars and stripes? I donīt know.
Iīm realy grateful to you. Itīs very cool, that you are so friendly and make you mod playable for me ( and all the other interested people).

Big thank you again :D

Jarhead
7th Feb 07, 1:12 PM
In that case ill use the stars and stripes combo, ill get to work on these + fix, only thing is due to work, i wont be able to upload till the weekend. If that is ok?

anarchy
7th Feb 07, 2:32 PM
Very cool... thanks.

Take all time you need... as I said: you are the skinner :trix:
And I must work until saturday this week ... so itīs fine!!!

Matt255
10th Feb 07, 2:54 PM
Well, i would like to change the flag without having to edit the teamcolors.lua file. Anyway to do that? I'll probably ask Halftrack, because he got rid of the teamcolors on the vehicles aswell.

I've tried to delete the alpha channel of the flag textures but that doesn't work.

anarchy
11th Feb 07, 10:34 AM
Good question... Iīm not sure, but I think, thatīs impossible... I tryed to kill all teamcolors. I failed :noway:

But; Iīm a beginner :D


And just some hours later normandy 44 2.0 shows you, what is possible :rolleyes:

Jarhead
12th Feb 07, 11:53 AM
As far as im aware it is possible to leave the team colours, however the colour would overcast over the texture, so if the texture is white, the colour will show over the top. If you mean, a coloured texture with the team colour, im not aware if this is possible for the flags.

Your best bet is to ask Halftrack as he has more experience with textures.
Anarchy - quick update, ive changed all the textures, cleaned up some other areas, got a problem with the axis OP texture though.. cant seem to fix it with causing a problem. I can post it as is for now, but im working on a fix, possibly removing it instead.

anarchy
12th Feb 07, 2:23 PM
Hey, no problem.

Take all time you need. And if you say, itīs finished, then itīs finished. ;) Just tell me!

Btw.: best regards from two of my friends. They love your mod like I do

Jarhead
13th Feb 07, 2:34 PM
Hey, ive just uploaded an improved version of this mod for your gameplay.

List of changes are:

* Changed Resource Flag, and some base flags to US Stars and Stripes
* Remove white bands at base of Resource Points
* Changed Allied Observation Post flag
* Removed Axis Observation Post flag (problem with texture, so couldnt keep it - will try to fix)
* As a side affect, had to change the tower next to the HQ (removing a flag)

Comments appreciated

http://files.filefront.com/Flags_Mod_v12rar/;6739900;;/fileinfo.html

anarchy
14th Feb 07, 5:01 AM
Cool...

that looks very good :D

Good idear to remove some of the flags. And "stars and stripes" looks excellent!!!

Jarhead
14th Feb 07, 2:20 PM
Thanks.. appreciated, if you want me to change it in anyway i can.

In the meantime, ill get back to :beer: , sorry i mean modding :awesome:

anarchy
15th Feb 07, 4:50 AM
Funny.

Drinking, modding... nearly the same :rolleyes:

Iīve two questions. The first:
why did you remove the flag a the axis HQ?

And second:
I saw a mod having all allis flags "stars and stripes" (not es good as yours) at the HQ, all buildings and the MG-nests. BUT: Iīm using a mod für the allis and axis buildings. The MG-nests are camouflaged. Every time I tryed to use these flags in my game, these camouflage is gone, the old nest ist there with new flags... :stupido: But it looks like I didnīt make any mistake. Are they interdependet?

Btw: sorry for my bad english... I try to do my best, but itīs long time ago, that Iīve written so much. Hope you donīt have to much problems with it.

Jarhead
17th Feb 07, 2:19 AM
Hi, your english is fine, so no problem there

1. The flag next to the HQ uses the same diffuse texture as the Axis OP. For some reason whatever i try, i cannot change the Axis op texture correctly. As as i chnage the Alpha channel i get i white band round the entire model (which doesnt look good). So i chose to remove this instead to fix it. However, because it is tied to the same diffuse texture, in meant loosing the other flag too (not by choice, took me a while to do that other texture too). I did try making another texture, to split them, but these 2 models continued to use the same texture even after i redirected to the new texture. Im still working on it.. hoping the 1.5 may fix it?

2. Again, i chose to keep the base flags as the Allied flag, it looked better than lots of US flags flying everywhere (personal choice). If you prefer i can make another version with complete US flags? The camouflage Allied base textures, i also have those, again if you wish i can include those in this seperate version?

Hope this helps?

anarchy
17th Feb 07, 7:12 AM
Cool.

If you could change the base flags agains US flags... than Iīll realy call you god of modding.

It would be very cool, if you could make a version with complete US flags. Maybe it looks a little... hmm... strange, but hey; why not? :rolleyes:

Jarhead
17th Feb 07, 1:36 PM
Here we go, copy this file into:

data\art\models\races\allies\structures\flag\model

and it will change all base flags to US Stars and Stripes

anarchy
18th Feb 07, 12:25 PM
Jear,

thatīs it. :awesome:

Now your place at the modding olymp is sure, if you ask me :rolleyes:
Big thanks again.

So whatīs your next project?

Jarhead
18th Feb 07, 12:49 PM
Thanks and no problemo B)

Im working on a mod, like everyone else, i want it to be as realistic as possible (for my own personal preference - again if anyone wants to use it, more than welcome). Im focusing on realism over gameplay, i think that can even it self out with the right AI balance. So this is where the flag textures came from.

Ive created 18 new Axis squads so far, still got more to include before i can begin with the Allied. Im actually having more fun modding the game, than playing it (although i love the game obviously :hippy: ).

What about you?

anarchy
18th Feb 07, 1:07 PM
Oh...

I canīt mod. Iīm just using Corsix tool to pimp some little mods. Nothing special, just for fun.
Realistic playing... sounds good. But I think itīs very hard to do.
So what I do: I take a mod (now normandy 44 2.0), make all units playable, all limited to 5, some changes for the weapons, to be fair... and than I start a bloody killing. I just take mods (sound, skins, and so on) and make them a little more funny for me. Iīd like to create an own mod; but I donīt have much time. Iīve to work to much. Corsix tool is not soooo complex, but if I would spend more time in creating my own mod, I would never see the daylight again :Skull:

So Iīm using skins and mods from others. :D

Jarhead
18th Feb 07, 1:21 PM
i have to admit, its taking along time, but im enjoying it so cant complain.. although i cant do somethings, so i confess to using some solutions from other mods :puppy:

anarchy
18th Feb 07, 1:34 PM
Jear, but you CAN do it. I canīt. And if I realy try, and it dosnīt work... the result is horrible :crash: for my PC. So the only thing I do is making other mods a little better playable for me. Itīs funny, too :beer: And if i make a mistake... hey... normal version over it and itīs good ;)

nsysusoloman
23rd Feb 07, 6:51 PM
Hey jarhead, just want to tell you that I have used your work in my skin pack:
http://forums.relicnews.com/showthread.php?t=138037
I changed the flags on the bunker and the HQ due to artistic reasons, hope you dont mind

Jarhead
24th Feb 07, 12:26 AM
Hey Nsysusoloman, i already noticed, but hey i dont mind, im more than happy for anything i produce to be used by anyone else, in fact im pleased, as long as it makes your mod look cool? ;)

DrZin
14th Apr 07, 10:00 AM
This is exactly what I've been looking for. I've downloaded your files, but I haven't any idea how to go about applying them. Could I perhaps impose on you to give me a brief How-to? I would REALLY appreciate it.

Thanks for your time.

DrZin

1SSPzGrenLehr
19th Feb 08, 4:55 PM
Everything works with the files I found in this thread, except unlike the images earlier on, the resource flags look like they over-lapping each other, a stars and stripes under a german flag...and for some reason I can't post a screenshot in this message... can someone either tell me what's going on or post fixed files? I would like to incorporate them into a Mod of Mine, but have to get this working right... I also don't have "white flags on capping, they aren't even showing until it's capped.

Please help :help:

AnyKey
19th Feb 08, 8:24 PM
It's the alpha channels you have to work with those XXX_tc.rgt, does this help or would you like more of an explanation? I recently did some flag textures myself, so I learned it was alpha channels what allow you to set different/individual flag for each Army(race).

1SSPzGrenLehr
19th Feb 08, 11:27 PM
Actually I have no way to edit images (other then Paint at the moment) could really use some help just getting a correct set of files...

...odd thing is that earlier in the post there are images of the correct resource flags working... and I downloaded the same files (I assume, from the link provided). I would like use these, but if they are buggy, then I will have to dump them and revert to the default (crapp) looking flags - :(

Any help would be apprciated, thanks.

AnyKey
20th Feb 08, 1:53 PM
When I get back later tonight around 12am (yeah I know :( ) i think I got some flag textures i could send you for you to use or learn from. I go by EST.



If you have MSN, PM and we could link up on there.




EDIT: Actually I just remembered the author of the ACIDMOD has some very good textures (not his work completely but a collection), check it out.

http://forums.relicnews.com/showthread.php?t=167398

Monty76
19th May 08, 6:02 PM
Where's the 'data' folder in the CoH installation? I can't find it. Also, can someone post a link to a mod that installs the stars and stripes/swastika/union jack without having to design them yourself? Don't have the first idea about stuff like that. I have a teamcolour.lua from a mod to change the colours of the insignia on the vehicles, but I don't know where to put it.

Edit: How do you use quote on this forum?

gustavowizard
7th Mar 10, 1:13 AM
this looks great :)
how i make to replace all german flags by Italians ones for my italy faction?
that USA flag to download here worked fine, but i tried to make the same to britain too and i got the flag right but still have that british white round symbold over it, i tried to erase it on difuse file but it just change the color to brown lol the color of photoshop erase i think... how can i remove it?

maybe i could use the german flags u made and just change to italy.. can i?
ty man