DDS Button Graphics Question

You can't find the button for that unit because none is provided, you'll have to make your own or find one that someone else has done.

Ah ok, can I use some graphics software to modify one of the current dds files or is it more complicated than that?
 
Ah ok, can I use some graphics software to modify one of the current dds files or is it more complicated than that?

The files provided are used by the unit, so you should not change them. You will have to create a new file.
 
The files provided are used by the unit, so you should not change them. You will have to create a new file.

Found the dxtbmp app and was able to convert a screenshot from bmp to dds - thanks for the help.
 
I've been using a lot of units from this DB too. I use them to replace Vanilla unit for my mod (modular XML). I'm not skilled with graphic, so I use Vanilla buttons when a downloaded unit is not provided with a button graphic file. When this file is provided of course I use it . I know that the Button tag in Civ4ArtDefines_Unit.xml has two entries separated with comma: the first entry for the civilopedia button, the second for the round button; but I know also that there is no need for two art files, if you use only one button Civ4 will use it for both (remembering that the commas have to be removed).
My problem is that the button of the downloaded unit doesn't work: the round button shows the unit correctly, the civilopedia button shows the Vanilla unit.
Here is an example of my xml code:

Spoiler :
<UnitArtInfo>
<Type>ART_DEF_UNIT_KNIGHT_ITALIAN</Type>
<Button>Modules/Italy/Art/Units/Italian Knight/brigand.dds</Button>
<fScale>0.42</fScale>
<fInterfaceScale>0.9</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Modules/Italy/Art/Units/Italian Knight/VikingHvyCavalryArmoredHorse.nif</NIF>
<KFM>Modules/Italy/Art/Units/Italian Knight/animation/LightCavalry.kfm</KFM>
<SHADERNIF>Modules/Italy/Art/Units/Italian Knight/VikingHvyCavalryArmoredHorse.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/HorseShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>

and here is a screenshot:

Immagine.jpg
Any idea about what is wrong?

Thank you in advance!
 
I don't use modular XML but in this Tut http://forums.civfanatics.com/showthread.php?t=234970 there is an example of the path for buttons
Before
<Button>,Art/Interface/Buttons/Units/Hellebardier.dds</Button>
After
<Button>,Modules/Switzerland/Hellebardier.dds</Button>

And the Art file looks like this:

Spoiler :
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Firaxis Games (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Civilization art path information -->
<Civ4ArtDefines xmlns="x-schema:CIV4ArtDefinesSchema.xml">
<CivilizationArtInfos>
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_SWITZERLAND</Type>
<Button>,Art/Interface/Buttons/Civilizations/Switzerland.dds,Art/Interface/Buttons/Civics_Civilizations_Religions_Atlas.dds,5,7</Button>
<Path>Art/Interface/TeamColor/swiss.dds</Path>
<bWhiteFlag>1</bWhiteFlag>
</CivilizationArtInfo>
</CivilizationArtInfos>
</Civ4ArtDefines>


Myself I use the old method of modding, that is to copy the XML files to the new mod folder and edit from there. To be honest your file looks like mine from the XML method rather than the one shown in the Modular XML tutorial, so perhaps that's your problem. Never did get Modular XML, using the old method

My CIV4ArtDefines_Unit.xml file looks like this:

Spoiler :
<UnitArtInfo>
<Type>ART_DEF_UNIT_DE1_SUBMARINE</Type>
<Button>Art/Interface/Buttons/Units/Gato.dds</Button>
<fScale>0.4</fScale>
<fInterfaceScale>1.3</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/Gato/Gato.nif</NIF>
<KFM>Art/Units/Submarine/Submarine.kfm</KFM>
<SHADERNIF>Art/Units/Gato/Gato.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/BattleshipShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.001</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<fBattleDistance>0.55</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bSmoothMove>1</bSmoothMove>
<fAngleInterpRate>720.0</fAngleInterpRate>
<fBankRate>.2</fBankRate>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop>LOOPSTEP_SUBMARINE</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_SUBMARINE</AudioRunTypeEnd>
</AudioRunSounds>
<SelectionSound>AS3D_UN_SUBMARINE_FORT</SelectionSound>
<ActionSound>AS3D_UN_SUBMARINE_FORT</ActionSound>
</UnitArtInfo>
 
Myself I use the old method of modding, that is to copy the XML files to the new mod folder and edit from there. To be honest your file looks like mine from the XML method rather than the one shown in the Modular XML tutorial, so perhaps that's your problem. Never did get Modular XML, using the old method

I'm using another civ as a model (Hungarian civ for avain's Varietas Delectat mod); it's a modular mod and the button paths in that civ work.
Example:
Spoiler :
<UnitArtInfo>
<Type>ART_DEF_UNIT_CAVALRY_HUNGARIAN</Type>
<Button>Modules/Hungary/Art/Units/Hungary/Hungarian Cavalry/button_huszar.dds</Button>
<fScale>0.42</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Modules/Hungary/Art/Units/Hungary/Hungarian Cavalry/hussar.nif</NIF>
<KFM>Art/Units/Unique/Russia/Cossack/RussianCossack.kfm</KFM>
<SHADERNIF>Modules/Hungary/Art/Units/Hungary/Hungarian Cavalry/hussar.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/HorseShadow.nif</ShadowNIF>
<ShadowAttachNode>HorseBip Spine1</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>
I enter my paths for my mod in the same way but they don't wok; And I don't know why!! :badcomp:

