February 2, 2003, 02:18
|
#1
|
King
Local Time: 15:34
Local Date: November 1, 2010
Join Date: Apr 2000
Location: Scenario League
Posts: 1,350
|
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.
|
|
|
|
February 2, 2003, 02:23
|
#2
|
Emperor
Local Time: 11:34
Local Date: November 1, 2010
Join Date: Dec 1969
Location: Baltimore, MD
Posts: 4,325
|
use civ2gfx or a hex editor
|
|
|
|
February 2, 2003, 02:35
|
#3
|
King
Local Time: 10:34
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
|
Rune Berge wrote the utility to extract/insert GIF files. Can be found here: http://coc.apolyton.net/utilities/gifxtractor3.zip. From his readme:
Quote:
|
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?
|
|
|
|
February 2, 2003, 08:48
|
#4
|
Emperor
Local Time: 17:34
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
I think DarthVeda meant the same thing.
But if it's for ToT (or MGE), you can use this:
http://www.users.on.net/johnson/resourcehacker/
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 at 12:41.
|
|
|
|
February 2, 2003, 12:11
|
#5
|
King
Local Time: 15:34
Local Date: November 1, 2010
Join Date: Apr 2000
Location: Scenario League
Posts: 1,350
|
I'm going to be using this for MGE, so does that mean I should use GifXtractor or Resource Hacker?
|
|
|
|
February 2, 2003, 12:38
|
#6
|
Emperor
Local Time: 17:34
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
Resource Hacker
|
|
|
|
February 4, 2003, 19:06
|
#7
|
King
Local Time: 15:34
Local Date: November 1, 2010
Join Date: Apr 2000
Location: Scenario League
Posts: 1,350
|
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?
|
|
|
|
February 4, 2003, 22:06
|
#8
|
King
Local Time: 10:34
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
|
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
|
|
|
|
February 5, 2003, 08:29
|
#9
|
Emperor
Local Time: 17:34
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
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.
|
|
|
|
February 5, 2003, 22:04
|
#10
|
King
Local Time: 10:34
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
|
Oops, I was careless! Didn't read the tree closely, and entered "GIF" by mistake. Thanks for the help, Merc!
|
|
|
|
February 5, 2003, 22:43
|
#11
|
King
Local Time: 10:34
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
|
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.
|
|
|
|
February 8, 2003, 14:26
|
#12
|
Emperor
Local Time: 17:34
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
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?
|
|
|
|
February 9, 2003, 08:48
|
#13
|
Prince
Local Time: 15:34
Local Date: November 1, 2010
Join Date: Oct 1999
Location: tampere,FINLAND
Posts: 550
|
Some what?
|
|
|
|
February 9, 2003, 16:17
|
#14
|
King
Local Time: 10:34
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
|
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?
|
|
|
|
February 9, 2003, 21:02
|
#15
|
King
Local Time: 10:34
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
|
PSP7 works well.
|
|
|
|
February 10, 2003, 01:48
|
#16
|
Emperor
Local Time: 09:34
Local Date: November 1, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
|
PSP 5.01
|
|
|
|
February 10, 2003, 13:03
|
#17
|
Emperor
Local Time: 17:34
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
|
PSP7... I just tried it with PSP3 too, and compared the files. Somehow PSP3 puts an extra 8 bytes after the palette, that's the only difference (but it really does crash).
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 11:34.
|
|