EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::News (https://www.eqemulator.org/forums/forumdisplay.php?f=594)
-   -   Some New Map Files (https://www.eqemulator.org/forums/showthread.php?t=22009)

fathernitwit 12-04-2006 02:48 AM

Some New Map Files
 
All,

I have posted some new map files to sourceforge for zones below. Unfortunately, the eqg loader from openEQ is far from complete, so a general solution to the crashes does not exist (and may never). I had to analyze each zone's eqg to find the right offset to get the map built... I decided to do it (for the zones we have packet collects of). Other zones may come later if I get a reason to do them.

NOTE: there are a few maps here which will overwrite existing zones! Do not put them in place unless your players are using the eqg zones.


anguish.map
arena.map
bazaar.map
bloodfields.map
broodlands.map
causeway.map
chambersa.map
chambersb.map
chambersc.map
chambersd.map
chamberse.map
chambersf.map
delvea.map
delveb.map
dranik.map
dranikhollowsa.map
dranikhollowsb.map
dranikhollowsc.map
draniksscar.map
guildhall.map
guildlobby.map
harbingers.map
lavastorm.map
nektulos.map
provinggrounds.map
riftseekers.map
stillmoona.map
stillmoonb.map
thenest.map
thundercrest.map
tutoriala.map
tutorialb.map
wallofslaughter.map

Angelox 12-04-2006 03:11 AM

Thanks FNW. this is a great help - maybe it will solve my tutoral "delema". I noticed you posted an Anguish map, does this mean you can spawn this zone?

bufferofnewbies 12-04-2006 04:57 AM

Quote:

lavastorm.map
WWOOHOOOO!!!
I so much like the new lavastorm better than the old one.

but Im keeping the old nektulos, new one is just eeehhhh
Danke, FNW. Good Show, 1 Bran point to you. :)

daeken_bb 12-08-2006 07:21 AM

If you need any help fixing the EQG loader or anything of that sort, let me know.

- Cody Brocious

Craleu 12-15-2006 03:48 PM

http://downloads.sourceforge.net/eqe...use_mirror=umn


link to new maps!

morganpartee 01-09-2007 01:24 PM

lol i was a slight nob when i quit eq...(1 year) so... i like the new zones! lol

Thanks! ;)

gernblan 02-16-2007 07:57 PM

Know what would ROCK to have a map file for, even though it's not part of titanium?

Barter zone.

John Adams 09-02-2007 02:25 PM

Quote:

Originally Posted by fathernitwit (Post 128362)
Other zones may come later if I get a reason to do them.

Sorry to wake the dead, but it's coming time to start considering how to deal with missing maps again.

fathernitwit, I have a good reason for you to do more mapping. :) We need them! More admins are branching into zones that have no maps, and render the encounters kinda futile.

You mentioned having to analyze each eqg - is this something you can 1-2-3 out for us to maybe someone else can help? I cannot get openEQ to even compile, and azone is missing pieces (.hpp files?) so I am kinda at a loss where to begin here. Any advice/direction would be appreciated - from any dev type that may understand how to build a heightmap from an existing .eqg zone file.

Thanks!

GeorgeS 09-03-2007 09:52 AM

Sounds pretty easy enough from the example, but the only thing is I have the openeq sources (on my site) with the .hpp files and all, but this won't compile into windows?

I should just check out the source and make a vb version or just a dos version.

GeorgeS

fathernitwit 09-03-2007 04:02 PM

I just made another quick hack to better support some of the new zones, committed the missing files (will hit download tonight), and posted a little guide... good luck.. hit me up on IRC if you are struggling.

http://www.eqemulator.net/wiki/wikka...a=AZoneEQGHack

Criimson 09-06-2007 10:51 AM

I for one am wondering if there is any way to do this under Windows. I would be happy to spend the next few weeks knocking out the rest of the zones if there is a way. I feel like DoD has a limited amount of zones and once theyre done, we can all forget about them.

I guess I can dual boot Linux - it's just I haven't used it in so long (read 15 years) that I have heard I would have to basically relearn everything as it has all changed alot.

Thank you,
Criimson

Criimson 09-07-2007 06:40 PM

fathernitwit

If you can post me a link to a linux build of aZone_eqg or even a link to getting it built with Code::Blocks I'll help ya tackle the rest of the .map files that need to be built. I don't mind searching for opcodes and would love to help.

