Jump to content
  • 0

Earth Strain chance of success


Question

Posted

 

Hello friends, as the title itself says, I would like to know where I am editing the percentage of ability to remove items, the skill has 50%, I would like to know how to edit this value for 20% for example. thank you.

Skill name: Earth Strain

Skill ID:  WL_EARTHSTRAIN (2216)

15 answers to this question

Recommended Posts

  • 0
Posted

You have change the formula here in skill.cpp:

		case WL_EARTHSTRAIN: {
			int job_lv = 0;

			if (src->type == BL_PC)
				job_lv = ((TBL_PC*)src)->status.job_level;
			rate = 6 * skill_lv + job_lv / 4 + sstatus->dex / 10;
			break;
		}

It seems like you might like it to have 40% of the original chance, so you can edit it like this and test:

		case WL_EARTHSTRAIN: {
			int job_lv = 0;

			if (src->type == BL_PC)
				job_lv = ((TBL_PC*)src)->status.job_level;
			rate = (6 * skill_lv + job_lv / 4 + sstatus->dex / 10) * 40 / 100;
			break;
		}

 

  • 0
Posted (edited)
10 minutes ago, n0tttt said:

 


		case WL_EARTHSTRAIN: {
			int job_lv = 0;

			if (src->type == BL_PC)
				job_lv = ((TBL_PC*)src)->status.job_level;
			rate = (6 * skill_lv + job_lv / 4 + sstatus->dex / 10) * 40 / 100;
			break;
		}

 

rate = (6 * skill_lv + job_lv / 4 + sstatus->dex / 10) * 40 / 100;

 

Is that part of the percentage?

 

rate = (6 * skill_lv + job_lv / 4 + sstatus->dex / 10) * 20 / 100;

= 20% chance sucess?

Edited by IsabelaFernandez
  • 0
Posted (edited)

As I understand, there's no fixed formula, because it varies with the dex and job. But, if you want 20% at max lvl, just change it to:

rate = 4 * skill_lv;

if I remember correctly, the max skill lv for this skill was 5.

The part I did before was to have the 40% of the chance you said (50%). But I think I understand better now.

Edited by n0tttt
  • 0
Posted
2 minutes ago, n0tttt said:

As I understand, there's no fixed formula, because it varies with the dex and job. But, if you want 20% at max lvl, just change it to:


rate = 4 * skill_lv;

if I remember correctly, the max skill lv for this skill was 5.

The part I did before was to have the 40% of the chance you said (50%). But I think I understand better now.

 

I would like to keep the variation of dex. and chance of success edit value, but I have no idea how to make this modification

  • 0
Posted
23 hours ago, n0tttt said:

You have change the formula here in skill.cpp:


		case WL_EARTHSTRAIN: {
			int job_lv = 0;

			if (src->type == BL_PC)
				job_lv = ((TBL_PC*)src)->status.job_level;
			rate = 6 * skill_lv + job_lv / 4 + sstatus->dex / 10;
			break;
		}

It seems like you might like it to have 40% of the original chance, so you can edit it like this and test:


		case WL_EARTHSTRAIN: {
			int job_lv = 0;

			if (src->type == BL_PC)
				job_lv = ((TBL_PC*)src)->status.job_level;
			rate = (6 * skill_lv + job_lv / 4 + sstatus->dex / 10) * 40 / 100;
			break;
		}

 

My formula don't have this, just this ~~>

    case WL_EARTHSTRAIN:
        {
            uint16 i;
            const int pos[5] = { EQP_WEAPON, EQP_HELM, EQP_SHIELD, EQP_ARMOR, EQP_ACC };

            if (dmg_lv != ATK_DEF) // Only strip if we make a successful hit.
                break;
            for (i = 0; i < skill_lv; i++)
                    skill_strip_equip(src, bl, pos, 5 * skill_lv, skill_lv, skill_get_time2(skill_id, skill_lv));
        }

  • 0
Posted

Most likely, yes. Just add the green parts and remove the red ones. But there was some followup to that patch, and having rAthena updated is always the best option, so I really recommend doing it and then applying whatever your custom mods may be.

  • 0
Posted
20 hours ago, n0tttt said:

Most likely, yes. Just add the green parts and remove the red ones. But there was some followup to that patch, and having rAthena updated is always the best option, so I really recommend doing it and then applying whatever your custom mods may be.

All parties or only those involving WL_EARTHSTRAIN?
  • 0
Posted (edited)
13 minutes ago, n0tttt said:

I recommend all parts since strip chances were also changed to match how they really worked.

After that, I recommend you to apply this one which is really short: https://github.com/rathena/rathena/commit/04f127fd7ce321ebea8638c26e64ef825b9e292e

 

 

I believe I've applied all the changes manually

 

On 11/25/2018 at 4:36 PM, n0tttt said:

As I understand, there's no fixed formula, because it varies with the dex and job. But, if you want 20% at max lvl, just change it to:


rate = 4 * skill_lv;

if I remember correctly, the max skill lv for this skill was 5.

The part I did before was to have the 40% of the chance you said (50%). But I think I understand better now.

rate = (2 * skill_lv + job_lv / 4 + sstatus->dex / 10) * 40 / 100;

= 20% chance in max skill lvl 5?

or 

rate = (2 * skill_lv + job_lv / 4 + sstatus->dex / 10) * 20 / 100;

Edited by IsabelaFernandez
  • 0
Posted (edited)

If you want a static 20% at lvl 5 change it to:

Quote

rate = 4 * skill_lv;

If you want to reduce the formula to some % then use

Quote

rate = (2 * skill_lv + job_lv / 4 + sstatus->dex / 10) * efectiveness / 100; 

and it will be efectiveness% chances of the original formula.

It depends on how you want it to be.

Edited by n0tttt
  • 0
Posted

In the first post you specified it had 50% chance. We probably were reading different files, you the outdated skill.cpp and I the updated one, which includes the formula. So I interpreted as it was calculating 50% on a given context, and you wanted that context to go down to 20%, so it means you wanted 40% of the original formula, since 20 is the 40% of 50.

It was a missunderstanding.

  • Upvote 1

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.

  • Recently Browsing   0 members

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