Announcement

Collapse
No announcement yet.

Fix Ugly Graying with SpritEd?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fix Ugly Graying with SpritEd?

    Mercator, it'd be nice to lighten up the civ color in the unit key. Did you confirm Draco's (ex-Draco, I forgot your current moniker) explanation in bold below, and can the darkening effect be changed with your editor? Even when all sprites have been removed from the Test of Time\Original directory, the effect remains, so in what sprite is the source of the darkening?

    Thanks

    From "Tribe Colours for Test of Time" by Cam Hills (SLeague)

    Adjusting tribe colours is a task that is relatively straightforward to fix. For scenario authors the amendment of tribe colours can add a visual twist to your game — adding a point of difference from the default colours. Even for those people who simply want to change the tribe colours for the default game, the solution is fairly simple.

    The relevant graphic that needs adjustment is the cities.bmp file — where in the bottom-left corner are the flag images.

    A. The second pixel along the top band of colour will change;[list=1][*]The colour of the font of the city names of a tribe.[/list=1]
    B. The second pixel along the bottom band of colour will change;[list=1][*]The colour of the box used to identify the city size (or city revolt),[*]The colour of the tribe in the diplomacy screen for dealings with tribe emissaries, and[*]In some cases, the colour used in the tribe's units' pictorials.[/list=1]
    C. However, a darkened version of this colour* is used as;[list=1][*]The colour of units' "shields" — being the octagonal marker left of a unit's health bar.[*]In some cases, the colour used in the tribe's units' pictorials.[/list=1]
    *At the time of writing this tip, there was no way known to overcome this darkening effect, however...

    Draco Omega writes;

    I know exactly what is causing the problem, the sprite file itself.

    Every pixel in a sprite file has a flag that tells if it is a team color pixel. Normal pixels are drawn with the exact color values in the file but team color pixels are handled a little differently.

    The set color values of the pixels are all shades of grey (the red, green and blue values are equal). To determine the color the pixel is drawn in, it first looks at the color ratio of the pixel on the bottom line in cities.bmp (as discussed in this article). For example, let us say the color in cities.bmp was Red 255 Blue 128 Green 0. This gives it a color ratio of 2:1:0. Now lets also say that the team color pixel was Red 64 Blue 64 Green 64. It converts this value to the same color ratio as the pixel in cities.bmp. In this case that would be Red 128 Blue 64 Green 0. Therefore the value of the pixel in the sprite file determines how bright the color is. This factor will be able to be customized as hoped when the Sprite Workshop is finished.
    El Aurens v2 Beta!

  • #2
    The civ color of units is part of their sprite files... That is, both their own UnitXX.spr (for the animated graphics) as well as their static images in Static.spr!

    When exporting a sprite, you'll get two bitmaps for each image. The mask (.msk.bmp) determines which pixels get shaded into their civ colour. The color of the matching pixel in the other of the two (.img.bmp) determines the actual shade.

    So yes, you can lighten the civ color. Use the mask to figure out which pixels are in civ color (you can use layers or masks in PSP for this). Then change the shade of those pixels in the .img.bmp image.

    In fact, if you have PSP, you can lighten the colors very easily:
    1. Open both the mask and the image.
    2. Add the mask as a new top layer to the image.
    3. Change the Layer Blend Mode of the mask to Lighten
    4. Adjust the mask layer opacity to get the result you want.
    5. Save the image (you'll probably get a warning message that bitmaps don't support layers or so, just click OK).
    Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

    Comment


    • #3
      Thanx! I'll give it a shot. Too poor at present, though, to buy PSP.
      El Aurens v2 Beta!

      Comment


      • #4
        I have a strong feeling everyone around here is, although everyone has it.
        You can always try the shareware version, unless you've already exceded its 30 day limit, of course.

        You could always try The GIMP (a free advanced graphics editor, like PSP or Photoshop, originally developed for UNIX, but also available for Windows), but they've tried their best at making it as incomprehensible as possible. I could barely find Windows downloads.
        Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

        Comment


        • #5
          You can always try the shareware version, unless you've already exceded its 30 day limit, of course.

          At this point, you can remember that Windows allows you to travel in time by double-clicking on the system clock.
          Blog | Civ2 Scenario League | leo.petr at gmail.com

          Comment


          • #6
            Of course, but then you'd be breaking the law, wouldn't you? So if you're breaking the law anyway, you can just as well download a crack or full unlimited version.
            Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

            Comment


            • #7
              Umm...Okay, I can export images and masks from sprite files. I think I understand the masks.

              BUT...
              Where is the mask that lies over the unit key?
              Last edited by Boco; June 11, 2003, 00:13.
              El Aurens v2 Beta!

              Comment


              • #8
                Use the mask to figure out which pixels are in civ color (you can use layers or masks in PSP for this). Then change the shade of those pixels in the .img.bmp image.
                Does one of these pixels affect the shading in the unit key? Or is there another sprite lurking in Static.spr.
                El Aurens v2 Beta!

                Comment


                • #9
                  You mean the health bar/shield unit key thing? That's not masked at all. The magenta in the unit-key graphic in the units.bmp is replaced by the civ colour.

                  The unit key is not present in any sprite file. It can only be changed in the units bitmap.
                  Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                  Comment


                  • #10
                    Rats! The 255,0,255 in the unit key is shown as a Team Color that Draco/Zarion describes above.

                    I'm getting a little redundant on this thread. If you want to continue just on the other one (Getting rid of the health bar!), that's fine with me.
                    El Aurens v2 Beta!

                    Comment

                    Working...
                    X