Jump to content

Dynamic Mobs Not Respawn MVP! (very small mod)


Recommended Posts

Posted (edited)

As all of you know, when dynamic_mobs option is swithed to "yes" all MVP & BOSS monsters respawning on restart, but this option is so usefull on small servers, because it's save lots of resources.

 

My modification allows to leave them static! Only MVP & BOSS monsters

 

All you have to do - is to change one line of code in npc.c.

 

if( battle_config.dynamic_mobs && map_addmobtolist(data->m, data) >= 0 )

to

if( battle_config.dynamic_mobs && !mob.state.boss && map_addmobtolist(data->m, data) >= 0 ) 

 

Hope it will be usefull :-D

Edited by ivanyan
  • Upvote 1
Posted

where is the difference? it does not matter if the mobs gets spawned when the map is not empty anymore or when mvps get spawned immediately. as you said, only a matter of ressources.

Posted (edited)

MVP dies on restart, when it is dynamic_mobs "off", but respawn immideately after restart when somebody appears on a map close to MVP when it switched to "on".

That's why I decidet to move boss monsters to static mobs, and all other mobs to dynamic.

 

The difference is, if your server crashes, your MVPs respawn immediately after server start. If it crashes again, MVP respawn again and again and so on... so your players will have tonns of MVP cards, if your server is unstable...

Edited by ivanyan
  • 3 months later...
Posted (edited)

Hi there,

Just to make sure I understood well

On 10/18/2013 at 1:42 AM, ivanyan said:

As all of you know, when dynamic_mobs option is swithed to "yes" all MVP & BOSS monsters respawning on restart, but this option is so usefull on small servers, because it's save lots of resources.

 

My modification allows to leave them static! Only MVP & BOSS monsters

 

All you have to do - is to change one line of code in npc.c.


if( battle_config.dynamic_mobs && map_addmobtolist(data->m, data) >= 0 )

to


if( battle_config.dynamic_mobs && !mob.state.boss && map_addmobtolist(data->m, data) >= 0 ) 

Hope it will be usefull ?

 

Once I modified the source line in npc.c; should i leave the dynamic_mobs 1 or 0 for the modification to apply (so ONLY MvP monsters won't respawn on server's reboot) ?

 

Figured out (I think); so the idea is to leave Dynamic_mobs = 1 and to modify the line in npc.c

Someone please correct me if I am wrong, if not then all good :)

Edited by Adam
  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...