Jump to content

MMaps Redux


Guest auntieMangos

Recommended Posts

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

My dev machine bit the dust yesterday and I just finished reinstalling the OS. Data is still intact, no worries. Should be able to make some progress now.

Generating the mmaps is most likely a waste.

BUT...

There may be a chance I can merge multiple navmeshes into a tiled navmesh, but I haven't really gotten nearly fall enough to tell. Can't really say at this point.

Link to comment
Share on other sites

Extract maps and vmaps, then in mmap.conf to specify the path to the directory where are your maps and vmaps.

Then create a folder at once mmaps.

Next, you need to run generator.exe with the parameters xxx - map, xx - X-coordinate, xx - Y-coordinate, and wait a long time.

For example, we can run the *.bat file:

generator.exe 000 20 35
generator.exe 000 20 36
generator.exe 000 20 37
generator.exe 000 20 38
generator.exe 000 20 39
generator.exe 000 20 40
generator.exe 000 21 35
generator.exe 000 21 36
generator.exe 000 21 37
generator.exe 000 21 38
generator.exe 000 21 39
generator.exe 000 21 40
generator.exe 000 22 25
generator.exe 000 22 26

What's hard to understand?

Link to comment
Share on other sites

I tested and got here mmaps such errors in the log:

deal dmg:3 to health:110
deal dmg:4 to health:107
WORLD: Recvd ZONE_UPDATE: 12
deal dmg:3 to health:103
637661517's UpdatePath failed: invalid start or end polygon
637661517's UpdatePath failed: invalid start or end polygon
637661517's UpdatePath failed: invalid start or end polygon
637661517's UpdatePath failed: invalid start or end polygon
deal dmg:4 to health:100
637661517's UpdateNextPosition failed: 0 length path
WORLD: Recvd ZONE_UPDATE: 12
deal dmg:3 to health:96
637661517's UpdatePath failed: invalid start or end polygon
637661517's UpdatePath failed: invalid start or end polygon
deal dmg:4 to health:93
637661517's UpdatePath failed: invalid start or end polygon
WORLD: Recvd ZONE_UPDATE: 12
637661517's UpdatePath failed: invalid start or end polygon
637661517's UpdatePath failed: invalid start or end polygon
WORLD: Recvd ZONE_UPDATE: 12
deal dmg:3 to health:89
WORLD: Recvd ZONE_UPDATE: 12
637661517's UpdatePath failed: invalid start or end polygon

coordinates:

Command: gps [Player: Testmag (Account: 1) X: -8988.514648 Y: -301.891876 Z: 71.
907005 Map: 0 Selected: None (Guid: 0)]

but in general works fine

Link to comment
Share on other sites

About 'invalid start or end polygon':

A search box is centered on the start position. The polygon which is nearest to the start position and inside this search box is the start polygon.

Same for end position and end polygon.

If either the start or the end poly search box contains no polygons, then pathfinding fails.

  • * In a lot of cases, this won't be an actual error.
    Flying monsters and players won't be near the navmesh, so they will generate this error. I will eventually handle this as a special case.
    Falling players are the same way, but I'm unsure how to find out if a player is falling.
    * In some cases, there is a hole in the navmesh due to incomplete data in the maps and vmaps. This is a genuine error, and for now the problem is solved by using the old mangos behavior (just go from start position to end position in a straight line, ignore obstacles)
    I need some assistance with map and vmap in order to correct the problem, fill in the holes in the mmap.
Link to comment
Share on other sites

Hello, I have just tested this patch and I have some crash (access violation) when I use .tele dalaran

so I rewrite some part to protect attributes, I think my changes need some improvement...

http://pastebin.com/FbRtyXw9

EDIT :

I just add it to fix another crash, I don't understand how it is produced...

