Galactic Civilization

Downloads
Metaverse
NewsGroup
Community
Purchase
Galactic Forum
Strategies
Mods
Empires
Do you still think GalCiv 1 is fun even with GalCiv II out?
758 votes
1- Yes
2- No


Ship encoder available
  Search:   
Go to Bottom         Go to Bottom
#25  by Veteran RustyBlade - 5/4/2003 5:35:26 PM

Anybody know if Atrocities Stellar Frontier ships will be ported?! Fantastic ships.

        
#26  by Citizen MadMaz - 6/4/2003 3:09:41 AM

Well, I guess since there have been no updates, no feedback and no real ship mods released, I guess people aren't using the tool very much Hopefully, I'm wrong and new mods are about to pop up all over the place.

Well, I've been experimenting a bit and have had a lot of crashing problems. I've finally isolated it the problem. Either the game or, more likely, mutil has a problem when generating mdl files whose name ends in a number. So, dnot.mdl is OK, but dnot13.mdl is not. The debug file of the game says it cannot find the minor model (35dnot13) when the mdl ends in a number. aargh! This was extremely annoying to track down. The actual file name doesn't seem to matter as I was able to change it afterwards without any problems.

In a related question, am I right when saying that the model name provided to the game is based on the string entered in the library name field, not the string in the individual fields, or the filename for that matter. So, if the output string is dnot.dml while all the race model strings are 0dnot13, 1dnot13, etc., the game will see a dnot model for all the races, not a dnot13. At least that's what I think was happening, when trying to figure out those errors. So, is that right?

And, if possible, please add cut & paste capability. If you want to replace all the ships, you'd need to enter 184 nearly identical strings. I don't mind bare bones, but this is more like jumping through unnecessary and very high hoops. Or perhaps just do a command line version and users can make our own batch files.

                
#27  by Citizen MadMaz - 6/4/2003 4:39:00 AM

I don't think what I said above about the name ending with numbers is accurate. The documentation seemed to suggest that the mdl name does not have to be the same as the source tga files. But I think now that they do have to be identical. All the ones that weren't identical crashed for me. That's probably the real problem I was having.

But I'm still getting some very strange results. I can take the exact same files, rename them, and then regenerate an mdl that is much larger than the first. Both seem to work. Cari, can you tell me more about any naming constraints and why I may be getting these strange results?

                
#28  by Veteran obbana - 6/17/2003 7:39:30 AM

I have a problem/question..
just started to try this program...
it's very useful, but how do i change the .mdl files to .ship-files..
And.. What's the use for .bak-file

--thanks..


      
#29  by Citizen MadMaz - 6/17/2003 11:02:24 AM

.ship files are text files that define the characteristics of a ship, like attack, hit points, name, description, etc, while .mdl files contain the graphics. So, you don't convert between them. You need them both.

.bak files are just backup files

                
#30  by Veteran obbana - 6/17/2003 11:33:53 AM

AH! THANK U SO MUCH!
now i may start creating some ships...

      
#31  by Diplomat HawaiiFive-O - 6/17/2003 11:41:03 AM

Excellent! We need more ship models.

Thanks for your work!



                     Posted via Stardock Central
#32  by Veteran Dark Rain - 6/18/2003 4:48:12 PM