Before
<Button>,Art/Interface/Buttons/Units/Hellebardier.dds</Button>
After
<Button>,Modules/Switzerland/Hellebardier.dds</Button>

I've tried to insert a comma like in the previous example, and now the button in the civilopedia is the vanilla one as always, and round button is a pink balloon..
 
As avain is rather experienced, I would trust in what he does. So drop the comma again. You might check for typos instead. Also, in your paths, there is no Custom Civilizations folder. But usually it's there in a mods file structure. Even if you don't have it yet, I suggest you change your file structure to have it included. How the content of your Italy folder looks like is your own decision, but outside of that you should keep some standard. This wouldn't solve your problem, but makes others lives easier when combining your mod with another.

BTW: I noticed that avains mod obviously doesn't have a Custom Civilizations folder, but my experience is that modular mods usually have one.
Also, considering the paths of your model and animation, there doesn't seem to be a typo. Unfortunately, the second spoiler you posted doesn't work for me - it's simply empty. So I can't see what exactly is wrong with the button. From the infos that I got from your posts, it could be that the dds is damaged.
 
yes if its a single button you never need a comma. Though it is optional.

If it is on an atlas you use two commas and a space: <tag>, ,yourartpathandname.dds,X,Y</tag>

not sure whats up with the modular stuff, I always do it the traditional way. Basically just make sure its pointing to the file ala assets

so if the file is in: YourMod/Assets/Modules/Hungary/Art/Units/Hungary/Hungarian Cavalry/

then you put: Modules/Hungary/Art/Units/Hungary/Hungarian Cavalry/button_huszar.dds

in the XML in that example.

There may be something weird if your mod is in "my documents" instead of "program files" too...
 
the second spoiler you posted doesn't work

Sorry, my error; now the image can be viewed in post #6.

There may be something weird if your mod is in "my documents" instead of "program files" too...

in your paths, there is no Custom Civilizations folder. But usually it's there in a mods file structure. Even if you don't have it yet, I suggest you change your file structure to have it included. How the content of your Italy folder looks like is your own decision, but outside of that you should keep some standard. This wouldn't solve your problem, but makes others lives easier when combining your mod with another.

My civ is a module for avain's Varietas Delectas mod; this means that it's in "program files" folder because this is where VD has to be installed and this is the reason for no Custom civilization folder; in the following picture you can see the path of my civ; the folders are not exactly the same of avain's hungarian civ (my model), but almost the same; talking about art files, he puts his units in:
[Root]/Assets/Modules/Hungary/Art/Units/Hungary/
and i put my units in:
[Root]/Assets/Modules/Italy/Art/Units/
because it seemed to me redundant to have two folders with the civ name; this choice is not the reason of my issue (I made tests about) and.. I don't think that it will give problem to other modders.. ;)
attachment.php
 
