Jump to content
  • 0

Pre-Renewal INT MATK calculation in Renewal Server


AnonUser

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  04/14/19
  • Last Seen:  

Hi guys, as per topic; where do I change the formula for stats calculation to be based on pre-renewal? The renewal.h only affects stat points required to increase the stats.

I want to use back the old MATK formula in a renewal based server.

Also, the item 15090 cannot be worn by Sniper class despite description stating it is allowed. What is the correct equip_jobs to fix it?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  832
  • Reputation:   317
  • Joined:  02/11/19
  • Last Seen:  

Maybe this is what you are looking for.

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  176
  • Reputation:   60
  • Joined:  01/11/19
  • Last Seen:  

in status.cpp, this is the pre-re formula for base matk :

#ifndef RENEWAL
unsigned short status_base_matk_min(const struct status_data* status) { return status->int_ + (status->int_ / 7) * (status->int_ / 7); }
unsigned short status_base_matk_max(const struct status_data* status) { return status->int_ + (status->int_ / 5) * (status->int_ / 5); }
#else

So find the renewal version of these functions in the same file and in the BL_PC and default section replace the formulas with the above ones. This way the change is limited to player characters only and won't break your monster matk stats. If you do want everyone to use pre-re including monsters, delete the entire function and remove the ifdef and else lines in the above quote to enable the old pre-re functions.

Edited by Seravy
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  04/14/19
  • Last Seen:  

Ah okay I replaced it, the min MATK works but the max MATK displays as 0.

Here's what I did though.

/*
* Calculates minimum magic attack
*/
unsigned short status_base_matk_min(struct block_list *bl, const struct status_data* status, int level)
{
    switch (bl->type) {
        case BL_PET:
        case BL_MOB:
        case BL_MER:
        case BL_ELEM:
            return status->int_ + level + status->rhw.matk * 70 / 100;
        case BL_HOM:
            return status_get_homint(bl) + level + (status_get_homint(bl) + status_get_homdex(bl)) / 5;
        case BL_PC:
        default:
        return status->int_ + (status->int_ / 7) * (status->int_ / 7);
    }
}

/*
* Calculates maximum magic attack
*/
unsigned short status_base_matk_max(struct block_list *bl, const struct status_data* status, int level)
{
    switch (bl->type) {
        case BL_PET:
        case BL_MOB:
        case BL_MER:
        case BL_ELEM:
            return status->int_ + level + status->rhw.matk * 130 / 100;
        case BL_HOM:
            return status_get_homint(bl) + level + (status_get_homluk(bl) + status_get_homint(bl) + status_get_homdex(bl)) / 3;
        case BL_PC:
        default:
        return status->int_ + (status->int_ / 5) * (status->int_ / 5);
    }
}


 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  176
  • Reputation:   60
  • Joined:  01/11/19
  • Last Seen:  

In renewal those numbers are for status and equipment Matk and not Min/Max Matk. Equipment Matk as a stat doesn't exist in pre-renewal but you are using renewal items and equipment so it does for you. Equip a weapon with an Matk bonus like any staff or wand, and you'll see that number goes there.

If you want min and max displayed, you'll have to basically replace the first number to show your Min Status Matk+Min Equip Matk and the second to show max status matk+max equip matk. clif.cpp is the file responsive for communicating with the client so if this is done on the server side at all (I have no idea), then it should be there.

Note that while renewal formulas have no min and max for status matk, equip matk does have a min and max but it's not displayed anywhere. See https://irowiki.org/wiki/MATK

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  04/14/19
  • Last Seen:  

Oh okay, let me explore around. Thanks for your advice! Much appreciated.

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