Jump to content
  • 0
Sign in to follow this  
Saruman

Status Resistance

Question

Please, I need help to set this... I've tried all I could think but I still don't understanding it...

 

Just want to give 100% resistance when the player have 400 of LUK

 

// Adjustment for the natural rate of resistance from status changes.// If 50, status defense is halved, and you need twice as much stats to block// them (eg: 200 vit to completely block stun)pc_status_def_rate: 100mob_status_def_rate: 100// Maximum resistance to status changes. (100 = 100%)// NOTE: Cards and equipment can go over this limit, so it only applies to natural resist.pc_max_status_def: 100mob_max_status_def: 100

Thankss

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

I think status resistance is depend on vit (ex : stun) and int (ex : silence).

They do not depend on luk.

 

edit :

after checking on irowiki stat calculator:

agi : affect sleep & bleeding (100 agi = 100% resist)

vit : affect poison & stun (100 vit = 100% resist)

int : affect silence (100 int = 100% resist), blind & chaos (100 int = 66% resist)

luk : affect curse (100 luk = 100% resist)

str & dex : do not affect anything

 

 

to give 100% resistance when the player have 400 of LUK (curse resist) :

 

pc_status_def_rate: 25

this will affect player only


mob_status_def_rate: 25

this will affect mobs

Edited by arisgamers

Share this post


Link to post
Share on other sites
  • 0

I think status resistance is depend on vit (ex : stun) and int (ex : silence).

They do not depend on luk.

 

edit :

after checking on irowiki stat calculator:

agi : affect sleep & bleeding (100 agi = 100% resist)

vit : affect poison & stun (100 vit = 100% resist)

int : affect silence (100 int = 100% resist), blind & chaos (100 int = 66% resist)

luk : affect curse (100 luk = 100% resist)

str & dex : do not affect anything

 

 

to give 100% resistance when the player have 400 of LUK (curse resist) :

 

pc_status_def_rate: 25

this will affect player only

 

mob_status_def_rate: 25

this will affect mobs

 

 

Didn't work :/

Edited by Saruman

Share this post


Link to post
Share on other sites
  • 0

This is a bit of a hack, but if you just want to "have inmunity to everything with 400 luk", just put type this:

if (st->luk >= 400)    sc_def = 10000;

 

If you want to have gradually resistance until 400 luk:

sc_def = st->luk * 25;

 

If you want gradually resistance until 400 luk BUT want it to complement the resistance gained from other stats (Vit, Int...)

sc_def += ((10000 - sc_def) * (st->luk * 25)) / 10000;

 

 

Where to put this? Here: https://github.com/HerculesWS/Hercules/blob/master/src/map/status.c#L6583

 

And then, recompile.

 

Note: This might affect the duration of some statuses.

Edited by csnv

Share this post


Link to post
Share on other sites
  • 0

Depends a bit on what exactly you want.

 

Status change resistances are quite complex. They work a bit like normal def as in there is a hard def (percentual reduction) and a soft def (linear reduction).

I wrote a guide about them over on RMS:

http://forum.ratemyserver.net/guides/guide-official-status-resistance-formulas-%28pre-renewal%29/

 

So, do you just want all status changes to depend only on LUK? Or get reduced by other stats? What should affect the chance? What should affect the duration? Etc.

 

You can find the relevant source code for the status changes in the link that csnv posted.

 

Basically if you want to change the basic stats a status change uses, you need to change it for each status change individually, see explanations in the comments of the source code about how sc_def, sc_def2, tick_def and tick_def2 work (10000 sc_def = 100% resistance). It's actually pretty straight forward. For example if you want each LUK to reduce chance and duration of STUN by 0.25% that code would look like this:

	case SC_STUN:		sc_def = st->luk*25;		break;
(Note: You don't need to set tick_def, it automatically uses sc_def if you don't set it.)

 

Or if you set the sc_def config to 25 instead of 100 then you would write:

	case SC_STUN:		sc_def = st->luk*100;		break;
