Modcraft - The community dedicated to quality WoW modding!

Content creation => Level Design => Topic started by: larrylaffer on September 13, 2012, 03:08:00 am

Title: [QUESTION] Ingame error: npcs falling to ground from WMOs
Post by: larrylaffer on September 13, 2012, 03:08:00 am
Hello,

I am currently having a very annoying problem with some custom maps of my server.
In my maps i have WMOs like a fortress... plataforms... caves, etc.
The problem is that the NPCs that are inside those WMOs, fall under the floor when they move.
This problem happens when the NPC moves around or get aggro, if dont, you can see them stand normally in the wmo floor.

Funny fuct is that only happens in some custom maps, but not in others.... and the wmos that i am using works fine in blizz maps.

I tried several things to fix this:
-Remake the map from 0
-Save the map with the latest versions of noggit
-Respawn the wmos... etc.

But nothing works. Each time i upload a new version to both the server and the client, it still have the same problem... the damn npcs just fall under the floor. I dont know if it is a problem within the wmo.. the server.. the emulator... etc..

The server emulator is Trinity. I used mythcore before, but we change it.

If anyone knows how to fix this problem... i will be very grateful

Most Regards.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Shruik on September 13, 2012, 04:03:29 am
Try using vmaps. When creating these maps for (i guess) each wmo are created to assure mobs don´t run trough walls or fall trough the floor ;)
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: larrylaffer on September 13, 2012, 04:41:04 am
Quote from: "Besidas"
Try using vmaps. When creating these maps for (i guess) each wmo are created to assure mobs don´t run trough walls or fall trough the floor ;)

I forgot to mention... we are using the vmaps :P
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Ascathos on September 13, 2012, 07:16:57 am
Did you try to update the VMaps with the newest ADTs ? Just to make sure that everything is alright.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: schlumpf on September 13, 2012, 09:21:37 am
Movement is client side. Are you sure the WMOs are solid in eyes of the client? Also: Do the server positions and client positions match? ie. is z on the server a bit too low, so it is below the colliding plane on the client?
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Soldan on September 13, 2012, 01:29:06 pm
Hey Larry,

We used to have the same problem with a couple of our instances in our server "WoW Xenon" or before that, "Lost WoW - Neltharion" Neltharion was just our realm, you might know it.

Now, what we did was create a new map id, let's say yours is 5000, just make a new one with 5001, and re-extract the maps with map-extractor. It should work. ^_^


Soldan
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: larrylaffer on September 13, 2012, 03:31:15 pm
Thanks to all for your replies,

Ascathos,

I thinks that we updated the vmaps several times.. but the problem always persisted.
Anyway, we are gonna check again

Schumplf,

The WMO is solid, ingame i can walk on it with my character, and the npc stand on the floor... however once it starts to move, fall under it.
Server and client position should match since we uploaded the map to the server... however i dont know if we check the z position, we are gonna check that and i will let you know.


Soldan,

Gonna try this and let you know if it worked ;)


Once again thanks to all, after work i will try those solutions and see if i can fix those damn maps.

