[GUIDE] How i make flag-buttons from 0d1n3oo3Broad's mono_XX.bmps

Osymandias

Grand King of Apes
Joined
Apr 16, 2004
Messages
450
Location
In the heart of the Bavarian Forest
[GUIDE] How i make flag-buttons from 0d1n3oo3Broad's mono_XX.bmps

This is a special guide for buttonmaking with my mono_XX.bmps for the flags of my flagpacks. it shows how to make buttons with my mono_XX.bmps.

What we need:
- i would recommend DXTBmp, it works fine and doesn't make any problems.
(- eventually a paint-programme that can resize pictures, but MS Paint can it handle also)


let's start:

i will take this picture for demonstration (mono_falkenkopf.bmp from my flagpack no. 4, size 220x220 pixels)



let's say you want use the flag with this colours (carthage) and the button with the same colours:


in this case, the flag itself (background) has the primary colour and the falconhead (symbol) the secondary.


open the mono_falkenkopf.bmp in the paintprogramme (here MS Paint)



the next step would be to find out the colours the civ uses:
1. go to ..\Assets\XML\Civilizations and open the CIV4CivilizationInfos.xml and search for the civ. in this case "Carthage". go to the (DefaultPlayerColor)-tag and look which colour carthage uses. in this case it's PLAYERCOLOR_ORANGE
2. now go to ...\Assets\XML\Interface and open the CIV4PlayerColorInfos.xml and search for PLAYERCOLOR_ORANGE, so that you know which is the primary and secundary colour. the primary colour here is COLOR_PLAYER_ORANGE and the secondary is COLOR_PLAYER_WHITE.
3. now open the CIV4ColorVals.xml and search for COLOR_PLAYER_ORANGE. in this case it's the only colour we have to search, because white is just white. the values for COLOR_PLAYER_ORANGE are (fRed)0.99(/fRed), (fGreen)0.35(/fGreen), (fBlue)0.0(/fBlue). to get the correct RGB-colours, we just have to multiply the numbers with 255. the RGB-values here would be RGB 252, 89, 0.


now we know the exactly RGB-value of the colour, we can paint the mono_falkenkopf.bmp. go back to paint. double-click to one of the colours (but not red and white, we will need them later). the colour palette should open. click "define colours (could be called different, i don't use english windows)



now we can define the colour in the RGB-values. type them in. RED: 252, GREEN: 89, BLUE: 0


you can click "OK" or "add colour (Farben hinzufügen)" and then OK. now we can use this colour.


let's paint the mono_falkenkopf.bmp in the proper colours.
as we seen above on the screenie the primary colour is the flag, thus the background, so we have to paint everything what is white to the carthagian orange. it will look like that:



the falconhead ingame is white, so we do here. paint the head white.



now we are ready for resize to buttonsize. you can here either save the coloured bmp and open it in a programme that can resize, or you do it in paint. in paint the only possible to resize is "image-->stretch/.." or hit "ctrl+k". But this works not with pixels, but with percent.



original size is 220x220. to get to the buttonsize of 64x64, we have to resize the picture in horizontal and vertical directions to 29% (64 / 220 = 0,291 ~ 29%).



to verify that we have a size of 64x64, we go to "image-->attributes" or hit "ctrl+e". there should be the height and width 64 to 64.



now we can add the buttonbracket.
open the civ4bracket2rt.PNG in paint. hit "ctrl+a". now the whole picture is marked. hit "ctrl+c" to copy the buttonbracket. go to your resized mono_falkenkopf.bmp and hit "ctrl+v" to insert the copied buttonbracket. now the buttonbracket overlaps the mono_falkenkopf.bmp. DON'T CLICK ELSEWHERE THAN per right-click on the red colour in the palette below and mark the "second colour invisible" on the left side under the toolbar. now the red of the buttonbracket should get invisible and the falconhead-button should appear with the bracket around it. click on any tool in the toolbar so that the bracket is fixed.



now to he last part. open a normal button from ..\Art\Interface\Buttons\Civilizations or open the btn_example.dds from the zip of my pack. the main picture is white (with a bracket) and the alpha has the buttonbracket alpha.



now double click the main-image. MS Paint opens (default) a file named "norm.bmp". now go to your mono_falkenkopf.bmp. hit ctrl+a to mark the whole picture and ctrl+c to copy it. go back to the norm.bmp and hit ctrl+v to insert the copied button. the button in it's brackets should appear. save it and go back to the btn_example.dds. click the "refresh after edit"-button and the button should appear. now just go to "file-->save as-->dds texture" and check that it will save it as "dxt3 dds". now browse to the ..\Art\Interface\Buttons\Civilizations-directory of your customassets- or mod-folder and save it there. also rename it like you feel. here i call it btn_falkenkopf.dds so that i can see to which flagdecal it belongs.





now the button is ready for implementation.
go to the ..XML\Art-folder and open the CIV4ArtDefines_Civilization.xml. there you can search the civ the button is for. in this case it's carthage. the code for the original button is (Button),Art/Interface/Buttons/Civilizations/Spain.dds,Art/Interface/Buttons/Warlords_Atlas_2.dds,5,1(/Button) but we just need the first part (Art/Interface/Buttons/Civilizations/Spain.dds) and change it to (Button)Art/Interface/Buttons/Civilizations/Btn_falkenkopf.dds(/Button)
now save the xml into your customassets- or mod-directory and try it ingame.

start civ and go to the civpedia. look under carthage and now it should have the button you made!


done!

[notes: i don't know why firaxis left the button-name as ...\spain.dds; <, > replaced wih (, )]
 
the civ4bracket2rt.PNG is in every flagpack i released (except my german flags flagpack).
which pack have you downloaded? perhaps i forgott in this one to include the civ4bracket2rt.PNG.
 
The Image is broke. :(
The thread is 14 years old and it links to a different server. That server apparently died and it's a very good reason for why you shouldn't link to images elsewhere in posts, which should be readable years into the future. Sadly odds are that nobody can bring back the images anymore.
 
Top Bottom