Respawn time for mobs

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

Moderator: Support Team

Respawn time for mobs

Postby Leorekk » Sat Feb 04, 2017 6:18 pm

There are mobs respawning extrem slow, for example the "Albion Invader" on mid startregion, he has on the DB a RespawnInterval of 0, what does 0 here mean? In which measure is this value in the DB - minutes, seconds, milliseconds?

There are alot of other mobs with a 0 too, as far i saw, is there a way to globally lower the respawn time?

BR
Leorekk
Leorekk
DOL Initiate
 
Posts: 17
Joined: Tue Jan 31, 2017 6:33 pm

Re: Respawn time for mobs

Postby PlanarChaosRvrtwo » Sat Feb 04, 2017 6:33 pm

Respawn Interval 1800 means 3 minutes.
And RespawnInterval 0 means no spawn after death.
Replacevalue just mean if it spawn or not.

to fix that generally use this Heidisql command (save db before):

UPDATE mob
SET RespawnInterval = replace(field, '0', '2400')

that will set all mobs with no respawn timer to respawn time 4 minutes.
Last edited by PlanarChaosRvrtwo on Sat Feb 04, 2017 6:49 pm, edited 3 times in total.
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: Respawn time for mobs

Postby PlanarChaosRvrtwo » Sat Feb 04, 2017 6:43 pm

Im aware of that issue i gonna do a beta version of my db with that fixed but atm to ill to do it.
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: Respawn time for mobs

Postby Leorekk » Sat Feb 04, 2017 7:02 pm

OK, if the logic is stay dead if its 0, it shouldnt be 0 for most of the mobs then right?

But if its in seconds, thats enough to know, i will patch it locally too - thanks!
Leorekk
DOL Initiate
 
Posts: 17
Joined: Tue Jan 31, 2017 6:33 pm

Re: Respawn time for mobs

Postby PlanarChaosRvrtwo » Sat Feb 04, 2017 7:05 pm

It shouldtnt be 0 correct but couse i needed to mix very outdated dbs and such to have again an very useful db a few errors occured like that and i tried to fix all my own but now its at that point i wasnt able to find fails my own so i released and let players appeal so the next db will have this fixed.
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: Respawn time for mobs

Postby Leorekk » Sat Feb 04, 2017 8:05 pm

I patch my DB now like this:

/*SELECT * FROM mob WHERE ClassType='DOL.GS.GameNPC' AND (RespawnInterval = 0 OR RespawnInterval = NULL)*/
UPDATE mob SET RespawnInterval = 60 WHERE ClassType='DOL.GS.GameNPC' AND (RespawnInterval = 0 OR RespawnInterval = NULL)

The GameNPC are the only once which would need it, i think... maybe there are others, but i need to investigate the logic of the table further.
Leorekk
DOL Initiate
 
Posts: 17
Joined: Tue Jan 31, 2017 6:33 pm

Re: Respawn time for mobs

Postby PlanarChaosRvrtwo » Sat Feb 04, 2017 11:17 pm

that works too ofc^^
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: Respawn time for mobs

Postby Leodagan » Sun Feb 05, 2017 10:20 am

RespawnInterval with 0 value doesn't mean that mob won't respawn !

0 value is treated like a default value and the server will randomize the Respawn Timer using Server Properties ( I think default Server Properties may be around 5 or 15 minutes :P )

To disable a mob Respawning (I don't remember if that's possible...) you may try to use a negative value like "-1", most database fields that are "signed" integer when only positive value make sense probably have special behavior for negative value... (but it's not consistent between negative meaning auto-config or negative meaning disable...)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Respawn time for mobs

Postby PlanarChaosRvrtwo » Sun Feb 05, 2017 11:02 am

Nvm checked it was wrong i did an fail^^
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: Respawn time for mobs

Postby PlanarChaosRvrtwo » Sat Feb 11, 2017 10:26 pm

I checked again -1 is script based respawn timer 0 means no respawn.
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: Respawn time for mobs

Postby Leodagan » Sun Feb 12, 2017 8:20 am

I must insist that "0" is in not meaning "No Respawn"

Here is the RespawnInterval Property of a GameNPC
Code: Select all
/// <summary> /// The Respawn Interval of this mob in milliseconds /// </summary> public virtual int RespawnInterval { get { if ( m_respawnInterval > 0 || m_respawnInterval < 0 ) return m_respawnInterval; int minutes = Util.Random(ServerProperties.Properties.NPC_MIN_RESPAWN_INTERVAL, ServerProperties.Properties.NPC_MIN_RESPAWN_INTERVAL + 5); if (Name != Name.ToLower()) { minutes += 5; } if (Level <= 65 && Realm == 0) { return minutes * 60000; } else if (Realm != 0) { // 5 to 10 minutes for realm npc's return Util.Random(5 * 60000, 10 * 60000); } else { int add = (Level - 65) + ServerProperties.Properties.NPC_MIN_RESPAWN_INTERVAL; return (minutes + add) * 60000; } } set { m_respawnInterval = value; } }
There is clearly Randomization of Respawn Time when the RespawnInterval is "0"

In GameNPC.StartRespawn we can see that any negative value will disable the Respawn Timer
Code: Select all
int respawnInt = RespawnInterval; if (respawnInt > 0) { lock (m_respawnTimerLock) { if (m_respawnTimer == null) { m_respawnTimer = new RegionTimer(this); m_respawnTimer.Callback = new RegionTimerCallback(RespawnTimerCallback); } else if (m_respawnTimer.IsAlive) { m_respawnTimer.Stop(); } // register Mob as "respawning" CurrentRegion.MobsRespawning.TryAdd(this, respawnInt); m_respawnTimer.Start(respawnInt); } }
There is even example in code on how to use this for Adventure Wing Instances :
Code: Select all
// Set respawn to false foreach(GameNPC mob in GetMobsInsideInstance(true)) { mob.RespawnInterval = -1; }
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Respawn time for mobs

Postby PlanarChaosRvrtwo » Sun Feb 12, 2017 10:50 am

gah worked to long yesterday and mixed up the current code and an very old code.
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


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest