View Full Version : Tutorial: Making a units_32 pic


zulu9812
Jan 15, 2004, 03:36 AM
What is the units_32 file?
Whenever you add a new unit to Civ3, you need to add an icon to the units_32.pcx file, located in Art\Units. The icon is displayed in-game next to the unit name in the build queue and at the bottom of the city screen, where it shows which units are currently stacked in the city. If you don't add an icon for each new unit you add, then in-game all the unit icons will be thrown out of whack and none will display properly. So you need to add an icon to the units_32.pcx sheet each and every time you add a unit.

There are several of these files - which one should I edit?
That depends. If you are adding a unit the original, main game ('vanilla' civ) then you should edit the icon sheet found in ...Civilization III\Art\Units.

If you are adding a unit to a PTW scenario or mod, then you should edit the units_32 sheet that is in the scenario folder, e.g. if you wanted to add a unit to DyP you would find the units_32.pcx in ...Civilization III\CIV3PTW\Scenarios\DyP\Art\Units

If you are adding a unit to a Conquests scenario, then it's the same as the above, but swapping Conquests for CIV3PTW.

Alternatively, you could do what I do, which is to have one main scenario folder into which I put all my downloaded units (it saves on disk space) - for this I use one big unit_32.pcx file with an icon on it for every unit ever made (well, all the ones I use anyway)

What format is the units_32 file?
The icon sheet is in .pcx format, each icon is 32x32 pixels in size, and the background colour must be magenta (R:255 G:0 B:255). The colour Red is used as the civ-specific colour, so if you're playing as Greece, all the red you see on the sheet in your graphics program will appear as Green in-game.

How do I add an icon to the units_32 file?
If an individual icon is supplied with the unit you downloaded, it's very easy. Open up the individual icon and the main units_32.pcx in a suitable graphics program (I use Jasc PaintShop Pro 7). With the individual icon window highlighted, press Ctrl+C to copy it. Then, with the main units_32 window highlighted, right-click and select 'Paste as New Selection' and drag the individual icon into place.

How do I make new unit icons?
If the unit you downloaded didn't come with it's own units_32 pic, you'll need to make one. Don't worry, it's easier than it sounds.

1. Get hold of FLICSter (from http://www.apolyton.net) and PaintShop Pro 7 (from http://www.jasc.com)

2. Use FLICSter to open the default flc of the unit.

3. Go to the Export tab and export the flc as a 'Storyboard PCX w/border'. You don't need to change any of the other options. Obviously you can specifiy where you want the storyboard exported to, but whatever you do, don't change the pallette.

4. Open up this exported storyboard in Paintshop Pro (or any suitable graphics program, i.e. one that can save as .pcx) and select one square. It doesn't really matter which one.

5. Press Ctrl+C to copy it.

6. Press Ctrl+V to paste it into a new window (which is created automatically in PSP 7) and resize the icon to 32x32 pixels.

7. Open up the main units_32.pcx and Paste as New Selection in any free square that suits you.

8. Save and close. You can now select the new icon for units in the editor!

How do I make the icons civ-specific
At step 6 above, after resizing, use the colour replacer tool to change colour on the bits of the image that you want to be civ-specific, from their original colour to red. Being honest, I'm not sure which particular shade of red counts as civ-specific (it could be a range).

Naval units always need to be squeezed into that 32x32 box, how can I make the icon appear bigger?
With some units, ships in particular, it can be difficult to fit the whole unit, end-to-end, into the box. When this happens, you can rotate the image by 20 degrees to the right. This will put the image at a sharper angle and result in either end of the ship going in a corner, rather than a side. The option to rotate an image is usually located under the Image menu. Rotate the image after you've extracted the storyboard and copied one square, but before you resize to 32x32.

Colonel Kraken
Jan 16, 2004, 07:13 AM
Hey Zulu,

Great work. I'm going to add a link to this thread in my tutorial straight away!

I had a question about this part:

If you don't add an icon for each new unit you add, then in-game all the unit icons will be thrown out of whack and none will display properly. So you need to add an icon to the units_32.pcx sheet each ande very time you add a unit.
Is this necessarily true? What if you added 2 or 3 units that have the same icon (like in Napoleonic Europe) in game but are different units?

I remember in the past (vanilla and PtW) that, if you didn't design your Units_32 correctly, you would get a problem where later in the game some of the icons started shifting ---even though, at first, they were correct.

In Conquests this doesn't seem to be a problem for me (unless I'm sub-conciously doing it correctly). Has this changed for C3C? Is this the issue you were addressing in your quote above?

