Jump to content
  • 0
Tio Akima

attributes in old SC_ is not working

Question

Hi guys
my sv is from December 2019 and is not with the updated SC_ system ... so far so good ...

However when adding some attributes in SC_MAXIMIZEPOWER, it does not work ...

 

original code

status->set_sc( BS_MAXIMIZE          , SC_MAXIMIZEPOWER   , SI_MAXIMIZE     , SCB_REGEN ); 

 

my edit

status->set_sc( BS_MAXIMIZE          , SC_MAXIMIZEPOWER   , SI_MAXIMIZE     , SCB_REGEN|SCB_AGI|SCB_DEX|SCB_STR|SCB_INT|SCB_BATK|SCB_MATK|SCB_SPEED ); 

 

so in the status_calc_matk function I put one of the attributes to be added, increasing the magic attack according to the skill level ...

 

    if(sc->data[SC_MAXIMIZEPOWER]){    //--------------------------------------------------------------- up matak base
        skill_lv = pc->checkskill(sd,BS_MAXIMIZE);
        matk += 8 * skill_lv;
        printf("debug print ");
    }    

 

however it did not work ... the debug print is show but the magic attack is not changed ...

 

well ... it makes me think that maybe this is not the right function ...

so I tried on:
status_calc_watk
status_calc_ematk

 

So when the ability is activated, the result is the same ... my debug message is displayed, but the status is not changed ...

this is funny because I added the condition in status_calc_int to add an attribute in INT and it works perfectly.

 

    if(sc->data[SC_MAXIMIZEPOWER]){  
        skill_lv = pc->checkskill(sd,BS_MAXIMIZE);
        int_ += 2 * skill_lv;
}

 

well ... I am not able to calculate the basic attack and the magic attack ... there is something wrong with my calculation ... maybe I am doing the wrong way.

so ... how to correctly calculate the magic attack correctly? (and also the basic attack) 😵

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

may be you changing matk outside of allowed range?

see matk_min and matk_max in config directory for limits.

 

Share this post


Link to post
Share on other sites
  • 0
6 hours ago, 4144 said:

may be you changing matk outside of allowed range?

see matk_min and matk_max in config directory for limits.

 

hmmm ... So, I need my change to be within this rule defined in the return ? 

return cap_value (matk, battle_config.matk_min, battle_config.matk_max);

 

I looked in limits.conf and found these values

// magic attack limits

matk_min_limit: 0
matk_max_limit: 65535

 

do these values apply to the rule?
Actually, I didn't understand how the rule works ...
The change I make to the status_calc_matk function, can't make the matk exceed matk_max?
Can you explain me?

 

The change I made was this:

    if(sc->data[SC_MAXIMIZEPOWER]){ 
        skill_lv = pc->checkskill(sd,BS_MAXIMIZE);
        matk += 8 * skill_lv;
        printf("debug msg");
    }    

is basically this:
matk += 40;

 

but it doesn't work ... it shouldn't exceed matk_max, I think. 😵

I'm really confused ...
I'm thinking that maybe I can't change the matak, just change the value of INT (and the matak will be generated automatically)

 

I dont know...

Share this post


Link to post
Share on other sites
  • 0

configuration not in code but in configuration files

see conf/map/battle/limits.conf

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

×
×
  • Create New...

Important Information

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