Now that's weird. I can see the picture from post #6 now and although the spoiler from your last post is empty for me again, I'm pretty sure that your paths aren't the problem. Otherwise the circle-shaped 'button' wouldn't be there. Also, it can't be any missing comma or something like that as your syntax is the same as mine and avains. And it works for both of us. And for you as well if you play avains mod, right? You could check for xml code that overwrites your button when it is used as button (not as circle-shaped icon). I can't tell you where to start with your search as I never heard about a problem like that before. Try to use some fantasy - the overwriting code probably doesn't look like it overwrites something. If it's a unique art (not a UU), you might check the CIV4UnitArtStyleTypeInfos.xml, too, although it doesn't deal with buttons. I could also imagine anotherreason for this although it'll sound strange. From the code listing you've posted, it seems like your button is not in the same folder as your unit is. It seems like most modders don't know about this, but on old systems it can happen that the unit does not show up on the lower left corner once selected, although all paths are correct if the name and the path of the animation file differ from those of the nif(s). Could be, that your button suffers a similar problem. So you might try to move your button to the knights subdirectory, correct the xml and see what happens.
Also, you might add another unit to your mod and give it a button. Don't overwrite your knight, just have them be in both at once. Check if the other units button works properly. If it does, try to compare the code of the two units and see whether there is still a mistake in the knights code. That's kind of debugging for poor men, but I can't think of anything else you could do.
 
I don't know why you can't see my last spoiler; it is correct for me now..
Yeah, it's very weird; I have met several weird, strange and annoying issues since I started to edit xml; I had the problem you described too: unit not showed in the left-lower corner and in civilopedia when .kfm and .nif don't have the same name but they are in the same folder..
this is why I say that xml-editing is for insane people :)
btw, my button IS in the same folder of the animation files:
<Button>Modules/Italy/Art/Units/Italian Knight/brigand.dds</Button>
<NIF>Modules/Italy/Art/Units/Italian Knight/VikingHvyCavalryArmoredHorse.nif</NIF>
also it can't be a typo because I have more than one unit with the same issue.. even with a unit that avain uses too; he decided to use the vanilla button, then I've tried to edit his code and replace vanilla button with the dl'd button: take a guess: It DOESN'T work:

Immagine2.jpg
 
Then I don't know what's the problem either...
 
Found it! It's a matter of graphic setting/graphic card; I made the test with the avain's unit on a more powerful PC and the buttons are shown properly; I even don't understand why the other avain's buttons are still shown properly on my less powerful PC
 
Ah ok, can I use some graphics software to modify one of the current dds files or is it more complicated than that?

Save yourself the trouble. I found a button in one of those graphic compilation mods that you can use. I'm using the exact same unit and the button matches quite well.
 

Attachments

Can you easily explain what mipmaps are and how can I check them? Thanks!
Mipmaps are a smaller version of the same picture that get saved within the same file. After opening the file, they might not be visible, but that doesn't mean they aren't there. There are two pruposes of mipmaps that come to my mind:
a) for slower systems; there, a smaller version of the file is used to save memory on the graphics card. This will make things looks blurry and that's why some user made buttons are blurry (small mipmap resized) or small (mipmap in his original size) - so don't use mipmaps for buttons, at least not for buttons that get displayed in the civilopedia.
b) imagine a wall using a brick texture. If you go away from the wall, you can't see all the details on the brick anyways, so why wasting memory? In this case, mipmaps get used for the texture depending on the distance between you and the wall. (-> use mipmaps for building and unit textures)
You can get rid of the mipmaps, if you open your button and save it as dds file again (save as, not just save), but taking care to disable mipmaps in the dialog that pops up during the saving process. If you use GIMP, you can't miss the dialog and the mipmaps, but your file shouldn't contain an alpha channel as GIMP obviously has trouble opening dds files with alpha channel. Alternatively, you should be able to do the same with Photoshop or dds converter.
 
Back
Top Bottom