Announcement

Collapse
No announcement yet.

Editing DLL Files?

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

  • Editing DLL Files?

    Does anyone know how to open up and edit the GIF's located within the Civ2 DLL (dialog) files?

    I remember this being mentioned a long time ago as something that could be done. But as to how, i've no clue.

  • #2
    use civ2gfx or a hex editor

    Comment


    • #3
      Rune Berge wrote the utility to extract/insert GIF files. Can be found here: http://coc.apolyton.net/utilities/gifxtractor3.zip. From his readme:
      The program should be fairly easy to use. Use the File menu to open the dll you want to edit. Then use the Image menu to insert and extract GIFs. The GIFs you insert into the dlls must not exceed the maximum size (in bytes) specified in the listview on the left. Also, for the GIFs to work properly with Civ2 they must be saved with GIF version 87a, noninterlaced. They should also have the same dimensions and color palette as those they are replacing (though this is not always required).
      To keep the correct palette, it's best to paste the new image into an extracted GIF.

      Despite how straightforward it appears, I can't get the d**n thing to work on ToT DLL's. It's not the utility or the GIF file, though. When I sent the gif to Techumseh, he was able insert it without a glitch.

      Oops! Saw DV's comment just as I was previewing. Is Civ2Gfx better than GIF Xtractor?
      El Aurens v2 Beta!

      Comment


      • #4
        I think DarthVeda meant the same thing.
        But if it's for ToT (or MGE), you can use this:


        Resource Hacker is quite a bit more advanced (since it's a general resource editor, not just for civ2), but only works with 32-bit files (= MGE and ToT only). With Resource Hacker you also don't need to worry about keeping the filesize smaller, only the image dimensions and palette are your limitations.

        (edited for clarity)
        Last edited by Mercator; February 2, 2003, 12:41.
        Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

        Comment


        • #5
          I'm going to be using this for MGE, so does that mean I should use GifXtractor or Resource Hacker?

          Comment


          • #6
            Resource Hacker
            Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

            Comment


            • #7
              Thanks, Merc! You rule.

              One more question - When supporting edited DLL files in a scenario; will they work if placed in the scenarios sub-directory, or do they have to directly replace the existing files like a mod pack?

              Comment


              • #8
                I'm pretty sure that it needs to be in the program directory.

                Merc, now I'm inept with two resource editors. From the help file, it looks like I should treat the GIF's as 'other resource'. So when I select "Action|Replace Other Resource", I get the attached dialog. Can't figure out what to do next.

                Open file with new resource -> select new gif file?

                Resource Type -> GIF?

                Resource Name -> ? No clue, but nonzero alphanumeric string needed

                Resource Language -> ? More clueless, but it seems to be optional
                Attached Files
                El Aurens v2 Beta!

                Comment


                • #9
                  WarVoid: Thanks ... They must replace the existing ones (as Boco said). The DLLs were never meant to be editable, so they didn't bother adding the "flexibility" the regular text and image files have.

                  Boco: These values should "simply" match the 3 levels in the branch of the selected resource.

                  E.g. the spaceship "spine" (in SS.DLL) is located at GIFS > 400 > 1033, so for this resource, its type is GIFS, its name is 400, its language 1033.
                  Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                  Comment


                  • #10
                    Oops, I was careless! Didn't read the tree closely, and entered "GIF" by mistake. Thanks for the help, Merc!
                    El Aurens v2 Beta!

                    Comment


                    • #11
                      I was hoping to do this via PM, but can't figure out how to PM with a pic.

                      Why does the attached GIF show up as black rectangle if I substitute it into ToT's Intro.DLL (GIFS, 901, 1033). It's 89a noninterlaced (ToT crashes with 87a noninterlaced)? I think it has the right palette, but perhaps not. I made it by copying the image into an extracted gif (901, 1033) and saving it.
                      Attached Files
                      El Aurens v2 Beta!

                      Comment


                      • #12
                        The 87a noninterlaced version of that works fine for me (i.e. I converted the image you attached).

                        Maybe you accidentally chose interlaced? Does my attachment work?
                        Attached Files
                        Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                        Comment


                        • #13
                          Some what?

                          Comment


                          • #14
                            Somewhat (The guy's clairvoyant ). Your GIF works perfectly. When I opened it in PSP v311 and saved it as GIF87a noninterlaced, crash. At least I've identified the culprit. That could also explain my troubles with a title.gif. So much for that version of PSP. What are you using, Merc, Tech?
                            El Aurens v2 Beta!

                            Comment


                            • #15
                              PSP7 works well.
                              El Aurens v2 Beta!

                              Comment

                              Working...
                              X