Announcement

Collapse
No announcement yet.

The Rocky Mountain Civilization II Site Presents: Editing UNITS.GIF Using PSP

Collapse
X
Collapse
  •  

  • The Rocky Mountain Civilization II Site Presents: Editing UNITS.GIF Using PSP

    INTRODUCTION

    There are so many questions and problems out there about editing gif files in Civ II, I finally decided I’d try and write a basic “How To” Tip. I’ll go over some basic principles, then end up with a step by step example. This tip will not make you a good artist.

    UNITS.GIF

    There are several gif files in Civ II, all of which can be edited. UNITS.GIF gets the most attention. It is the file that stores the images (pictures) for all of the units displayed in Civ II. It is directly related to the description of each unit and its characteristics found in RULES.TXT. The units also use specific sound files (.WAV files) found in the SOUND directory of Civ II (or one of the scenario directories if you have the Scenario CD). Changing the units in Civ II’s UNITS.GIF without understanding these relationships will not produce the desired results.

    The UNITS.GIF file provided by Microprose gives some important hints on editing the file at the bottom of the file itself. These include the following:

    TRANSPARANCY

    A gif formatted file allows certain colors in the color pallett to be defined as transparent. This means, those colors do not appear when the “picture” represented by the gif is placed in a file and used. Instead, whatever is already in the background appears where those colors would have been. In Civ II, the last three colors of the color pallett are the colors defined as transparent. This is hard coded. You can change the pallett when editing a unit, but you must insure that the last three colors are the ones used in the “transparent” areas of the unit. Civ II is hard coded to find the units in the particular locations that are represented in the file, UNITS.GIF, where they are surrounded by the “green” boxes.

    LOCATION

    Microprose uses two of the transparent colors to surround each unit in such a way as to show a “diamond” for the units position. You can not violate the lower part of this diamond. (The darker, purplish color at the bottom of the units in the stock UNITS.GIF). It does not matter if only one of the “transparent” colors are used to surround the unit (you will see this in some UNITS.GIF files from the net. It is just easier to make out the diamond if two of the transparent colors are used. Again, you can not create a unit that extends below the diamond, if you do, strange things happen.

    PSP USAGE

    Paint shop pro is an excellent, shareware tool for editing gifs. IN working with Civ II, it has one major limitation. That is that it places a control block in the gif file if you do a “Save As”. Civ II vomits when it hits this control block. You will get an error message. If you ingnore it about 12-15 times (or so), you will ultimately get into the game, but you will not see any units. You can avoid this by simply copying the original (or good) UNITS.GIF (or other gif file) to the location you want it BEFORE editing using File Manager. Then, when you are done editing, use the “Save” command. Then PSP saves it as it was.

    There are many tools in PSP for editing. Basically, you pick the foreground color you want to edit in (from the strip menu) and then use the pencil, the line, the fill, the spray, etc. to work in that color. We find the “fence” and the “lasso” extremely useful for copying and moving portions of one picture to another area for editing. You fence around, or lasso around, an area, then copy (from the “Edit” menu).
    Then you can experiment with the various paste options (New Selection, Inot Selection, etc.).

    EXAMPLE

    Here’s a simple example of editing UNITS.GIF for any scenario for the scenario CD. If you do not have the scenario CD, then you’ll have to end up moving your original UNITS.GIF file to a safe place and editing in the UNITS.GIF in the main level Civ II directory. You can use the same directions, although it will be different units you edit.
    1. Using file manager, make a copy of the UNITS.GIF file in the ALIEN directory under the SCENARIO directory. Call the new copy OLDUNITS.GIF.
    2. Go into PSP and open the UNITS.GIF file in the ALIEN directory under the SCENARIO directory.
    3. Under the “View” command, zoom in to 6:1.
    4. Pan to the lower right corner of th file, where you will see a heavy truck with a beam weapon mounted on the back. Using the fence tool, make a fence around this truck, fencing in the entire area all the way to just on the outside of the green border.
    5. Under the edit command, execute the “Copy” command.
    6. Now, pan up in the file to the FRAAG (I believe) vehicle which is also on the far right, but the scond row from the top.
    7. Use the “Edit” command and pick the “Paste” option, and “Paste as new selection”. The image you copied will come up in a fenced view. Move this image until it overlays the FRAAG vehicle perfectly (with the green lines lining up) and then click. (If you make a mistake and are off, then hit the undo option under edit and attempt the paste again.
    8. Go to the “File” menu and “Save” the file
    9. Exit the file.
    10. Play the ALIEN scenario. When a FRAAG vehicle is developed (or for any already in the game), you will now see the new picture you put in its place.
    These steps can be experimented with until you get good at it. For example, you could edit the truck before copying by using one of the other tools and some different colors. Then copy it. If you mess up, then rename the OLDUNITS.GIF back to UNITS.GIF and you lost nothing.

    Hope this helps.

    Jeff Head
    The Rocky Mountian Civ II Site
    http://www.nebonet.com/headhome/jeffciv2/index.html
    jeffh at nebonet.com

      Posting comments is disabled.

    Article Tags

    Collapse

    Latest Articles

    Collapse

    • The Rocky Mountain Civilization II Site presents: Mod Packs, Scenarios, Units, Hints and Tips
      by Martin Gühmann

      The Rocky Mountain Civilization II Site presents:

      Mod Packs, Scenarios, Units, Hints and Tips provided by our site are SHAREWARE
      This means that you are free to look at them, download them, use them, abuse them, etc. If you like ours, and they are of benefit to you, we ask that you consider sending us the following to offset the site subscription, email, counter, etc. costs, so we can continue providing all of this to Civ II enthusiasts around the world:
      Our Hints & Tips that help ......................... $ 1.00 (US)
      Our Scenarios you like ............................... $ 1.50 (US)
      Our Mod Packs you like ............................. $ 2.00 (US)
      *The Rocky Mountain Civilization II Site
      P.O. Box 295
      Nephi, UT 84648
      Thanks for your consideration.

      HINT or TIP : Microprose Scenario CD Impact

      Regarding the new Civ II Scenario CD by Micropprose and it's impact on Mod Packs. They have done some really good things that I will summarize below:

      a) They have included a number of very good scenarios, each of which is a virtual Mod Pack of its own. They have made switching between the scenarios, and all of the respective mods for each, very easy. They did this by establishing a SCENARIO sub-directory under the main Civ II directory which contains each scenario as another sub-directory. Within the sub-directory for each scenario are all of the .GIF and .TXT files for the mod, and a SOUND sub-directory whcih includes any new .WAV files. The Civ II program uses the mods in the sub-directory under SCENARIO when you start up a scenario or saved game from that sub-directory.

      b) The Civ II program now returns to the main, start-up menu whenever you quit, win or resign from a game. No more restaring the program each time you stop playing.

      c) They have created a nice macro language for creating conditional events within your scenarios. The conditional (IF, THEN) statements are included in an "event.txt" file for each scenario sub-directory and are then executed during the game according to the conditional statements in the "event.txt" file. For example, one could cuase any civilization to have its treasury increaded by X amount according to conditional happenings in the game; or, you can create new units for any civilization according to conditions you establish; or, you could have certain units move to various places on the map based on conditional statements at some point in the game; or, you could play a special .WAV file based on conditions, etc., etc..

      The net effect of this has been to force players to make one of two decisions

      1) You can take your existing Mods under MODPACK created by the Mod Pack manager and move each sub-directory under SCENARIO. A sub-directory called SOUND will have to be created for each for any .WAV files. For example, for a Mod Pack called "MoreReal", you would end up with:

      c:\civ2\scenario\morereal\sound

      .WAV Mod files for MoreReal go into "sound" directory of path above. .TXT and .GIF Mods files for MoreReal go into "morereal" directory of path above.

      2) You can load the new scenarios into a temporary place on disk, and then move the scenario sub- directories that come with the CD under your Mod Pack directory, doing away with the SOUND sub- directory for each and loading the .WAV files into the respective Mod Pack directory. This will allow you to use your current operation with Mod Pack manager, and the GAME.TXT and LABELS.TXT modifications for each Mod Pack.

      I opted for the first option. Changing between Mod Packs is much faster, and I've got the best of both worlds. All of the Mod Packs I've accumulated work, and I have the new stuff. Hope this helps.

      IMPORTANT

      Specific changes to GAME.TXT and LABELS.TXT files for each Mod Pack are rendered obsolete by the new civ2.exe. This is because these files have changed to accomodate the new functionality in Civ II, and the program does not use any GAME.TXT or LABELS.TXT files in the SCENARIO sub-directories. So, you'll have to change them once for your own general environment and put them in the main civ2 directory, then risk having to update them with any new releases.

      ...
      September 3, 2012, 18:01
    • Civilization II SAV/SCN file format
      by Mercator
      PrologueThis thread is intended to become a reference guide to the Civilization II savegame and scenario file format. It is a vital first step if we ever want to see a universal civ2 scenario editor. I started this thread to make it a more public and centralized effort, as opposed to Allard's Hex Editing document. While being an indispensable initiative, I believe it's become almost unmanageable. There never was one central place to post new discoveries, making it impossible to keep up to date.But for this new effort to succeed, we need your help. So, please post your discoveries about the file format here.However, this is mostly meant to be a raw file format reference, not (yet) a complete guide to how every single byte can be used in making your scenarios. When you do have a new discovery, please keep it concise and to the point. But feel free to add comments or ask questions, as long as they're specifically about this reference, and not about hex-editing in general.Please do NOT ask your hex-editing questions here. If you have a question, post a new thread.As you will notice, apart from the table of contents the file format is still mostly uncompleted. That's not because we know so little, but simply because I haven't added all of it yet. This thread will probably always remain a work in progress. And for the moment certainly not only for the file format itself. I will also be adding notes on the notation and some of the terms used. Notes will follow right after the table of contents, including notes on the table of contents itself.Table of ContentsNotesCreditsFile FormatHeader (12)Settings (CiC:558, FW/MGE:572, ToT:1238)??? (ToT:640)Menu (16)Game (38)Technologies (200, CiC: 186)First to Discover (100, CiC:93)Discovered By (100, CiC:93)Wonders (56)??? (262, ToT:288)Civilizations (13118, ToT:28478)Names (7 * 242 = 1694)Properties (8 * 1428 = 11424, ToT: 8 * 3348 = 26784)Transporters (ToT10: 4 + 14 * transporters, ToT11: 172 + 14 * transporters)MapsHeader (14, ToT:16)Data, repeat for all maps in ToT (13 * surface, ToT: 13 * surface + 2)Visible Improvements (7 * surface)Map (6 * surface)Resource Seed (ToT:2)??? (2 * 6th header value * 7th header value)??? (1024, ToT:10240)Units (26 * units, MGE: 32 * units, ToT: 40 * units)Cities (84 * cities, MGE: 88 * cities, ToT: 92 * cities)???Passwords (MGE/ToT: 224)???Conquest History (338)EventsHeader (FW: 6, ToT: 8)Events (FW: 298 * events, ToT: 276 * events)String HeapNotesTable of ContentsLet me start off with some comments about the notational use in the table of contents. Due the differences between the various game versions, as well as the presence of variable-size sections I have refrained, and will refrain, from using file offsets. Instead, I indicate the size in bytes of all different parts of the file format. You should be able to calculate the exact position yourself.So, in parentheses is mentioned the size in bytes of that (sub-)section. Differences between the game versions are marked with their respective abbreviations:CiCCivilization II Scenarios: Conflicts in Civilization and all prior versions, including the original "classic" Civilization II v2.42.FWCivilization II: Fantastic WorldsMGECivilization II: Multiplayer Gold Edition with the latest patch version 1.3 and all equivalent versions, including Civilization II: Ultimate Classic Collection and the add-on Civilization II: MultiplayerToTCivilization II: Test of TimeToT10More specifically, the unpatched version of Test of Time, version 1.0ToT11Patched Test of Time v1.1A size unmarked by any abbreviation applies to all versions, with the possible exception of any marked sizes. E.g. Header (12) means the header is 12 bytes for all versions, Header (14, ToT:16) means the header is 14 bytes for all versions except Test of Time, for which it is 16 bytes. Passwords (MGE/ToT: 224) means this section only exists in the MGE and ToT versions, where it is 224 bytes.File FormatData TypesOnto the file format notes. So far, there are three data types: The null-terminated string is a variable length type for text. It always ends with a byte value of zero, meaning a string of 9 bytes only has place for at most 8 characters. The signed short integer is a numeric data type taking up 2 bytes. It can take values from -32768 to +32767. The unsigned byte should be self-explanatory. It takes values from 0 to 255.DescriptionIf the specific order of a section with multiple values is not specified, you can assume the order as used in the RULES.TXT. This applies, for instance, to the technology and wonder sections.HexadecimalsI mark hexadecimals with the prefix "0x". In this guide I write them in big-endian notation. In other words, in the same way you'd see them in your Windows calculator. However, in the binary file format, the numeric data types use a reverse, little-endian, notation with the least significant value first. The bytes appear in reverse order. E.g. for a short integer value, your hexadecimal calculator might say 27, ...
      June 12, 2012, 12:03
    • The Rocky Mountain Civilization II Site Presents: RULES.TXT Comments and Notes
      by Martin Gühmann
      ;------------------------------------------------------------------------------------------------------------- 
      ; The Rocky Mountain Civilization II Site 
      ;-------------------------------------------------------------------------------------------------------------- 
      ; 
      ;   RULES.TXT Comments and Notes 
      ; 
      ;    May 1997 by Jeff Head and the Rocky Mountain Civilization II Site 
      ; 
      ;	What follows are the notes and comments that I have made in my own rules.txt file
      ;	for the changes I make to Civ II when making a Mod Pack.  Some of it is the stock
      ;	notes that Microprose sent out with the game, a lot of it has been added to or
      ;	clarified based on my many “trial and error” experiences.
      ;
      ;	We release this as a help to those making Mods, not as an “end-all”. Although
      ;	these comments represent our general experiences, they could well be sub-sets
      ;	of the actual game operation and programming, meaning they may not work as
      ;	stated in all cases.
      ;-------------------------------------------------------------------------------------------------------------- ...
      	
      April 8, 2011, 17:30
    • Advanced Scenario Design in Civ2
      by Martin Gühmann

      Advanced Scenario Design

      Leon Marrick (Leon2M at aol.com), assisted by Harlan Thompson (harlant at hawaii.edu) and others.
      Please see Credits for details.

      This manual is designed to assist those with both a firm understanding of the map editor and of the Cheat menu used in preparing scenarios to improve and polish their work. Novices are urged to read some of the excellent documents for beginners found on the "Ultimate Civ2 Page" now Apolyton, and practice with a design or two before delving too deeply into this document.

      This is a long essay, but not even close to being comprehensive. Additions are welcomed.

      If you see a section referance - example "(Section 5a)" - that section of the document (in this case, the discussion of the rules.txt file's cosmic principles area) will have further information on the subject.
      ...
      March 26, 2011, 20:10
    • CITY IMPROVEMENTS, WONDERS and UNITS for only Certain Civ2 Civilizations
      by Martin Gühmann
      I have received a number of inquiries into changing Civ II to accomplish a number of things. One of the premier requests deals with a fairly advanced capability in the Mod Pack area. I will answer this in this file:
      ...
      March 25, 2011, 18:41
    • Civilization 2: A few words about ...
      by Martin Gühmann
      • 'Conflicts in Civilization', Microprose's Civ2 Scenario Disk
      • 'Evolution - The dawn of humanity', Actura's Civ2 Scenario Disk
      • 'Scenarios & Maps für CivilizationII', Tewi's Civ2 Scenario Disk
      • 'The official strategy guide', Prima's Book for Civ2
      ...
      March 25, 2011, 18:31
    Working...
    X