Graphics question/problem

macantas

Chieftain
Joined
Mar 17, 2007
Messages
15
I'm making a mod that I want to change the religions around. The XML coding is done, but I want to change the icons and art associated with the religions. Looking at CIV4ReligionInfo.xml shows me all the art locations where I can find the files loaded to produce the existing game art -- but when I look at those locations, I don't even see the proper folder structure! I've searched through my mod asset folders, the BtS asset folders and the parent Vanilla asset folders, and in no place do I have the same folder hierarchy as what should be there. Here's an example:

Spoiler :
<ReligionInfo>
<Type>RELIGION_ORACLES</Type>
<Description>TXT_KEY_RELIGION_ORACLES</Description>
<Adjective>TXT_KEY_RELIGION_ORACLES_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_RELIGION_ORACLES_PEDIA</Civilopedia>
<TechPrereq>NONE</TechPrereq>
<FreeUnitClass>NONE</FreeUnitClass>
<iFreeUnits>0</iFreeUnits>
<iSpreadFactor>150</iSpreadFactor>
<GlobalReligionCommerces>
<iGlobalReligionCommerce>1</iGlobalReligionCommerce>
<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
</GlobalReligionCommerces>
<HolyCityCommerces>
<iHolyCityCommerce>3</iHolyCityCommerce>
<iHolyCityCommerce>0</iHolyCityCommerce>
<iHolyCityCommerce>3</iHolyCityCommerce>
</HolyCityCommerces>
<StateReligionCommerces>
<iStateReligionCommerce>1</iStateReligionCommerce>
<iStateReligionCommerce>0</iStateReligionCommerce>
<iStateReligionCommerce>1</iStateReligionCommerce>
</StateReligionCommerces>
<Button>Art/Interface/Buttons/Religions/Christian.dds</Button>
<TechButton>Art/Interface/Buttons/TechTree/Christianity.dds</TechButton>
<GenericTechButton>,Art/Interface/Buttons/TechTree/Christianity.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,1,3</GenericTechButton>
<MovieFile>Art/Movies/Religion/Christianity/Chr_Found.nif</MovieFile>
<MovieSound>AS2D_BUILD_CHRISTIAN_MOVIE</MovieSound>
<Sound>AS2D_BUILD_CHRISTIAN</Sound>
</ReligionInfo>


My mod doesn't have near as much complexity in the art folders (since it probably just defaults to BtS), and the BtS and Vanilla folder structure is:
Beyond the Sword\Assets\Art\Interface\Buttons\
but there is no \Religion\ subfolder in Buttons.

I thought I would run a search for the files supposed to be in the folders (ie. "Christianity.dds") but no file came up. I looked through ALL the .dds files on my computer, and found nothing that matched it.

So where are these files? Civ is obviously loading them from somewhere, cause they load and work fine, but I just can't see them anywhere. And how to I add my own if I can't find where they're really supposed to be? Just make my own Mods\Assets\Art\Interface\Buttons\Religion\ file and add my own .dds files?

Can anyone out there shed some light on what I'm missing?
 
I think those files are packed up in one of the Assets.fpk files. You'll need PAK file builder application to unpack the original art, then it'll be in some atlas.dds file.

You don't necessarily need to do that though. In my mod, I changed the religions around a bunch.

Create a directory like this in your mod;

Assets\Art\Interface\Buttons\Religions

Put whatever buttons you have for your religions there, and link it up correctly in the XML. If you didn't change some religions, leave them how they were. If you don't have buttons for your new religions you can make them using AsioAsioAsio's button maker, its easy if you have Photoshop, GIMP, or paintdotnet. You'll also have to change the res icons.

Create another directory;

Assets\res\Fonts

copy the gamefonts.tga and gamefonts75.tga into the directory you just created.

see this thread to learn how to modify the gamefonts

hope that helps
 
Another quick question: The ReligionInfo gives you options for changing the religion's Button, TechButton, GenericTechButton and the movie files, but which of these is the little religion icon that appears under the city on the main map page and the beside Leaders names on the bottom right hand corner of the main screen? They're all circular images as opposed to square. Does Civ take the Button image and put a round border around it, or is that icon loaded from somewhere else?
I've found that changing the XML files works for everything in the Civilopedia, TechTrees and all, but loads the same icon picture for ALL relgions on the map (meaning every city with any religion will show the Islamic icon in my case, and any city with more than one religion will show multiples of only the Islamic icon). Is there somewhere else I should be changing the art files?
 