Most Regards
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: larrylaffer on September 14, 2012, 07:10:17 pm
Ok.. we tried everything that you ppl suggested.. but nothing seems to work :(

Quote from: "Ascathos"
Did you try to update the VMaps with the newest ADTs ? Just to make sure that everything is alright.

we always updated the vmaps... but that dindt fix the problem

Quote from: "schlumpf"
Movement is client side. Are you sure the WMOs are solid in eyes of the client? Also: Do the server positions and client positions match? ie. is z on the server a bit too low, so it is below the colliding plane on the client?

The WMOs are solid. About the position, i dont understand very well how to see the z position in server and client side. As far i know, an object has 3 xyz position in the ADT: the actual xyz position of the object, and the lower an upper position to form some "cage" around the wmo. We tried to give greater values to those lower and upper positions.. but it doenst work.

Quote from: "Soldan"
Hey Larry,

We used to have the same problem with a couple of our instances in our server "WoW Xenon" or before that, "Lost WoW - Neltharion" Neltharion was just our realm, you might know it.

Now, what we did was create a new map id, let's say yours is 5000, just make a new one with 5001, and re-extract the maps with map-extractor. It should work. ^_^


Soldan

We tried that... dint work :(


Now.. we noted something in one map: The map have several wmos... and in a couple of them the npcs fall under the floor, but not in the other ones... so we think is something about within thewmo, maybe we miss some information in the ADT.
If someone has another idea of how to fix the error.. please let us know.

Regards and thanks for ur time.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: schlumpf on September 14, 2012, 07:12:07 pm
Are you really sure the server has all the files extracted? By default those tools only export the standard maps or something like that. Double check, that the server has both, the map and the wmo visible and calculates that.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: larrylaffer on September 16, 2012, 06:48:38 pm
Quote from: "schlumpf"
Are you really sure the server has all the files extracted? By default those tools only export the standard maps or something like that. Double check, that the server has both, the map and the wmo visible and calculates that.

Yeah.. we checked and double checked that.. but it still doenst work :S
Is very strange cuz some wmos (platforms) of the map works fine, but in other ones the npc just fall under the floor.... and there are wmos that are in blizz maps and works fine in them.

Maybe is a problem with the emulator? we are using trinity now...

regards
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Soldan on September 16, 2012, 07:15:25 pm
It's very weird..

I also sent other instructions to shutok to tell you to try.. You tried them aswell? Step by step?

We did that on our server. The bug happened with 2-3 instances.. THe instances we had, ofc were just 1 adt and a floating wmo, so all of the npcs fell.

If I can think of anything else, I'll post it.

But what I told shutok to send to you should have worked.. It's very strange.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: larrylaffer on September 20, 2012, 01:59:29 am
i think we tried those steps but dindt worked....

as a new information, i was wrong about the time that the error took place. The error only happens when the npcs figth on the wmo, and not when they just move around walking with waypoints.

Once an npc in the wmo starts to fight, it fell under the ground....
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: schlumpf on September 21, 2012, 12:40:42 am
Quote from: "Soldan"
He hablado con mi noggitero, y me dice que lo más seguro es que aparte de lo que te dije arriba, tengas que borrar y meter las entries de criaturas, creo que me dijo la tabla de las spawneadas, no el template.

Intenta, incluso borrar los maps del emulador (porque seguramente lo has comprobado ya, si enciendes el emulador sin los maps sale "desconocido" en /who pero los npcs si van.") Pon los mapids en otro id, si son 10001, pues le pones algo como 101001, y vuelve a sacar los mapas.

Y claro, si cambias los id de los mapas, tendrás que cambiar todas las tablas que tengas ajustadas a eso, ya sea la de instance, incluso los de las criaturas spawneadas (en este caso, no solo lo cambiaria sino, los sacaria, los borraría de la db y los metería de nuevo con la id nueva de mapa, como dije arriba).

Se que seguramente hayáis hecho ya todo esto, pero no se a lo mejor haciendolo paso por paso como dije funcione. Al menos a nosotros nos funcionó.

Un saludo, Soldan.

P.D: Sabes lo que le pasaba a mi raptor? // Por cierto, al pasar modelos nuevos que haga otravez a .m2, en todos la armadura sale mal ajustada en plan si el casco está ajustado perfectamente en la cabeza, en el modelo se verá arriba, o no irá al ritmo de la animación del mismo modelo, o una parte de armadura se pone a dar vueltas a lo loco.. cosas asi.

--> Sorry for the spanish guys, it's just alot of information and alot easier to explain when the person asking for help is a native spanish speaker.

Soldan :)

This is an English only forum. Try writing in English, as it might help others who come across the same problem at a later time.

I deleted your post as it was violating one of the few rules we have.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: stoneharry on September 21, 2012, 09:22:44 am
Are they game objects?

NPCs load before game objects, so they can fall to the real ground level (or next object if loaded in time) client side.

If you did this via noggit (direct map editing) then I have no idea.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: larrylaffer on September 22, 2012, 04:08:52 am
Quote from: "stoneharry"
Are they game objects?

NPCs load before game objects, so they can fall to the real ground level (or next object if loaded in time) client side.

If you did this via noggit (direct map editing) then I have no idea.

No, there are map objects, i added them via noggit.

About the solution that soldan gave me (assign a new zone id, then delete the npcs and recreate them with new  entry.. etc.) it doenst work for us.

It seems that the problem is that the server reads the z position of the npc to low. If we appear in the npc position, we appear under the floor. However is not a server problem because some custom maps and blizz maps works fine.

Probably we need to add some data in the map or in the wmo in order to properly make it work, but we are stuck at the moment.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on September 29, 2015, 10:57:59 am
This issue sounds exactly what I discovered now. Somebody found any solution ?

My case:
I copied in Noggit the dock from Ratchet (ratchet_dock.wmo) to another place I wanted to have a new harbor.
I use TC and recreated all maps, mmaps, vmaps for the server.

Than I spawned some NPCs on the dock. They stay, that's not the problem. But they don't move.
- If the NPC has random waypoints, he just stays on it's spawn point. Didn't try to move.
- If I make individual waypoints (a way to harbor and back to the dock) the NPC is walking but if he comes over water (means water is under the dock) he is falling through the dock into the water and continues to walk back to harbor ^^.

First I thought that's maybe a normal behaviour either of client or server. But than I spawned the same NPCs on Ratchet on the same dock. And there everything is working fine.

So I guess if have to set somewhere in the ADT a flag or something like that to make the WMO marked as solid.

Any ideas ?
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on September 29, 2015, 02:42:25 pm
Server side maps, vmaps and mmaps need to be updated. You have changed map on client side, fine, but don't expect that server will somehow change it on its own on its side too :D.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on September 29, 2015, 03:00:17 pm
?

I wrote:

I use TC and recreated all maps, mmaps, vmaps for the server.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on September 29, 2015, 03:10:27 pm
Than you haven't updated (re-generated) them properly. Wth was that topic about thet... I can't find it, nvm.

I have noticed that when having part of map in 1st MPQ and part/newer version of map in 2nd MPQ leads to having data extracted only from 1st MPQ and data from 2nd one is simply skipped during generation. So, if you are extracting map data from map files which are being split across more MPQs, and thats just case anytime you modify blizzlike map, it can help a lot to put all data into just one MPQ. Friend of mine once told me that modifying blizzlike MPQs can corrupt them, I have personaly never tested it, but I keep a whole non-used client just for extracting purpouses, to make sure that all map files are together and are extracted properly.

#TC extractors.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on September 29, 2015, 04:04:47 pm
Well, I was working quite a lot with TC map extractors and have added some loging functionality and the ability to limit the creation process to only a specific map etc. At that time I just was curios what's going on inside and it was quite interesting. I learned a lot about adts.

Therefore I'm quite sure that all patches are read in the way they should.

Additionally I can see ingame that the new maps are working. Because I also changed some ground terrain. And on the ground players and NPCs walking fine. With wrong (old) maps they sometimes fly over or walk beyond the map.

If I understand you right you tell that if data (map) in a higher patch has newer timedate the TC extractors may extract only this one from the older patch with lower number. Did I understand you right ?

But that would be a heavy bug in the extractor because that's the basic of MPQ patches.

But let's make another brainstorm:

Is it a serverside issue or is it a clientside issue ?

Personally I think it's a clientside issue (if it is, we don't need to think about map extractors longer).

Why I'm thinking so:

When I add manual waypoints to a NPC they are saved in the database. I can also visual check them by a GM command. The waypoints are correct. So I guess the core is nothing else doing than sending these waypoint coordinates to the client. With other words: The core is sending correct coordinates to the client. Regardless on any maps.
So the client receives the coodinates of the NPC and is trying its best to move the NPC over terrain and objects like dock wmo. At this point the server core is out of the game. It's the client who handles the movement of the NPC. Therefore if there is a bug, the bug should be in the adt.

This is my understanding what's happening. Would like to hear your opinions.

EDIT:
And btw, the map extractor of TC was able to read only till patch-5. At least in Jan 2015. Don't know if they fixed it ever. If not I made this:
Code: [Select]
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index a573f9f..7d90f36 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -100,6 +100,15 @@ const char *CONF_mpq_list[]={
     "patch-3.MPQ",
     "patch-4.MPQ",
     "patch-5.MPQ",
+    "patch-6.MPQ",
+    "patch-7.MPQ",
+    "patch-8.MPQ",
+    "patch-9.MPQ",
+    "patch-a.MPQ",
+    "patch-b.MPQ",
+    "patch-c.MPQ",
+    "patch-d.MPQ",
+    "patch-e.MPQ",
 };
 
 static const char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on September 29, 2015, 07:43:13 pm
"If I understand you right you tell that if data (map) in a higher patch has newer timedate the TC extractors may extract only this one from the older patch with lower number. Did I understand you right ?

But that would be a heavy bug in the extractor because that's the basic of MPQ patches."


But it is so. When I had my modified PvPZone02 map in patch-3.mpq (yes, I was using that blizzlike one), map files were extracted only for blizzlike content from patch.mpq where original PvPZone02 files are stored and those custom put into patch-3.mpq were completely ignored. Don't ask me why, but it was so and the only one thing which truly solved that for me was putting my modified map into patch.mpq itself. Extractors did read and use patch-3.mpq, but by than they were already "done" with PvPZone02 and weren't even checking for more of that map's data, apparently. Just btw, as far as I know it is not that in common that in MPQs in Data folder (not in Locale folder) are duplicated data. All files I have ever seen were only in one of MPQs and had no other version in another MPQ, but I might be wrong in this case.

"When I add manual waypoints to a NPC they are saved in the database. I can also visual check them by a GM command. The waypoints are correct. So I guess the core is nothing else doing than sending these waypoint coordinates to the client. With other words: The core is sending correct coordinates to the client. Regardless on any maps."

Tbh, that proves absolutely nothing. Because that display function for waypoints only spawns temporary wisp NPCs (ID 1). Btw, those wisps have fly. Both NPC and waypoint coordinates are in 3d system, they don't care about ground height coordinate, so that you can spawn waypoint into something what might be just empty air for server and that waypoint wisp appears in place which is for server air is just how it works and is supposed to work. So, sadly, what you wrote and tryed means nothing in this case :X.

About sending data to client, you are slightly wrong here, too. Server knows where waypoints are, server handles NPC movement (by using vmaps and mmaps) between those waypoints and to client are sent results of calculations of NPC's movement. Which means that client may (or may even actually not) know coords of waypoints, but it has quite likely just absolutely no or little use for them (well, I believe client actually works with NPC movement a little bit too, but most of calculations would be still made by emu). NPC also needs more than waypoints to determine how it moves - it needs to know about collisions with other models, with gobs, with terrain... Letting client do so would not be very hack-proof, smart or responsible by both blizzard and trinity devs.

I have been working with custom and modified maps for years and whenever NPCs were moving oddly, it was server side map files fault. Server may know very well where waypoints are, but if it thinks that they are somewhere in the air, above a terrain or out of building's floors, it will just attempt to make NPC (if it is not flying NPC) move on something what server thinks should be ground/floor, to prevent it from flying effect. Sadly, on customized maps it is this what actually makes flying effects.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on September 30, 2015, 12:30:10 pm
Thank you for the interesting explanation.

I have to think a little bit about how to put all the stuff in one MPQ only. At least it would be worthy to give a try.
But just wanted to remember that some of the extractors never was able to read a file like patch-6.mpq f.ex. That was maybe also a reason for some confusion.

Before I do the MPQ compression stuff I would like to do another simple test:

I will copy the original dock.wmo in Ratchet and will put it a copy of it beside the other in the same adt. Than I will recreate the maps and check what's happening.
Possible results are: Both dock are not working, both are working or only one of it. ^^

The result may could proof if it is really a timedate based issue of reading different MPQs. Because than both docks would be in the same adt and than in the same new mpq file.

Do you agree ?
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on September 30, 2015, 01:53:48 pm
That might work (well, I am not entirely sure if I get what you want to do well).


My original issue with PvPZone02 files was that I have completely recreated WDT file, changed amount of ADTs and even their coordinates. On coords where original map was I had blank space, I didn't have even 1 ADT there. Both my ADTs and WDT were in patch-3.mpq, while blizzlike map was in patch.mpq. Sadly, extractors were still extracting that blizzlike version (I have figured that out quite simply - I have just checked tile IDs in map files names, from my ADTs were extracted no data, from blizzlike all data while those should not exist at all anymore). Re-moving my ADT and WDT data to patch.mpq solved that. I had also similiar problems with extracting data for my Stormwind map - again, outdated blizzlike files were being extracted, while mine were not.

So, find where (Kalimdor I suppose) map is located, in which MPQ, try to add your modified ADT into that MPQ so you really literaly overwrite blizzlike version. That should definitely work. Placing that modded ADT into another MPQ works for client, noggit, MPQ editor, WMV and whatever else, but it seems it doesn't work for extractors as it should, at least not in all cases.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Drikish on October 16, 2015, 12:32:41 am
Hi there - the only way to stop npc's from running through wmo's is to generate M-maps for your server.
This generates a low res wireframe of vertices from the game world as a hole in chunks. The game then know a where, objects exist and calculates box movement according to logic. Aka if you jump off a wall the npc's will find a path down to you.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on October 16, 2015, 10:03:09 am
Hi,
mmaps may solve a different problem but not this one in my case.

I can proof that. As for TC the mmaps are optional. I had just switched them off (be renaming the mmaps folder and may changing the config file ? I have forgotten ^^) so the core is using the vmaps only.

After that I checked the dock.wmo in Ratched. The original one by Blizz is still working while the copied one by Noggit is not.

In the meantime I found out that I also don't need to test this issue with NPCs. The GM command .gps shows all relevant information about this issue. Walk over the original dock and make .gps. It will show something like that: ground level -20, floor level +5. That is when the vmaps are extracted fine. The core recognizes that I'm walking on the dock on a level of about 5 meter. On the Noggit placed dock wmo you have always ground and floor level at f.e.x -20m, means the dock wmo is not recognized well.

By examining the adt file in detail I have seen this:
The original dock is referenced in all MCRF sub-chunks it is in like these coordinates of sub-chunks:
12/0 13/0
12/1 13/1
12/2 13/2 14/2

As you can see these chunks are exactly the L-shape of the Ratched dock.

Noggit does not save the dock wmo in the same way. I believe that's may why the extractor isn't working well after.

Amaroth's hint with MPQ didn't helped me in this case. I put my ADT in different MPQ, also patch, patch-2, 3 wherever it makes senses. But no change.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on October 16, 2015, 10:07:08 am
Juuuuust a question. What noggit version are you using? There have been some issues with WMO models in older versions which were fixed in SLD... 1.2? 1.3? Anyway, the newest version wouldn't hurt, if you don't use it.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on October 16, 2015, 10:10:36 am
I use 1.2

With 1.3 and 1.4 I have only tons of problems and they save things in a very strange manner.

BTW: THIS issue I have tested with all 3 versions of Noggit already ;-)
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on October 16, 2015, 02:31:09 pm
Quote from: "Magnus"
With 1.3 and 1.4 I have only tons of problems and they save things in a very strange manner.
They do so for pretty good reason. Still, if you have tryed the same with them and it didn't work out, then I am just out of ideas.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Steff on October 16, 2015, 02:43:37 pm
pre.  sdl 1.3 dont save the wmo data right.  so wmo map calculation dont work.
copy map to ankther project.  save all adts once with sdl 1.3 or heigher.  run extractor on this adts.  trow then in trash.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on October 16, 2015, 03:20:03 pm
I just found the project folder when I was testing it with Noggit 1.3.

