Jump to content

Saruman

Members
  • Content Count

    15
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    Saruman reacted to Playtester in Status Resistance   
    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.
×
×
  • Create New...

Important Information

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