Jump to content

New group bonuses


Recommended Posts

Hi, how do I change current group bonuses for new ones?
For example, I would like the "berserker" (PARTY_ROLE_HASTE) skill instead of attack speed to be strong against monsters with values I set myself.

 

The entry for this bonus looks like this:


        case PARTY_ROLE_HASTE:
            {
                int iBonus = (int) (10+5*k);
                if (ch->GetPoint(POINT_PARTY_HASTE_BONUS) != iBonus)
                {
                    ch->PointChange(POINT_PARTY_HASTE_BONUS, iBonus - ch->GetPoint(POINT_PARTY_HASTE_BONUS));
                    ch->ComputePoints();
                }
            }
            break;

 

The attack speed bonus is calculated from this formula:

 int iBonus = (int) (10+5*k); 

 

I would like to set a fixed value for bonuses for given levels (m, g, p)


m-m10:

Attack value - 70
Strong against monsters - 5%
Max HP - 3000
Chance of Critical Hit - 15%
Monster Resistance - 2%
Casting Speed - 10%

 

g-g10 :

Attack value - 120
Strong against monsters - 10%
Max HP - 7000
Chance of Critical Hit - 25%
Monster Resistance - 5%
Casting Speed - 20%


P:

Attack value - 200
Strong against monsters - 15%
Max HP - 10000
Chance of Critical Hit - 40%
Monster Resistance - 10%
Casting Speed - 30%

 

My english is poor, so sorry for the mistakes.
Thanks in advance.

Link to comment
Share on other sites

The only variable in the formula is "k" which is the skillpower vaiable and ranges from 0.05 at level 1 to 1.25 at P. You have to ways of accomplish what you want, edit the formula to reach the cap you want at the current rate of change which implies intermediate values will follow the function. For example:

Spoiler

actual att damage formula is 10+60*k which is equal to 85, if you change it like this 10+152*k you will get 200 attack bonus at P but lower values are calculated from this one and you have no control over them: at G1 with current formula you would get k = 0.82 and bonus = 134 you can find k values either in source or when you start your server on the terminal preceded by SKILL_POWER_BY_JOB

or you can totaly remove the formula and manually enter the values from level 0 to 40 in a declared array accessible by the function

short	m_PartyAttackBonus[41] = { 1,2,3,4,5,/*YOUR 41 values here*/... };
and then change int Bonus = m_PartyAttackBous[ch->GetParty()->GetLeader()->GetSkillLevel(YOUR_LEADERSHIP_SKILL_VALUE)]
it would be better if you add a check if the party leader exists( if (ch->GetParty()->GetLeader()) ), maybe it is not needed but you would want to test it before (having two chars in group with the leader logging off while the party member is attaccking monsters so he is constantly checking for those values)
 

 

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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