But I will do it once more. May I made a mistake. I have now so a lot of copies of folders for testing purposes.



EDIT:
Tested once more with Noggit 1.3 and 1.4 by recreating vmaps. Still doesn't work.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on October 16, 2015, 07:00:02 pm
Again, just to make sure. Have you spawned that WMO in new Noggit, or just opened ADT with that WMO and re-saved that ADT by using new noggit? I know we are probably driving you mad, but the second option possibly won't work :D.

Open 1.2-made ADT in 1.3/1.4 and select WMO model you have spawned in 1.2. Check, if you see green box around WMO. If you don't, click with middle mouse button, you don't actually have to move WMO, only that middle-click is needed. Green box will appear. Save and try. And again, if you have done this (or spawned WMO directly in 1.3/1.4, in uch case you wouldn't need to do this) then sorry for spamming.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on October 16, 2015, 07:11:40 pm
I have selected another object (a tree) and rotated it a little bit.

I thought that's good enough for recalculating this adt and save it.

Do I need to select the wmo ?
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on October 16, 2015, 07:31:39 pm
Tree isn't object you have issues with. It isn't even WMO. You need to select every single WMO which was spawned by using 1.2 and middle-click while it is being selected. Without doing so, WMO data will remain corrupted a little bit. So, like I said, select your ratchet in SDL 1.3/1.4 and check if you can see big green box around it, I am not sure what is that box, some kind of bounding box of WMO? Whatever. If you can't see it/it is very small and just somewhere around model's origin, then you need to do that middle-click. Without that you fixed nothing.

In a short version - 1.3/1.4 SDL need to be used to spawn or move trouble-giving WMO model to fix that model's data, just saving ADT in that noggit version won't do anything on its own.
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Magnus on October 17, 2015, 11:28:09 am
Works ! That middle mouse click makes it !

Thank you for your patience :)
Title: Re: [QUESTION] Ingame error: npcs falling to ground from WMO
Post by: Amaroth on October 17, 2015, 12:18:22 pm
Kinda stupid reason to have 3 pages of walls of text :D. OK, np.