Adding Placeable objects to azone generated map files
An issue with the maps generated by azone at present is that they do not include
placeable objects. Many placeable objects are inconsequential for LOS, e.g. trees, boulders, wall decorations, however there are some large/important objects that are classed as 'placeable', e.g. some bridges and buildings. For example, the buildings in Potranquility (bank etc). If you fear a mob in those buildings they will just run straight through the walls, and some of the bankers are sunk up into their neck in the ground because as far as LOS/BestZ is concerned, the buildings don't exist. I have spent the last couple of days adding the ability to azone to include placeable objects in the map files. While it is not ready to release yet, mainly because you currently have to edit the source to specify the id numbers of the placeable models you want included, here is a potranquility map for people to test with (this includes the geometry for the walls and floors of the buildings I referred to above (and that is the only extra thing it includes, i.e. no trees etc). http://www.rama.demon.co.uk/potranquility.rar If you fear in mob in the buildings before and after dropping this into your Maps directory, you will see the difference. You can also try casting on a mob inside the building while you are outside (with the old map it will let you, even though you can't see your target). If anyone has any zones where they are desperate for certain placeable objects to be included, (S3D or EQG) let me know and I'll see if I can cook you up a map with those objects included. |
Toxxulia Forest (tox) has that problem; npcs in the buildings there are waist-deep in the floor, would be great to see that fixed.
Thanks for you fixes! |
Quote:
http://www.rama.demon.co.uk/tox.rar It includes the geometry for three extra models (I threw the bridge in as a bonus :) ) HUT4_DMSPRITEDEF ERHOUSE_DMSPRITEDEF TBRIDGE_DMSPRITEDEF I tested one building before and after and it seemed to have done the trick. If anyone has any more requests, I likely won't get to them until tomorrow. |
Thanks again - I'll be testing shortly, before you go, I was wanting to give you something else to think about which may be related to your work; The boats.
Only one of them is not fall through , the rest are , the most needed ship is the SirensBane (butcher > freeporte boat), and it is totally transparent. We actually have a fully functional system for boats to run on schedule dynamic zone or not. but really can't use it to its best or properly, unless we can get a boat thats not so large as the one we have now. I'm about to make a detailed post on how we did this, but really, the SirensBane is very needed - it appears in many zones, and fits the areas perfectly. |
This is a reply to Scorp from another thread where the subject of azone was brought up. Thought I would put the reply here rather than cluttering up the other thread, or starting a new one.
Quote:
Regarding the PVP areas, I just logged into the old arena zone, and also went to the PVP arena in Freeport. If you issue the #bestz command in the pvp part of the arena zone, it tells you you are in water. Likewise, in the pvp arena in Freeport, it tells you that you are in an unknown area, so it seems that these pvp areas are defined as special, but just not being handled correctly. I'll look into it some more. Given that I can only pull out the special areas from S3Ds, and not EQGs. What other S3D zones have pvp areas (and where abouts in the zone are they) ? Thanks |
Halas has one, and this may help: OpenZone can create them.
I have a zone I made with one, and can give you the file. Because, OZ will successfully create the area (recognized by the client) you might want to either look at the OZ source or (probably quicker) ask Windcatcher about it. EDIT... My thought on this subject, btw, is that once we can identify the area and if a player and/or target is in it, we can add code to where it checks to see if attack is allowed against another player and allow/deny it depending on if they are in it. Probably with a rule so the serverOp can turn it on or off. This would actually be a pretty simple add-on once we can determine the PvP area and a client's position in or out of it. |
Quote:
working with S3Ds) and also Windcatcher's WLD format document, and the PVP areas should be defined in the S3D with a name beginning 'DRP_ZONE': Quote:
|
I got the PVP areas figured out correctly. There are PVP areas in the following zones:
Arena, Cabwest, citymist, freportw, Kael, mischiefplane, neriaka, neriakb, paineel, qeynos, sseru, thurgadina I could't find one in Halas. There is an area called 'The Pit Of Doom' which looks a bit like a mini-arena, but there is nothing in the S3D file to flag it as such, and I don't get the client message when I go in there. My ISP is doing maintenance which means my webspace is down at the moment, but when it comes back up I will post the water maps for the zones above with the PVP areas tagged correctly. I also wrote a patch for the server to detect the PVP areas (bool WaterMap::InPVPArea) and added some output into the #bestz command to show whether you were in a PVP area or not, however it still requires someone to modify the attack code to call InPVPArea to perform the check. (I'll let someone else do that). Here is the zone patch. I'll post the maps later when my webspace is back up. The modified version of awater to produce the .wtr maps tagged with PVP areas will come with my modified azone when that is done and tested. Code:
diff -u --recursive /tmp/EQEmu-0.7.0-1115/zone/command.cpp ./command.cpp |
Here are the 'Water' maps for the zones I mentioned in the previous post with the PVP regions tagged (1.4MB):
http://www.rama.demon.co.uk/pvpmaps.tar.gz The directory in the tar file is called pvpmaps but that is just a temp directory I put them in while creating the archive. Once you have extracted them, drop them in your Maps directory where the other .wtr files are. |
I had a look at what would be involved to use this to enable PVP combat in the PVP areas, and it looks to be simpler than I thought, i.e. just change the existing GetPVP() function:
Code:
--- /tmp/EQEmu-0.7.0-1115/zone/client.h 2008-06-15 00:07:57.000000000 +0100 |
Quote:
|
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 |
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. http://www.rama.demon.co.uk/azone2/loio-tex.jpg Those ruins are placeable objects, this is what the .map file thinks the scene looks like: http://www.rama.demon.co.uk/azone2/loio-noplac-map.jpg 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. http://www.rama.demon.co.uk/azone2/loio-mviewer.jpg 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 Code:
http://www.rama.demon.co.uk/azone2/loio-buildings.jpg You can test by trying to cast a spell on a mob in the ruins that you cannot see. |
This is ver cool. Thank you! It would be nice to get people involved in building an official "azone.ini", eh?
|
very nice work Derision. Anyone working on a new map pack with models included?
|
Quote:
|
Here's Skyfire map
|
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. |
Quote:
|
An unusual amount of -1 model entries for eastwastes. I've been going through them alphabetically... slowly... I dare someone to take a look at bloodfields, it made me cry and not with any amount of joy. =(
|
There's another problem I noticed too, Skyfire has a lot of 'moonwalkers' (npc's get stuck and go a few steps back then forward a few, never get anywhere). I noticed at first in the entrance to Veeshan. Thought maybe it was the map , but the azone2 fix doesn't help. Then I started seeing this moonwalking bug all over the zone, with many npcs. If you can slow or freeze the frame rate , you'll see the mob gets stuck waist-deep in the ground where this is happening (the moonwalking is just an illusion). Skyfire Map I made is so gigantic because I detailed a lot of objects in hopes it would help some. But the most needed objects that are what cause the problem are not in the S3d files , they are on the Skyfire.wld files. I haven't checked any other zones, I Imagine the more irregular the terrain, the more prone to moonwalking. I saw some moonwalking in FM and really haven't check more zones - But Skyfire would be the zone to work this bug out.
In FM(Frontier Mts), most mobs walked fine, with the new fix (Dersion fix for 'BestZ Calculation for aggroed mobs), most the giants travel flawlessly over the big mountains, but once in a while you bump into a MJ fan (moonwalker). I think the 'BestZ Calculation' fixed a lot more than expected. |
Quote:
Code:
$ ./listobj eastwastes | grep "not found" | wc -l Code:
$ ./listobj eastwastes | grep "not found" | sort | uniq -c I checked all the other .s3ds, and the placeable objects with missing models generally seem to be trees, grass, flames, waterfalls, etc (all things that are likely animated), so this doesn't bother me too much, as I think they are generally the kind of objects that you wouldn't want to include in LOS anyway. As for CRYSCAVETELE202, it is possible that the object mesh exists in the S3D, but was never actually placed in the zone by the designer, which is why LISTOBJ doesn't list it, as no objects use that model. And KLS, I thought your comment about bloodfields meant there were loads of objects missing for that zone too, but I guess it is just the opposite :) |
Ok well, I guess what already was dumped has the houses and what not - did you have time to take a look at skyfire? I'm wondering why so many mobs there don't path properly
|
Quote:
|
Here's a couple more; Crushbone and Najena Maps.
I'm doing maps and posting them as I do other work, not really gonna go all out and do them all at once, but I'll get there eventually - and share the ones I do get done with you all. |
Kael Maps
|
Derision ;
I think I start to see a pattern in a problem - BtW a good way to test things is with the bots, they basically make the same mistakes the Mobs do when theres a bugged area. In Crushbone , inside the castle in the first big room where Darish spawns, there a big Table- that was a good place to camp mobs from, but any pull gets near the table and they fall through the floor and get waist deep. In Unrest building where Undead barkeep spawns, when you pull him, he tries run through the bar, and falls through the floor to the level below, then starts attacking you through the floor. Seems when there's an object in the building like a bar, or a table, they get bugged and mobs fall though. I also noticed the bots getting caught up inside the walls in unrest building and stuck, I had to summon them out. In the top floor, where the undead knight spawns, i set up camp and went to pull a mob from the next floor down: Big mistake! none came up the stairs, they came under the floor and attacked, eventually killed me - it was a train and the bots won't respond unless they have line of sight. Seems like there's still something missing in the maps, something that needs to be added to the azone and will solve all these problems at once. I have made new maps and still the problem remains. I made a new Unrest map with all the items incuded, still no dice. |
Tell me if you still want locs and I'll get them and post here.
|
I'm not sure if this is the right place for this, but since it seems to be applicable to the topic at hand...
I've been playing around with loading the various data files for the newer zones. (All the .EQG ones.) The following is a refinement of the information from both OpenEQ and also what Derision has kindly provided with his azone patches. The EQTZ format isn't fully worked out yet, but maybe someone here can finish those last pieces. Please forgive the repeating of already known information. (Note: When I use 'int' as an indicator for data below, I'm using it in the sense of a 32 bit entity. Using long or one of the *int_32 types, probably would be more accurate, but I've been spending too much time with java source code lately, so int has just crept up to being equated with the 32-bit incarnation. -- And please forgive the pascal esque pseudo-code, I hope it isn't too confusing.) ZON There are two flavors of this file. The first started to show up with the Omens of War expansion, when the EQGs were first introduced. The second I find first used for Prophecy of Ro outdoor zones. They are distinguished by the 4 byte magic string at the start. EQGZ indicates the first format, while EQTZ indicates the second. Format One: The file header has already been pretty well covered. Code:
4 bytes - magic string, indicating the format, always EQGZ Following that, a block of meshcount DWORDs. They are references into the namehash, each indicating a mesh that is part of the zone. Everything else that wants a mesh references this list. The next part is what we really care about, the list of placed objects. There are objcount of these entries, and here is also the only difference I could find between versions 1 and 2. Code:
Object format: The version 2 block seems to be some kind of coloring info, or something like that. Certainly no geometry we need to care about. Next we have the unknown. Each of these are 40 bytes long. (Seemingly an int followed by 9 floats. Zone lines, teleporters, something like that at a guess.) Finally, we have the light entries. Each of these is 36 bytes long. (1 int for a name reference, 8 floats for parameters. Not that it really matters for our needs.) Format Two: These are newline separated lines of XML-styled parameters only. The entire format is human readable, and has to be parsed as such. The first line holds a 'P' and nothing else. The other parameters are MINLNG, MAXLNG, MINLAT, MAXLAT, QUADSPERTILE, UNITSPERVERT, ... The only ones that we really need to generate a map file, are QUADSPERTILE and UNITSPERVERT. The NAME property has always been identical to the name of the ZON file, which is NOT always equal to the name of the EQG. There is a .DAT in the EQG with the name indicated by it, and that holds the primary geometry info. (In particular, it's a height-map, split into tiles, made up out of quads.) TER MOD and TER files are largely identical. The only thing that a MOD file has, that the TER lacks, is the possibility to include a skeleton for model animation. The format is already well enough handled by azone, and as such I'll just limit myself to some observations. There is no BSP tree, or anything else really usefull for splitting up the zone in here. The intent seems to have been to provide big chunks of polygons sharing the same material, and just feeding that to the GPU. (Those chunks I've found so far seemed to be 200 or 400 polygons each. Maybe that can be translated into a quadtree or something else, but I haven't looked that closely yet.) The Material Block I've seen a reference to the data in here in another thread. If the information has already been found out since, I missed it. For each of the parameters, of a material, there is a block of 3 DWORDs. The first is a reference to the namehash of the file, the second a selector, and the third the data, interpreted as indicated by the second. 0 - As a float (values for parameters) 2 - Reference into the name hash (usually seen for texture names) 3 - As an int (usually color info) The file ending. Version 1 and Version 3 end after any potential skeleton info. Version 2 ends on a DWORD, that is used as a flag. If it's 0, the file ends with that, for non-zero, there are vertex_count*8 bytes following. (Two floats per triangle, at a guess, a secondary texture coordinate pair, which version 3 pulls up into the vertex structure itself.) My limited forrays into the meaning of the group parameter, for the polygon list, had some matches between materials using a water shader and -1 for the group (I think that is what azone calls it anyway, the non-material parameter anyway, that has a flag field vibe for me), but that's highly likely to be wrong. So far, the existence of some 100k+ polygons for the TER entries has made my eyes want to bleed and refuse to even try to just try and match up material info to group info. Sadly, it's going to be the only place where info useable for water maps is going to be found, if it's found. DAT The format for the terrain files. I haven't really managed to display these yet, but they are at least parsing correctly. From the ZON file, two parameters are needed to generate any kind of worthwhile terrain. QUADSPERTILE, to load the height values correctly, and UNITSPERVERT, to create an actual quad grid. The format now. First the quasi header. I don't really have a clue what any of the first four entries means, but the fifth is the only thing needed to parse the file. Code:
Header: For the tiles below, some helpful variables. quadcount = QUADSPERTILE ^ 2 vertcount = (QUADSPERTILE + 1) ^ 2 The quadcount is the number of actual quads within in a tile, and the vercount how many vertices we need to create those. Code:
Tile format: The z coordinates of the objects all seemed to be relative to where on the tile the x,y pair places them. (Many 0.0s) Since they are referenced in the DAT. ECO - clear text, XML-esque style, defines the materials LOD - Level of Detail, clear text, with range indications and MOD files to use then. TOG - Some kind of model grouping, valdeholm uses these, but no idea how to find the references just yet. I think that about sums up what I've found out about the EQTZ format. Hopefully it is of some help for the map generation project. |
Quote:
It adds a bit more runtime overhead. For each possible Z position it casts a ray upwards. If the ray hits a face, it then checks if it is the back or front side of a polygon. E.g. if you were inside a building it would hit the front side of a downward facing poly that makes up the ceiling, so you are not under the world. If you were waist deep in the bar in unrest, the ray would hit the back side of the poly making up the top of the bar, and so you would be classed as under the world and the code would move you to the top of the bar (assuming that is 'nearer' than the floor below). It absolutely depends on the server having Azone2 generated map files. The reason for this is that the stock azone builds EQG maps with the vertices ordered the opposite way round to S3D maps, basically meaning the 'under the world' test that works for S3D maps, returns the opposite result for EQG maps. I'll do some more work on it one of these days. |
In the case of Unrest and the Undead Barkeep, you can 'fix' this by altering the rule Map:FixPathingZMaxDeltaMoving from the default of 20.0 to 12.0. The reason this works is because the difference in height between the floor of the bar room and the room below is around 13.0.
I can't recall why I chose 20.0. It was probably arbitrary, but you should keep an eye out to see if this re-introduces hopping in other zones if you make this tweak. |
Can I build a new set of 'default' azone2 maps without the Placeable objects (other than ones already done), and continue adding the Placeable objects?
Or do you need the maps to be complete with the objects? EDIT: I made the change 'Map:FixPathingZMaxDeltaMoving from the default of 20.0 to 12.0' and will post latter on today how that worked. |
Quote:
So, you can build a new set of default azone2 maps. |
Quote:
|
Quote:
|
Quote:
I also went to the original sky hopping test-zone (Lake of Ill Omen) and there still was no sky hopping. Anyways, I'll keep watching as I play see what else might happen. |
These are all Azone2 converted Map files.
Just to be sure nothing got broke during transfer, you should have a total of 459 files in the package (watermaps included). None of the files on the package have placeable objects added, as the batch I made would not deal with the ini file properly (kept mixing all the objects to all the maps), not to mention all the work involved in converting them - I have to keep on making those out as I can What I did was rename my old maps to MapsOLD , and started a new Maps directory with these new maps. Then I replaced the maps with placed objects A few maps may not work right, namely Lavastorm and Nektulos , because these were done with the eqg file present. If so, post here and I'll make non-eqg ones. |
Derision;
No matter what map I use here, the Mobs stand under the huts instead of in them. They used to stand in them here's the updated hollowshade map |
Quote:
|
Quote:
|
All times are GMT -4. The time now is 12:49 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.