Jump to content
  • 0

Change ASPD Formula to the iRO one


Tiraga

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  04/14/13
  • Last Seen:  

Hi, since i want to use a offline Server to Test some Build and Equip-Combination for the offical Server (Renewal) i play on, i would like to change the ASPD Formula to the iRO ASPD Formula but could only  find unsolved Requests of the same kind.

I know i need to make the changes in status.c and got an idea for some of it already but not so sure about other stuff and would like to ask for help.

The iRO Formula is the following:

Spoiler

ASPD Penalty = [ 1 − { Job Base ASPD − 144 } ÷ 50 ]

Note: Limit down to a maximum of 0.96. Keep 2 decimals.


ASPD Correction = [ { √( 205 ) − √( AGI ) } ÷ 7.15 ]

Note: Round up to 3 decimals. for AGI > 205 this stays 0


Equip ASPD % = [ { 195 − Base ASPD } × Total of Equip ASPD Mod ]

Note: Round down to 1 decimal.


Base ASPD = [ 200 − { 200 − ( Job Base ASPD + Shield PenaltyASPD Correction + √[ AGI × 9.999 + DEX × 0.19212 ] × Aspd Penalty ) } × { 1 − Potion ASPD ModSkill ASPD Mod } ]

Note: Round down to 2 decimal.


Final ASPD = [ Base ASPD + { Equip ASPD % } + Equip ASPD Fixed ]

I startet to change some Stuff but in the Process of it i figuered i need to unterstand more of the original rAthena Formula to make this changes

 

#ifdef RENEWAL_ASPD
    int16 skill_lv, val = 0;
    float temp_aspd = 0;

    amotion = job_info[classidx].aspd_base[sd->weapontype1]; // Single weapon    I'm no 100% sure but i think i can leave this part alone since the Job ASPD seem to be the same in iRO and kRO
    if (sd->status.shield)
        amotion += job_info[classidx].aspd_base[MAX_WEAPON_TYPE];
    else if (sd->weapontype2 && sd->equip_index[EQI_HAND_R] != sd->equip_index[EQI_HAND_L])
        amotion += job_info[classidx].aspd_base[sd->weapontype2] / 4; // Dual-wield

    switch(sd->status.weapon) {
        case W_BOW:
        case W_MUSICAL:
        case W_WHIP:
        case W_REVOLVER:
        case W_RIFLE:
        case W_GATLING:
        case W_SHOTGUN:
        case W_GRENADE:
            temp_aspd = status->dex * status->dex / 7.0f + status->agi * status->agi * 0.5f;        This part i want to change to: temp_aspd = status->dex / 0.19212f + status->agi * 9.999f;  
            break;
        default:
            temp_aspd = status->dex * status->dex / 5.0f + status->agi * status->agi * 0.5f;        This part i want to change to: temp_aspd = status->dex / 0.19212f + status->agi * 9.999f;
            break;
    }
    temp_aspd = (float)(sqrt(temp_aspd) * 0.25f) + 0xc4;                                                              Here i belive i need to change the part: * 0.25f to multiplicate with the ASPD Penalty but I'm not sure how to get the Base ASPD to calculate that and what does the + 0xc4 mean?
    if ((skill_lv = pc_checkskill(sd,SA_ADVANCEDBOOK)) > 0 && sd->status.weapon == W_BOOK)
        val += (skill_lv - 1) / 2 + 1;
    if ((skill_lv = pc_checkskill(sd,GS_SINGLEACTION)) > 0 && (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE))
        val += ((skill_lv + 1) / 2);
    amotion = ((int)(temp_aspd + ((float)(status_calc_aspd(&sd->bl, &sd->sc, true) + val) * status->agi / 200)) - min(amotion, 200));    At this point i dont know how to proceed further. I need to calculate the ASPD Correction, Equip ASPD% and Base ASPD but not exactly sure how to do it and put em together at the end.

 

Maybe someone did it already or could help me.

 

Best regards

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  115
  • Reputation:   4
  • Joined:  08/14/16
  • Last Seen:  

bump!

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  148
  • Reputation:   18
  • Joined:  03/03/19
  • Last Seen:  

ah well i dont know what you want but ill shed what light i can on you

 

// Base weapon delay
	amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
	 ? (job_info[classidx].aspd_base[sd->status.weapon]) // Single weapon
	 : (job_info[classidx].aspd_base[sd->weapontype1] + job_info[classidx].aspd_base[sd->weapontype2]) * 7 / 10; // Dual-wield

amotion = SD->STATUS.WEAPON or whatever... this will look to our character then scan our jobdb1 for our aspd to our equiped weapon

 

ok now everything above this formula is specific to aspd passives and i guess that list of weapons, not sure why but if those weapons seem off to you, go make changes there. (ah i see your trying to change those, well im not familiar with the mechanics but ill teach you how to read)

now underneath this base weapon delay we will find this

	// Percentual delay reduction from stats
	amotion -= amotion * (4 * status->agi + status->dex) / 1000;

	// Raw delay adjustment from bAspd bonus
	amotion += sd->bonus.aspd_add;

btw shield is in jobdb1.. this is where your gonna make your stat related aspd changes... as amotion is what we use to identify the base weapons aspds including shields... potions just seem to be fixed... 

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