Thanks,

CK

zulu9812
Jan 16, 2004, 07:27 AM
You're correct on both points.

Every unit needs an icon, but they can be the same icon as another unit.

As for the second point, if you aren't careful about pasting in a new icon, you can overlap the line of the scare, which will shift all the rows below down one square. Which will eventually mean that some icons will appear cut-off in game.

Colonel Kraken
Jan 16, 2004, 07:36 AM
Originally posted by zulu9812
You're correct on both points.

Every unit needs an icon, but they can be the same icon as another unit.
Oh, ok, so you don't have to actually make sure you add a specific icon for every unit in the Units_32 (which is what it sounded like)

As for the second point, if you aren't careful about pasting in a new icon, you can overlap the line of the scare, which will shift all the rows below down one square. Which will eventually mean that some icons will appear cut-off in game.

Oh, I'm sorry. I think you misunderstood "shift" (but thanks for that info too). What I meant is what you originally said about getting the incorrect icon in-game. What I meant by shift is units would start using the icons of the unit above or below it in the editor list. Some units would have the incorrect icons later in the game (seems to me it always occurred in the Modern Era), but the problem wouldn't show up until then. I remember that problem came up really early in the modding community and someone had come up with the solution for it.

Do you remember that? Do you find that can still be a problem? I don't believe I've come across that problem with C3C.

Thanks,

CK

zulu9812
Jan 16, 2004, 01:40 PM
I do remember that problem. From experience, it only happens in 'vanilla' civ, if you have duplicate settler/worker/leader/army icons. It doesn't seem to be an issue with the 2 expansion packs, probably because the era-specific icons are determined by pediaicons.txt

Colonel Kraken
Jan 17, 2004, 08:07 AM
Originally posted by zulu9812
I do remember that problem . . .

Excellent. Thank you very much!

Gringo
Jan 28, 2004, 06:19 PM
I created a UNITS 32 for PTW and treid to leave the original PTW 32 pcx as the frist units (figuring they would stay in order on the editor) then added all the custom units's 32pcx.

But for some reason the icons don't match the original units on the editor... Did I do something wrong?

Thanks in advance Zulu.


PS: nevermind I did it right, I just forgot to delete a test Units32 that was in same folder =p, DUh... it was reading off of that file instead of the final units32 I made. thanx for the tutorial.

bjbj1991
Jan 31, 2004, 02:20 AM
Do I need to get PaintShop or can I just use any program like Paint.

zulu9812
Jan 31, 2004, 05:34 AM
Paint won't do the job. You need a graphics program that can edit pallettes. I use Paint Shop Pro, which costs money, but I'm sure there are some free graphics programs suitable. GIMP springs to mind.

LtComRavenSeven
Feb 02, 2004, 04:06 AM
Would Microsoft Picture it work for adding units to the units 32 file?

zulu9812
Feb 02, 2004, 05:14 AM
I don't know - does it support palette tables?

LtComRavenSeven
Feb 02, 2004, 02:12 PM
Nope, I don't think so. I'm gonna have to get me a program that does. What is out there that is relatively cheap I can find at a local store, or free that isn't going to take two hours to download on my slow connection?

zulu9812
Feb 02, 2004, 02:29 PM
try GIMP (http://www.gimp.org/)

LtComRavenSeven
Feb 04, 2004, 01:25 AM
Excellent! After only an hour to download and install (thanks to a very slow connection), and some tinkering I have added my first unit. GIMP works great and I would say it's good for anyone doing basic adding to the units 32 file.

ALL HAIL MIGHTY ZULU!

zulu9812
Feb 04, 2004, 02:46 AM
Why, thank you very much :)

bjbj1991
Mar 13, 2004, 02:40 AM
I cant get gimp to work.:mad: It says I'm missing something called libgimpui-1-2-0.dll :confused: can you help:thanx:

Sleepy Eyes
Mar 13, 2004, 05:47 PM
I wish I would have read this earlier.. I figured out I had to transfer from flc to gif to pcx and resize it to 32. But i was using the default microsoft editor and a flc to gif converter..But now I want to try the software you are using and learn some more...Esp in regard to ships which have dark backgrounds when converted and I want the regular transperancy contrast. So I had not been able to do any icons for ships. But when I get that software I should be able to. HOw much does paintshop cost?

