Jump to content
  • 0

When Monster Level Up option is selected, MvPs respawn with the same level they were killed


PedroProplayer

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   4
  • Joined:  10/10/13
  • Last Seen:  

When the option for allowing monsters to level up when they kill players(mobs_level_up at battle/monster.conf), I've noticed that MvPs will respawn with the same level they were killed.

For example, if a given MvP kills 10 players and gains 10 levels, it will respawn 10 levels higher the next cycle. This effectively makes MvPs much stronger than they should be, overtime.

Obviously, I don't want this to happen. I want MvPs to respawn always at their default level. Any ideas on how to make this work?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   28
  • Joined:  11/08/11
  • Last Seen:  

10 hours ago, OwTen said:

Try commenting this out in src/mob.cpp

//		if(battle_config.mobs_level_up && md->level > md->db->lv) // [Valaris]
//			bonus += (md->level-md->db->lv)*battle_config.mobs_level_up_exp_rate;

 

This is part of the EXP calculation for mobs that leveled up and not related to respawning.

 

In src/map/status.cpp in function status_calc_mob_ replace lines

	if (opt&SCO_FIRST) { // Set basic level on respawn.
		if (md->level > 0 && md->level <= MAX_LEVEL && md->level != md->db->lv)
			;
		else
			md->level = md->db->lv;
	}

with

	if (opt&SCO_FIRST) { // Set basic level on respawn.
		if (md->level > 0 && md->level <= MAX_LEVEL && md->spawn && md->spawn->level) {
			// Restore specific level used in spawn file
			md->level = md->spawn->level;
		}
		else
			md->level = md->db->lv;
	}

 

This restores the level set in a spawn file, otherwise the mobs will respawn with it's default level.

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.

×
×
  • Create New...