here's an example of one of my religions infos (it started as Jewish, switched to Yankee, now its being called "Abolitionist" and is an Ideology, not religion (I've only changed the parts the user see's)

Code:
<ReligionInfo>
			<Type>RELIGION_JUDAISM</Type>
			<Description>Abolitionist</Description>
			<Adjective>TXT_KEY_IDEOLOGY_YANKEE_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_IDEOLOGY_YANKEE_PEDIA</Civilopedia>
			<TechPrereq>TECH_DEMOCRACY</TechPrereq>
			<FreeUnitClass>UNITCLASS_JEWISH_MISSIONARY</FreeUnitClass>
			<iFreeUnits>0</iFreeUnits>
			<iSpreadFactor>100</iSpreadFactor>
			<GlobalReligionCommerces>
				<iGlobalReligionCommerce>1</iGlobalReligionCommerce>
				<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
				<iGlobalReligionCommerce>0</iGlobalReligionCommerce>
			</GlobalReligionCommerces>
			<HolyCityCommerces>
				<iHolyCityCommerce>0</iHolyCityCommerce>
				<iHolyCityCommerce>0</iHolyCityCommerce>
				<iHolyCityCommerce>4</iHolyCityCommerce>
			</HolyCityCommerces>
			<StateReligionCommerces>
				<iStateReligionCommerce>0</iStateReligionCommerce>
				<iStateReligionCommerce>0</iStateReligionCommerce>
				<iStateReligionCommerce>1</iStateReligionCommerce>
			</StateReligionCommerces>
			[B]<Button>Art/Interface/Buttons/Religions/Jewish.dds</Button>[/B]
			<TechButton>Art/Interface/Buttons/TechTree/Judaism.dds</TechButton>
			<GenericTechButton>,Art/Interface/Buttons/TechTree/Judaism.dds,Art/Interface/Buttons/Beyond_the_Sword_Atlas.dds,4,3</GenericTechButton>
			<MovieFile>Art/Movies/Religion/Judaism/Jud_Found.nif</MovieFile>
			<MovieSound>AS2D_BUILD_JEWISH_MOVIE</MovieSound>
			<Sound>AS2D_BUILD_JEWISH</Sound>
		</ReligionInfo>

sorry it kinda pasted weird.

I have all the references to TXT_KEY_IDEOLOGY_YANKEE parts in the XML/TEXT/GameTextInfos_CivilWar.xml file, you probably already know that part. The bolded part is the one that matters.

If you want to remove the movie, change that part to <MovieFile/>, or you could use my tutorial on how to make simple movies.

The part I already told you about is mostly all you need, I forgot 1 thing. As you have probably learned by now, the buttons should be 64x64 pixels, and saved as DDS DXT 3 w/ mip maps (This is easy using GIMP 2.4, get it if you don't have it). You also need to (at least you did in warlords) make another file just like those, except 32x32 and saved with a _d.dds after them.

In my example, I kept the religion mostly the same, but changed the parts the user sees. So my icon of Abolition is actually named Jewish.dds, and I also have a file exactly like it, only 32x32, appropriately named Jewish_d.dds, and its the same way for Slave Holding.

Shiggs
 
Oh now I get what you were saying. The silvery button and making the button look correctly... yes... that part can be a little tricky if you don't have Photoshop. If you using photoshop just paste on the layer that says "Paste Graphic Here" then anchor layer and save. That simple.

If you using GIMP, you need to move to the "paste graphic here" layer, it doesn't start in it. Somewhere in the "layers" tab it'll say "select previous layer" or "next layer" ect. Then paste, anchor, save.

thats if your using Asio's button maker.... if you only have a couple, I could whip em right up. :)
 
Drat! sorry, I confused the normal buttons with the religious ones. The religious buttons still are mostly the same as the others, other than you won't need the button maker to create them. You just need to have an image saved as 64x64 DDS DXT 3 w/ mip maps (and the same one as _d.dds at 32x32, sorry if i'm sounding redundant). They key to making them look right is the transparency, here's an example of what mine looked like before I saved it as the dds. I had to have it as a png so it could save the transparency layer, without messing things up. The white part your seeing is actually from the forum bg, the bg of the image is transparent, so it looks right on the civ created blue squares, in the civlopedia and religion advisor screens, and on the tech tree.
 