zulu9812
Mar 14, 2004, 03:27 AM
Originally posted by Sleepy Eyes
I wish I would have read this earlier.. I figured out I had to transfer from flc to gif to pcx and resize it to 32. But i was using the default microsoft editor and a flc to gif converter..But now I want to try the software you are using and learn some more...Esp in regard to ships which have dark backgrounds when converted and I want the regular transperancy contrast. So I had not been able to do any icons for ships. But when I get that software I should be able to. HOw much does paintshop cost?

http://computing.kelkoo.co.uk/shopbot/search.jsp?from=shopbot&catPath=uk%2Fsoftware&catId=117001&os=Win&title=Jasc&x=0&y=0

http://www.jasc.com/products/paintshoppro/

zulu9812
Mar 14, 2004, 03:29 AM
Originally posted by bjbj1991
I cant get gimp to work.:mad: It says I'm missing something called libgimpui-1-2-0.dll :confused: can you help:thanx:

http://www.wingimp.org/forum/read.php?f=2&i=864&t=864

Vuldacon
May 15, 2004, 10:52 PM
Anyone wanting to either make or Correct CIV Specific Colors in a .pcx file for the units_32.pcx Game File needs a way to Correct and accurately Check the new .pcx before Copying and Pasting it into the units_32.pcx Game file.

To use this Procedure, You will need a good Graphics Editing Program, I use Paint Shop Pro 8.

Rather than try and present the Procedure and examples that would require a very long post, I will simply offer the small Zip file of the Procedure that includes the Palettes and an example to anyone wanting it.

Until recently, ALL of the created files for the units_32.pcx Game file have been incorrect. Especially in regard to CIV Specific Colors.

This Procedure will provide a way to create and or Correct any .pcx file for use as a CIV Specific Colored .pcx for the Main units_32.pcx Game file.

small Zip file size is 13.6 kb

Vuldacon
May 15, 2004, 11:02 PM
Here is a small units_32.pcx file that has Corrected CIV Specific Colors. Note the Red Areas will change color to the Civ that Owns the Unit.

Vuldacon
May 15, 2004, 11:06 PM
Here is the same Unit with the Altered Palette I made that will help you see accurately where the CIV Specific Colors are. Note the Green areas...these are where the CIV Specific Colors are in the Unit. By using the Procedure, Palettes and a little thoughtful effort, Your .pcx Files can all be Corrected. Either created New or Old ones simply corrected in your units_32.pcx Game file.
The Zip with the Palettes and Procedure is on the Previous page.

Vuldacon
May 15, 2004, 11:11 PM
......................Sorry, Double post here :mad:

Vuldacon
May 15, 2004, 11:34 PM
Here are 96 Corrected .pcx files for the units_32.pcx Game file. I used the "Procedure" offered earlier to correct these. Each .pcx file is Unit Named.

Timelord
Aug 01, 2004, 08:48 PM
Can you recomend a decent graphic editer that is either shareware or more preferably freeware and can handle .pcx files?

Thanks

zulu9812
Aug 02, 2004, 12:51 AM
Certainly can, it's called GIMP :)

Timelord
Aug 02, 2004, 10:57 PM
Certainly can, it's called GIMP :)


Umm was looking for something a bit smaller..(if thats the one I am thinking of..(open source), I have very limited disk space on this machine :sad:.

Know of any others?


Thanks

zulu9812
Aug 03, 2004, 02:01 AM
Smaller? The program's already small! - http://www.gimp.org/downloads/

Timelord
Aug 07, 2004, 09:11 AM
Smaller? The program's already small! - http://www.gimp.org/downloads/

Well 16+ meg isn't small to me :) But what the hay it works..

Saturn6
Aug 16, 2004, 03:38 PM
Would Imaging for Windows work? If not, is there any other way to get a unit picture in the 32' file?

disturbed bacon
Oct 03, 2004, 01:01 PM
how do you make more empty boxes for adding more units? I need more units, but there are no more empty boxes left to put them in. what do i do?

thanks for the help!!! :) :) :) :D :D

