City File Tutorial

Gray Wolf

Winter Wolf
Joined
Jun 2, 2012
Messages
482
Location
Ravenswood
Note: A PDF file of this tutorial is attached below.

OK, this is my latest version of my City Files tutorial. Hopefully it will do a good job explaining how to create city files
with multiple layers in GIMP and use them in the game.

1. City File Basics

The game uses city files to draw cities on the map for civilizations. The type of city file that it uses is based on the culture group of the civilization. So the American, Asian, European, Mediterranean, and Middle Eastern culture groups all have their own unique city graphics.

1.1 City Files

Each culture group uses its own unique city file:
American: rAMER.pcx
Asian: rASIAN.pcx
European: rEURO.pcx
Mediterranean: rROMAN.pcx
Middle Eastern: rMIDEAST.pcx

So here is an image of the rAmer.pcx file that comes with the Conquests game:

Spoiler :


It has 4 rows and 3 columns.

The rows are for each ERA: Ancient, Medieval, Industrial, and Modern
The columns are for city sizes: City Size 1, Size 2, and Size 3

Example: So whenever a civilization in the American culture group builds a Size 2 city in Medieval times, it would build the city in row 2, column 2.

1.2 Walled City Files

Each culture group uses its own unique walled city file:
American: AMERWALL.pcx
Asian: ASIAWALL.pcx
European: EUROWALL.pcx
Mediterranean: ROMANWALL.pcx
Middle Eastern: MIDEASTWALL.pcx

Example Here is an image of the default AMERWALL.pcx file that comes with Conquests:

Spoiler :


So, the game will use this file to build any city with walls for civilizations in the American culture group.

Each row is for each ERA: Ancient, Medieval, Industrial, and Modern.

So if the American civilization is building a walled city in Industrial times, the game will use the graphics in the third row.

Note: I understand that most people know all this already but I thought this needed to be here in case someone doesn't understand how the game uses the files...

1.3 Location of Files

You can find the city file images in the Art/Cities folder at this path:
C:\Program Files (x86)\2K Games\Civilzation III Complete\Art\Cities

If you want your own custom city file(s), you will need to create a folder
in your scenario called 'Cities' and put your custom file(s) there.

One of my mods is called LK (for Lions and Kings) so my cities folder is at:
C:\Program Files (x86)\2K Games\Civilzation III Complete\Conquests\Scenarios\LK\Art\Cities.

2. How to Create City Files

Let's say we want to create different cities for the American culture group.
We'd need to change the rAmer.pcx file. So I'll use that as an example here.

2.1 Open up a City Template in GIMP.

I attached a file called City Template.xcf that we will use to create a new rAmer.pcx file.

This file is based on Pounder's Large City Template found here which is 753 W x 568 H.

Spoiler :


The top section of each square (magenta) is the place where you can safely put city images. If you put city images in the bottom section of the square (green), then irrigation and terrain will overlay your city graphics.

The second column is different. It has green at the top and magenta at the bottom. The same principal applies.
You need to put all your city images on the top section.

Anyway, I basically took Pounder's template and added layers to it, one for each City and Era.
You can download it below in the attached zip file and I'll explain how to use it...

2.2. How to View The Layers of the City Template.xcf file

With the City Template.xcf file open, go to Windows/Dockable Dialogs/Layers (or Press CTRL-L for short)

You should see something like this:

Spoiler :


There are 14 layers. Pounders Large City Template is the base layer. I added a Magenta layer which is an optional layer that you may want to use. (I'll explain more about that later). And then the other 12 layers are for each Era and City Size.

Example: So if we want to create an Industrial, Size 2 City, we would use the layer called Industrial 2.
Or, if we need to create an Ancient, Size 1 City, we would use the layer called Ancient 1.

2.3 How to Create Your Own Layers
Windows/Dockable Dialogs/Layers (or CNTL L for short)
Right Click and choose New Layer
Give the Layer a Name
Layer Fill Type: Transparency
Click OK

Note: For this tutorial you won't need to create any of your own layers.

2.4 How to move layers

If you want to move layers, just use your mouse to move layers up and down in the layer box
to wherever you want to put them.

Note: I always keep the base layer on the bottom.

Well, so far so good on the new version of the tutorial! I should probably just stop here. LOL. :)
 