Shiggs, I have a question...

I have the buttonmaker by Asio, but I can't figure out what to do with it. I pasted the graphic in and then... what? I anchor it into the layer that says "Paste Graphic Here?"

And then when I save it, I clicked on dds (I use GIMP 2.4), but then you spoke of mip maps... What else do I check when saving? Apparently, saving as a volume map, doens't work... or does it? I couldn't get it to work as that, anyway.

Thanks for posting, and I wouldn't mind being held by the hand on this one. I tried merging everything into one layer but then it showed up with a visible border!

BTW, what am I supposed to do with alpha channels?
 
interesting, your right, in GIMP its not so easy... I've been using PhotoShop, its much much easier. I'll try to figure it out, the volume map shouldn't matter.
 
Ok I think i figured out doing it on GIMP.

After you already have your image (I prefer to save them as .jpg or .bmp at 64x64 prior to making the button), Open up the buttonmaker.xcf and your image using GIMP.

Copy your image to the clipboard.

Go to the buttonmaker.xcf, click "Layer", "Stack", "Select Next Layer", until it says "Paste Graphic Here" at the bottom of the window.

Now Paste your image onto that. Select "Layer", "Anchor Layer", Then "Merge All Visible Layers"...

Now you should have just 1 layer, and the image looks like it has a border...... but it really won't look correct yet.

Open up the "Alpha Channel Buttons.bmp" that came with the Button Maker.

Copy it, and paste right on top of the image you have been working on. Do not anchor it yet. Select "Layer" "Transparency", "Color to alpha".

Now anchor it, and Save as DDS DXT 3 w/ mip maps, it should work fine.
 
Hold the phone!

UPDATE:

Follow these instructions with GIMP:

1. Download and install the DDS plugin for GIMP (do a quick search here or Google it).
2. Download the Buttonmaker 2.0 by AsioAsioAsio (do a quick forum search).*
3. Download the Buttonmaker 3.0 by Imperal[WrG] (look in the thread concerning Buttonmaker 2.0).
4. Extract all files from both Buttonmakers into its own folder for ease of use
5. Copy the image you want (for a unit, use Print Screen in the civilopedia once you get it in the game, for example). Make usre it doesn't have magenta anywhere!
6. Open GIMP.
7. Paste into new project.
8. Use your skills to make the image like you want (for a unit, for example, erase the background).
9. Copy the desired image.
10. Open the "buttonmaker3" XCF.
11. Click on the Dialogs tab in the top right of the main window
12. Select Layers. A new window should pop up.
13. Scroll down in the new window until you see "Paste Graphic Here"
14. Click Paste
15. Right-click on the "floating layer" and select Anchor Layer. Your image should now be paste into that layer.
16. Delete the "floating layer".
17. Delete unnecessary background layers by right-clicking them in the layers window. You should have the magenta border layer on top, the shadow layer, the, you image layer, and the bg layer--in that order.
18. Right-click on each layer and merge down individually until you have one layer.
19. Go to the tools window and select the button "Select color by tool...", represented by 3 RBG boxes.
20. In the main window, zoom in, and click on the magenta border only. It will highlight the area to be deleted.
21. Delete the border by clicking the Delete key. You should now see greyscale checkers where the magenta used to be. Don't worry, you're fine!
22. In the main window, click "Save As". A new box will appear.
23. Click on the "+" sign in the lower left of this box.
24. Select DDS and save. There are no special settings.
25. Copy the new DDS file to the desired location.
26. Make sure you edit the Civ4ArtDefinesUnit.xml properly: There should be only one line in the tag <Button> pointing to one file. (Be sure to remove the commas!)

Voila! You're done.

Hopefully, I made this tutorial dummy proof.

*May be ultimately unncessary
 
Back
Top Bottom