I have Fedora 6 installed now, but I get all kinds of errors trying to build it with Code::Blocks

Criimson

Criimson 09-08-2007 10:15 PM

OK reinstalled Linux (Fedora 7) and have Eclipse installed. This is a really nice IDE.
I am trying to get azone_eqg compiled but am getting these errors.

Code:

Severity and Description        Path        Resource        Location        Creation Time        Id
error: ‘FACE’ has not been declared        aZone        azone.h        line 129        1189332762511        146
error: ‘FACE’ was not declared in this scope        aZone        azone.cpp        line 240        1189332762521        166
error: ‘FACE’ was not declared in this scope        aZone        azone.cpp        line 305        1189332762525        173
error: ‘FACE’ was not declared in this scope        aZone        azone.h        line 117        1189332762508        140
error: ‘faceBlock’ was not declared in this scope        aZone        azone.cpp        line 97        1189332762511        148
error: ‘faceBlock’ was not declared in this scope        aZone        azone.cpp        line 114        1189332762512        149
error: ‘faceBlock’ was not declared in this scope        aZone        azone.cpp        line 116        1189332762512        151
error: ‘faceBlock’ was not declared in this scope        aZone        azone.cpp        line 181        1189332762518        159
error: ‘faceBlock’ was not declared in this scope        aZone        azone.cpp        line 305        1189332762525        172
error: ‘faceptr’ was not declared in this scope        aZone        azone.cpp        line 240        1189332762522        167
error: ‘head’ was not declared in this scope        aZone        azone.cpp        line 280        1189332762524        171
error: ‘heads’ was not declared in this scope        aZone        azone.cpp        line 386        1189332762532        182
error: ‘int QTNode::fillBlocks’ is not a static member of ‘class QTNode’        aZone        azone.cpp        line 386        1189332762530        180
error: ‘mapHeader’ was not declared in this scope        aZone        azone.cpp        line 279        1189332762523        169
error: ‘nodeHeader’ has not been declared        aZone        azone.h        line 158        1189332762511        147
error: ‘nodeHeader’ was not declared in this scope        aZone        azone.cpp        line 312        1189332762526        174
error: ‘nodeHeader’ was not declared in this scope        aZone        azone.cpp        line 386        1189332762531        181
error: ‘nodes’ was not declared in this scope        aZone        azone.cpp        line 312        1189332762526        175
error: ‘struct FaceRecord’ has no member named ‘face’        aZone        azone.cpp        line 243        1189332762522        168
error: ‘v’ was not declared in this scope        aZone        azone.cpp        line 194        1189332762520        163
error: ‘v’ was not declared in this scope        aZone        azone.cpp        line 205        1189332762520        164
error: ‘v’ was not declared in this scope        aZone        azone.cpp        line 216        1189332762521        165
error: ‘v1’ was not declared in this scope        aZone        azone.cpp        line 140        1189332762513        154
error: ‘v2’ was not declared in this scope        aZone        azone.cpp        line 148        1189332762514        155
error: ‘v3’ was not declared in this scope        aZone        azone.cpp        line 156        1189332762516        156
error: ‘VERTEX’ does not name a type        aZone        azone.h        line 56        1189332762502        133
error: ‘VERTEX’ does not name a type        aZone        azone.h        line 125        1189332762510        145
error: ‘VERTEX’ has not been declared        aZone        azone.h        line 111        1189332762505        139
error: ‘VERTEX’ was not declared in this scope        aZone        azone.cpp        line 137        1189332762513        152
error: /zone/map.h: No such file or directory        aZone        azone.h        line 5        1189332762502        132
error: expected `;' before ‘FACE’        aZone        azone.cpp        line 181        1189332762519        161
error: expected `;' before ‘head’        aZone        azone.cpp        line 279        1189332762524        170
error: expected `;' before ‘nodeHeader’        aZone        azone.cpp        line 312        1189332762528        177
error: expected `;' before ‘v1’        aZone        azone.cpp        line 137        1189332762513        153
error: expected `)' before ‘&’ token        aZone        azone.h        line 63        1189332762503        134
error: expected ‘,’ or ‘;’ before ‘{’ token        aZone        azone.cpp        line 386        1189332762534        185
error: expected ‘,’ or ‘...’ before ‘*’ token        aZone        azone.h        line 108        1189332762504        137
error: expected ‘;’ before ‘*’ token        aZone        azone.h        line 94        1189332762503        136
error: expected ‘;’ before ‘*’ token        aZone        azone.h        line 123        1189332762510        144
error: expected primary-expression before ‘unsigned’        aZone        azone.cpp        line 386        1189332762532        183
error: expected type-specifier before ‘FACE’        aZone        azone.cpp        line 181        1189332762519        160
error: expected type-specifier before ‘nodeHeader’        aZone        azone.cpp        line 312        1189332762527        176
error: initializer expression list treated as compound expression        aZone        azone.cpp        line 386        1189332762534        184
error: invalid types ‘int[long unsigned int]’ for array subscript        aZone        azone.cpp        line 184        1189332762520        162
error: ISO C++ forbids declaration of ‘FACE’ with no type        aZone        azone.h        line 94        1189332762503        135
error: ISO C++ forbids declaration of ‘FACE’ with no type        aZone        azone.h        line 108        1189332762504        138
error: ISO C++ forbids declaration of ‘FACE’ with no type        aZone        azone.h        line 123        1189332762509        143
error: request for member ‘size’ in ‘((QTBuilder*)this)->QTBuilder::_FaceList’, which is of non-class type ‘int’        aZone        azone.cpp        line 167        1189332762517        157
error: request for member ‘size’ in ‘((QTBuilder*)this)->QTBuilder::_FaceList’, which is of non-class type ‘int’        aZone        azone.cpp        line 172        1189332762517        158
error: template argument 1 is invalid        aZone        azone.h        line 117        1189332762508        141
error: template argument 2 is invalid        aZone        azone.h        line 117        1189332762509        142
error: type ‘<type error>’ argument given to ‘delete’, expected pointer        aZone        azone.cpp        line 115        1189332762512        150
error: type ‘<type error>’ argument given to ‘delete’, expected pointer        aZone        azone.cpp        line 342        1189332762529        178
error: variable or field ‘fillBlocks’ declared void        aZone        azone.cpp        line 386        1189332762530        179

Any ideas?

Criimson

Secrets 09-09-2007 01:57 AM

Quote:

Originally Posted by Criimson (Post 138235)
OK reinstalled Linux (Fedora 7) and have Eclipse installed. This is a really nice IDE.
I am trying to get azone_eqg compiled but am getting these errors.

Remember to have zlib and the full CVS. It relies on a lot of files to compile.

John Adams 09-09-2007 08:20 AM

Quote:

/zone/map.h: No such file or directory
azone_eqg and it's files must live in ./utils/ dir under eqemu source, or you have to change the paths throughout.

I moved mine to (example) /eqemu/build/current/util/azone_eqg, and it compiled - but still did not work when executing.

uncommon 09-30-2007 07:13 AM

I've been playing a bit with azone today, i'm not at home just on my linux laptop and don't have all the stuff to test these map files... but they should be okay i think.

barter.eqg : http://uncostockage.free.fr/EQEMU/barter.map
fhalls.eqg : http://uncostockage.free.fr/EQEMU/fhalls.map

These are 2 of the few zones i really want to use on my server.. next one is dreadspire but i can't seem to be able to find that opcode. So question to you fathernitwit, is it possible that azone just won't support a zone and always seg fault even if i'm sure i got the right opcode and all ?

dreadspire.eqg, to me the boundary is around here, i tried different value but it always crash... any idea ? :

Code:

4DD0  36 00 00 02 00 00 00 36 36 00 00 4A 36 00 00 02   
4DE0  00 00 00 5B 36 00 00 6F 36 00 00 02 00 00 00 82
4DF0  36 00 00 8F 36 00 00 00 00 00 00 00 00 40 41 9D
4E00  36 00 00 00 00 00 00 CD CC 4C 3D 07 00 00 00 AF
4E10  36 00 00 BA 36 00 00 05 00 00 00 CC 36 00 00 02
4E20  00 00 00 DE 36 00 00 F8 36 00 00 02 00 00 00 09
4E30  37 00 00 23 37 00 00 02 00 00 00 36 37 00 00 43
4E40  37 00 00 00 00 00 00 00 00 40 41 51 37 00 00 00
4E50  00 00 00 CD CC 4C 3D 97 1A 72 C4 29 49 8B C5 38
4E60  25 98 C5 3D 6D 54 3E 04 5E 79 3F 3B 76 B8 3D 83
4E70  83 83 00 1E 70 EF 41 9C B5 AD BD 8C 22 9C 3E C0
4E80  5F 8F BB 55 AE 37 44 53 E6 85 C5 38 25 98 C5 53
4E90  DC 75 BE C6 7C 78 3F D5 1D 5E 3C 83 83 83 00 4D
4EA0  40 02 42 D8 B5 AD BD A4 0F 56 3E C0 5F 8F BB 85
4EB0  D0 0D 45 51 31 44 C5 38 25 98 C5 DC F8 41 BF F6
4EC0  78 26 3F B6 FB 60 3D 83 83 83 00 40 E6 0D 42 D8
4ED0  B5 AD BD BE CD 02 3E C0 5F 8F BB 35 3C 38 45 F2


Lalolyen 09-30-2007 10:46 AM

Ok first stupid post...

I've had a lot of people ask me, and I cannot give them an answer as I haven't found it yet myself..

What are the map files for?

I've deleted the map files on our server as they seem to do nothing, and the server still works. I added them back of course later on *just in case* he he.

But again, I noticed no diffrence, as the info about the zones seems to be stored in the database and the client.

Am I wrong?

uncommon 09-30-2007 11:17 AM

It's about los, load a zone with no map file and try to cast some kind of detrimental spell on a mob and you will get the "you cannot see your target" message for example. Mob won't be able to cast detrimental spell also i'm sure etc...

Lalolyen 10-01-2007 10:46 AM

Ok and with looking at some of that it seems that the server would also translate terrain such as water for mobs too right? I think someone said once that water is purely client-side. I'm not sure about that, for your avatar sure, but not for mobs, the server controls where the mobs path, how they path, when they path etc. I'm sure there must be something missing in a map file that allows underwater mobs to leave the water =S. I mean using the client on live it works, on emu it doesn't... Something is missing there (meaning it worked when DoN/Titanium came out).

KLS 10-02-2007 07:42 PM

Quote:

These are 2 of the few zones i really want to use on my server.. next one is dreadspire but i can't seem to be able to find that opcode. So question to you fathernitwit, is it possible that azone just won't support a zone and always seg fault even if i'm sure i got the right opcode and all ?
Dreadspire is actually a version 3 eqg, while the azone code was written to read version 2.. and it doesn't perfectly as shown =(

The version 3 eqgs are actually much more well behaved too sadly, but azone currently wont read them properly as the vertex data structure has changed from 32 bytes to 44 bytes in that version. Can get azone to support them soon though, I've been able to render them properly so I know I got the structure down.

uncommon 10-02-2007 11:19 PM

Ok thank you KLS, it makes sense now. Almost every single DoD .eqg i tried crash azone, even when the opcode is really obvious.

Anyone tried these 2 .map files to see if they work ? I'm still not at home and can't do it.

gernblan 10-03-2007 04:34 AM

Been playing with them and you're right... even when the offset is obvious, no dice.

SO... hopefully one can get azone to support this type of EQG also. I for one am willing to sit there and figure out offsets and work on anniversary zones even under these conditions, as long as there is a way that it CAN work.

I would think this is high priority because without this working in some way, any anniversary support in the future is pointless I would think.

So please, anyone capable (unfortunately I'm not THAT good with C++), please, let's work on this and make a real effort to getting the rest of the maps made not just for titanium but also for the zones going forward.

:)

gernblan 10-03-2007 04:54 AM

Maybe I'm dumb but someone please explain to me what the "- 2" or "+ 19" mean in the offsets that were already hacked.

The wiki says that this offset will be on a 16 byte boundary but those do change that, no?

Examples:

} else if(string("ter_guildhall.ter") == zone_name) {
buffer = ter_orig + 0x3080 - 2;
} else if(string("ter_guildlobby.ter") == zone_name) {
buffer = ter_orig + 0x4190 + 19;

So if the offset for guildhall is 0x3080 as stated in the wiki example... why subtract 2 from it?

...and why add 19 to guildlobby's?

I at least need a basic understanding of these values and why they are the way they are (and different from the wiki) before I can really sit down and hack away at these zones for us.

uncommon 10-03-2007 06:23 AM

If you look at the various example in the ter.cpp file it's not always on a 16 bit boundary.
About the guildhall example, 0x3080 - 2 is obviously the same as saying it's 0x307e (i tried and it works)... personnaly that's how i found the barter.eqg opcode (it's 0x56AD), i was sure it was around 0x56B0 but that one didn't worked so i tried 0x56B0 - 1 then 0x56B0 - 2 etc... till it worked. Probably an horrible way to find it but it worked. :)

I hope that's clear ? Sorry my english sucks.

gernblan 10-03-2007 08:10 AM

VERY clear, thank you!

May I ask what fhalls was too?

As we find them, let's post the offsets so that we can all have them, please?

Ok, knowing what you just told me, I'll going to try to work on another zone.

uncommon 10-03-2007 08:42 AM

For sure, let's do that, fhalls.eqg is 0x2230.

KLS 10-03-2007 09:46 AM

There's a handful of zones up to depths that I can't load and render properly atm, but it's just a matter of finding the offsets at this point. Should probably look for a more general solution, for version 2 EQGs but it's frustrating..

There's a freaking chunk of unknown data before the vertex data, somehow related to the material layers and a potential chunk of unknown data after the index data.. making finding the start of the vertex data pretty much impossible without offsets or identifying the unknown data before the vertex data.

gernblan 10-03-2007 01:28 PM

Quite right KLS.

I'm working on it feverishly. I am thinking of a brute force method.. maybe writing a perl script to cycle the offsets, compile azone, execute it.

Would be ugly but it just may work...

That being said, my perl isn't up to par yet but I'm going to try anyway.

gernblan 10-05-2007 08:16 PM

I'm having a hell of a time writing that script... my perl just isn't good enough yet.

Anyone up to taking a stab at this? It just may help get more zone maps made.

What the script needs to do:

(first you'd manually run azone on the zone you want to hack to get the .ter file name (since it's not always the same as the zone shortname), then you'd go into the ter.cpp file and add an offset line for that zone)

1) using a loop that increments the offset value you want to try (loop range of, say 0x0500 to EOF maybe?) ...load the ter.cpp file and at the offset location for the zone you want to hack, change it to the loop value, then save it back out.
2) compile azone
3) run azone on the zone you are hacking
4) trap the output to see if it gave a segfault. If it did, loop again. if it did NOT crash, double check for a .map file for that zone. If one exists, exit, reporting the offset found.

SO, part of this is manual and the script would have to be tweaked some each time because a new line like:

Code:

else if(string("ter_hive.ter") == zone_name) {
          //drachnidhive - not working yet
          buffer = ter_orig + 0x2B36;
  }

... would have to be added. The example above I added to try to hack drachnidhive.

Anyone up for banging out a perl script that can do this? I promise I'll hack the living heck out of it and then post the ter.cpp with the correct offsets for the zones I am able to make maps for (as well as the maps themselves) if you do.

So, the short of it is that the perl script would help change the offset in ter.cpp in a brute force way and be smart enough to know when it worked.

Then the user manually adds another line to ter.cpp like the above, changes the perl script to point to the offset location in ter.cpp (would be great if the script parsed that line and you could just tell it what line it was on!)... then the user runs the brute force script on the next zone... etc.

Is this idea stupid? Anyone think that it will not work? If not, why not?

Thank you.

KLS 10-06-2007 05:50 AM

Based on my EQG loader I got sidetracked last week with:

Code:

arena (works)
arena2 (works)
tutoriala.eqg (works)
tutorialb.eqg (works)
lavastorm.eqg (works with manual offset: 0x2db00+24)
highpasshold.eqg (works)
freeporteast.eqg (works)
freeportwest.eqg (works)
freeportsewers.eqg (works)


Depths of Darkhollow
westkorlachb (works)
westkorlacha (works)
corathus (works)
corathusb (works)
drachnidhiveb (works)
dreadspire (works)
illsalina (works)
westkorlachc (works)
drachnidhivea (works)
drachnidhivec (works)
illsalin (works)
nektulosa (works)
shadowspine (works)
eastkorlacha (works)
corathusa (works)
westkorlach (works)
illsalinb (works)
drachnidhive (works)
illsalinc (works)
eastkorlach (works)


Dragons of Norrath
guildhall (works with manual offset: 0x3080-2)
delvea (works with manual offset: 0x39bb60+4)
stillmoona (works with manual offset: 0x71944+4)
thenest (works with manual offset: 0xCA244)
stillmoonb (works with manual offset: 0xE340-2)
barter (works with manual offset: 0x56AD)
broodlands (works with manual offset: 0x382BB-4)
guildlobby (works with manual offset: 0x4190+19)
thundercrest (works with manual offset: 0x62230-4)
delveb (works with manual offset: 0x38BF0)

Omens of War
anguish (works)
dranikcatacombsa (works with manual offset: 0x16b0+8)
dranikcatacombsb (works with manual offset: 0x12a0+15)
dranikcatacombsc (works with manual offset: 0x16b0+8)
dranikhollowsa (works)
dranikhollowsb (works)
dranikhollowsc (works)
draniksscar (works)
harbingers (works with manual offset: 0x1178)
provinggrounds (works)
chambersa (works)
chambersb (works)
chambersc (works)
chambersd (works)
chamberse (works)
chambersf (works)
causeway (works)
riftseekers (works)
draniksewersa (works with manual offset: 0x1410+19)
draniksewersb (works with manual offset: 0x1410+19)
draniksewersc (works with manual offset: 0x13b0+30)
bloodfields (works)
fhalls (works)
dranik (works)
wallofslaughter (works)

Not including any version 4 EQGs and just eqgs I found on my system. There are special conditions for version 1(fhalls) and version 3(anything in DoD) that don't let them load with the version 2 loader correctly (though you can get fhalls to work with an offset). I'll try to post my code once I clean it up a bit.

uncommon 10-06-2007 07:34 AM

Nice, thank you KLS.

What are version 4 EQGs btw ? PoR zones and stuff like this ?

KLS 10-06-2007 08:15 AM

commonlands, southro, northro, newest nektulos are examples. Not sure PoR are v4 I suspect they're v3 and everything past v4.

gernblan 10-06-2007 12:01 PM

Thank you KLS, looking forward to it!

That along with some sort of brute force script should help this situation a lot.

Like I said, I am willing to spend the time brute forcing these if someone would be kind enough to drum up a script to do so. I'm just not "good enough" to make one that works... I've been trying since I first mentioned it.

gernblan 10-06-2007 12:03 PM

Quote:

Originally Posted by KLS (Post 139055)
Dreadspire is actually a version 3 eqg, while the azone code was written to read version 2.. and it doesn't perfectly as shown =(

The version 3 eqgs are actually much more well behaved too sadly, but azone currently wont read them properly as the vertex data structure has changed from 32 bytes to 44 bytes in that version. Can get azone to support them soon though, I've been able to render them properly so I know I got the structure down.

Is there a way to add v3 (and v4) support to azone, even if they still require manual offset hacking?

I'm willing to spend the time if I know that it's at all possible trying to find thse offsets.

Derision 04-11-2008 07:22 PM

Quote:

Originally Posted by KLS (Post 139082)
Should probably look for a more general solution, for version 2 EQGs but it's frustrating..

I don't know whether the Dev's worked out the formula for calculating the offsets for version 2 EQGs, but I searched and couldn't find anything relevant after this thread.

I've been messing about trying to get OpenEQ to load version 2 EQGs, and came across this old thread:

http://www.eqemulator.net/forums/arc...p/t-21615.html

Based on that, I knocked together the following bit of Python to calculate the offsets (excuse my Python, but I'm new at it :) ):

Code:


import struct, posixfile, socket, zlib, pdb, sys



for eqgfilename in ["broodlands", "guildhall", "guildlobby", "harbingers", "stillmoona", "stillmoonb", "thenest", "thundercrest"]:
    filenames = []
    files = []
 
    eqgfile = file(eqgfilename + '.eqg', 'rb')

    block = eqgfile.read(12)
    (offset, magic, unknown) = struct.unpack('L4sL', block)


    eqgfile.seek(offset, posixfile.SEEK_SET)

    block = eqgfile.read(4)

    dir_count = struct.unpack('I', block)



    for i in range(0, dir_count[0]):
        block = eqgfile.read(12)
        (crc, fileoffset, filesize) = struct.unpack('LLL', block)


        if crc == 0x61580AC9:

            CurrentPos = eqgfile.tell()
            eqgfile.seek(fileoffset, posixfile.SEEK_SET)
            InflatedLength = 0
            uncompressed = ''
              while InflatedLength < filesize:
                block = eqgfile.read(8)
                (deflen, inflen) = struct.unpack('LL', block)

                block = eqgfile.read(deflen)
                uncompressed = uncompressed + zlib.decompress(block)
                InflatedLength = InflatedLength + inflen

            eqgfile.seek(CurrentPos, posixfile.SEEK_SET)
            fncount = struct.unpack('L', uncompressed[0:4])       

            pos = 4
            for j in range(0, fncount[0]):
                fnlen = struct.unpack('L', uncompressed[pos:pos+4])

                fmt = str(fnlen[0]) + 's'
                fname = struct.unpack(fmt, uncompressed[pos+4:pos+4+fnlen[0]])
                fname = fname[0].strip('\x00')

                if fname[len(fname)-4:len(fname)] == '.ter':
                    wantedfile = fname

                filenames.append(fname)
                pos = pos + 4 + fnlen[0]
        else:
            files.append((eqgfile.tell() - 12, fileoffset))


    for i in range(dir_count[0] - 2, 0, -1):
        for j in range(0, i):

            if files[j][1] > files[j+1][1]:
                tmp = files[j]
                files[j] = files[j+1]
                files[j+1] = tmp



    for a in range(0, dir_count[0]-1):
        if filenames[a] == wantedfile:

            eqgfile.seek(files[a][0], posixfile.SEEK_SET)
            block = eqgfile.read(12)
            (crc, fileoffset, filesize) = struct.unpack('LLL', block)

            eqgfile.seek(files[a][1], posixfile.SEEK_SET)
            break

    uncompressed = ''
    inf = 0

    while inf < filesize:
        block = eqgfile.read(8)
        (deflen, inflen) = struct.unpack('LL', block)

        block = eqgfile.read(deflen)
        uncompressed = uncompressed + zlib.decompress(block)
        inf = inf + inflen

    (magic, version, list_len, obj_count, vert_count, tri_count) = struct.unpack('4sLLLLL', uncompressed[0:24])


    ter_tmp = list_len
    pos = 24
    while pos < ter_tmp:
        strlen = 0
        while uncompressed[pos+strlen] != chr(0):
            strlen = strlen + 1
        fmt = str(strlen) + 's'
        (strvar) = struct.unpack(fmt, uncompressed[pos:pos+strlen])
        pos = pos + strlen+1

        strlen = 0
        while uncompressed[pos+strlen] != chr(0):
            strlen = strlen + 1
        fmt = str(strlen) + 's'
        (strval) = struct.unpack(fmt, uncompressed[pos:pos+strlen])
        pos = pos + strlen+1



    pos = 24 + list_len
 
    for b in range(0, obj_count):

        (index, name_offset, another_name_offset, property_count) = struct.unpack('LLLL', uncompressed[pos: pos+16])

        pos = pos + 16
        for a in range(0, property_count):
            pos = pos + 12

    print "Offset for EQG Zone %-20s (TER: %-22s) is %8X" % (eqgfilename, wantedfile, pos)

For the EQG zones hardcoded in the currently downloadable version of azone, it spits out the same offsets:

Code:

Offset for EQG Zone broodlands          (TER: ter_broodlands.ter    ) is    382B7
Offset for EQG Zone guildhall            (TER: ter_guildhall.ter    ) is    307E
Offset for EQG Zone guildlobby          (TER: ter_guildlobby.ter    ) is    41A3
Offset for EQG Zone harbingers          (TER: ter_harbingers.ter    ) is    1178
Offset for EQG Zone stillmoona          (TER: ter_main.ter          ) is    71948
Offset for EQG Zone stillmoonb          (TER: ter_easterntemple.ter ) is    E33E
Offset for EQG Zone thenest              (TER: ter_abyss01.ter      ) is    CA244
Offset for EQG Zone thundercrest        (TER: ter_stormtower01.ter  ) is    6222C



All times are GMT -4. The time now is 07:08 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.