Vuldacon
Oct 03, 2004, 09:58 PM
disturbed bacon ... simply duplicate the "empty Boxes" with a graphics program by copy and paste technique or download Zulu's units_32.pcx, which has many more frames for adding units. Either way, you need a usable graphics program to be able to simply copy and paste additional frames or units to the units_32.pcx file.

Tholish
Oct 30, 2004, 01:17 AM
There's a low tech way to make units 32 pcxs.

Play with the unit in the game, take a screenshot, and cut a more or less 32x32 slice of the screenshot, resize to exactly 32x32, then paste it into the units32.

I use something I downloaded for free called "Image Forge" (I found it doing an internet search for "pcx") to do screenshots and cut and paste and resize. I just hit the print screen button during the game, close the game, open Image Forge, select Edit, then Paste, then As New Selection, and there it is, the screenshot as a new pcx file. From there I can cut out a rectangular part of it, and paste as New Selection again to make a small file, then I can select Resize and put the size I want it. Then, depending on what I'm doing, I use Gimp (which was recommended by a post somewhere, and is also free, but is fancier than ImageForge and kind of hard to figure out how to download and install) to open and close it which gets the save format right since imageforge can mess it up so Civ won't use it, especially for Terrain and like Tech Icons, but I think its OK for Unit32s.

And if you aren't about to download a free graphics program and learn how to use it, you can just substitute a units32 from some mod that used a huge one with almost everything, then reset all your icon selections in the editor to use something that's kinda close to what you want. Sometimes, inexplicably, units32s from mods don't work in other mods, though.

Vuldacon
Oct 30, 2004, 05:52 AM
Tholish, you are merely resizing game shots of units with that technique and it will not be correct. Number one, in order to have a Civ Specific units_32.pcx, you would have to play as the Romans to have the Red Civ Specific Color on the Unit...and that is IF it would work but it will not. The units_32.pcx palette is different from a screenshot of units in the Game so merely resizing a screenshot of a unit to fit the units_32.pcx sheet will not work concerning the correct colors etc... The Background from a screenshot would also exist in the file, unless you edit it out. Much easier to make a .pcx file that will be correct. I suppose if you are only trying to get any sort of picture of a unit on the units_32 sheet, that "technique" could be used but don't expect it to have correct colors or look good in the game. IF you do not have a Good Graphics Editing Program like Paint Shop Pro, zulu9812 has posted a Hugh number of units on his units_32.pcx sheet here at the site. If you have the ability to copy and paste, you can even select from it...if not, use it as it is. Good Luck with your efforts.

Morfos
Nov 06, 2004, 09:28 AM
I have a problem, I cannot "Past as new selection" I can only "paste" Is it because my program is incapable of doing so?

Vuldacon
Nov 06, 2004, 11:15 AM
Morfos...To even try to answer that Question, you would need to state what Program you are using. IF it is Paint Shop Pro, Click Edit then Paste then select how you want to paste. Otherwise, Try Copy=Ctrl+C then Paste=Ctrl+V or paste as new Selection=Ctrl+E.

