Simple questions about still leaderheads.

gael

Ard Ri
Joined
Aug 11, 2002
Messages
2,394
Location
Ireland
"I do that in PSP7. Get a frame of happy, content, and mad, resize to 200x240. Make it a 256 color image with the last 2 colors "unused" for transparency. "

This is some info I got on creating the .pix images for leaderheads.
256 is 8 bit right?
How do I set the last two colours for transparency?

I have PS7 and PSP7.

Do I have to do this for the images that I'm using to make the flics?
 
The thing you need to do to avoid transparency issues is to make sure the last 2 colors on the palette do not appear in your image. It doesn't matter what colors they are, just that they are unused. You should do this for all the images which will become PCXs as well as the image that will become the FLC, although normally one of the PCX images (such as the neutral expression) is used to make the FLC anyhow.

One easy thing to do in PSP is when you drop it to 256 (8-bit) colors, check the "include windows colors" option which will reserve a chunk of the first and last colors for some "standard" windows colors. The last 7 are very bright and often won't be used in your image. The next-to-last when you do this is bright cyan (light blue) and the last is the brightest white.

Switch each of these colors (by editing the palette) to a color with high-contrast to the rest of your image such as a bright red or the well-known bright magenta to see if they appear on the image. If they don't, you are done. If they do, you have to get rid of them.

There are 2 ways in which I get rid of these colors. First, if there's only one or 2 spots where they show up, is to grab the paint bucket and fill those spots with an appropriate color from the middle of the palette. If, however, there's a good deal of these spots, I use a palette switch like so:
  1. save the current palette which has the last 2 colors very bright. For simplicity and lack of creativity call it "good.pal"
  2. edit the palette and find a used color in the middle which would be appropriate to use in the spots you are replacing. write down the rgb values.
  3. change the entry in the palette of the color you are replacing to match this exact color by entering the same rgb values. the image should now look like it's supposed to with the bright spots gone.
  4. if you have to replace both colors, repeat the last 2 steps for the other one.
  5. load the "good.pal" you saved above. Choose the "nearest color matching" option. the visible image should not change
Now the bright colors should be gone from the image but they should occupy the last 2 palette spots and you are done.

Note that one place where you want to use one of these colors is the "Advisor all" image which has the circular graphics for the foreign advisor screen. The background color which surrounds the pictures should be the next-to-last color in the palette for the images to appear correctly.
 
While this thread is here, I thought I'd put out the following. As far as I know, these are all the files necessary for a leaderhead along with the civ3 and ptw naming conventions. Have I missed anything?

Art/Advisors
  • Advisor composite image ("XX_all.pcx", "x_leadername advisor.pcx"):
    PediaIcons section: #START LEADER/RACE ART
    461x346 pcx containing 12 114-pixel diameter circular images for the 4 eras (left to right chronologicly) with 3 emotions (happy to sad/angry from top to bottom) surrounded by a transparent (*see below) background
Art/Civilopedia/icons/Races
  • Large icon ("NationLARGE.pcx", "x_leadername civpedia lg.pcx"):
    PediaIcons section: #Start Races
    128x128 pcx
  • Small icon ("NationSMALL.pcx", "x_leadername civpedia sm.pcx"):
    PediaIcons section: #Start Races
    30x30 pcx
Art/Leaderheads
  • Large Happy ("XX_HAP.pcx", "x_name victory happy lg.pcx"):
    PediaIcons section: # Happy Icons (conquer/domination/space winner)
    200x240 pcx
  • Large Neutral ("XX.pcx", "x_name victory neutral.pcx"):
    PediaIcons section: #START LEADER/RACE ART
    200x240 pcx
  • Large Kissed ("XX_KIS.pcx", "x_name kiss lg.pcx"):
    PediaIcons section: # Large Kiss Icons (Culture/diplomatic Winners)
    200x240 pcx
  • Large Beatup ("XX_CONQ_L.pcx", "x_name victory beatup lg.pcx"):
    PediaIcons section: # Large Beaten-up Icons (defeat)
    200x240 pcx
  • Small Happy ("XX_SHAP.pcx", "x_name victory happy sm.pcx"):
    PediaIcons section: # Small Happy Icons (defeat)
    120x150 pcx
  • Small Sad/Angry ("XX_ANG.pcx", "x_name victory angry sm.pcx"):
    PediaIcons section: # Small Angry Icons (domination/space losers)
    120x150 pcx
  • Small Kissed ("XX_SKIS.pcx", "x_name kiss sm.pcx"):
    PediaIcons section: # Small Kiss Icons (diplomatic losers)
    120x150 pcx
  • Small Beatup ("XX_CONQ.pcx", "x_name victory beatup sm.pcx"):
    PediaIcons section: # Small Beaten-up Icons (conquered/eliminated)
    120x150 pcx
  • Small with Heart ("XX_CULT.pcx", "x_name victory heart sm.pcx"):
    PediaIcons section: # Small loving Icons (Cultural Victory Loser)
    120x150 pcx
  • Small circle image for heart ("XX_CULTB.pcx", "x_name victory heart tiny.pcx"):
    PediaIcons section: # Small loved Icons (Cultural Victory Winner)
    120x150 pcx containing a small (32-pixel diameter) circular image surrounded by transparent background
Art/Flics
  • Ancient Forward Animation ("XX_A01.pcx", "x_leadername diplo ancient fwrd.pcx"):
    121-frame 200x240 FLC
  • Ancient Backward Animation ("XX_A02.pcx", "x_leadername diplo ancient bwrd.pcx"):
    121-frame 200x240 FLC
  • Middle Ages Forward Animation ("XX_B01.pcx", "x_leadername diplo mid fwrd.pcx"):
    121-frame 200x240 FLC
  • Middle Ages Backward Animation ("XX_B02.pcx", "x_leadername diplo mid bwrd.pcx"):
    121-frame 200x240 FLC
  • Industrial Forward Animation ("XX_C01.pcx", "x_leadername diplo indust fwrd.pcx"):
    121-frame 200x240 FLC
  • Industrial Backward Animation ("XX_C02.pcx", "x_leadername diplo indust bwrd.pcx"):
    121-frame 200x240 FLC
  • Modern Forward Animation ("XX_D01.pcx", "x_leadername diplo mod fwrd.pcx"):
    121-frame 200x240 FLC
  • Modern Backward Animation ("XX_D02.pcx", "x_leadername diplo mod bwrd.pcx"):
    121-frame 200x240 FLC
Transparency note: on the advisor all image and the small circular heart image, there is an inconsistency. vanilla civ3 files have the last palette color as the background while ptw files have the next-to-last palette color as the background. While they all work in-game, when I made the Davis leaderhead, using the vanilla-style last color resulted in a transparency problem which was fixed by switching to the next-to-last color. Can anyone shed some light on this?

Edit: Added PediaIcons section names
Edit#2: Corrected size of advisor all image; had transposed 2 numbers.
 
Ah *cracks knuckles*

First, the advisor you say 114 px diameter. I use 117 otherwise parts of the old advisor show through (I just paste on top of other ones so I get the positioning right)

Second, Transparency. In all of my work, I have made the transparent color the last color in the pallette AND the second to last I NEVER USE. I make the last one bright pink, and use it as the background color, and the second to last I make bright green and I make sure I do not use this color anywhere in the picture.

Third, PCXs. All the _hap, _conq, _etc, AND the 2 pedia icons you should always have the last two colors in the pallette NOT USED. To do this, set them to pink and green like I said before, and make sure that they are not used anywhere in the picture. This is true for every PCX EXCEPT XX_CULTB.pcx. For that, follow the advice in the first post.

Fourth, and most tricky. The FLCs. You guessed it, the last two colors cannot be used. Most people can make a FLC no problem, works fine. BUT if your leaderhead has many colors (Liluokalani), you will run into transparency issues there as well. To fix this:

Go ahead and make your FLC. Take the frame with the most colors and Export to Paintshop pro or some pallette editor. Change to 256 color pallette (CTRL-SHFT-3 in PSP). Change the last two colors to green and pink (SHFT-P opens pallette editor in PSP). go to Colors-> Save Pallette. Save as a .pal somewhere on your drive. Close PSP or pallette editor, do not save changes. Go back to Animshop and do a save. When saving, click the customize button (PIC ATTACHED), change colors to 255, select custom Pallette, and Nearest Color. Now click the Browse button and find the .pal file you made earlier. It will use that pallette on every frame, which is why you wanted the frame with the most color. Click OK, and continue saving.

Hopefully this helps. :D

GIDustin
 

Attachments

  • flcpallettehelper.jpg
    flcpallettehelper.jpg
    58.5 KB · Views: 126
To reply to gael's original question:

In PSP7, CTRL-SHIFT-3 will make your pic 256 color. Then SHFT-P will open the pallette editor. Just dbl-click the last two spots and select a new color. The two colors you choose should not be used anywhere in the pic.

