No announcement yet.




    Get the Full version of this guide with images and unit.txt example

    Here is what I have so far on a file to help explain how to make non-animated unit graphics. I'm going to add some more (such as an additional section on how to make shadows) but this is the basic part. When I post it, I will include a couple of files that will help the user make files easier. For now if you want to try this out, use the text I included earlier in this thread for the text file, and open up one of the cow pictures that comes with the graphics editor patch to start your graphic off from (deleting the cow, of course).

    I'm putting this here to see if anyone has any questions or if this in fact works for people. It seems pretty complicated cos there are many steps, but are just mindless steps. I can now make a unit in less than 15 minutes if I just want to slap one together.

    Also, if anyone could describe the process of how to make a new unit (what other files need to be edited and how). I haven't begun to explore that yet, but I could tack someone else's explanation of that onto the end of this file.



    by Harlan Thompson

    Activision's lack of decent documentation makes the making of graphics seem very daunting. If you have Photoshop and you don't care about including animations, it really isn't that tough. It looks complicated, but once you get used to it, the process will only take a few extra minutes over what one needed to do in making a unit for Civ2. Here is a step by step explanation on how to do it- do not be afraid! .
    Before I start, I should explain that I assume you are already familiar with the Photoshop programs and all of its commands. If you are not, use the Help feature, or read the manual or buy a how to book.

    1. Find or make a graphic picture you like. If you aren't an artist, scanning in a picture or grabbing one off of the internet will do just fine. If you are taking another image, keep in mind the closer the image is to the final size you want, the better. This is because there will be less distortion when you resize it. So try to find small pictures, since CTP graphics are pretty small compared to most graphics out there.

    2. Using Photoshop, open the blank file- GUblankMA1.0.tif (which you presumably downloaded with this file) and the graphic you want to turn into a unit. The goal is to fit the graphic into the blank file. The blank has a big white diamond in the middle of it. This is to help you know exactly how big a terrain tile is. You generally don't want to go outside this box too much, because the more you do, the more things in other adjacent tiles will overlap and be blocked. But compared to Civ2, you have more room to go outside the box if you want, and there is no problem with going below the box.

    3. Resize the graphic. The blank file is only 96 pixels wide and 72 pixels high, so chances are you are going to need to shink the graphic to make it fit. Use the command Image -> Image Size. Type in a new number of pixels (a width of 70 might be close to what you want) and hit return, then OK. Then cut and paste into the blank file. Use the undo command if you aren't happy with the results, until you get it right.

    It helps to have your graphic just right before you reduce its size. If you don't separate it from its background, the edges of the graphic will turn colors you don't want them to. Best to select the background and then delete it before resizing. To do this, first make a new layer of your graphic (Layer -> Duplicate Layer). On the duplicated layer, select the background. There is a whole art to selecting to make sure you have just what you want and none of what you don't. Use the help menu if you need work here. One good way to do it is use the Select -> Color Range tool. Use the tweezers and the plus tweezers to click on all the colors you want selected. Hit OK. Then use the Marquee or Lasso tools to add or subtract from this selection (hold down the Shift key to add, the Alt key to subtract). Try to get rid of the fuzzy border pixels you don't want, or else your unit will end up looking fuzzy too. Once you have the background selected, Cut it. Now you can select what remains (use the Magic Wand command, set to its maximum tolerance, 255) and Paste that into the blank file.

    4. Once you Paste it, your graphic will now appear in the blank file as a new layer. Move it around over the white diamond until you have it exactly where you want it.

    5. Delete the white diamond in the background layer, cos you will no longer need it. Do this by selecting Layer 2. Now the white diamond should disappear. Make it disappear permanently by merging Layer 2 into the Background layer.

    6. Adjust your unit until it looks like you want it to appear in the game. Make sure there is no pure black in the part of the graphic that will become the unit. Pure black is how the game defines the background. If there is any pure black where you don't want it, select it, and replace it with a black that is almost identical. Only the game engine will know the difference between a color that is pure black and one that's 99.9% black.

    7. Now comes the tricky part of getting the alpha channel to work. Find the Layers window in Photoshop. Along the top of this window you should see three tabs, Layers, Channels and Paths. Click the Channels tab. You should see four channels for your graphic already: RGB, Red, Green and Blue. If you have any other channels, delete them.

    8. Select the pure black background behind your unit. To make sure you select every last pure black pixel, use the Select -> Color Range command. With the tweezer, click on the black background, then click OK. Now use the Select -> Inverse command. You should now see every last pixel that is NOT pure black selected. If you see pixels that should be pure black but aren't, fix that now, then repeat step 8 until you have it right.

    9. Now make the Alpha channel. With all the non-pure black pixels selected and the Channels tab open on the Layers window, click the "save selection as channel" button at the bottom of the Channels tab window. The icon on this button is a black box with a dashed circle inside it. When you click on this, a channel called Alpha 1 should appear in your Channels window.

    10. Save the file. Make sure you save it as a .tif file. If you can't save it as a .tif file, it may be that you haven't merged all your layers together. Do so, if you haven't already. If you still can't save as a .tif file, use the Save a Copy command. The blank file you opened is called GUblankMA1.0.tif. For your save name, replace the word "blank" with a number between 0 and 99. For instance, let's say you want to make sprite 96. So call the file GU96MA1.0.tif. Put this saved file in a folder you create called "96".

    11. Using the Save a Copy command, make four copies of this file. Call them: GU96MA2.0.tif, GU96MA3.0.tif, GU96MA4.0.tif, and GU96MA5.0.tif. You must do this because a unit sprite has a minimum of five facings (front, back, side, etc...). In fact, you can make five different pictures for each of these files, if you really want to have five different facings, but I am assuming you only want one for this example.

    12. At this point, we must start to deal with the Makespr.exe program that comes with the sprite editor patch provided by Activision. Download this patch if you haven't already.

    13. Put the Makespr.exe file in the Units folder of your CTP\CTPSpriteTools folder.

    14. Enter MS-DOS so you can run the Makespr.exe program (you can't just click on it for it to work- you have to open it from within DOS). One easy way to open MS-DOS is to click on the Start button on your Windows desktop, then click Programs and select MS-DOS Prompt from the list of programs.

    15. Go to the Units folder within DOS. If you are like me, the MS-DOS program opens up in the Windows directory. I type "cd .." (return), then "cd CTP" (return), then "cd CTPSpriteTool" (return) and finally "cd Units" (return).

    16. There is now one missing piece we need before we can run Makespr.exe. We need to have the text file ready. Every time you compile a sprite, you need not only the graphics but also one text file.

    17. Luckily you won't have to do anything to this file except name it and put it in the right folder. Use the text file that comes in this download, called GU00.txt. Put it in the Units folder of your CTP\CTPSpriteTools folder. In this example we're making sprite 96, so the text file should be renamed GU96.txt. Later, when you make other sprites, you can just rename this file over and over again for each new sprite number.

    18. We now should be ready to make the sprite. To double check, make sure the files GU96MA1.0.tif, GU96MA2.0.tif, GU96MA3.0.tif, GU96MA4.0.tif, and GU96MA5.0.tif are in a folder called 96 that is within your Units folder. Make sure both the file GU96.txt and the makespr.exe file are in the Units folder (but NOT in the 96 folder).

    19. At the MS-DOS prompt in the MS-DOS program, type:

    makespr -u 96

    then hit return. If you have done everything correctly, you will get a message that says: "conversion completed successfully." You will now find the sprite file sitting in the Units folder. It will be named GU96.spr.

    If you did something wrong, you will get some other message. You may well see the message: "error in bitmap data. Pixel with no associated alpha". This happens if you didn't make the alpha channel correctly. If there is even ONE PIXEL that is not pure black that has been selected in your alpha channel, you will get this message. Repeat steps 8, 9 and 10 to get that right. If you get some other message, it could be your files are misnamed, or not in the right places.

    20. The final step is to move the newly created sprite file into the correct folder. It belongs in the CTP\ctp_data\default\graphics\sprites folder. At this point you may want to rename it. For instance, if your sprite is an improvement of the Settler sprite, you would move sprite GU01.spr somewhere else, and call your new sprite GU01.spr. Once you do this, it should now work when you start the game.

    How do you know which sprite numbers are already associated with which unit? Open up the file called SpriteID.txt in the CTP\ctp_data\default\gamedata folder. If you use a number between 0 and 99 that isn't already being used, you will make a new unit. Of course you will have to also change some other text files before the computer can use your new unit. Good luck with your modmaking.

    ticktock's addition

    There are only a few differences when using PaintShopPro. Here is the process for getting and saving a unit (this assumes you are fairly familiar with PSP):

    1. Open the blank unit as above and open a second window with your graphic (note when acquiring a grahpic try to make the background all one color).

    2. Resize the graphic to 96 by 72. Then ensure that the background is all one color. This has to be precise. If, for instance you did a screen scrape of a unit in snow, there would be several shades of white in the background. Just click on the dropper, then sample one of the shades of white with the left mouse button. I usually us an obscure color (like the old purple-pink in Civ2) for the other mouse button. Click on the replace button and set the tolerance around 10. Then replace the background. You may have to repeat this a few times to get it all one color.

    3. Make sure your right (background) mouse color is the same as your background and copy the image to the clip board. Then, select the blank tif and then click, from the top menu,"Edit", "Paste","As Transparent Selection" to paste it on the blank image. Just center it over the diamond.

    4. Then to make the Alpha channel, from the top menu, click on "Masks", "New", "From Image". It may tell you that there is alreday an alpha image and ask if you want to replace it. Click on yes. That will bring up another window. On this one select "Any non-zero value" and click "OK".

    And there you have it.
      Posting comments is disabled.

    Article Tags


    Latest Articles


      by Harlan
      Get the Full version of this guide with images and unit.txt example

      Here is what I have so far on a file to help explain how to make non-animated unit graphics. I'm going to add some more (such as an additional section on how to make shadows) but this is the basic part. When I post it, I will include a couple of files that will help the user make files easier. For now if you want to try this out, use the text I included earlier in this thread for the text file, and open up one of the cow pictures that comes with the graphics editor patch to start your graphic off from (deleting the cow, of course).
      March 5, 2012, 17:43
      by Celestial_Dawn
      I think I've managed to figure out how the AIPs work. The AIPs certainly have a lot of information about the inner workings of the AI. Read and enjoy. AIP COMMENTS (based on default.aip) Default.aip is the first aip loaded at game start and contains a number of strings which are not found in the other personality aips. If repeated in the other aips, the new values take precedence over the default. // The next line was used in Dark Reign to specify a likelihood that a spy // would be seen... We can use that stuff in Civ3, too int infiltrator_period = 2; No clue. ...
      March 5, 2012, 17:33
      by Celestial_Dawn
      SET_FOOD_OR_PROD.FLI and SET_RESOURCE_DESIRE.FLI COMMENTS For all non-barbarians: 1. If cities = 0-1 and total population is 1, Maximise growth ratio (minimise turns to next pop) Pay as much wages as needed, minimise rations, average workday No PW Minimum workers on production tiles Maximum workers on food tiles Opening game strategy (this means explore more, and don't build roads yet - this is the same for all entries in this FLI so I won't repeat it) ...
      March 5, 2012, 17:27
      by Celestial_Dawn
      BEGINTURN.FLI(S) COMMENTS beginturn.fli is a template that is unused by the game. The settings for the various personalities are: Barbarian settle_dense, science_slow, diplomacybarbarians //Barbarian Cleric settle_dense, science_fast, diplomacypeacebackstab //Religious SciFew settle_loose, science_fast, diplomacypeaceloyal //Agreeable SciMany settle_dense, science_fast, diplomacypeaceloyal //Peaceful Slaver settle_dense, science_fast, diplomacywarbackstab //Slaver WarFew settle_loose, science_slow, diplomacywarloyal //Aggressive WarMany settle_dense, science_slow, diplomacywarbackstab //Militant Note that both science_fast and science_slow are identical, Activision decided to set them all to a fast science rate, but differentiated them according to their research goals - i.e. do you research war branches rather than development brances of the tech tree. I think this approach is just fine....
      March 5, 2012, 17:23
      by Celestial_Dawn
      AIPLOADER.FLI COMMENTS OUTPUT primary_loaded is only in aiploader.fli primary_loaded is to make sure that the AIPs are loaded in the correct order. This is to ensure that survival_mode.aip and citywall.aip are only loaded after the personality aips have first been loaded. Personality AIPs are always loaded on the first turn (turn 0). Otherwise, not relevant...
      February 13, 2012, 19:07
      by Mr Ogre
      How to stagnate growth and technology

      "When you create scenarios, will you be able to stagnate growth? For example, if I wanted to create a Viking scenario would you be able to ensure the tech level remains the same for that time period as opposed to being able to develop nuclear weapons? In Civ 2 that was one of the things that bothered me most. Someone creates a WW2 scenario and it quickly turns into a Desert Storm scenario."
      You can "stagnate" technology through three routes:...
      February 11, 2012, 21:16