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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 06-22-2008, 12:31 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

The previous patch to GetPVP didn't check if there was a watermap loaded for a zone and will crash the zone if there isn't. This should work better:

Code:
--- /tmp/EQEmu-0.7.0-1115/zone/client.h 2008-06-15 00:07:57.000000000 +0100
+++ client.h    2008-06-22 17:18:17.000000000 +0100
@@ -36,6 +36,7 @@
 #include "mob.h"
 #include "npc.h"
 #include "zone.h"
+#include "watermap.h"
 #include "AA.h"
 #include "../common/seperator.h"
 #include "../common/Item.h"
@@ -275,7 +276,8 @@
        void    SetGM(bool toggle);
        void    SetPVP(bool toggle);

-       inline bool     GetPVP()        const { return zone->GetZoneID() == 77 ? true : m_pp.pvp; }
+       inline bool     GetPVP()        const { if(zone->watermap != NULL) return zone->watermap->InPVPArea(x_pos, y_pos, z_pos) ? true : m_pp.pvp;
+                                               else return  m_pp.pvp; }
        inline bool     GetGM()         const { return (bool) m_pp.gm; }

        inline void     SetBaseClass(uint32 i) { m_pp.class_=i; }
and thanks for hosting the files Angelox.
Reply With Quote
  #2  
Old 06-29-2008, 08:20 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Here is azone2 (as I call it), along with a new version of awater that includes PVP
regions in the .wtr files. I've also included two other utilities called listobj
and glmodelviewer that I'll get to in a moment.

Source: www.rama.demon.co.uk/azone2/azone2.rar

Windows Executables: www.rama.demon.co.uk/azone2/az2exes.rar

The source includes .vcproj and an .sln file for Visual C++ Express 2008.

The source needs to be unzipped into the utils directory of your EQEmu source
tree, e.g. into EQEmu-0.7.0-1118/utils/azone2.

I've not included diffs as I replaced the S3D and EQG loaders with later versions
from OpenEQ that I had made some fixes to and included support for loading models, and the patch would be quite large.

Copy the executables into the same directory as your .S3D and .EQG files. To include
placeable objects for S3Ds, the _obj.s3d files must also be present.

Some newer EQGs have a .ZON file as a separate file in the filesystem rather than
inside the EQG. In these cases, the .ZON file must also be present along with the
EQG.

Azone2 provides support for including placeable objects in your .map files.

Here I will give a short tutorial on why you might want to use it.

Take this view of lakeofillomen.



Those ruins are placeable objects, this is what the .map file thinks the scene looks like:



If we want to include those buildings in the .map, we need to know
their model numbers. We could use listobj:

listobj lakeofillomen

Some models have meaningful names, but not so in the case of these buildings,
so we will use glmodelviewer instead.

From a command prompt (Windows only):

glmodelviewer lakeofillomen

Use the + and - keys to cycle through the models until you find one that
looks like what you are after.



It turns out that the buildings use models 49,50,51,52,53,54,55,56 and 57.

In the same directory as azone2 and our s3d/eqgs, we also need to put a file
called azone.ini. This tells azone2 what models to include in the .map

Code:
# Include huts, houses dock and bridge from tox
tox.s3d,7,17,20,26
# Include two bridges from Tutorialb
tutorialb.eqg,17,47
# Include prison, ramp and a couple of towers in Anguish
anguish.eqg,5,7,8,119
# Include ruined buildings in LOIO
lakeofillomen.s3d,49,50,51,52,53,54,55,56,57
# Include bridges in thundercrest
thundercrest.eqg,14,51
So, once we have added the line for lakeofillomen.s3d, we run azone2.

Code:
azone2 lakeofillomen

AZONE2: EQEmu .MAP file generator with placeable object support.
There are 406935 vertices and 135645 faces.
Processing azone.ini for placeable models.
azone.ini entry found for this zone. Including 9 models.
Including Placeable Object  326 using model   50 (KURH200_DMSPRITEDEF).
Including Placeable Object  327 using model   49 (KURH100B_DMSPRITEDEF).
Including Placeable Object  330 using model   50 (KURH200_DMSPRITEDEF).
Including Placeable Object  331 using model   49 (KURH100B_DMSPRITEDEF).
Including Placeable Object  473 using model   52 (KURH300A_DMSPRITEDEF).
Including Placeable Object 1475 using model   52 (KURH300A_DMSPRITEDEF).
Including Placeable Object 1476 using model   56 (KURH600B_DMSPRITEDEF).
Including Placeable Object 1477 using model   54 (KURH400C_DMSPRITEDEF).
Including Placeable Object 1503 using model   52 (KURH300A_DMSPRITEDEF).
Including Placeable Object 1504 using model   55 (KURH501A_DMSPRITEDEF).
Including Placeable Object 1505 using model   53 (KURH400B_DMSPRITEDEF).
Including Placeable Object 1788 using model   57 (KURH600BR_DMSPRITEDEF).
Including Placeable Object 1789 using model   51 (KURH300_DMSPRITEDEF).
Including Placeable Object 1790 using model   54 (KURH400C_DMSPRITEDEF).
Including Placeable Object 1791 using model   55 (KURH501A_DMSPRITEDEF).
Including Placeable Object 1792 using model   53 (KURH400B_DMSPRITEDEF).
Including Placeable Object 1793 using model   52 (KURH300A_DMSPRITEDEF).
After processing placeable objects, there are 426633 vertices and 142211 faces.
Bounding box: -7650.19 < x < 5026.62, -4153.97 < y < 7221.72
Building quadtree.
Done building quad tree...
Match counters: 1115234 easy in, 3053018 easy out, 55536 hard in, 0 hard out.
Writing map file.
Map header: Version: 0x01000000. 142211 faces, 6487 nodes, 239090 facelists
Done writing map (8.12MB).
Copy the .map over to your server Maps directory. Now it looks like this.



You can test by trying to cast a spell on a mob in the ruins that you cannot see.
Reply With Quote
  #3  
Old 06-29-2008, 02:05 PM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

This is ver cool. Thank you! It would be nice to get people involved in building an official "azone.ini", eh?
Reply With Quote
  #4  
Old 08-02-2008, 03:04 PM
Flare83
Sarnak
 
Join Date: Aug 2008
Location: usa
Posts: 43
Default

very nice work Derision. Anyone working on a new map pack with models included?
Reply With Quote
  #5  
Old 08-02-2008, 04:22 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Quote:
Originally Posted by Flare83 View Post
very nice work Derision. Anyone working on a new map pack with models included?
I was meaning to start, but since each map needs to be manually created, it would take a while. Anybody care to help? We could divide and conquer.
Reply With Quote
  #6  
Old 08-02-2008, 09:40 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Here's Skyfire map
Reply With Quote
  #7  
Old 08-03-2008, 01:13 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Here's Frontier Mountains and GFaydark Maps.

Derision; Im having problems with eastwastes , it does not dump all the placed-object info. I saw where objects 1-15 were, there then jumped to 2077-2015. For example I can see CRYSCAVETEL202 as an object, but it's not in the LISTOBJ dump.
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:44 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3