[edit]Once you change the 2 colors in the pallette, there is a very high chance that some pixels in your image will change color. You will have to manually fix those. Using the Color-replacer tool is the easiest way.[/edit]

GIDustin
 
Originally posted by GIDustin
Ah *cracks knuckles*

First, the advisor you say 114 px diameter. I use 117 otherwise parts of the old advisor show through (I just paste on top of other ones so I get the positioning right)

In terms of the 114 diameter, there is also a one pixel border around the entire thing and between each circle as a type of grid. The file is 461 pixels wide (4x114=456 plus 3 separators and a border for each side) and 346 tall (3x114=342 plus 2 separators and a border for each side). What I have done is start with an image gridded like that, paste 114-pixel square images into the spots between the gridlines, and then paste a background "mask" I made from an existing file overtop of that.

Second, Transparency. In all of my work, I have made the transparent color the last color in the pallette AND the second to last I NEVER USE. I make the last one bright pink, and use it as the background color, and the second to last I make bright green and I make sure I do not use this color anywhere in the picture.

I don't know what happened to my Davis head initially then. Because he didn't quite work with the last color being the transparent one. Perhaps there's some kind of interaction between the last 2 colors that your pink/green choices avoid but mine didn't.

Fourth, and most tricky. The FLCs. You guessed it, the last two colors cannot be used.

Cool. The procudeure you describe in making and using a custom palette is exactly what I did to avoid transparency problems with the Wessex head.
 
I started on some other leaderheads for my scenario.
I tried doing the pcxs in photoshop, changing them to index mode 255 colours and hoping for the best.
It obvously did'nt work out, so I'm back to PSP.

Which pallete do I edit for the transparency thing?
I have the image at 8 bit, then I choose colors/edit palett and it gives me the choice of three palletes.
Which one do I alter, and where is the "include windows colors" option on the interface.

I don't use PSP, so I'm completly ignorant on were even the basic commands are.

The ancient flic seems to be Ok in game, but the other images have purple on them.


:mad: :confused:
 

Attachments

  • purple.jpg
    purple.jpg
    34.9 KB · Views: 107
I really should make a tutorial on this...

Here are 2 dialogs from my version of PSP (5).

First, when you reduce the image from 24-bit to 8-bit (256) color, these are the options I use, including the "Include Windows Colors" option. To get this dialog, the command is Colors->Decrease Color Depth -> 256 colors or SHIFT-CTRL-3.
pdescobar_temp_PSP1.gif


Then, when you edit the palette you get a box like this. The Edit palette command is Colors->Edit Palette or SHIFT-P. You want to view the palette by "Palette Order" because then the colors you are worrying about at the end of the palette are the very last ones on the list.
pdescobar_temp_PSP2.gif


Those first and last sets of 8-12 colors are what get added by the "include windows colors" option. Normally, the only problem you get is that the last color is pure white, so you have to make another, earlier, color pure white and the last color pink in a process similar to the one I posted earlier.
 
In photoshop, it is the FIRST two colours that should be magenta and green, not the last two. I might be too late, but, like anyway. :)
 
I know mrtn already just said this but I think everyone should realize that photoshop uses the FIRST two colours for transparency, not the last two. I've made static leaderheads and fixed others with photoshop, and tested them in the game and I know they work like this. I assume paintshop uses the LAST two colours from what everyone says. I hope in the future when people are trying to help others with leaderheads or civilopedia pics that they find out which program is being used to prevent giving the wrong information. ;)

In photoshop, I always use 'ffooff' as the pink for the first colour and 'ooffoo' as the green for the second colour. They are very bright, seldom used in pictures, and match the colours that firaxis' pictures usually have.

If your converting a jpeg to pcx in photoshop, when you switch to index colour in colour mode, from rpg colour, it asks you what type of palette you want. If you select 'custom' palette you can pick the first two colours of the palette to those I listed above, then hit o.k. It will convert to 256 colour palette leaving the first two colours as those you selected. They probably haven't been used in the picture. You can check if they have by changing them for a second to a bright colour to see whether any pixels in the picture have changed colour. If not, switch them back, flatten the image in the layer menu and save as pcx. If the colours were used just redo the steps above replacing one of the two colours in your custom palette with a colour your sure will not be in your picture.

I hope this helps some people.
 
Well it helps me :)
I always forget how I did things last time, so I have to invent the wheel again and again.:rolleyes:

Edit: Grandraem, why don't you put together a nice little tutorial and post it in that forum, about how to fix transparency/pallette problems in photoshop? I suppose there are more people than me that have a memory as a donut. :)
 
Back
Top Bottom