The config option is applied at the end:
		if (battle_config.pc_sc_def_rate != 100) {			sc_def = sc_def*battle_config.pc_sc_def_rate/100;			sc_def2 = sc_def2*battle_config.pc_sc_def_rate/100;		}
If you leave the source code as it is and just set the config option to 25, then the status changes simply need 4 times higher stats than they usually need. As LUK has a very high effect on the linear reduction, you will probably be immune to any status change much earlier.

 

 

Hope it helps. If you explain in detail why you want to change it and how exactly it should work, I could probably help more.

Share this post


Link to post
Share on other sites
  • 0

 

Depends a bit on what exactly you want.

 

Status change resistances are quite complex. They work a bit like normal def as in there is a hard def (percentual reduction) and a soft def (linear reduction).

I wrote a guide about them over on RMS:

http://forum.ratemyserver.net/guides/guide-official-status-resistance-formulas-%28pre-renewal%29/

 

So, do you just want all status changes to depend only on LUK? Or get reduced by other stats? What should affect the chance? What should affect the duration? Etc.

 

You can find the relevant source code for the status changes in the link that csnv posted.

 

Basically if you want to change the basic stats a status change uses, you need to change it for each status change individually, see explanations in the comments of the source code about how sc_def, sc_def2, tick_def and tick_def2 work (10000 sc_def = 100% resistance). It's actually pretty straight forward. For example if you want each LUK to reduce chance and duration of STUN by 0.25% that code would look like this:

	case SC_STUN:		sc_def = st->luk*25;		break;
(Note: You don't need to set tick_def, it automatically uses sc_def if you don't set it.)

 

Or if you set the sc_def config to 25 instead of 100 then you would write:

	case SC_STUN:		sc_def = st->luk*100;		break;
The config option is applied at the end:
		if (battle_config.pc_sc_def_rate != 100) {			sc_def = sc_def*battle_config.pc_sc_def_rate/100;			sc_def2 = sc_def2*battle_config.pc_sc_def_rate/100;		}
If you leave the source code as it is and just set the config option to 25, then the status changes simply need 4 times higher stats than they usually need. As LUK has a very high effect on the linear reduction, you will probably be immune to any status change much earlier.

 

 

Hope it helps. If you explain in detail why you want to change it and how exactly it should work, I could probably help more.

 

 

Thanks for answering

 

I want this: 

 

200 of Vit, the player get 100% resistance of stuning

400 of Luk, the player get 100% resistance of freezing 

 

Is it right?

	case SC_FREEZE:		sc_def = st->luk*25;		sc_def = st->mdef*100;		sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);		tick_def = 0; //No duration reduction#ifdef RENEWAL		tick_def2 = status_get_luk(src) * -10; //Caster can increase final duration with luk#else		tick_def2 = 0; //No duration reduction
Edited by Saruman

Share this post


Link to post
Share on other sites
  • 0

Not quite.

 

What you want is that:

case SC_FREEZE:  sc_def = st->luk*25;  tick_def = 0; //No duration reduction  break;
And:
case SC_STUN:  sc_def = st->vit*50;  tick_def = 0; //No duration reduction  break;
You can remove all the rest of the code for those status changes.

Share this post


Link to post
Share on other sites
  • 0

 

Not quite.

 

What you want is that:

case SC_FREEZE:  sc_def = st->luk*25;  tick_def = 0; //No duration reduction  break;
And:
case SC_STUN:  sc_def = st->vit*50;  tick_def = 0; //No duration reduction  break;
You can remove all the rest of the code for those status changes.

 

thanks, i'll try it.

 

But there's no way to do this outside the source? 

Share this post


Link to post
Share on other sites
  • 0

Changing the type of stat needed itself no.

 

If you just want everything to require 4 times higher stats then you can use the solution arisgamers posted:

pc_status_def_rate: 25

mob_status_def_rate: 25

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.