Thread Tools
Old February 2, 2003, 02:18   #1
WarVoid
King
 
WarVoid's Avatar
 
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.
__________________
The Arabic CivII Site
WarVoid is offline  
Old February 2, 2003, 02:23   #2
DarthVeda
Emperor
 
DarthVeda's Avatar
 
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
DarthVeda is offline  
Old February 2, 2003, 02:35   #3
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
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?
Boco is offline  
Old February 2, 2003, 08:48   #4
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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)
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

Last edited by Mercator; February 2, 2003 at 12:41.
Mercator is offline  
Old February 2, 2003, 12:11   #5
WarVoid
King
 
WarVoid's Avatar
 
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?
__________________
The Arabic CivII Site
WarVoid is offline  
Old February 2, 2003, 12:38   #6
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 17:34
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
Resource Hacker
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old February 4, 2003, 19:06   #7
WarVoid
King
 
WarVoid's Avatar
 
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?
__________________
The Arabic CivII Site
WarVoid is offline  
Old February 4, 2003, 22:06   #8
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
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
Attached Thumbnails:
Click image for larger version

Name:	reshack.png
Views:	80
Size:	4.4 KB
ID:	35963  
Boco is offline  
Old February 5, 2003, 08:29   #9
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old February 5, 2003, 22:04   #10
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
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!
Boco is offline  
Old February 5, 2003, 22:43   #11
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
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.
Attached Thumbnails:
Click image for larger version

Name:	901n1033.gif
Views:	74
Size:	27.7 KB
ID:	36067  
Boco is offline  
Old February 8, 2003, 14:26   #12
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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?
Attached Thumbnails:
Click image for larger version

Name:	901new.gif
Views:	63
Size:	27.7 KB
ID:	36315  
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old February 9, 2003, 08:48   #13
ottok
Prince
 
ottok's Avatar
 
Local Time: 15:34
Local Date: November 1, 2010
Join Date: Oct 1999
Location: tampere,FINLAND
Posts: 550
Some what?
ottok is offline  
Old February 9, 2003, 16:17   #14
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
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?
Boco is offline  
Old February 9, 2003, 21:02   #15
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 10:34
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
PSP7 works well.
Boco is offline  
Old February 10, 2003, 01:48   #16
techumseh
Civilization II PBEMScenario League / Civ2-Creation
Emperor
 
techumseh's Avatar
 
Local Time: 09:34
Local Date: November 1, 2010
Join Date: Apr 1999
Location: of the frozen North.
Posts: 4,197
PSP 5.01
__________________
Tecumseh's Village, Home of Fine Civilization Scenarios

www.tecumseh.150m.com
techumseh is offline  
Old February 10, 2003, 13:03   #17
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
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).
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:34.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team