Go Back   EQEmulator Home > EQEmulator Forums > Archives > OpenEQ > OpenEQ::Development

OpenEQ::Development Development discussion for OpenEQ. Do not post for support.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-28-2004, 07:14 PM
jbb
Hill Giant
 
Join Date: Mar 2003
Location: UK
Posts: 242
Default Looking for more zone format information

I'm trying to draw placeable objects over the basic terrain mesh.
I can load and draw the models from a EQG file without too much problem, and I've figured out from the ZON resource in the EQG file where to draw them, but I can't seen to work out which model to draw at each point.

Has anyone worked this out yet?
Reply With Quote
  #2  
Old 09-30-2004, 11:18 AM
daeken_bb
Discordant
 
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
Default

I worked on it a bit and still haven't figured it out... I'll let you know if I figure anything out.
__________________
Keep me unemployed and working on OpenEQ, PM me about donating

Check out my deviantART page at http://daeken.deviantart.com/
Reply With Quote
  #3  
Old 09-30-2004, 06:48 PM
jbb
Hill Giant
 
Join Date: Mar 2003
Location: UK
Posts: 242
Default

I found some more information on .ZON files.
I have to go to work now so this is just a quick post, I'll write it up properly later.

There is a 28byte/7 long header.
7 longs (a, b, c, d, e, f, g)
a is a magic number
b is always 1
c seems to be the length of the name table
d seems to be the number of 4 byte entries in an unidentified table follwoing the names
e seems to be the number of placable objects in the ZON file

Next is a model name table which consists of a whole lot of null terminated strings in the form



name, name, name, name.MOD
Where the names are one or more internal names for the model file name which follows.

Then there is a section which I've not identified.
And then the objects which are a big array of

struct Object
{
long id; // Not sure how to use this
long model_name;
float x, y, z; // World coordinates of object
float r1, r2, r2; // Rotations about the 3 axis
float scale; // Multiplier of the scale of the object
}

If the 28 byte header is longs a, b, c, d, e, f, g etc. you can find this table by going to location c + d * 4 + 28 in the file. I think "c" is the size of the string table and "d" is the number of 4 byte entries which preceed the objects in the ZON file. "e" is the number of entries in the object table.

The model_name long in the objects is an offset into the string table, so add 28 to the start of the ZON file and use it as an offset from there. This is a pointer into the name table at the start to the "name" of the model to put in the world at that point.


After the objects is another table, something to do with lighting I think but I've not really looked at that yet.

My wireframe render in another posting seems to work with the objects where I expect so I think this is basically right.
Reply With Quote
  #4  
Old 09-30-2004, 10:27 PM
daeken_bb
Discordant
 
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
Default

Wow, nice work man

I'll work on implimenting placeable objects into OpenEQ tonight
__________________
Keep me unemployed and working on OpenEQ, PM me about donating

Check out my deviantART page at http://daeken.deviantart.com/
Reply With Quote
  #5  
Old 10-01-2004, 07:22 AM
DeletedUser
Fire Beetle
 
Join Date: Sep 2002
Posts: 0
Default

As you can see in the screenshot it's partly working.
The palm trees look about right. The other trees have semi-transparent textures which I don't yet render properly so probably would be right. On the other hand there is a strange blob above the towers which looks very wrong.

I guess I'll have to load up EQ live and go take a look what's really there and try to figure out what is wrong.

Reply With Quote
  #6  
Old 10-01-2004, 08:11 AM
jbb
Hill Giant
 
Join Date: Mar 2003
Location: UK
Posts: 242
Default

Also, TER files and MOD files seem to have the same format. The TER file is just the model for the basic terrain. In all the ZON files I've seen the TER file is the first entry in the objects list, so you don't have to load the terrain and the objects separately. Although the x, y, z coordinates of the objects seem to be relative to those of the first entry for the TER file. I don't know if that is just a special case or if there is some way to tell that the location of an object is relative to another one rather than absolute coordinates.
Reply With Quote
  #7  
Old 10-01-2004, 08:42 AM
jbb
Hill Giant
 
Join Date: Mar 2003
Location: UK
Posts: 242
Default

I think I'm getting there.
Anguish looks a lot more impressive with the objects :-



Although looking at these statues by the door I'm missing some polygons still.



But the door object fits in it's hole perfectly here so the positioning and scaling looks right anyway

Reply With Quote
  #8  
Old 10-01-2004, 08:56 AM
daeken_bb
Discordant
 
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
Default

Actually, I've seen the TER file be listed far into the ZON file. I don't remember which zone it was, but it has happened. Might be something to look into.
__________________
Keep me unemployed and working on OpenEQ, PM me about donating

Check out my deviantART page at http://daeken.deviantart.com/
Reply With Quote
Reply


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 Off

Forum Jump

   

All times are GMT -4. The time now is 05:53 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3