Mob Z coordinates

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

Mob Z coordinates

Postby Sharp » Tue Sep 20, 2016 9:03 am

Greetings,
I got problem with issue related to mob z coorinates. I want to create script that will spawn mob in zone, but i need to define where is located the texture-ground, unless mob will be placed in air or worse scenario where it will be placed under textures.
Is there any easy way to calculate it somehow?
For every help thx so much :)

Regards Sharp.
User avatar
Sharp
DOL Initiate
 
Posts: 17
Joined: Tue Sep 20, 2016 8:33 am

Re: Mob Z coordinates

Postby HunabKu » Thu Sep 22, 2016 3:37 pm

You need to set a Z value.
If th mob is up on Z axis, it will fall, no problem.
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: Mob Z coordinates

Postby Sharp » Thu Sep 22, 2016 4:19 pm

You need to set a Z value.
If th mob is up on Z axis, it will fall, no problem.
Hey, thx for answer!
I know, it appear on ground and even aggro ppls, but it take times before start hit due of moving up from 0--->ground/land Z.
Is there a way to calculate that Z value somehow, because in other way i will get that mob issue :)

Thanks in advance.
User avatar
Sharp
DOL Initiate
 
Posts: 17
Joined: Tue Sep 20, 2016 8:33 am

Re: Mob Z coordinates

Postby LugusSkye » Thu Sep 22, 2016 4:30 pm

i am afraid that only way to find max(z coordinate) of any point on land is to get that location from client file that renders the zone. if anyone here is an expert in modifying client files - would be interesting to know if that is true or not.
User avatar
LugusSkye
DOL Initiate
 
Posts: 20
Joined: Fri Sep 09, 2016 4:05 am

Re: Mob Z coordinates

Postby Sharp » Thu Sep 22, 2016 6:46 pm

i am afraid that only way to find max(z coordinate) of any point on land is to get that location from client file that renders the zone. if anyone here is an expert in modifying client files - would be interesting to know if that is true or not.
Thank you for your answer!
Yes def would like to hear opinion from the expert also.
User avatar
Sharp
DOL Initiate
 
Posts: 17
Joined: Tue Sep 20, 2016 8:33 am

Re: Mob Z coordinates

Postby Leodagan » Fri Sep 23, 2016 6:31 am

You need client geometry or something that can "mimic" them...

Dawn Of Light server currently have no idea of what the world looks like, for the server all Regions are made up of Zones which are Empty Cubes (65k units by side)

Getting Z-axis ground level is not possible without building some kind of module for DOL that would have data to match the client geometry !

One possibility is to try loading client assets inside Regions (read client files at startup and keep terrains/models in memory), but it will be very memory hungry.

An other Possibility is to build a navigation map out of client files and only keep a simple model with areas where npc/player can "walk"

A minimal version of navigation map would be to use terrain height-maps with an interpolation algorithm without building the whole triangle mesh, this will not work for dungeons or cities, this will not detect buildings / trees / bridges...

If your skilled enough in C# and Geometry you can try to look at my Client Lib project : https://github.com/dol-leodagan/DaocClientLib

It's not ready to use, I'm having a hard time trying to guess what the client files means, and how to import every relevant in-game content to have an accurate navigation map !
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Mob Z coordinates

Postby Sharp » Fri Sep 23, 2016 7:27 am

Thank you alot for your post Leo, that give me some better view on this issue :)
User avatar
Sharp
DOL Initiate
 
Posts: 17
Joined: Tue Sep 20, 2016 8:33 am

Re: Mob Z coordinates

Postby Blue » Mon Sep 26, 2016 2:57 pm

Don't know if its still the same. This is how it worked:

- Mob is at Z=0 when random walking because the server does not know Z at the target coord X,Y
- When the mob is attacked and the mob starts to follow an object/player Z is immediately set to the target objects Z.

Basically that should work good but something seems to mess up. It could be that the check if (Z == 0) fails.

So back to your question, its totally ok to set Z=0 for mobs spawned by your script. They will automatically patch to targets Z when they begin to follow it.
ex DOL Lead Developer
Blue
Uthgard Admin
 
Posts: 961
Joined: Wed Jan 21, 2004 11:07 pm
ICQ: 63977313

Re: Mob Z coordinates

Postby LugusSkye » Mon Sep 26, 2016 4:36 pm

what happens if you have a mob which has a "path" like behavior - patrolling, moving in certain area.
if you insert this mob using DB script with Z = 0, how will it move considering starting point has coords Z = 0?
and not only mob related but if you are creating a new teleport location - you won't be able to do it with Z = 0, at least i don't think it will port you successfully.
User avatar
LugusSkye
DOL Initiate
 
Posts: 20
Joined: Fri Sep 09, 2016 4:05 am

Re: Mob Z coordinates

Postby Blue » Mon Sep 26, 2016 5:03 pm

If you have a path at hand then you have a Z coord. Just take a point on the path when you spawn the NPC.

An ingame location to teleport to should be created from ingame (then you have Z ofcourse). Uthgard uses named teleport locations which can be registered on the fly by GM's. Not sure about the state in DOL.
ex DOL Lead Developer
Blue
Uthgard Admin
 
Posts: 961
Joined: Wed Jan 21, 2004 11:07 pm
ICQ: 63977313

Re: Mob Z coordinates

Postby LugusSkye » Mon Sep 26, 2016 5:25 pm

i believe in scripts, Blue and i believe OP had same in mind. but you are right, some things need human intervention oh well! ;)
User avatar
LugusSkye
DOL Initiate
 
Posts: 20
Joined: Fri Sep 09, 2016 4:05 am

Re: Mob Z coordinates

Postby Sharp » Mon Sep 26, 2016 7:28 pm

Thx you Blue for your time and answers :) that rly helps me in work!
-cheers
User avatar
Sharp
DOL Initiate
 
Posts: 17
Joined: Tue Sep 20, 2016 8:33 am


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest