Jump to content
  • 0

mobs/stone drop by level ?


DeYaN.
Go to solution Solved by Ikarus_,

Question

I have a strange problem on my server , 

Why players with a lower level(ex 56) has a good drop on stone metin (lv90 ) compared to a player with lv higher than stone (ex 94)

I want to make a calibration like : + / - 10 levels - same drop . 

Link to post

7 answers to this question

Recommended Posts

  • 1
  • Solution

VERY BIG DISCLAIMER: I m going to show you where the level delta is applied and how they made the constants, but they are used for all monsters, and not only for Stones.

 

 

 

long answer:
 

Spoiler

 in game/src/constants.h
 


#define PERCENT_LVDELTA(me, victim) aiPercentByDeltaLev[MINMAX(0, (victim + 15) - me, MAX_EXP_DELTA_OF_LEV - 1)]
#define PERCENT_LVDELTA_BOSS(me, victim) aiPercentByDeltaLevForBoss[MINMAX(0, (victim + 15) - me, MAX_EXP_DELTA_OF_LEV - 1)]

 

 

as you can see here is calculating a PERCENTAGE to apply to the drop chance which depend on level delta (monster level - player level)

 

These are macros which are using aiPercentByDeltaLev and aiPercentByDeltaLevForBoss and they are defined in constant.h/constant.cpp.

 

here is where is calling the macros (item_manager.cpp  ITEM_MANAGER::GetDropPct ):


	if (!pkChr->IsStone() && pkChr->GetMobRank() >= MOB_RANK_BOSS)
		iDeltaPercent = PERCENT_LVDELTA_BOSS(pkKiller->GetLevel(), pkChr->GetLevel());
	else
		iDeltaPercent = PERCENT_LVDELTA(pkKiller->GetLevel(), pkChr->GetLevel());

 

 

here is where the aiPercentByDeltaLev and aiPercentByDeltaLevForBoss are defined (i really don't like how they are defined)  from constants.cpp:


const int * aiPercentByDeltaLev = NULL;
const int * aiPercentByDeltaLevForBoss = NULL;


 

They are instanced as NULL and they get the real value on runtime by parsing the locale (from locale_service.cpp):


void LocaleService_TransferDefaultSetting()
{
	if (!check_name)
		check_name = check_name_euckr;

	if (!is_twobyte)
		is_twobyte = is_twobyte_euckr;

	if (!exp_table)
		exp_table = exp_table_common;

	if (!CTableBySkill::instance().Check())
		exit(1);

	if (!aiPercentByDeltaLevForBoss)
		aiPercentByDeltaLevForBoss = aiPercentByDeltaLevForBoss_euckr;

	if (!aiPercentByDeltaLev)
		aiPercentByDeltaLev = aiPercentByDeltaLev_euckr;

	if (!aiChainLightningCountBySkillLevel)
		aiChainLightningCountBySkillLevel = aiChainLightningCountBySkillLevel_euckr;
}

 

 

Finally we can see here that the real array const defined is aiPercentByDelta_euckr and aiPercentByDeltaLevForBoss_euckr, which are defined in constants.cpp:

 



// MIN(MAX_EXP_DELTA_OF_LEV - 1, (Àû·¾ + 15) - ³»·¾))
const int aiPercentByDeltaLevForBoss_euckr[MAX_EXP_DELTA_OF_LEV] =
{
	1,      // -15  0
	3,          // -14  1
	5,          // -13  2
	7,          // -12  3
	15,         // -11  4
	30,         // -10  5
	60,         // -9   6
	90,         // -8   7
	91,         // -7   8
	92,         // -6   9
	93,         // -5   10
	94,         // -4   11
	95,         // -3   12
	97,         // -2   13
	99,         // -1   14
	100,        // 0    15
	105,        // 1    16
	110,        // 2    17
	115,        // 3    18
	120,        // 4    19
	125,        // 5    20
	130,        // 6    21
	135,        // 7    22
	140,        // 8    23
	145,        // 9    24
	150,        // 10   25
	155,        // 11   26
	160,        // 12   27
	165,        // 13   28
	170,        // 14   29
	180         // 15   30
};



const int aiPercentByDeltaLev_euckr[MAX_EXP_DELTA_OF_LEV] =
{
	1,  //  -15 0
	5,  //  -14 1
	10, //  -13 2
	20, //  -12 3
	30, //  -11 4
	50, //  -10 5
	70, //  -9  6
	80, //  -8  7
	85, //  -7  8
	90, //  -6  9
	92, //  -5  10
	94, //  -4  11
	96, //  -3  12
	98, //  -2  13
	100,    //  -1  14
	100,    //  0   15
	105,    //  1   16
	110,    //  2   17
	115,    //  3   18
	120,    //  4   19
	125,    //  5   20
	130,    //  6   21
	135,    //  7   22
	140,    //  8   23
	145,    //  9   24
	150,    //  10  25
	155,    //  11  26
	160,    //  12  27
	165,    //  13  28
	170,    //  14  29
	180,    //  15  30
};

 

 

 

 

 

short answer:
 

Spoiler

from constants.cpp:
 



// MIN(MAX_EXP_DELTA_OF_LEV - 1, (Àû·¾ + 15) - ³»·¾))
const int aiPercentByDeltaLevForBoss_euckr[MAX_EXP_DELTA_OF_LEV] =
{
    1,      // -15  0
    3,          // -14  1
    5,          // -13  2
    7,          // -12  3
    15,         // -11  4
    30,         // -10  5
    60,         // -9   6
    90,         // -8   7
    91,         // -7   8
    92,         // -6   9
    93,         // -5   10
    94,         // -4   11
    95,         // -3   12
    97,         // -2   13
    99,         // -1   14
    100,        // 0    15
    105,        // 1    16
    110,        // 2    17
    115,        // 3    18
    120,        // 4    19
    125,        // 5    20
    130,        // 6    21
    135,        // 7    22
    140,        // 8    23
    145,        // 9    24
    150,        // 10   25
    155,        // 11   26
    160,        // 12   27
    165,        // 13   28
    170,        // 14   29
    180         // 15   30
};

const int aiPercentByDeltaLev_euckr[MAX_EXP_DELTA_OF_LEV] =
{
    1,  //  -15 0
    5,  //  -14 1
    10, //  -13 2
    20, //  -12 3
    30, //  -11 4
    50, //  -10 5
    70, //  -9  6
    80, //  -8  7
    85, //  -7  8
    90, //  -6  9
    92, //  -5  10
    94, //  -4  11
    96, //  -3  12
    98, //  -2  13
    100,    //  -1  14
    100,    //  0   15
    105,    //  1   16
    110,    //  2   17
    115,    //  3   18
    120,    //  4   19
    125,    //  5   20
    130,    //  6   21
    135,    //  7   22
    140,    //  8   23
    145,    //  9   24
    150,    //  10  25
    155,    //  11  26
    160,    //  12  27
    165,    //  13  28
    170,    //  14  29
    180,    //  15  30
};

 

 

 

 

Conclusions:
The influence of difference of level on dropping is exactly how you described.

If my level is lower than the level of the monster/stone i get a drop bonus.

if my level is equal to the level of the monster/stone i don't get a bonus and neither a malus.

if my level is higher than level of the monster i get a malus

Edited by Ikarus_ (see edit history)
  • Love 2

My youtube channel  on which you can see my works here

Link to post
  • 0
On 11/18/2020 at 1:01 AM, Ikarus_ said:

VERY BIG DISCLAIMER: I m going to show you where the level delta is applied and how they made the constants, but they are used for all monsters, and not only for Stones.

 

 

 

long answer:
 

  Hide contents

 in game/src/constants.h
 


#define PERCENT_LVDELTA(me, victim) aiPercentByDeltaLev[MINMAX(0, (victim + 15) - me, MAX_EXP_DELTA_OF_LEV - 1)]
#define PERCENT_LVDELTA_BOSS(me, victim) aiPercentByDeltaLevForBoss[MINMAX(0, (victim + 15) - me, MAX_EXP_DELTA_OF_LEV - 1)]

 

 

as you can see here is calculating a PERCENTAGE to apply to the drop chance which depend on level delta (monster level - player level)

 

These are macros which are using aiPercentByDeltaLev and aiPercentByDeltaLevForBoss and they are defined in constant.h/constant.cpp.

 

here is where is calling the macros (item_manager.cpp  ITEM_MANAGER::GetDropPct ):


	if (!pkChr->IsStone() && pkChr->GetMobRank() >= MOB_RANK_BOSS)
		iDeltaPercent = PERCENT_LVDELTA_BOSS(pkKiller->GetLevel(), pkChr->GetLevel());
	else
		iDeltaPercent = PERCENT_LVDELTA(pkKiller->GetLevel(), pkChr->GetLevel());

 

 

here is where the aiPercentByDeltaLev and aiPercentByDeltaLevForBoss are defined (i really don't like how they are defined)  from constants.cpp:


const int * aiPercentByDeltaLev = NULL;
const int * aiPercentByDeltaLevForBoss = NULL;


 

They are instanced as NULL and they get the real value on runtime by parsing the locale (from locale_service.cpp):


void LocaleService_TransferDefaultSetting()
{
	if (!check_name)
		check_name = check_name_euckr;

	if (!is_twobyte)
		is_twobyte = is_twobyte_euckr;

	if (!exp_table)
		exp_table = exp_table_common;

	if (!CTableBySkill::instance().Check())
		exit(1);

	if (!aiPercentByDeltaLevForBoss)
		aiPercentByDeltaLevForBoss = aiPercentByDeltaLevForBoss_euckr;

	if (!aiPercentByDeltaLev)
		aiPercentByDeltaLev = aiPercentByDeltaLev_euckr;

	if (!aiChainLightningCountBySkillLevel)
		aiChainLightningCountBySkillLevel = aiChainLightningCountBySkillLevel_euckr;
}

 

 

Finally we can see here that the real array const defined is aiPercentByDelta_euckr and aiPercentByDeltaLevForBoss_euckr, which are defined in constants.cpp:

 



// MIN(MAX_EXP_DELTA_OF_LEV - 1, (Àû·¾ + 15) - ³»·¾))
const int aiPercentByDeltaLevForBoss_euckr[MAX_EXP_DELTA_OF_LEV] =
{
	1,      // -15  0
	3,          // -14  1
	5,          // -13  2
	7,          // -12  3
	15,         // -11  4
	30,         // -10  5
	60,         // -9   6
	90,         // -8   7
	91,         // -7   8
	92,         // -6   9
	93,         // -5   10
	94,         // -4   11
	95,         // -3   12
	97,         // -2   13
	99,         // -1   14
	100,        // 0    15
	105,        // 1    16
	110,        // 2    17
	115,        // 3    18
	120,        // 4    19
	125,        // 5    20
	130,        // 6    21
	135,        // 7    22
	140,        // 8    23
	145,        // 9    24
	150,        // 10   25
	155,        // 11   26
	160,        // 12   27
	165,        // 13   28
	170,        // 14   29
	180         // 15   30
};



const int aiPercentByDeltaLev_euckr[MAX_EXP_DELTA_OF_LEV] =
{
	1,  //  -15 0
	5,  //  -14 1
	10, //  -13 2
	20, //  -12 3
	30, //  -11 4
	50, //  -10 5
	70, //  -9  6
	80, //  -8  7
	85, //  -7  8
	90, //  -6  9
	92, //  -5  10
	94, //  -4  11
	96, //  -3  12
	98, //  -2  13
	100,    //  -1  14
	100,    //  0   15
	105,    //  1   16
	110,    //  2   17
	115,    //  3   18
	120,    //  4   19
	125,    //  5   20
	130,    //  6   21
	135,    //  7   22
	140,    //  8   23
	145,    //  9   24
	150,    //  10  25
	155,    //  11  26
	160,    //  12  27
	165,    //  13  28
	170,    //  14  29
	180,    //  15  30
};

 

 

 

 

 

short answer:
 

  Hide contents

from constants.cpp:
 



// MIN(MAX_EXP_DELTA_OF_LEV - 1, (Àû·¾ + 15) - ³»·¾))
const int aiPercentByDeltaLevForBoss_euckr[MAX_EXP_DELTA_OF_LEV] =
{
    1,      // -15  0
    3,          // -14  1
    5,          // -13  2
    7,          // -12  3
    15,         // -11  4
    30,         // -10  5
    60,         // -9   6
    90,         // -8   7
    91,         // -7   8
    92,         // -6   9
    93,         // -5   10
    94,         // -4   11
    95,         // -3   12
    97,         // -2   13
    99,         // -1   14
    100,        // 0    15
    105,        // 1    16
    110,        // 2    17
    115,        // 3    18
    120,        // 4    19
    125,        // 5    20
    130,        // 6    21
    135,        // 7    22
    140,        // 8    23
    145,        // 9    24
    150,        // 10   25
    155,        // 11   26
    160,        // 12   27
    165,        // 13   28
    170,        // 14   29
    180         // 15   30
};

const int aiPercentByDeltaLev_euckr[MAX_EXP_DELTA_OF_LEV] =
{
    1,  //  -15 0
    5,  //  -14 1
    10, //  -13 2
    20, //  -12 3
    30, //  -11 4
    50, //  -10 5
    70, //  -9  6
    80, //  -8  7
    85, //  -7  8
    90, //  -6  9
    92, //  -5  10
    94, //  -4  11
    96, //  -3  12
    98, //  -2  13
    100,    //  -1  14
    100,    //  0   15
    105,    //  1   16
    110,    //  2   17
    115,    //  3   18
    120,    //  4   19
    125,    //  5   20
    130,    //  6   21
    135,    //  7   22
    140,    //  8   23
    145,    //  9   24
    150,    //  10  25
    155,    //  11  26
    160,    //  12  27
    165,    //  13  28
    170,    //  14  29
    180,    //  15  30
};

 

 

 

 

Conclusions:
The influence of difference of level on dropping is exactly how you described.

If my level is lower than the level of the monster/stone i get a drop bonus.

if my level is equal to the level of the monster/stone i don't get a bonus and neither a malus.

if my level is higher than level of the monster i get a malus

 

Thx you for your effort and explain, but i don`t know who the source is working , and i try to translate your description on my mind but i`m not sure .

If i put like this , the drop is equal with the mob level ?

Spoiler

    1,      // -15  15
    3,          // -14  15
    5,          // -13  15
    7,          // -12  15
    15,         // -11  15
    30,         // -10  15
    60,         // -9   15
    90,         // -8   15
    91,         // -7   15
    92,         // -6   15
    93,         // -5   15
    94,         // -4   15
    95,         // -3   15
    97,         // -2   15
    99,         // -1   15
    100,        // 0    15
    105,        // 1    15
    110,        // 2    15
    115,        // 3    15
    120,        // 4    15
    125,        // 5    15
    130,        // 6    15
    135,        // 7    15
    140,        // 8    15
    145,        // 9    15
    150,        // 10   15
    155,        // 11   15
    160,        // 12   15
    165,        // 13   15
    170,        // 14   15
    180         // 15   15

 

Link to post
  • 0

The first numbers are used when your level is 15 (or more) levels higher than monster level (the number 1 means that the basic chance is reduced by a factor 1/100 ).

The last numbers are used when your level is 15 (or more) levels lower than monster level (the number 1 means that the basic chance is increased by a factor 180/100)

the numbers in the center (100) is the neutral value (doesn't affect the basic chance to drop the item)

 

Edited by Ikarus_ (see edit history)

My youtube channel  on which you can see my works here

Link to post
Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.