Morfos
Nov 07, 2004, 08:34 AM
Im using Star Office. Its the only program I have that can open the file. :(

Vuldacon
Nov 07, 2004, 10:15 AM
Morfos, I am not Familiar with the Star Office program but finding it in an Online search, it is not specifically for Editing Graphics so you will have to find out what it will and will not do. Zulu has recommended GIMP...you might give it a try if you have no success with Star Office and cannot buy a good Graphics Editing Program. here is a link you can try:
DO it TODAY because you cann click ORDER and get the Delux GIMP and 3 other CDs FREE........ http://www.manay.com/image_studio.htm

MikeLynch
Nov 08, 2004, 11:42 AM
I have edited my units_32 image and every time I load it in the scenario, the game crashes right after I create the first city. When I rename it to units_32-screwed-up.pcx, no problems occur, but I'm getting the original game's icons.

Why is this happening? Are there "forbidden colors" in units_32?

Vuldacon
Nov 08, 2004, 12:29 PM
MikeLynch, Keep the units_32.pcx File Name The same. You add unit pictures to the same sheet (copy and Paste) and each entry will have a number when you select it in the Editor. Add more blank squares so you can add more units. Back Up your Original units_32.pcx file and save it. IF your Game Crashes, it will be due to something else.

Morfos
Nov 27, 2004, 08:44 AM
What do I do after pasting the new image?

Vuldacon
Nov 28, 2004, 09:55 AM
..after pasting the image on your units_32.pcx sheet, open the Editor and click Scenario then click Custom Rules. OK to the warning...Click Rules then click Units. Click the Add button and type in the unit name Exactly as the folder and .ini file have it in your units files. Then using the icon window on the top left, type in or use the arrow to locate the image you pasted on your units_32.pcx sheet. When you have the correct number for the image, the image will show in the top left window. Set all of the new settings you want for the new unit. Exit this 1st window and Save As a new name .biq for senario to play. Either click File and then Save As or it will ask if you if you want to save after you click to exit the Editor. You can save the file in Scenarios folder and use it when you want to play a game with your new units.

METALWOLF
Dec 14, 2004, 09:23 PM
newbie here :D i down loaded zulu's icons.. now what do i do from here with them .help please :( these are only the icons and not the animations -correct?

Vuldacon
Dec 15, 2004, 12:52 PM
METALWOLF, The units_32.pcx file has the icons for the units that you will see in your city build screen when playing a game (These are NOT the unit animations). Unit animations are in separate, individually named folders found in the same units folder where the units_32.pcx files is located.

You can use Zulu's units_32.pcx file as it is or copy and paste individual icons from his sheet to your original units_32.pcx file used in the game. You need a Graphics editor that will allow you to open, select, copy and paste individual icons if you only want some of the units from Zulu's sheet added to your original sheet.

1st...(if you have the Normal installation for CIV III) For the Original CIV III Game, go to C:\Program Files\Infogrames Interactive\Civilization III\Art\units.

For PTW, C:\Program Files\Infogrames Interactive\Civilization III\Civ3PTW\Art\Units.

For Conquest, C:\Program Files\Infogrames Interactive\Civilization III\Conquests\Art\Units.

Scroll to the bottom and you will see the units_32.pcx file for each of these Game versions. Rename the one you use or save it to a floppy or CD as a backup of this original game file incase you want or need it at some point in the future.
2nd...paste Zulu's units_32.pcx file in the same units folder. IF you saved the original file somewhere else but did not rename it in the units folder, you will overwrite this file. If you renamed the original units_32.pcx file, you will simply paste Zulu's file in the folder. Either way, keep a backup of the Original Game file. You may find it easiest and or best to rename the file Original_units_32.pcx and save it somewhere else as well as leaving it in the same folder. The other method of using Zulu's units_32.pcx file is to copy the desired unit icons from Zulu's file and paste each onto your Original units_32.pcx file.
You will use the Icons when you add new units that are represented on this sheet. To Add new units as well as apply the appropriate icons from the units_32.pcx file, You will use the game Editor...see above post. Also see the Tutorials concerning adding new units to the game.

METALWOLF
Dec 15, 2004, 10:26 PM
:D thanks for your help Vuldacon.. i will follow your instructions.. seems easy enough

GeneralMatt
Jul 13, 2005, 06:32 PM
Do not air units need an extra pic for the planes .pcx file?

WilliamOfOrange
May 21, 2006, 10:17 PM
What is the units_32 file?

How do I add an icon to the units_32 file?
If an individual icon is supplied with the unit you downloaded, it's very easy. Open up the individual icon and the main units_32.pcx in a suitable graphics program (I use Jasc PaintShop Pro 7). With the individual icon window highlighted, press Ctrl+C to copy it. Then, with the main units_32 window highlighted, right-click and select 'Paste as New Selection' and drag the individual icon into place.

This is weird, I did this earlier today with Kinboat's Veritech unit and it worked, but I cannot seem to add it to Zulu's master list (it wasn't on as far as I could tell). I am using GIMP

Now every time I paste it in, it is all messed up...dots and colours.....no pic....any ideas? I have even tried re-unpacking the Veritech unit pic and pasting into other unit-32 arays...Help please:confused:

Vuldacon
May 22, 2006, 11:11 AM
WilliamOfOrange...Kinboat's Large and Small pcx files along with the units_32.pcx file for the Veritech were not made with correct palettes.
I corrected these if you want them for use.
Here is the zip:

SG-17
Oct 17, 2006, 04:20 PM
but what if you fill the unit sheet?(vanilla) how do i add more?

Bjornlo
Oct 17, 2006, 05:00 PM
Not sure in Vanilla, but in C3C (and I guess all versions)
You just make the icon sheet larger.

Open the pcx in a paint program that can handled indexed (fixed palette images). Paint programs such as Photoshop, Paintshop and GIMP.
I use photoshop.
Next either resize the background or create a new blank image that is allot larger (in height only) by 2x.
Assuming you resized the canvas not the image, you re-position the orignal image so it is at the top. Copy it and paste it so it is also covering the bottom. You then erase the contents of the frames of the duplicates.
If you create a blank image, paste two copies of the original image in and position them. Load the palette from the original image if you do it this way...
etc... there must be 1000's of ways to add rows.

Vuldacon
Oct 17, 2006, 11:55 PM
Here is a Large BLank units_32.pcx. It is 28 across rather than 14. The units_32 Palette is loaded to this Blank so all you need to do is copy and paste your Images to it.
Note: It is Important to keep Leaders, I believe Armies as well, in the same Frames as the Originals because they are indexed for Game Use. It is Best to simply Copy and Paste the Original Images in the same Order and in this case, copy and paste from Left to Right. This Sheet will hold two Rows from the Original units_32 across one Row...After Pasting your Original Images to this File, add what you want after. This Sheet has 420 frames and you can add more as needed. Just Rename this Sheet units_32.pcx by removing the word "Blank_" that is at the start of the name.

Snootch
Aug 20, 2007, 12:21 PM
How do we get rid of the magenta square behind our units when we put them onto the map?

Bjornlo
Aug 20, 2007, 12:27 PM
The magenta square should not be there on the map. The units 32 is not the unit just a icon for it. Much like you clicked on an ICON for Internet Explorer to come where.
On the map the game will use animated files called FLCs which you must add to your game. Please read the adding units to the game tutorial.

Vuldacon
Aug 20, 2007, 02:21 PM
Snootch... as Bjornlo indicated, the units_32 file has its own Palette and is only intended for the small unit Icons that show the unit in the City Screen and build Queue. IF a unit uses Civ Specific Colors, they must use the Red Civ Specific color for the units_32 file for those colors to change for each Civ.

...as for units, they each use their own 256 color Palette because each unit uses different colors. The Game Palette uses four rows of 16 Civ Specific colors as well as 1 row of 16 Shadows and 1 row of 16 smoke or fog shades. This leaves 160 slots on the palette for unit colors. IF Magenta shows behind your unit on the game map, the Magenta color is not in the correct slot of the palette. It is used as a Transparent color and the game uses indexes to know where this transparent color is on the palette. There are several tutorials concerning units and palettes. IF you can "wade" through it, I wrote a tutorial about how to make one palette for a unit that uses multiple palettes. This also shows a method to make a unit palette as well as the placement of the unit colors on the palette. IF you use a different Graphics Editing program than Paint Shop Pro, you should still be able to adapt any of the Tutorials to the way your Program works and shows palettes.
...So to answer your question more directly...correct the position of the Magenta color for the particular unit on its game palette to correct the Magenta you are seeing behind your unit on the map. This has nothing to do with the units_32 Palette. Good Luck :)

Snootch
Aug 20, 2007, 05:03 PM
Hey, guys - thanks for trying to help me out. I have to admit, however, that I am clueless to about 80% of what you both wrote, probably because I came off as doing something more advanced than what I really am!

I do understand that I am not dealing with FLICs at the moment. I am just talking about the Map Editor - I apologize for leaving that detail out. I am talking about the units_32.pcx sheet where I just copy and pasted units to it that I found. (I know I have to do PediaIcons and Civilopedia entries, ini. files, etc.) I don't do unit creations - I am not that qualified!

I attached a picture in another thread, but I don't know how to reference it with a link. Maybe this is it: http://forums.civfanatics.com/showpost.php?p=5846651&postcount=217

Vuldacon
Aug 21, 2007, 12:18 AM
Snootch... Is that Image one where the Worker animation appears on the map with the Magenta Background or is this something you pasted on the map? If it is the actual Worker animation, the Unit Palette does not have the Magenta indexed correctly on the palette.
IF you have a Graphics Editing Program, Open a Unit .pal Game Palette and you will see where the Magenta is located on the palette. You can generate a storyboard with Flicster to get a .pal and alpha pal palette. Look at the .pal Palette for this. By the Way, If your Original Game Worker Unit is having this Magenta Background Problem, it is Corrupt.

Again, the units_32 sheet does not have anything to do with Units on the Game Map...ONLY on the City Screen and Build Queue list. Those areas are where you would see what you Paste on the units_32.pcx sheet...NOT the Game Map. Unit Palettes affect what you see on the Game Map. Have you altered your Terrain "Map" Graphics?

Snootch
Aug 21, 2007, 03:27 AM
Thanks again, Vuldacon. I now understand the role of the units_32.pcx sheet. And no, I did not alter the terrain graphics - I am using the default folder files.

What I did was download your blank PCX sheet above so I could put more unit icons in my mod. That image I attached shows what happens when I open my units_32.pcx file in IrfanView, then add a unit to it (cut and paste from another PCX sheet). Then when I open the Map Editor program, all of a sudden I see this magenta square behind my units! The same thing happened when I "added" a resource to that other PCX sheet - all my resources had the magenta square behind them, too! So if I just leave the PCX sheets alone, there is no magenta square, only then I can't put my new units into the scenario!

Is this a problem with IrfanView? Does IrfanView alter the settings somehow? I prefer this program because it is free.

I am not sure what to do with palettes - I am just a cut & paste guy!

Vuldacon
Aug 21, 2007, 07:40 AM
Snootch... I am not Familier with the Free Program IrfanView but it seems that it is altering your pcx Palettes. IF you Open the pcx "sheets" and just paste an image into them, the palettes should remain the same. Not sure what is going on there but probably the palette indices are incorrect.
You could try another Free Program or upload/send your pcx "sheets" so the correct palette can be applied to them. I will check the palettes for your pcx files if you upload them.
Does IrfanView allow you to view or change the palettes?

Edit... I downloaded Infanview and tested it briefly. I believe you need to download Plug-ins to be able to use many features. I was not able to load a palette and I believe this is one of the things you have to add a Plug-in for. Check the Palettes of your pcx files and make sure they are correct...save them as pcx files and check that they are pcx files after saving them.

Snootch
Aug 21, 2007, 12:18 PM
Vuldacon - you are a champ. Thanks again for your time and effort with me. I hope other Civ gamers who might have had this problem can read this and appreciate your efforts, as well.

Thanks for checking out IfranView even though it is probably not what most of you (qualified) guys use. I opened up your blank_units_32.pcx sheet in IrfanView and went to Image\Palette\Export Palette and saved it as Blank. Then, I loaded the PCX sheet I had all my units on. I then went to Image\Palette\Import Palette and loaded Blank. I saved the PCX sheet, then loaded the Civ 3 Map Editor and... voila! That worthless magenta square is now gone.

One thing I discovered was that Palettes cannot be worked on if the image is greater than 256 colors. So at one point I had to go to Image\Decrease Color Depth and set it to "256 Colors (8 BPP)." Then I could do the Palette stuff.

Also, when I went back to copy and paste more units to my PCX sheet, IfranView kept jacking with the Palette! (Worthless little bean.) So what I did was get all the units I wanted on the units_32.pcx sheet, then made sure the Color Depth was 256 colors, then had to Import the palette that I saved as Blank... then I saved it. (Whew!) This fixes IrfanView's propensity to change things. If I learn of a way to stop IrfanView from bugging us (or if you do), I'll let you know.

Now, don't think I understand any of this palette business one bit. I did notice that a person can edit the palette, though I am clueless as to how that would be done. I've read some posts on Civ Fanatics about RGB and positions and stuff, and when I tried to alter things, nothing worked. So unless you know how to work palettes (which I have no clue), then I strongly suggest downloading Vuldacon's Blank_units_32.pcx file above. Of course, what I am doing here is not the hard stuff - I am not making units, I am just trying to copy and paste them per the directions I found elsewhere on CivFanatics. If all you have is a problem with magenta squares, like Vuldacon (and others) said, it is just a palette issue, so try what I did!

Thanks again, Vuldacon. You really helped me hone in on what I should be looking for and got me thinking the right way. Again, I hope others can use this. Take care.

Vuldacon
Aug 21, 2007, 07:03 PM
Glad you found a work around that corrects the problem for you with Infanview. It is a nice little program for Free anyway. Like all programs, we have to learn what they can do and how we can use them.

Another Free Program that you can use that will help you with Palettes is Pedit Palette Editor by Bertram Simon. Also Flicster by Moenir generates both the .pal and alpha.pal palettes for units as well as flcs and allow you to view them.

I believe Infanview saves images with a Default that causes the palette problem so it is important to import the Correct Palette before saving your files. From the little I read, I believe you can download Plug-ins that will allow you to handle pcx files and palettes easier.

You can Download "Gimp", which is a Free Image Manipulation Program as well. You may find it easier to use for simple image work.

As for Palettes, there are many uploaded tutorials and information available on this subject here at CivFanatics. Palettes are no more difficult than anything else concerning Graphics work. Remember this...when something seems difficult, it is because there is something you do not yet know. When we understand and successfully gain a procedure we like, it is easy :)