Attachments

  • City Templates.zip
    64.8 KB · Views: 234
  • City File Tutorial.zip
    801.1 KB · Views: 178
3.0 Let's Create a new rAmer.pcx file for America

Save the City Template.xcf file as Plains Indians.xcf. (File/Save As/Plains Indians.xcf).

We're going to create a bunch of Native American type cities as an example.

Ok, working off the Plains Indian file. Press CNTL-L to see all the layers.

We'll need to create a city for each layer.


3.1 Ancient City - Size 1

Let's start with the Ancient, Size 1 City. So click on the layer called Ancient 1.

Open up the Transparent Tee Pee 1.png file that I attached. Do an Edit/Copy to copy the image.

Now click on the Plains Indians.xcf file title bar...
Edit/Paste as New Layer. (The image will show up in the top left corner)
Spoiler :


Click M to move the image.
Use your Mouse to move the image to somewhere in the 1st row, 1st column pink area
(i.e. the place where Ancient City 1 images belong).
I put it in the center area. This is where the game usually places all cities...
Spoiler :


We now have an Ancient American Size 1 City.

Here's how to verify this:

To make a layer visible, just click on it's Eye icon.
They are on the left hand side of each layer label.
Spoiler :


So to see only the Ancient 1 city, make sure it is the only Eye icon that is toggled on.
To turn an Eye icon off, just click on it. Click on all the other layer's, and toggle off their visibility.

Spoiler :


When you do that, you should see the Ancient Size 1 Transparent Layer.
It looks like this... with the Tee Pee there...

Spoiler :