@@ -160,11 +160,11 @@ bool TargetedMovementGeneratorMedium<T,D>::Update(T &owner, const uint32 & time_
        return true;
    }

    if (i_destinationHolder.UpdateTraveller(traveller, time_diff, false))
    {
-        if (!IsActive(owner))                               // force stop processing (movement can move out active zone with cleanup movegens list)
+        if (!IsActive(owner) || !i_path)                    // force stop processing (movement can move out active zone with cleanup movegens list)
            return true;                                    // not expire now, but already lost

        // put targeted movement generators on a higher priority
        if (owner.GetObjectSize())
            i_destinationHolder.ResetUpdate(50);

Link to comment
Share on other sites

Hello, I have just tested this patch and I have some crash (access violation) when I use .tele dalaran

so I rewrite some part to protect attributes, I think my changes need some improvement...

Cool, I had meant to do some more encapsulation.

I think that the crash is from something more complicated though. Can you describe more about it? I'll try to reproduce it and see what's making it happen.

Link to comment
Share on other sites

I actually managed to push all the mmaps to a github repo (they probably hate me over there lol). It'll take a little to dl but no where near as bad as generating them. just pull from my repo at:

git://github.com/caeruleaus/mangos.git mmaps

It's faramir118's repo plus the added mmap files in zip archives. I use 7zip so i don't know if it'll work correctly with other zip programs. just open any of the mmaps.zip.00# files and extract and your set

Link to comment
Share on other sites

I thought mmap and vmap_rewrite were totally seperate tools. Why do they need to be merged together, if such is the case?

A batch file would not work as well or as quickly as the Git Bash script caeruleaus posted. Just be prepared to have your computer tied up around the clock for a few days if you want to generate all the maps quickly. Windows can use a CALL function to simplify the execution of generator.exe. Just loop it through a counter. I still think the Bash method would be best. You can also install Gnu Utils for Windows to add many Unix commands and tools.

Link to comment
Share on other sites

Cool, I had meant to do some more encapsulation.

I think that the crash is from something more complicated though. Can you describe more about it? I'll try to reproduce it and see what's making it happen.

I just use .tele dalaran .tele stormwind .tele orgrimmar...

Link to comment
Share on other sites

i have this errors under unix: ../game/libgame.a(debugcmds.cpp.o): In function `ChatHandler::HandleDebugMoveMapCommand(char const*)':

debugcmds.cpp:(.text+0x31c8): undefined reference to `dtNavMesh::findNearestPoly(float const*, float const*, dtQueryFilter*, float*)'

debugcmds.cpp:(.text+0x31f3): undefined reference to `dtNavMesh::findNearestPoly(float const*, float const*, dtQueryFilter*, float*)'

debugcmds.cpp:(.text+0x324b): undefined reference to `dtNavMesh::findStraightPath(float const*, float const*, unsigned int const*, int, float*, unsigned char*, unsigned int*, int)'

debugcmds.cpp:(.text+0x32f8): undefined reference to `dtNavMesh::getTileByRef(unsigned int, int*) const'

debugcmds.cpp:(.text+0x330c): undefined reference to `dtNavMesh::getPolyByRef(unsigned int) const'

debugcmds.cpp:(.text+0x3436): undefined reference to `dtNavMesh::getTileByRef(unsigned int, int*) const'

debugcmds.cpp:(.text+0x344a): undefined reference to `dtNavMesh::getPolyByRef(unsigned int) const'

../game/libgame.a(Map.cpp.o): In function `Map::LoadNavMesh(int, int)':

Map.cpp:(.text+0x560f): undefined reference to `dtNavMesh::DtNavMesh()'

Map.cpp:(.text+0x567b): undefined reference to `dtNavMesh::init(unsigned char*, int, bool, int)'

../game/libgame.a(Pathfinder.cpp.o): In function `PathInfo::updateNextPosition()':

Pathfinder.cpp:(.text+0x1e8): undefined reference to `dtNavMesh::findStraightPath(float const*, float const*, unsigned int const*, int, float*, unsigned char*, unsigned int*, int)'

../game/libgame.a(Pathfinder.cpp.o): In function `PathInfo::isPointInPolyBounds(float, float, float, float&, unsigned int)':

Pathfinder.cpp:(.text+0x42a): undefined reference to `dtNavMesh::getTileByRef(unsigned int, int*) const'

Pathfinder.cpp:(.text+0x444): undefined reference to `dtNavMesh::getPolyByRef(unsigned int) const'

Pathfinder.cpp:(.text+0x4d7): undefined reference to `distancePtPolyEdgesSqr(float const*, float const*, int, float*, float*)'

../game/libgame.a(Pathfinder.cpp.o): In function `PathInfo::Build(unsigned int, unsigned int)':

Pathfinder.cpp:(.text+0x758): undefined reference to `dtNavMesh::findPath(unsigned int, unsigned int, float const*, float const*, dtQueryFilter*, unsigned int*, int)'

../game/libgame.a(Pathfinder.cpp.o): In function `PathInfo::Build()':

Pathfinder.cpp:(.text+0xa90): undefined reference to `dtNavMesh::findNearestPoly(float const*, float const*, dtQueryFilter*, float*)'

Pathfinder.cpp:(.text+0xab2): undefined reference to `dtNavMesh::findNearestPoly(float const*, float const*, dtQueryFilter*, float*)'

../game/libgame.a(Pathfinder.cpp.o): In function `PathInfo::getPathPolyByPosition(float, float, float)':

Pathfinder.cpp:(.text+0xc3e): undefined reference to `dtNavMesh::getTileByRef(unsigned int, int*) const'

../game/libgame.a(Pathfinder.cpp.o): In function `PathInfo::Update(float, float, float)':

Pathfinder.cpp:(.text+0xfdd): undefined reference to `dtNavMesh::findNearestPoly(float const*, float const*, dtQueryFilter*, float*)'

Pathfinder.cpp:(.text+0x1072): undefined reference to `dtNavMesh::findNearestPoly(float const*, float const*, dtQueryFilter*, float*)'

Pathfinder.cpp:(.text+0x11b6): undefined reference to `dtNavMesh::getPolyByRef(unsigned int) const'

Pathfinder.cpp:(.text+0x135b): undefined reference to `dtNavMesh::getPolyByRef(unsigned int) const'

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use