Status Resistance

Saruman

New member
Messages
15
Points
0
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

 
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

 
Last edited by a moderator:
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 :/

 
Last edited by a moderator:
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.

 
Last edited by a moderator:
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:
Code:
		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.

 
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:
Code:
		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?

Code:
	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
 
Last edited by a moderator:
Not quite.

What you want is that:

Code:
case SC_FREEZE:  sc_def = st->luk*25;  tick_def = 0; //No duration reduction  break;
And:
Code:
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.
 
Not quite.

What you want is that:

case SC_FREEZE: sc_def = st->luk*25; tick_def = 0; //No duration reduction break;And:
Code:
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? 

 
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
 
Back
Top