And to see how it looks on top of Pounder's Template, toggle Pounder's layer on (click it's eye icon).
Now you'll just have 2 eye icons visible. The Ancient Size 1 City and Pounder's Template.

You should see this:

Spoiler :


Ok, now toggle on each layer's visibility except the magenta one. Leave it toggled off.
We want to see all cities on top of the base... as we build them.

3.2 Ancient City - Size 2

Let's make the Ancient City Size 2. We'll put 2 Tee Pee's there.
Do a CNTL-L to see the layer box and click on the Ancient 2 layer (so we can work on it).

Spoiler :


Open up Transparent Tee Pee 1.png and Transparent Tee Pee 2.png. Add both of them to the Ancient Size 2 square,
one at a time. Edit/Copy each of them and Paste them as new Layer's. Make sure that after you Move (M) them into position that you lock them in with a Layer/Merge Layer. This keeps the layers at a total of 14 layers.

note: Later on when you get good at this, you can use as many layers as you want. See Blue Monkey's post below
about how to create layer groups... He said that some of his files have had up to 100 layers in them!
But I'm not sure I understand layer groups well enough to talk about it so I'll leave that alone for now.

For now, let's just keep 14 layers.

And you can see how many layers you currently have in the file by looking at the title bar.
Spoiler :


Anyway, make sure you put the cities within the top colored section of the square also.
I made mine look like this:

Spoiler :


3.3 Ancient City - Size 3

Click on the Ancient 3 layer. Let's add an Ancient Size 3 city with 3 tee pee's.
Open up the Transparent Tee Pee 3.png if you want another Tee Pee.

My Ancient 3 layer looks like this:
Spoiler :


note: I toggled off visibility of Ancient 1 and Ancient 2 so you can only see Ancient 3...
 
Ok, I'm going to build the rest of the file myself. (The final Plains Indian.xcf file is attached).

But as I go, I'll put some GIMP notes here on how you can Delete, Edit, and Copy images inside layers.

3.4 How to copy a city on one layer and paste it into a different layer

Let's say we want to make the medieval size 3 city the same as the Ancient Size 3 city...

Click on Ancient Size 3 (so you can work on that layer). Use the Rectangle (R) tool to copy the the city image.
Edit/Copy. Select/None.

After you copy what you want, make the Medieval Size 3 layer visible and also the base layer visible.
Click on the Medieval Size 3 layer (so you can work on that layer).
Edit/Paste as new layer. Move (M) the image to the Medieval Size 3 square. Layer/Merge Down.

Now you have a Medieval size 3 city that looks like the Ancient Size 3 city.

It looks like this:

Spoiler :



3.5 Deleting the images out of a layer

It's easy to delete an image out of a layer. Let's say we changed our mind and we don't want the Medieval Size 3 city to look like the Ancient Size 3 city. Just click on the Medieval 3 layer to work on it. Use the Rectangle Tool (R) to select the image. Click the Delete Button. Select None. Now whenever you look at the Medieval 3 layer, it will be empty.

I went ahead and deleted that Medieval Size 3 image out of my file.

3.6 Adding an image someone else created into one of your layers

This is one of the main things that you will need to do when creating City Files. Because there are a lot of good cities out there that you can already use. You can find them in the City Files Database.

So, as an example, I'm going to use a Middle Eastern City image from one of Wood Brother's files. The file looks like this:

Spoiler :


You can download his city files here.

Basically, when you find a city that you like, you need to use GIMP (or MSPaint) to select the image and put it on a transparent background so you can use it in one of your layers.

I'm just going to explain a very basic technique on how to do that...because that should probably be described in a separate tutorial. And there are people who are better at making transparencies than me...

But here are the basic steps:
I opened Wood Brother's file in GIMP and used the Rectangle (R) tool to select the Medieval Size 1 image.
I then did an Edit/Copy and Edit/Paste as New Image... which gave me this image below:

Spoiler :


So now we need to remove the pink background and make it transparent.
Fuzzy Select can help us do that. Tools/Selection Tools/Fuzzy Select.
Or just click U as a shortcut...

Now click on the pink area to select all of the pink.
Now click the delete button.
Then select none.

It has a transparent background now.

Spoiler :


Now, if there is one thing I've learned, don't trust it as being game-ready! You need to look at it closely
and test it first. I actually had to fix this transparent image because it had a few things wrong.
So I attached the fixed image in my zip file so you can use it in this tutorial if you want...

And here are some basic notes on how to fix/test your transparent image...
Spoiler :

To make sure it is a good transparent background file, zoom in on it. View/Zoom 800%.
If you see pink pixels in the transparent image, then use U to Fuzzy Select them and delete them.

Sometimes you can fix the images by copying a color from one pixel over top of the pink pixel.
There are all kinds of ways to fix the file and make sure it looks good in game.

Also, Click U for Fuzzy Select and click around the perimeter of the image. Eventually, GIMP will select the whole image ... and you can see if GIMP selected non-opaque type areas that usually are outside of the main image.
If you see any of those, they need to be deleted, or they will turn into off-pink type colors if you paste the image
on a magenta background. Or they will turn off-green if you paste on a green background.

Finally, to really make sure your image is good. Paste it into an all magenta file. Then Index it to 254 colors.
Then export it as a .pcx file. Then open the .pcx file and look at its color map. The map should show only 1 pink color. If there are a bunch of off-pink colors in the color map, then your transparent image had a lot of non-opaque pixels in it that turned into off-pink colors when you pasted it into the magenta file. In other words, there will be a bunch of little pink pixels that show up in the image in the game... which is no good.

But if you only see 1 pink color, then you have a good transparent image.

Like I said, I'm not an expert at this, so if someone wants to write a tutorial on how to make transparent files, that'd be great... I just want to put the basics here...

Also, I forgot to mention one of Pounder's methods. Basically you can select an image in MSPaint and have MSPaint automatically make a transparent background for it. See his MS Paint example here. I tried it and it works pretty good.


Ok, so let's put the transparent middle eastern city in the file. Basically you just add it to a layer just like in the Tee Pee examples.
Let's put the image in the Medieval 1 layer.

Open the Mid East City.png file. Edit/Copy. Click on the Medieval 1 layer (to work on it). Paste it in the image. Move (M) it
to where you want. Layer/Merge Layer. And that's it. You are using someone else's city for your Medieval 1 layer now.

Spoiler :


Note: But after doing all that work, I've decided I don't want a Middle Eastern City in my America file!
I was just using this as an example... so I deleted that city out of the layer.

Ok, so I finished the rest of the cities. I basically made each ERA look like the Ancient ERA to speed things up....
You can see the final file (Plains Indians.xcf) (attached in the zip file).

Now, I'll explain how to flatten your image and turn it into a .pcx file that can be put in the Cities folder and used in the game.
And, after that, I'll explain how to created the Walled City files...
 
3.7 Last Steps: Creating the rAmer.pcx file

Ok, so here is my final image with all of its layers...

Spoiler :


Let's create an rAmer.pcx file out of it.

3.7.1 Flatten Visible Layers

First, save a copy of your .xcf file so you can use it again later if you want to re-edit something...

We want to make all the layers visible (except the magenta one).
Then we need to Image/Flatten Image to merge all the images into one base file.
This also removes all transparencies and gets rid of all the layers except for 1.
That's why you need to back up your .xcf file (in my opinion) so you can go back to it again later
if you want to edit a city/layer.

Anyway, the only layer that exists now is called Pounder's City Template (i.e. what I've been calling the base layer).
It looks just like the final image above except it only has 1 layer now..

