Region ID's being the same value

A place where you can talk about anything Dawn of Light or DAOC related

Moderators: Project Admin, Support Team

Region ID's being the same value

Postby gladefall » Mon Jun 12, 2017 2:29 am

Hi all,

I am trying to understand the Region ID's being the same for many zones in the game. Can Region not be the same as ZoneID so each zone has it's own unique RegionID?

The reason for the inquiry is I was using a field in Mob and NPCtemplate to designate which zone there are located in for a view I want to create. As always, thanks for the help.

Glade
gladefall
DOL Initiate
 
Posts: 16
Joined: Thu Mar 09, 2017 2:10 am

Re: Region ID's being the same value

Postby ontheDOL » Mon Jun 12, 2017 2:54 am

Basically, each "region" is defined where you have to enter a loading screen. Where as a "zone" is the different areas/subregions?( i guess you could call it?) within a region. We only load into Albion classic once (region 1 ) for its 14 zones.

We use the regionID to define several things that affect all the zones within that region, such as Immunity timer when zoning, pve movement speed etc , it also allows to disable/enable the loading of the entire region.

If i understand you correctly, you want to be able to be able to see in the database what zone each mob is in? I know the "mob" table only has a RegionID column. If this is what you want to do, you could create a new column called ZoneID ( this would have to be done in the "mob" table script. Then add some fields in /mob command and in GameNPC that when a mob is saved to database its currentzoneID could be saved into the new "ZoneID" column you created.... If this isn't what your talking about maybe clarify for me ;)
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: Region ID's being the same value

Postby gladefall » Mon Jun 12, 2017 3:05 am

That is exactly what I was looking to do. Thank you for the explanation and advice!
gladefall
DOL Initiate
 
Posts: 16
Joined: Thu Mar 09, 2017 2:10 am

Re: Region ID's being the same value

Postby ontheDOL » Tue Jun 13, 2017 12:21 am

i like the idea, especially handy for the same mob with different npctemplates , so you can track which template is used where. I might look into it as well ;)
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: Region ID's being the same value

Postby PlanarChaosRvrtwo » Tue Jun 13, 2017 1:01 am

Maybe even more useful use an packageid for mobs and use Zonename rather then Zoneid.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Region ID's being the same value

Postby ontheDOL » Sat Jun 17, 2017 12:55 am

so i've added this field and it works fine when creating a new mob, because we can add logic to SaveIntoDatabase to save the mobs zonename into the DB.

But, i've been trying to come up with a way that all current mobs can get their zonenames exported to the database... but where ever i've tried so far , i cant get past "not established as an instance of an object" error (my favorite #$@%^ error ;) )

anyway, i'll keep trying...
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: Region ID's being the same value

Postby PlanarChaosRvrtwo » Sat Jun 17, 2017 3:26 am

Maybe the workaround can handle it ontheDOL couse isnt there an save interval? if you could edit that save method so each ingame mob get added new to db?
Or what about delete mobs outa db (all mobs) so the cache can save em back to db?
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Region ID's being the same value

Postby ontheDOL » Sat Jun 17, 2017 3:57 am

aye, I ended up making a command that goes through every gamenpc and adds their currentzone.description and saves back to database... i couldn't figure out another way, but you only have to run the command once so i guess its not too bad (too quite awhile on my shitty laptop for command to run its course with 24k mobs)


Image
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: Region ID's being the same value

Postby elcotek » Tue Jun 20, 2017 9:51 am

Hello,
With this pice of code you can get the zone description direct from any region id and don't need a object.

Add this into your World Mamager:
Code: Select all
/// <summary> /// Get the zone description of a region id /// </summary> /// <param name="redionID"></param> /// <returns>the zone description or not avaiable</returns> public static string GetZoneDescription(ushort regionID) { Zone zone; if (m_zones.TryGetValue(regionID, out zone)) return zone.Description.ToString(); return "not avaiable"; }

Greetings :wink:
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 177
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany


Return to “%s” General

Who is online

Users browsing this forum: No registered users and 1 guest