[C3C] How to open / modify pcx files

Samash2020

Chieftain
Joined
Oct 3, 2016
Messages
1
Hi, I am wondering if someone can help me. Hopefully this is in the right place. I want to add more units to a mod, and used GIMP to open the pcx unit file, but after saving and then reopening the file, it is all distorted. Which program is best to use? Thank you.
 
Moderator Action: Moved to the Civ 3 Creation and Customisation main forum - you're far more likely to get some help here! I seem to recall you'd need to export as a pcx and it should be okay.
 
Hi, I am wondering if someone can help me. Hopefully this is in the right place. I want to add more units to a mod, and used GIMP to open the pcx unit file, but after saving and then reopening the file, it is all distorted. Which program is best to use? Thank you.
Welcome to CFC!

Gimp should work for editing the .pcx file, but you may need to export out the palette beforehand, as it needs to be saved in 256 colors, with the last two being the transparency colors. Your edits may kick in if you import the original .pcx file's palette if it is already saved as a .pcx file.

I myself use Irfanview and MS Paint/Paint.net, Irfanview to modify the palette and save the files as .pcx, and Paint to actually do image editing, mostly because I never bothered to figure out how Gimp works.
 
and used GIMP to open the pcx unit file, but after saving and then reopening the file, it is all distorted.
This is too vague a description to give useful advice. Maybe you can post a screenshot - or both the original and the "distorted" files. It's probably the dreaded "invisible colors not in proper palette slot" problem but who knows.

Gimp should work for editing the .pcx file, but you may need to export out the palette beforehand, as it needs to be saved in 256 colors, with the last two being the transparency colors. ... mostly because I never bothered to figure out how Gimp works.
You probably remember, since you commented in the thread, but for the sake of those like Samash2020 who don't know: Palettes can be edited and rearranged in GIMP. No need for another program.
 
Yeah, I wasn't sure if Samash saved the image without preserving the palette, so I thought I'd mention that if the palette isn't properly set, it can cause problems for the image.
 
Welcome!

Please also say what you want to achieve in more detail. Simply adding units to a mod doesn't actually require opening the pcx files at all. As they said GIMP can do everything you need when editing pcx files. It saves files in its own native format so if you open a pcx file, modify it, and want to save it you must use the export option in GIMP rather than save or save as.
 
Hello Samash! Welcome to the C&C forum. I have to warn you - once you learn how to customize your gaming experience, it becomes a habit, then an addiction, then it takes over your life completely, ruining your health and relationships forever. So enjoy!

So you want to learn to index pcxs. Well, I could be boring and point you to the 'Tutorials' section of this forum, where you'll find lots of useful advice, but what fun would that be? Here, I might have something for you....

(rummages around in drawers, says, "damn!" , rummages around on shelves a bit more before muttering, "oh yes, here it is...")

A while back, just for poops and giggles, I made a little GIMP tutorial for making a new sort of improvement icon that Oni Ryuu had designed in response to Anthony Boscia's fix for the 'over-link bug' (that thread is HERE)

The important part of it, for your purposes, is the 'indexing' portion, steps 9-16. See if this helps. It also shows my basic GIMP set-up, (note, for instance, that I always set the work-background to 'transparent') which I've found useful for most Civ projects:


Obviously, you should also check out the 'Tutorials' section of this forum, since this isn't an 'official' tutorial.
 
Last edited:
Hi, I am wondering if someone can help me. Hopefully this is in the right place. I want to add more units to a mod, and used GIMP to open the pcx unit file, but after saving and then reopening the file, it is all distorted. Which program is best to use? Thank you.

Me too! Got a new PC and downloaded newer version of GIMP and found exported .pcx files are skewed, something to do with an offset somewhere, palette is fine. I Googled for an answer and found this thread. Anybody any ideas of a fix, or another application that'll do the job?

It's a known issue in GIMP - found this bug report:
https://gitlab.gnome.org/GNOME/gimp/issues/2160

Cheers
 
Last edited:
Examples in the bug report. tilt everything over by 45 deg or so and wrap around: squares becomes wibbly parallelograms.

Pcx file viwers are common enough, but not a decent editor. OpenOffice has a graphics module that claims support, might try that. Move to Win10 has proved troublesome - getting CiivIII working took ages. Including bizzare text bug in labels.txt (thank goodness for Google and forums).

Edit to add: Nope, OpenOffice drawing not bitmapped images, won't export as pcx. It'll import pcx files but little more.
 
Last edited:
I'm not a graphics expert by any means, but one suggestion I'd have is to download the old version of GIMP that you're familiar with. FileHippo has a nice archive of old versions; my guess is you're looking for the latest 2.8 version, but it has the latest 2.6 and 2.4 versions as well if you hit Back a few times. I stuck with 2.4.7 for awhile myself, after 2.6 re-did the interface and the options I used in my infrequent Civ3 graphics modding were not as easy to find.

I haven't run into this yet myself... but like I said, I rarely modify graphics, and am probably still on 2.8 on my Windows 8.1 desktop where I do the most modding
 
Thanks - been looking for older version, wasn't familiar with FileHippo. Tried 2.6.12, worked fine. Try 2.8.22 next. Perhaps it's just 2.10 that's bust - pity, it does look good.
 
Last edited:
All done. GIMP 2.8.22 works fine as well, so it is just 2.10 that's bust. Guess they'll get round to the bug at some point - thanks chaps.
 
Gimp should work for editing the .pcx file, but you may need to export out the palette beforehand, as it needs to be saved in 256 colors, with the last two being the transparency colors. Your edits may kick in if you import the original .pcx file's palette if it is already saved as a .pcx file.

I myself use Irfanview and MS Paint/Paint.net, Irfanview to modify the palette and save the files as .pcx, and Paint to actually do image editing, mostly because I never bothered to figure out how Gimp works.
Irfanview is very useful to create a pcx that will work in the civ 3 game. open the associated default pcx file you intend to modify (such as resources.pcx to modify resource icons) and save the Irfanview color palette. this palette file can be used to correct any updated or new pcx files to a format that will correctly display in civ 3. simply import the saved palette file to convert the pcx to a pcx format that will work in civ 3. the import palette file step is necessary since Irfanview by default expands the image to 24 bit, a format for pcx that will NOT work in civ 3

MS Paint or other bmp program can be used to create the file, but after importing this file to Irfanview even if the palette has 256 colors it likely will not work with Civ 3 since the last color needs to be magenta. hence a final step is to import the color palette file mentioned above
 
While your main point - Irfanview is useful - is true there are some gaps & bits of misinformation in your explanation of how pcx palettes function in Civ 3.

The last two slots in the palette are reserved for anything meant to be invisible. We commonly refer to these as green & magenta because those are the colors Firaxis used. However, it is the positions in the palette - not the color - that matter.

The directions you give for using a saved palette are fine for reapplying it to the original file after editing. To be clear though, simply applying the palette of one file to another forces color changes that can have unintended results. Sooner or later a pcx maker needs to learn how to change modes, edit palettes, and so on.

This is true regardless of the software used to do the graphics work.
 
Welcome to CFC!

I myself use Irfanview and MS Paint/Paint.net, Irfanview to modify the palette and save the files as .pcx, and Paint to actually do image editing, mostly because I never bothered to figure out how Gimp works.

Thank you friend! :) Hope it really works, I was very angry with useless GIMP (maybe due to my not good hands).
 
I'll just post my question here...
I have made a science advisory background in Paint.net - but when transporting it to GIMP it loses most of the colors.
It's probably has to do with the palette, but I don't know how to change this or how to get the colors back.

I've attached the files.
Does anyone know how to fix this?
Thank you so much.
 

Attachments

  • science_ancient.pcx
    science_ancient.pcx
    674.6 KB · Views: 18
  • ancient final.png
    ancient final.png
    1.1 MB · Views: 29
Theov... I made a Palette from the .png image.
You will need to name it as I simply named it science.

I do not use Gimp but it is probably an import/export situation and how to reduce colors.
 

Attachments

Theov... I made a Palette from the .png image.
You will need to name it as I simply named it science.

I do not use Gimp but it is probably an import/export situation and how to reduce colors.
thank you so much!!

How did you do it?

It seems I can use the palette for middle/industry and modern, too...
thanks again!
 
Last edited:
Theov... I use Paint Shop Pro 9 ( an old version) for years as it is easy and all I need concerning Graphics for the Civ Game.

Edit: I start by adding a pixel of Pure Magenta and a pixel of Pure Green to an area where I can easily paint out those colors with what should be there ... such as on the top label bar of Grey.
I then reduce colors to 256 colors.
Then I paint out the Magenta and Green with the same Grey color on the top Label Bar.
Then I increase colors to 16 million colors and Reduce colors to 256 colors... That leaves 2 slots at the end on the Palette where I then open the palette and add the Magenta and Green at the end.
Save as what ever name and as a .pcx. Finished.

You can get some assistance from the Members that also use Gimp.
 
Last edited:
Back
Top Bottom