Jump to content
  • 0
Sign in to follow this  
wallaby

Base Luk Immunity

Question

Hi everyone,

 

So I have this:

 

if(st->luk > 299) rate = 0;

 

which gives me status ailment immunity at a total of 300 Luk, it works. Is there a way to set it to do the same but with a BASE Luk of 100? Does this work?

 

if(bst->luk > 99) rate = 0;

 

Thanks for your time.

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

with a bit of thinking, we can find the solution. what kind of calculations are we familiar with that the source would do based off of your base stats?

 

FD7lQHU.png

 

we use our brains and remember that weight is the easiest example of this, so we search for the strength modifier in weight. as we can see, they use sd->status.str*300 to access the base str. next, we identify what is making the status effect resistance. we simply search for luk* to find this, since we know it's going to be luck multiplied by some number. in status.c, we find sc_def2 under each of the status effects by doing this search: 

 

UqzwYm4.png

 

 

i'm not sure how much sc_def2 needs to make me immune, but it's safe to assume that if we plug in 300 luk(3000) and base our multiplier off of that we should be gucci. i do some more research and see if the source already uses an example of what we need since sd isn't being used here... we know the main difference here is that it's using a . instead of a ->, but it's not exactly what we need here, so we search for st. to see if they already use a shortcut which fits our needs, and with a bit of searching we find...

 

zASMXXX.png

 

bst.luk is what you're looking for. you may either choose to substitute in each individual status effect formula the st->luk*10(3000 at 300 luk) with bst.luk*30(3000 at 100 base luk), or use it however you see best fit.

Edited by Blinzer

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.