I will say that because there are many methods that can be used to make Palettes and many of them are uploaded here...they can confuse someone who does not yet understand the basic static factors that are in all end results for a Particular Game Palette. The methods of getting there and the Programs used to do it can and do vary. This leaves people who are only beginning with the various game palettes for Civ, not sure what program or steps to use. I sympathize but unfortunately, what has been written is from individuals who use their personal programs and developed methods to accomplish the steps involved. Due to this, most people learn by extrapolation and "Trial and Error" until they understand and develop their own "techniques" with the programs they have.

Start with learning the Basic Facts about the Palette you want to work with...then look into tutorials where you can try the personal methods and programs that others use for the tasks. Many ways to accomplish the same end result..some are easier and or faster...just like almost everything concerning Computer Tasks. :)

Cronus
Jun 13, 2008, 12:09 AM
Sorry if this is old or anything but I have a very similar (exactly the same rather) problem as MikeLynch. Where the unit_32.pcx file is apparently not working after re-sizing it.

Does it have to be 2x larger than the original size for it to work if you want to make it bigger? Or can it be smaller than double the original size? Like 1.5x or 1.25x?

Every time it seems that the unit_32.pcx file is needed in-game, the game crashes (like after building the first city, or going to an adviser).

I guess I'll download Zulu's unit_32 file if I can't get my own modified one to work.