3.7.2 Index the image to 254 colors

Image/Mode/Indexed
Maximum Number of colors = 254
Color Dithering: None
Convert
File/Export To/rAmer.pcx
Now close the file you've been working on.
Open up the rAmer.pcx file you just created
Windows/Dockable Dialogs/Colormap

The Colormap should look something like this:
Spoiler :


Notice how there is only 1 neon green and 1 magenta color in the map. That means we did everything right...
It means all the images with transparent backgrounds that we pasted into layers were good images...

Ok, so now we need to Move the Pink/Magenta color to index position 255 and move the Neon Green color
to index 254.

And we can see them pretty easily in this color map. But, just in case you can't find them, go to the image
and use the Color Picker Tool. Or click O for short. Click the Pink area (with the color map open).
Now look at the color map. The Pink color will be selected and you can look at the color index number
to know where it is. Mine says it is on index 84.

Spoiler :


You can also use the color picker and select the green area to find out where that color is located in the map...
but let's skip that. It's easy to see that is on color index 203.

Now, we need to re-arrange the map and move those colors.
Right click on any cell in the color map and choose 'Rearrange Colormap'.

You'll see something like this:

Spoiler :


With your mouse, move the pink color (at index 84) to index 255 ... and then move the green color at 203 to index 254.
Click OK.

Spoiler :


Now Overwrite the rAmer.pcx file. And/or export it again and do a replace. File/Export/rAmer.pcx.
It's now ready to be used in the game. Just put it in the cities folder.

3.8 Flatten Whichever Layers You Want

Ok, I put a Magenta layer into the .xcf file just to show you that you can create an all Magenta image
easily also. Just make all the layers visible (including the Magenta layer) except Pounder's base layer.
So now everything is turned on except the Pounder layer.

Anyway, if you flatten the image now, you'll see your cities on a Magenta background, like this:

Spoiler :


And if you wanted to use this Magenta file to create your rAmer.pcx file, you could do that. The file
can have any background color you want. Just make sure you set index 254 and 255 to your background
colors. And if you only have 1 background color like this, put Magenta (ff00ff) on index 255 and then on index 254 put any color that you want that is not used in the palette. Usually neon green (00ff00) works great for that.
 
Ok, let's make the walled city file now.

4.0 Create the AMERWALL.pcx file

I'm just going to show a quick and dirty way to make a walled city.
Open up the awesome rAmer.pcx file that you just made.
View/Zoom/200%. Use the Rectangle Tool (R) to select the first column (251 W x 568 H).
Edit/Paste as/New Image

Open up the Walls.png file from the zip file...
Edit/Copy the walls.
Go to the New Image that you made.
Edit/Paste as New Layer
Move (M) the walls over the city.
Layer/Merge Down.

Edit/Paste the walls over the other 3 cities.

Spoiler :


Index this file to 254 colors. Create a pcx file out of it and fix the color map. Put the Green color on 254 and magenta/pink color on 255.
(using the notes above where I explained how to do that...)

Anyway, just name the file AMERWALL.pcx and put it in the cities folder and the game will use it.

Now, I decided that Plains Indians probably didn't make walls. So I decided that for my walled image,
I'd rather see a totem pole by the tee pee instead.