Hello, I just got GalCiv and I already want to write some tools (it's my hobby hehe). I know that you dont have the .mdl format written down but can you give us some hints? I'm really slow/not very good at reverse engineering a file format, I've reverse engineered 6 of them max in my life and it's often been a frustrating experience

If you can help, I was wondering how are they stored in the mdl? From what I gather, the sprites are stored in the file but how are they stored? Is it a raw bitmap, is it a paletted bitmap? Is the palette in the .mdl file? Is there some form of compression?

As for rotating the model, I guess it depends on your graphic know how but for myself, I'd just slap the texture onto a quad in OpenGL an rotate it ^_^. Oh better, I'd use DevIL, i'm sure there's a rotation function in there somewhere and it doesnt require any 3d knowledge.

Visual Designs : http://www.tauniverse.com/visual-ta/HTML/index.html Link

          
#33  by Veteran Dark Rain - 6/18/2003 5:11:23 PM

MMmm are you using Sybase to save those files? Just wondering because there's a couple of references to "LIBBLK" in the file and it looks like it's a dll related to sybase (googled for it).

          
#34  by Citizen MadMaz - 6/18/2003 5:14:52 PM

You know being slow at reverse engineering is pretty fast from the perspective of people who don't do it at all.

If you wanted to reverse engineer a format, I think the mtd files would be more useful, since there already a serviceable utility for mdl files.

In short, I think mtd files are a more general format than the mdl files. Each mtd file, or library as they call it, can contain any number of four types of component "books": palettes, sprites, incl (?) and Tile (?). I've seen this much just in passing, but if you do a search on "pear tree library" you can find the home page of the guy who originally wrote the stuff.

                
#35  by Citizen MadMaz - 6/18/2003 5:19:58 PM

Are you adressing me? If so, I haven't used Sybase for anything.

                
#36  by Veteran Dark Rain - 6/18/2003 5:35:24 PM

mmm are you sure it's pear tree library? Its actualy a physical place so google isnt very helpful but I've gone through a lot of them and they dont seem to be computer related.

On another note, you're right, the mtd and mdl file format do seem related from a quick glance at the headers in a hex editor.

About Sybase : well I just said that because in the mdl file there's a reference to libblk and it's a sybase dll apparently but after having checked out more files it doesnt seem to be consistent so I imagine it's something else.
[Message Edited]

          
#37  by Senator CariElf - 6/18/2003 6:08:26 PM

The mtd and mdl formats are very similar; they both contain sprites.  The mdls contain animated sprites and the mtds contain non animated sprites. There are also the .tiles files which contain tiles and tile sprites.  Really, though, we could call them anything we want; these are just convenient.  We call these file libraries, and the libraries contain books. 



        
#38  by Citizen MadMaz - 6/18/2003 7:40:46 PM

mmm are you sure it's pear tree library? Its actualy a physical place so google isnt very helpful but I've gone through a lot of them and they dont seem to be computer related.


Oops, I don't know why I added the whole tree business. It was just pear library, which, btw, he says is the basis for Galactic Civilizations 3! Man, he really must be in the know Here's the page I saw: http://www.ionet.net/~mduffy/Resume.html Link

The mtd and mdl formats are very similar; they both contain sprites. The mdls contain animated sprites and the mtds contain non animated sprites. There are also the .tiles files which contain tiles and tile sprites. Really, though, we could call them anything we want; these are just convenient. We call these file libraries, and the libraries contain books.


There you have it, straight from the source's mouth. It sounds like you may be one pretty please away from getting some byte offsets.

                
#39  by Senator CariElf - 6/19/2003 11:49:08 AM

hehehe. I have to figure out the byte offsets myself.  I was going to post the formats for the library and sprite headers, but I wanted to make sure that I had the format correct before posting it.

        
#40  by Senator CariElf - 6/19/2003 11:52:33 AM

Well, I think that by Galactic Civilizations 3 he means this current Galactic Civilizations.  There were 2 versions oif GC for OS/2, the IBM operating system.

        
#41  by Veteran Dark Rain - 6/19/2003 5:15:12 PM

Thanks CariElf, I'll look into it when I get home tonight.

Mmmm I looked at the website and I dont think there's anyway I can download it or check the file format. Maybe email him and ask for it but since he licenced it to stardock it might not be legal. I think?

          
#42  by Veteran Dark Rain - 6/19/2003 8:46:47 PM

Well here's what I found out so far, I'm attacking the pixel data right now : http://www.tauniverse.com/visual-ta/Downloads/GalCiv/gc-mdl-fmt.txt Link


-----------------------------
Visual Designs : http://www.tauniverse.com/visual-ta/ Link
[Message Edited]

          
#43  by Diplomat HawaiiFive-O - 6/19/2003 11:06:00 PM

Very interesting, good luck on your project.

Parsing hex files != fun.



                     Posted via Stardock Central
#44  by Veteran Dark Rain - 6/19/2003 11:39:13 PM

Tell me about it

I'm doing some progress with the sprite book, I've identified some of it's structure but I havent pinpointed the pixel data yet ;(. I had hoped it was only a simple 64x2046 raw bitmap sprite for a ship (wishful thinking) but it's more complicated than that. Each frame is a different image and each image has a x, y offset along with a size. Add to that, that some form of SPR1 use compression and I haven't even found what is the compression flag.

Anyway, back to work!

          
#45  by Veteran Dark Rain - 6/20/2003 2:57:01 AM

I've updated the file a bit, still have to understand quite a bit of stuff. I'm going to bed for now. I'm too tired to find out more
[Message Edited]

          
#46  by Citizen MadMaz - 6/20/2003 3:23:35 AM

If you wanted to, you could wait until Cari feels comfortable posting those header files and probably avoid some of the work you're doing. Or better yet, if she could get the go ahead to post a few select functions from mutil, you'd be set

                
#47  by Veteran Dark Rain - 6/20/2003 3:27:10 AM

Yeah but it's my hobby, it's fun in a twisted kind of way ^_^

          
#48  by Veteran Dark Rain - 6/20/2003 11:19:14 AM

Alright, I've updated it again. I only have to decode the pixel data now. I think I've found out most of the other useful stuff. Sure there's still some unknown but I dont think it should prevent me from reading SPR1 books.

File Format : http://www.tauniverse.com/visual-ta/Downloads/GalCiv/gc-mdl-fmt.txt Link

Also, it might be interesting to note that the mdl, mtd, tiles etc all have the same file format, so no work lost there ^_^.
[Message Edited]

          
#49  by Citizen MadMaz - 6/20/2003 5:16:34 PM

I just checked out your results document. Impressive sleuthing, Dark Rain!

In terms of decoding the pixel data, I don't know if this matters, but I thought I'd mention it. All the graphics I've encoded into the pear format have included an alpha channel. Although I don't know how this is typically encoded, I couldn't see how it would fit in with the specs you have so far.

btw, I don't think the alpha data is translated into a transparency value or anything like that, since my first iteration of ships seemed to have partial transparency effect. I was trying to make a glowing colored halo to indicate what kind of aliens they're from, but, when you manually scrolled around the map, if the ship went over some of the colored parts of the nebula background, the halo would partially change color. This of course defeating its purpose and I had to redo the ships. Anyway, what I was trying to say is that it appears to retain the real alpha channel data. I'm not sure if it's relevent, but just in case...

btw, great (and fast) work so far

                
<<   <-   1 (2) 3   ->   >> 
   Page 2 of 3   

Go to Top    Go Back to Message Board    Go to Top
To be able to post something you have to become a member
Click here!



Copyright 1995-2026 Stardock Corporation. All rights reservered.
Site created by Pixtudio and Stardock, designed by Pixtudio.