Jump to content
  • 0

Earth Strain chance of success


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

 

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)

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

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;
		}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

If you would like to keep the formula but reduce the chance, then use the first code I posted.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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));
        }

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

You might need to update your rAthena to the latest version. It was changed on this commit: https://github.com/rathena/rathena/commit/f0dfdf9219f6467ceda819879b9ab0d85bcabf2e

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

14 hours ago, n0tttt said:

You might need to update your rAthena to the latest version. It was changed on this commit: https://github.com/rathena/rathena/commit/f0dfdf9219f6467ceda819879b9ab0d85bcabf2e

 

is it possible to manually update only this part?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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?
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

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

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

Just now, n0tttt said:

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

 

 

 

Ok, I just want to understand what this 40/100 means.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

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