Flag problem for Civ

Joined
Sep 23, 2002
Messages
650
So here's my problem, I'm trying to make a new Civ for myself to get into modding again and I've run into a problem, my flags aren't working. Well, more specifically, none of my .dds files are working. I'm working on a Mac and am using Graphics Converter X to make my .dds files, they work fine, I save them, their preview image is right, but when I open them again they are all black, and when I playtest the flag it's pure white. Now I know that there's a Mac forum but this is a creating and customization problem, so no need to redirect me there. So here is my question: Could someone either A) take a look at my .dds files and see if they're correct (IE is GCX actually doing what it's in theory suppose to be able to do) and if not, fix them or make new ones? I know, I"m sorry that I"m being a pain, but your help would be greatly appreicated, and from what I can tell it shouldn't take too long. Anyway, I've attached my .dds files and .bmp files of the original and it scaled to 128x128 for the flag if they need to be redone. Thanks in advance
 

Attachments

  • Flag 1.bmp
    175.8 KB · Views: 75
  • Flag 2.bmp
    48.1 KB · Views: 68
  • DDS Files.zip
    44.9 KB · Views: 57
I am Windows user, but it sounds like a problem with the alpha channel. Try to save it without alpha and see what happens. I bet that will work for you. I know all the tutorials write you should save it WITH alpha (I think with black alpha, you have to check this again for further "experiments") and this seems to be true for most machines, nevertheless there are machines where this doesn't work. There is no solution, at least I don't know it, that work for both type of machines (note: if you can fix this problem for your system by doing what I said, it will sincerly not work on the other users pc's!). I put both types of flags in my magyar mod, so the user can replace it if necessary and I know there is at least one mod made by asioasioasio, a very experienced modder, where the same is the case. Unfortunatly I can not tell you why this happens: I have no idea what the reason could be. Good luck.

P.S.: I don't know why all these smart tutorial writers do not update there tutorials to point to this problem.
 
Okay, I have changed my mind. I took a closer look at your dds-files: they are all black. Something definatly gone wrong. Unfortunatly I don't know the program you are using. I suggest to try saving without alpha to see if it works. If not, you have to figure out how to save the alpha with your program correctly. I'll see what I can do for you...
 
Hmm, thanks for your reply. (One) of my problems is that the program I'm using doesn't have anything that allows me to mess with alpha channels, so I can't play with those. I've tried making normal dds files with this program, didn't work, so I tried modifying pre-existing flags and buttons that I've downloaded from here and they had their images to begin with, put mine in, saved, and black again, so no luck.
Thanks for the suggestion though! I unfourtionatly can't think of anything else I can do on my end alpha-channel wise
 
Hmm... a program for converting into dds that doesn't support alpha channels... very useful. However I made a flag for you:



I don't know if this is what you thought of. I used your first bmp, rotated it and changed sizes to 128x128 (the game stretches the flag byitself, but it needs it in 128x128 as your second file is; however, your second file wouldn't look good, becuase it would also be stretched). After that I opened it and added alpha channel in dxtbmp. You can load the flag here: click! I put in the version without alpha as well.
 
It's me again... I can not open ._ahwha.dds and ._flagdecal_Ahwha.dds of your DDS Files.zip, but the other two actually seem to have an (black) alpha :)goodjob: ). The problem is, that all the other channels are black as well. Don't know if this helps you to get control over your program.
 
Got an idea! There seems to be GIMP for Mac as well. Although I do not work with GIMP I read that there is a dds plugin for it. With GIMP you should be able to do what you want to do :) .
 
Thanks alot for all of your help. I'm going to go into the program and see if I can find where the heck it thinks it's channels are, see if I can play with them. If I get any information I'll post it. Thanks for the flag too!
 
Ooo! New Fun-ness!
First, yes there is a GIMP for Mac, but the DDS plugin is a windows plugin, dll files and the such, and I don't have the programing experience to convert them to a mac-useable format (I assume it's possible) and I haven't been able to be directed to a port of it, so I can't use GIMP.
Second, I found the Alpha-Channel thing in GCX but when I clicked on it I couldn't edit the Alpha and when I tried the show Alpha thing, I couldn't edit it and it messed up my thing so no can do.
Third, for some reason, when I go to load the flag into my game, all the white is blue! It's white when I view them, but in the game it's blue! Any thoughts on why that's so?
 
If the (secondary) colour of the civilization you are playing is blue as well, then it is an xml related thing. Make sure the <bWhiteFlag>1</bWhiteFlag>-tag in CIV4ArtDefines_Civilization.xml has the value 1, not 0. 0 is for flags like the ones that came with civ4. In these files are parts that are displayed in the civilizations specific colour. I guess this tag will be okay, since there are parts of your flag that work. You can change the primary civiltaion specific colour in the CIV4CivilizationInfos.xml: the <DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>-tag, I think. But this is not the colour we are searching for. When I made my magyar mod, I made a vanilla, a warlords and a bts version. The first twos ran without any problems. When I updated the mod for bts I had the problem that the white parts of the flag were yellow (sounds like your problem). I had to change the SECONDARY colour of the civ to white. Unfortunatly I think that in bts these colours are defined in a separate file and I have no bts on my laptop so I can not look it up now. I think the file was called like colvals or something like that. You could load the bts version of my mod from civfanatics or wait until I look it up tomorrow. Note: do not change the primary, but the secondary colour!
 
Just had to switch on my desktop pc... That's what you have to do:
1) copy CIV4PlayerColorInfos.xml to your mod (it's in the interface directory), if necessary CIV4CivilizationInfos.xml as well
2) open the CIV4CivilizationInfos.xml and search the <DefaultPlayerColor>-tag, write in a new entry, for example PLAYERCOLOR_COOL_COLOUR, the line should look like this: <DefaultPlayerColor>PLAYERCOLOR_COOL_COLOUR</DefaultPlayerColor>
3) open the CIV4PlayerColorInfos.xml, add a new playercolour-entry, for example:
<PlayerColorInfo>
<Type>PLAYERCOLOR_COOL_COLOUR</Type>
<ColorTypePrimary>COLOR_PLAYER_DARK_GREEN</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_WHITE</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_DARK_GREEN_TEXT</TextColorType>
</PlayerColorInfo>

The value of type has to be the same like the <DefaultPlayerColor>-tag's in CIV4CivilizationInfos.xml. Now you have added a new colour scheme for your civ without overwriting an existing one. As it is in the example above the <ColorTypeSecondary>-tag needs to have the value COLOR_PLAYER_WHITE (because this is the colour you want to have in this case). The <ColorTypePrimary>-tag's value can be anything you want (suggestion: your flag is green so it would fit if your borders etc look green as well). The only restriction is that it has to be an already defined colour. That means you can not write anything in. Search a colour that fits in the other <PlayerColorInfo>-tag's. That's all. If you plan to make a modular mod you have to include the CIV4InterfaceSchema.xml.

EDIT: I recognized that this file is included in vanilla as well. That means this should work if your mod is not for bts, too.
 
Yay! It works now!
The only problem that I had was that I had to set the primary color to White in order for it to work. Do you have any idea why my flag's white is effected by team color? Japan's flag and American's flag aren't. But all in all thanks oh so much for your help!

EDIT: Figured it out! I was testing by just throwing my stuff into America, and their tag < bWhiteFlag > was set to 0, or "paint flag with team colors". Making my full civ now I've turned that to 1, or "don't!" so it's all good! Yay!
 
Top Bottom