Announcement

Collapse
No announcement yet.

Editing Freeciv graphics the easy way

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

  • Editing Freeciv graphics the easy way

    A quickguide for windows users: Editing Freeciv graphics the easy way


    Anyway who has tried out Freeciv might have also taken a look at the graphic files lcoated in the data directory. There you'll find various tilesets. They do share one thing : they're all saved in the P(ortable) N(etwork) G(raphics) PNG format.


    So can I edit and change the graphics? Yes, as easy as you can with the original Civ2 graphics. As long as you have a graphic editor which can load& save PNG you shouldn't have much problems. In the following screens I'll show how easily it can be done with an old version of PSP. But any modern graphic editor will do.


    Step 1: Choose your subject and load the original Freeciv graphic file

    I never was a personal fan of the gold and iron resource squares in Tim Smith's Hires set so that's where we'll start. Let's open up terrain1.png in the /data/hires directory. For pageloading convenience I've converted the PNG to JPG for now.
    Attached Files
    6
    Yes
    50.00%
    3
    Don't know
    0.00%
    0
    No
    0.00%
    0
    It needs a banana!
    50.00%
    3
    Last edited by CapTVK; April 29, 2002, 17:38.
    Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

    Elie A. Shneour Skeptical Inquirer

  • #2
    Step2: Check the palette transparency

    Just like graphic GIF files, PNG has an option for setting the background colour to transparent. In the case of Civ2 it's a curious pink colour that serves as the background. Freeciv uses standard black as the transparent background colour.
    In PSP you can turn off the background colour with the option view palette transparency in the colors menu. Let's see how terrain1.png looks without the black background:
    Attached Files
    Last edited by CapTVK; April 29, 2002, 17:43.
    Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

    Elie A. Shneour Skeptical Inquirer

    Comment


    • #3
      Step3: Understanding Transparency


      Wait a minute! If the background colour is black and has now been made invisible. Does that mean I can't use black in my own graphics!? If so, why can still see that large black rectangle on the screen?

      There's a good question which you have already answered yourself:
      There are several types of black, and only one type can be made transparent. Standard black has the values R=0 G=0 B=0 I=0 If you use the eye dropper and move over the black rectangle you'll see it has a differing value: R=0 G=0 B=0 I=192. It isn't the same! That's the reason why this black rectangle still shows up. As long as you a slightly different type of black your're okay*

      (*unless you WANT your units to be invisible in the game, a trick that sometimes is used by scenario makers )
      Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

      Elie A. Shneour Skeptical Inquirer

      Comment


      • #4
        Step4: Changing and editing graphics

        Now that we understand transparency, we'll get to the nitty gritty: editing. I'll presume you understand standard editing and how cut and paste works. Looks closely at the picture below and you'll see I've already changed the Freeciv gold resource square to the standard Civ2. That just leaves the Freeciv iron square circled in red. Looks a bit like a spearpoint doesn't it? Well, I prefer the standard Civ2 one so let's load up the terrain1.gif from the original Civ2
        Attached Files
        Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

        Elie A. Shneour Skeptical Inquirer

        Comment


        • #5
          Step 5 Copy and Paste


          First we'll copy& paste the Civ2 iron resource square and save it as a file
          Attached Files
          Last edited by CapTVK; April 29, 2002, 17:42.
          Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

          Elie A. Shneour Skeptical Inquirer

          Comment


          • #6
            step 6 Editing and settings transparency


            Now we'll remove the pink and gray and replace it with the standard black colour and set the background colour (once again R=0 G=0 B=0 I=0) to transparent. After that we make the background invisible The end result will look like this:
            Attached Files
            Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

            Elie A. Shneour Skeptical Inquirer

            Comment


            • #7
              step7: Pasting in the new graphics


              Now that the transparency has been set we can copy&paste it into the Freeciv terrain1.png. I've included the green line to make it easier to line up the square over the old one.

              (Just a tad more to the left.... )
              Attached Files
              Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

              Elie A. Shneour Skeptical Inquirer

              Comment


              • #8
                Step8: Tidying up

                Everything seems okay so let's deactivate the view palette transparency-option in the colors menu and see the results (in JPG format):
                Attached Files
                Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

                Elie A. Shneour Skeptical Inquirer

                Comment


                • #9
                  step9 Conclusion and suggestions

                  In this guide you learned how easy it is to change the graphics in Freeciv for windows. You can edit all the Freeciv graphic files in the same way as long as your graphic program supports PNG and know how to set the background to transparent.


                  As a final suggestion I would like to draw your attention to my plan to create a new set, named Apolyton , for Freeciv based on various tiles and units created by the Civ2 scenario makers. If anyone would like to donate some units or help out please contact me by email or via this forum.
                  Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

                  Elie A. Shneour Skeptical Inquirer

                  Comment


                  • #10
                    ooooooouuhhh...... great guide!
                    FreeCiv rulez!

                    Comment


                    • #11
                      Originally posted by Chaos Engine
                      ooooooouuhhh...... great guide!
                      Ehmm...thanks..but I've been busy coming up with something better!


                      WATCH THIS SPACE
                      Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

                      Elie A. Shneour Skeptical Inquirer

                      Comment


                      • #12
                        Nice guide! Now, if I only knew how to manipulate PNG transparency settings in Picture Publisher ...
                        I love the tick of the Geiger counter in the morning. It's the sound of... victory! :D
                        LoD - Owner/Webmaster of civ.org.pl
                        civ.org.pl's Discussion Forums and Multiplayer System for SMAC and Civs 2-4

                        Comment


                        • #13
                          Originally posted by LoD
                          Nice guide! Now, if I only knew how to manipulate PNG transparency settings in Picture Publisher ...

                          Isn't Picture Publisher more of a photo editor? I can imagine transparency settings buried away somewhere deep in the picture settings. You could try PaintShopPro (I still use the ancient version 5.0) or the open source graphic editor the GIMP (comparable in options to PSP but easier in direct use).
                          Skeptics should forego any thought of convincing the unconvinced that we hold the torch of truth illuminating the darkness. A more modest, realistic, and achievable goal is to encourage the idea that one may be mistaken. Doubt is humbling and constructive; it leads to rational thought in weighing alternatives and fully reexamining options, and it opens unlimited vistas.

                          Elie A. Shneour Skeptical Inquirer

                          Comment


                          • #14
                            Yes, PP's more suited for photoediting, but usually I get away with using it for more, err, 'designer' ends. It has transparency controls for the GIF, but none for PNG as it seems. I'll have to try GIMP I think. Thanks for the reply.
                            I love the tick of the Geiger counter in the morning. It's the sound of... victory! :D
                            LoD - Owner/Webmaster of civ.org.pl
                            civ.org.pl's Discussion Forums and Multiplayer System for SMAC and Civs 2-4

                            Comment


                            • #15
                              I have tried GIMP but I can't seem to get it going. Everything seems fine until I load an image (eg, Civ2 units.gif) and I get an error saying it can't load the brush type (click OK then ctd). Unfortunately, the help provided on Tor Lillquist's page seems more geared toward unix users.
                              (\__/) Save a bunny, eat more Smurf!
                              (='.'=) Sponsored by the National Smurfmeat Council
                              (")_(") Smurf, the original blue meat! © 1999, patent pending, ® and ™ (except that "Smurf" bit)

                              Comment

                              Working...
                              X