1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Tutorial: Making a units_32 pic

Discussion in 'Civ3 - Tutorials, Reference, & Guides' started by zulu9812, Jan 15, 2004.

  1. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    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.
     
  2. Colonel Kraken

    Colonel Kraken Deity

    Joined:
    Dec 27, 2001
    Messages:
    2,453
    Location:
    Grand Rapids, MI
    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:
    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
     
  3. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    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.
     
  4. Colonel Kraken

    Colonel Kraken Deity

    Joined:
    Dec 27, 2001
    Messages:
    2,453
    Location:
    Grand Rapids, MI
    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)
    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
     
  5. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    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
     
  6. Colonel Kraken

    Colonel Kraken Deity

    Joined:
    Dec 27, 2001
    Messages:
    2,453
    Location:
    Grand Rapids, MI
    Excellent. Thank you very much!
     
  7. Gringo

    Gringo Chieftain

    Joined:
    Aug 18, 2002
    Messages:
    42
    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.
     
  8. bjbj1991

    bjbj1991 E=MC2

    Joined:
    Dec 30, 2003
    Messages:
    56
    Location:
    Sacramento California
    Do I need to get PaintShop or can I just use any program like Paint.
     
  9. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    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.
     
  10. LtComRavenSeven

    LtComRavenSeven Chieftain

    Joined:
    Feb 2, 2004
    Messages:
    3
    Would Microsoft Picture it work for adding units to the units 32 file?
     
  11. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
  12. LtComRavenSeven

    LtComRavenSeven Chieftain

    Joined:
    Feb 2, 2004
    Messages:
    3
    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?
     
  13. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
  14. LtComRavenSeven

    LtComRavenSeven Chieftain

    Joined:
    Feb 2, 2004
    Messages:
    3
    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!
     
  15. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
  16. bjbj1991

    bjbj1991 E=MC2

    Joined:
    Dec 30, 2003
    Messages:
    56
    Location:
    Sacramento California
    I cant get gimp to work.:mad: It says I'm missing something called libgimpui-1-2-0.dll :confused: can you help:thanx:
     
  17. Sleepy Eyes

    Sleepy Eyes Chieftain

    Joined:
    Feb 14, 2004
    Messages:
    53
    Location:
    Canada
    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?
     
  18. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    http://computing.kelkoo.co.uk/shopb...ftware&catId=117001&os=Win&title=Jasc&x=0&y=0

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

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
  20. Vuldacon

    Vuldacon Dedicated to Excellence Supporter

    Joined:
    Nov 14, 2001
    Messages:
    6,515
    Gender:
    Male
    Location:
    USA
    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
     

    Attached Files:

Share This Page