Also, I open it perfectly fine with MS Paint... after converting it to a bmp. then re-converting it to a pcx. Is that the problem? If it is that's going to be annoying. As everything looks fine, no quality-loss that I can see.


EDIT:

Figured out that it was MS Paint afterall unfortunately. Though, I simply changed to using Microsoft Photo Editor, which opens pcx files perfectly fine without needing to change format.

So after using a bit of cutting and pasting, I got the newly re-sized and larger units_32.pcx file working the way it used to, and better! [yay]

Cronus
Jun 13, 2008, 01:56 AM
sry for double post grrr

Vuldacon
Jun 13, 2008, 07:28 AM
Cronus... Start by using the Original units_32.pcx file and add more frames as needed.
Make the units_32 images 32 X 32 pixels with 72 Resolution and in pcx format. Keep the Great Leaders and Army Units in the same place (or skip those frames) on the original units_32.pcx file so the game will not crash... Because the game is coded to use those specific frames for Great Leaders and Armies, if you place a normal unit in those frames and your game uses Great Leaders or Armies, the Game will crash.

When you copy and paste the images to the units_32 file sheet, they will pick up the nearest color that matches which will not be correct as far as CIV Specific colors. You will not be able to see if the CIV Colors are correct unless you load the palette I made that will show them as Green.
I made a Tutorial for units_32 images that has the palettes included. Look on the Bottom of page 1 of this thread.

Edit: Here is a zip that has the Conquest_units_32.pcx with 25 extra Blank rows and a Blank_units_32.pcx with 20 blank rows that you can use.
...I recommend using the "Conquest_units_32.pcx" because you can simply add to it without having to deal with the Army or Great Leader areas but if you know what to do and prefer a totally blank units_32.pcx, that is included.
Note: Remove the "Conquest_" from the "Conquest_units_32.pcx" Name and or the "Blank_" from the "Blank_units_32.pcx" name for use.

Cronus
Jun 13, 2008, 08:36 AM
Yeah I do notice a slight color problem in the units (a little bit of pink where the civ-color would be), though I can still see a lot of civ-color.

I'll give the information you gave me a go, thanks for replying so quickly :)