Jump to content
  • 0

batkrate does nothing?


b1rbert

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  47
  • Reputation:   3
  • Joined:  05/04/14
  • Last Seen:  

Heya, after implementing Oliviers code for actually showing the ATK increase for ATK% I eventually figured out that "bonus bAtkRate" does nothing at all for me.

I am currently implementing randomoptions and while trying out 3 different Falchions with 3 different ATK% roll I saw that every single one of them does not change my damage on monster or players at all. no matter if its +20% or +100% ATK.
The Status Window actually updates the ATK number depending on the roll on the weapon thanks to Olivier but the actual damage dealt does not change. any reason why that is?

and yes I know that pre-renewal usually uses bAllClass to increase the damage but I actually want bAtkRate to work. Had a look at the source to see if maybe renewal only but that doesn't seem to be the case.

EDIT:

So I looked at it again and made a TEMPORARY "fix" for my problem. I might have to look at it again later to see if what I did was just a bandaid on another problem.

 

add this to battle.cpp at:

static int64 battle_calc_base_damage | at the end before return damage; is being send.

    //Finally, add baseatk
    if(flag&4)
        damage += status->matk_min;
    else
        damage += status->batk;
//added this)
    if (sd && sd->bonus.atk_rate)
        damage += damage * sd->bonus.atk_rate / 100;

    if (sd)
        battle_add_weapon_damage(sd, &damage, type);

#ifdef RENEWAL
    if (flag&1)
        damage = (damage * 14) / 10;
#endif
    return damage;
}

tested it and actually increases the damage. I'm too inexperienced with code to know if that should do the trick. If it happens to just be a % damage increase depending on the bonus% you get I might just rename the batkrate to "Final Damage +x%" and call it a day. if somebody has any other ideas I'd appreciate it

Edited by b1rbert
temp fix
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  897
  • Reputation:   248
  • Joined:  01/30/13
  • Last Seen:  

bAtkRate only works in renewal by default, it's even documented:

Quote

bonus bAtkRate,n;              ATK + n% that won't interfere with Damage modifier and SC_EDP (renewal mode only)

But your solution to make it work in pre-re seems fine to me.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  47
  • Reputation:   3
  • Joined:  05/04/14
  • Last Seen:  

58 minutes ago, Playtester said:

bAtkRate only works in renewal by default, it's even documented:

But your solution to make it work in pre-re seems fine to me.

To be fair I actually read the renewal part but thought it was meant to be for the SC_EDP part because its been around for so long. mistake on my part!

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...