So this is what I made using the small transparent totem.png file I attached in the zip.
Spoiler :


The small transparent totem pole is actually a little too big. It's 70 pixels high.
So I decided to scale it down to 50 pixels high.

So here's the original totem pole on a transparent background.
Spoiler :


To scale it, you just go Image/Scale Image
Then change the Height from 70 to 50.
And then make sure the Interpolation is set to None (very important, otherwise you will get anti-aliasing problems)
Anyway, when you scale a good transparent image down, as long as you set Interpolation to None, your smaller image
should be good also...for game purposes. After I scaled it down, I indexed it and looked at the color map and it
only had 1 pink color and so it should be good to use in the walled city file.

So here's my last version of the Walled Template using a smaller totem pole.
Spoiler :


It's the one I decided to convert to a .pcx file.

I attached my Ancient Plains Indian city file below if anyone is brave enough to use it!
 

Attachments

  • Plains Indian Files.zip
    12.4 KB · Views: 138
5.0 Cities and Resources

The city can be as big as the top colored area. So you can make a small city or one that covers the whole area.
One thing I noticed. The larger you make your city, the more likely it will cover a resource...
and you may or may not want that.

6.0 Cities and Road Building

Whenever you build roads, it will not overlay the city graphics...which is good.

For example, when roads are built near tipi's, it will look like a road leads to the front of a tipi...and then it will look like another road starts out again from the back of the tipi.

Hope that makes sense.
 
7.0 Cities and Irrigation and Terrain

If you put part of your city in the bottom colored section by accident, that part of your city can and probably will be overlayed by terrain and/or irrigation. In other words, that part of your city will disappear from view.

Pounder wrote a little bit about that here.

8.0 Invisible Cities

Also, thanks to Civinator for explaining how to make invisible cities. You can read more about them here.

Basically, to make an invisible city, just leave the layer empty (i.e. don't put any graphics in it). Then the only thing that will show up on the map are soldiers/spearman and the name of the city... which could be useful in certain scenarios...

9.0 The Sixth Culture Group / Culture Group "None"

Civinator also discovered that there is another culture group (the 6th one), when you set the culture group for a civilization to "none".
I'm not sure I understand it all or how to creatively use it in a scenario... but you can read more about the 6th culture group here.
 
Well, this tutorial is finished for now... I'm not sure what else to add.

My goal was to explain the basics of how to create city files and walled city files and I think I accomplished that.

I am sure that some people found this tutorial boring because they already knew how to make layers.
This was mostly made for myself and as a primer for people who are just learning how to make city files.

But I welcome any feedback...

I don't think I'm going to re-write any part of the tutorial again though. It takes a long time to do
and I'm purty tired! :)
 
Gray Wolf howls:

We built this City.
We built this City on Rock and Roll...

We built this City.
We built this City on Rock and Roll...
 
Reserved for something that I probably forgot to explain!

Note: Folks, if the comments below don't make sense, it's because I wrote a tutorial earlier that wasn't so good,
and after getting a lot of good feedback from Laurana Kanan and Blue Monkey and Civinator, I decided to re-write
the tutorial above...

Basically, Laurana Kanan and Blue Monkey both explained a much simpler and better way to create city files using multiple layers
... so I re-wrote the tutorial to explain how to create the files using multiple layers...
 
Looks like you've spent quite a bit of time putting this together, which is quite an effort - well done. I'm not as familiar with GIMP so I'm not too sure what it's capabilities are.

I should mention that the blue/red sections I added to Pounder's file was really just a guide for city placement so that I had only minimal overlap with adjoining terrain/improvements. When I paste my cities in they are automatically centered so a guide for centering wasn't necessary.

The biggest problem I see, and I think I mentioned this before, is that working with only two layers creates extra work when you want to change or adjust something. Why not keep all the cities as separate layers until the end and then flatten the image? Merging each layer down as it's added limits what adjustments (position, color, sizing, etc.) you can make to each individual element. Reading sections 6 & 7 was also a little confusing, like you were doing more work than you needed to. Keeping everything in a single file would simplify the work immensely.

A question about the "magenta template file" in section 6. If you have separate background and city files like in this guide, why not just past the cities onto Pounder's original template instead of the solid magenta? At least then you'd be better able to see where the cities lie. Again, it just seems like you have too many steps and files when it could all be simplified. Also, I don't know if it makes a difference when using GIMP, but I usually index the file first before exporting to pcx - I've sometimes noticed differences in the color table when indexing from a non-native file format.

The last thing I noticed while looking at your city elements, in particular the totem poles, is that when you resized them, GIMP resampled the image and you ended up with anti-aliasing around the edges - this is what is giving you the "off pink" pixels because they are not 100% opaque. Looking at the color table for the AMERWALL2 pcx you have a lot of pink shades mixed in, which will cause transparency issues in the game. Best way to reduce images is to "preserve hard edges", which will remove most if not all of the anti-aliasing depending on the source image. Most times you won't even have to fix anything.

I understand we each have our own method for doing things so take my comments as friendly suggestions only. All in all though I thought this was a good guide.

P.S. It might be worthwhile to create a separate city template for walled cities.
 
Looks like you've spent quite a bit of time putting this together, which is quite an effort - well done.
...
All in all though I thought this was a good guide.

Thank you.

The biggest problem I see, and I think I mentioned this before, is that working with only two layers creates extra work when you want to change or adjust something.

Why not keep all the cities as separate layers until the end and then flatten the image? Merging each layer down as it's added limits what adjustments (position, color, sizing, etc.) you can make to each individual element.

I think I just really liked the idea of having just one file and being able to open it up and find all the cities.

And it doesn't take long to open up the city template and paste the transparent city file into it ... and
then sort of start all over with the city that I'm trying to fix/edit.

Reading sections 6 & 7 was also a little confusing, like you were doing more work than you needed to. Keeping everything in a single file would simplify the work immensely.

Yea, my method does require some extra steps, but I can make a new Magenta file fast and paste everything into it pretty fast...

I think it actually simplifies the work using just 2 layers. Otherwise, after you flatten everything, you'll have to go back and cut out cities and then re-create neon green/pink city squares.

Also, you can't rely on pink being over green or green being on top of pink because Pounder's 2nd column is different...
I remember having city files with a pink background (the size 1 city) and wanting to paste it into the 2nd column (size 2 city) as a base ... and then getting flustered after seeing the green background at the top instead of pink...

I didn't want to make a lot of layers for each city because after you flatten them you lose the layers...unless you keep copies of each city... but if you have a whole lot of backup files of the cities, you'd have to name them all and keep track of them. And the naming conventions for each culture group, era, and city size would drive me crazy.

Anyway, it just seems easier to me to make one big transparent file to save everything into.

Everyone has their own methods though ... and this one seems to work well for me...

A question about the "magenta template file" in section 6. If you have separate background and city files like in this guide, why not just past the cities onto Pounder's original template instead of the solid magenta?

Yea, this would definitely save steps. The answer to this is basically OCD. I really want/need to see all magenta in the end. It's cleaner. Also, sometimes I accidentally overwrote the template I was working on and then I wouldn't have a pure template again and I'd have to go to civfanatics and download it again or something ... so using Magenta on the side avoids that issue.

Also, I don't know if it makes a difference when using GIMP, but I usually index the file first before exporting to pcx - I've sometimes noticed differences in the color table when indexing from a non-native file format.

Right ... I usually index it first. I'm not sure why I didn't do that this time.

So thanks for pointing this out. I'll look into this to see if it makes a difference.

(Edit/Done - I just checked and it doesn't matter if you export it to a pcx and then index it ... or if you index it and then export
it as a .pcx. Basically the only thing that matters it that the final indexed file looks good and only has 1 pink in 255
and 1 green in 254).

The last thing I noticed while looking at your city elements, in particular the totem poles, is that when you resized them, GIMP resampled the image and you ended up with anti-aliasing around the edges - this is what is giving you the "off pink" pixels because they are not 100% opaque.

It definitely resampled the image and included some non-opaque pixels because when I pasted it into the magenta file, it showed
off-pink pixels around the edges.

So I'm going to fix the file and put a better version there to download.
(Edit/Done - so the file should work now without any funny looking off-pink pixels. Basically I zoomed in on the transparent image and deleted the non-opaque pixels that were hanging around outside the image everywhere. And then I pasted the new transparent image into the magenta file and everything looks good now.)

Looking at the color table for the AMERWALL2 pcx you have a lot of pink shades mixed in, which will cause transparency issues in the game. Best way to reduce images is to "preserve hard edges", which will remove most if not all of the anti-aliasing depending on the source image. Most times you won't even have to fix anything.

After it is on an all magenta background, I'll look at the image and it's Color Map. If I see lots of little off-pink cells, I'll go back to the RGB image with a transparent background and clear out the non-opaque cells (i.e. fix it).

Most of the time the color map will only have 1 pink cell and I move it to 255 and I don't have to remake anything or fix any pixels.

Thanks for bringing this up though. I am going to research this and see if there is something I can do better when scaling to prevent these kind of pixel issues. I'm not sure if GIMP has a Preserve Hard Edges command or not. I hope it does.

You should make a walled template

I made a walled template using your blue zone file. I just cut out the first column.
Anyway, it's inside a zip file that I attached on the 1st post.

I understand we each have our own method for doing things so take my comments as friendly suggestions only. All in all though
I thought this was a good guide.

Thanks, I appreciate that. And when I get some time, I'll probably fix parts of the tutorial based on some of your feedback.

I'm happy overall though because I just wanted to make a fairly detailed tutorial on how to do everything because I couldn't find one when I was trying to learn how to do this myself.

Thanks again.
 
Let me try and explain again.

I think I just really liked the idea of having just one file and being able to open it up and find all the cities.

And it doesn't take long to open up the city template and paste the transparent city file into it ... and sort of start all over with the city that I'm trying to fix/edit.

I only have 1 file for each city pcx (e.g. rAMER, rASIAN, etc.) that I'm dealing with and they each have the background, cities, and guide all included, just on different layers.



What you are dealing with with your method is essentially 3 files - the template, the cities, and the final background.

I think it actually simplifies the work using just 2 layers. Otherwise, after you flatten everything, you'll have to go back and cut out cities and re-create neon green/pink city squares.

Actually, no. Once I have my cities placed I save the file as, for example, rASIAN Layered Template. Then I flatten the image, index, and save as a pcx. Now if I decide to change the position of, say the Industrial size 2 city I just reopen the layered template file go to the layer with that city, move it to the new position, overwrite the layered file, flatten, index, and save it as a new pcx. There's no cutting, pasting, or re-creating squares since the city and background are on different layers.

If I understand what you're doing when changing a position of a city you have to open the city file and first cut out the city you want to move; then open the template file and paste the city file on top of it in a new layer; and then paste the cut out city back on top of those two layers, move it to the new position, and then merge it down into the city layer. Once that is done you open the magenta background file, copy the city layer onto it, flatten, index, and export. That's alot of cutting and pasting whereas I don't have to cut or paste anything.

Also, you can't rely on pink being over green or green being on top of pink because Pounder's 2nd column is different...
I remember having city files with a pink background (the size 1 city) and wanting to paste it into the 2nd column (size 2 city) as a base ... and then getting flustered after seeing the green background at the top instead of pink...

You wouldn't have this problem if the city and background were on different layers.

I didn't want to make a lot of layers for each city because after you flatten them you lose the layers...unless you keep copies of each city... but if you have a whole lot of backup files of the cities, you'd have to name them all and keep track of them. And the naming conventions for each culture group, era, and city size would drive me crazy.

I don't understand what you mean here. As I said above, I only have 1 file per pcx. Well, technically 2 - the layered file and the finished pcx.

It definitely resampled the image and included some non-opaque pixels because when I pasted it into the magenta file, it showed off-pink pixels around the edges.
I fixed the file by copying pure magenta (ff00ff) over top of all the off-pink pixel areas. (When I usually just double-click each off-pink cell in the Colormap and change them to ff00ff).

So the file should work fine in the game (even though the colormap looks funny and includes a bunch of off-pink cells...because those colors aren't in the actual image anymore). But I'll look at the file again to make sure. Because I was tired at the end of making this tutorial and I may not have replaced all the off-pink pixels.
I'll probably just go to the colormap and double click each off-pink cell and change them to pink ... because the colormap should be that way anyway.

Here's a look at the color table and totem in-game:



All those "off pink" colors will cause you problems as you can see from all the pink/purple pixels on the totem in-game. It's maybe not as noticeable since the graphic is so small, but they're still there.

After it is on an all magenta background, I'll look at the image and it's Color Map. If I see lots of little off-pink cells, I usually just double click on those off-pink cells and change them to magenta (ff00ff). If it doesn't mess up any part of the inside of the image, I'll know that the image is good and it's just getting rid of the outside pixels that were off-pink.

Most of the time the color map will only have 1 pink cell and I move it to 255 and I don't have to do any pixel changing.

You only want 1 index position of magenta. Since you only have 254 colors available for the actual graphic when indexing. Every additional index slot of off-pink or magenta you have takes away from the colors available to the graphic. It's better to get rid of any anti-aliasing before you index.

I'm not sure if GIMP has a Preserve Hard Edges command.

I'm not sure what it's called, but it does have that feature. Should be an option somewhere on the "Scale Image" dialog box.
 
Let me try and explain again.
I only have 1 file for each city pcx (e.g. rAMER, rASIAN, etc.) that I'm dealing with and they each have the background, cities, and guide all included, just on different layers.

Wow, I see what you are talking about. You can do everything with a lot of layers all inside 1 file. Awesome.

My way is extra work but I sort of like doing it with 3 files.
 
All those "off pink" colors will cause you problems as you can see from all the pink/purple pixels on the totem in-game. It's maybe not as noticeable since the graphic is so small, but they're still there.

I was just tired last night.

I fixed them all and re-uploaded them. If you look at them again, you'll see they are indexed good with only 1 pink and 1 green and they don't have any off-pinks anymore.

I haven't looked at any of them in game yet but they should all look good.
 
It's better to get rid of any anti-aliasing before you index.

Right, I usually make sure my transparent image is perfect (without any non-opaque type pixels hanging around). That way when you put it into an RGB file, it goes in ok.

And then, like you said, you index at that point.


I'm not sure what it's called, but it does have that feature. Should be an option somewhere on the "Scale Image" dialog box.

I looked and didn't see it there. It would be very nice to be able to do that...to make sure you get rid of anti-aliasing without having to fix pixels manually...

So I'll keep looking and maybe Google that...
 
Laurana Kanan,

I'm sorry I edited out the statement below that I said earlier ... and you were already responding to it evidently.

Where I said:
After it is on an all magenta background, I'll look at the image and it's Color Map. If I see lots of little off-pink cells, I usually just double click on those off-pink cells and change them to magenta (ff00ff). If it doesn't mess up any part of the inside of the image, I'll know that the image is good and it's just getting rid of the outside pixels that were off-pink.

Most of the time the color map will only have 1 pink cell and I move it to 255 and I don't have to do any pixel changing.

I deleted that statement out of my post because I realized that I do in fact try to fix the transparent image first (and not the magenta file). I don't usually just double click on colors and change them pink. Although I have done that before with ok results, it's best not to do things that way... and it defeats the purpose of creating a good transparent file that you can place on a magenta background with no worries.

Anyway, that's why I sort of took it out because I actually don't do things that way.
I think I've been a little tired after writing this long tutorial! :)

But I'm glad you caught all those errors. I want to make sure that whoever gets this tutorial, reads it and understands it and that all the .pcx files are indexed properly.

I'm going to check my .pcx files in game again now (after fixing them). They should work now.

Thanks.
 
Laurana Kanan,

I think your way of doings things is probably faster, more efficient, and more professional.
I see all the layers you are talking about.

I guess I'm just stuck with my way of doings things. I hope some people like my approach but if they don't, that's ok... hopefully this will help someone out there though.
 
Had a little bit of time this morning so I thought I'd take a pass at your wall pcx. I think I was able to get a little better dynamic range of colors and capture more of the size and shape of the totem.





I guess I'm just stuck with my way of doings things.

As long as it works and you're happy with the results it doesn't matter which way you do things. Over the years I've learned that for ever one way of doing something in PS there are at least six other ways of accomplishing a similar effect.
 
Wow, that looks extremely good.
 
Top Bottom